From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 1/3] x86: tolerate running on EFI runtime services page tables in map_domain_page() Date: Fri, 24 Oct 2014 10:52:01 +0100 Message-ID: <544A2141.7020805@citrix.com> References: <54492111020000780004175B@mail.emea.novell.com> <5449226E020000780004176D@mail.emea.novell.com> <5449093F.6080500@citrix.com> <54493870020000780004186A@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XhbXS-0001Ki-4d for xen-devel@lists.xenproject.org; Fri, 24 Oct 2014 09:52:06 +0000 In-Reply-To: <54493870020000780004186A@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 23/10/14 16:18, Jan Beulich wrote: >>>> On 23.10.14 at 15:57, wrote: >> On 23/10/14 14:44, Jan Beulich wrote: >>> --- a/xen/arch/x86/domain_page.c >>> +++ b/xen/arch/x86/domain_page.c >>> @@ -7,6 +7,7 @@ >>> */ >>> >>> #include >>> +#include >>> #include >>> #include >>> #include >>> @@ -37,11 +38,14 @@ static inline struct vcpu *mapcache_curr >>> */ >>> if ( unlikely(pagetable_is_null(v->arch.guest_table)) && is_pv_vcpu(v) ) >>> { >>> + unsigned long cr3; >>> + >> This will need an __maybe_unused to compile in a non-debug build. > Definitely not (and I actually build tested it also for that case). > ASSERT() had got changed a (long) while ago to specifically allow > for such cases. > >>> --- a/xen/arch/x86/efi/stub.c >>> +++ b/xen/arch/x86/efi/stub.c >>> @@ -9,6 +9,12 @@ const bool_t efi_enabled = 0; >>> >>> void __init efi_init_memory(void) { } >>> >>> +paddr_t efi_rs_page_table(void) >>> +{ >>> + BUG(); >>> + return 0; >> Is the return strictly needed? The __builtin_unreachable() in BUG() >> should prevent the compiler from complaining. > It's not strictly needed, but is in line with the immediately following > function. > > Jan > Ok. Reviewed-by: Andrew Cooper