From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932895AbdCaICF (ORCPT ); Fri, 31 Mar 2017 04:02:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:37463 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932692AbdCaICC (ORCPT ); Fri, 31 Mar 2017 04:02:02 -0400 Subject: Re: [Xen-devel] [PATCH] xen, kdump: handle pv domain in paddr_vmcoreinfo_note() To: Jan Beulich References: <20170330141824.4113-1-jgross@suse.com> <58DD3AF6020000780014ABAE@suse.com> Cc: Petr Tesarik , xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com, linux-kernel@vger.kernel.org From: Juergen Gross Message-ID: <7d8457d8-22db-7d2d-f992-d59ea3493e44@suse.com> Date: Fri, 31 Mar 2017 10:01:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <58DD3AF6020000780014ABAE@suse.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/03/17 17:05, Jan Beulich wrote: >>>> 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. With virt_to_machine() defined in arch/x86/include/asm/xen/page.h I think changing any of those assumptions will require major work. Juergen