Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934175AbdC3PGA convert rfc822-to-8bit (ORCPT ); Thu, 30 Mar 2017 11:06:00 -0400 Received: from prv-mh.provo.novell.com ([137.65.248.74]:38132 "EHLO prv-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933518AbdC3PF7 (ORCPT ); Thu, 30 Mar 2017 11:05:59 -0400 Message-Id: <58DD3AF6020000780014ABAE@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.1 Date: Thu, 30 Mar 2017 09:05:58 -0600 From: "Jan Beulich" To: "Juergen Gross" Cc: , , "Petr Tesarik" , Subject: Re: [Xen-devel] [PATCH] xen, kdump: handle pv domain in paddr_vmcoreinfo_note() References: <20170330141824.4113-1-jgross@suse.com> In-Reply-To: <20170330141824.4113-1-jgross@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 760 Lines: 23 >>> On 30.03.17 at 16:18, wrote: > @@ -2903,3 +2906,13 @@ int xen_unmap_domain_gfn_range(struct vm_area_struct *vma, > return -EINVAL; > } > EXPORT_SYMBOL_GPL(xen_unmap_domain_gfn_range); > + > +#ifdef CONFIG_KEXEC_CORE > +phys_addr_t paddr_vmcoreinfo_note(void) > +{ > + if (xen_pv_domain()) > + return virt_to_machine(&vmcoreinfo_note).maddr; > + else > + return __pa((unsigned long)(char *)&vmcoreinfo_note); I don't think you need the double cast here. This being placed in x86 code is correct only as long as the assumption is correct that no other architecture will allow for PV guests. And this being placed in Xen code is correct only as long as the assumption is true that no other hypervisors will allow for PV guests. Jan