From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= Subject: Re: [PATCH] xen: disable reporting hw virtualized lapic availability on PVH guests Date: Wed, 4 Jun 2014 12:53:37 +0200 Message-ID: <538EFAB1.3030503@citrix.com> References: <1401876773-43100-1-git-send-email-roger.pau@citrix.com> <538F14E40200007800017B18@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Ws8pE-000245-Hd for xen-devel@lists.xenproject.org; Wed, 04 Jun 2014 10:53:44 +0000 In-Reply-To: <538F14E40200007800017B18@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@lists.xenproject.org, Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org On 04/06/14 12:45, Jan Beulich wrote: >>>> On 04.06.14 at 12:12, wrote: >> --- a/xen/arch/x86/hvm/vmx/vmx.c >> +++ b/xen/arch/x86/hvm/vmx/vmx.c >> @@ -1660,7 +1660,7 @@ void vmx_hypervisor_cpuid_leaf(uint32_t sub_idx, >> uint32_t *eax, uint32_t *ebx, >> uint32_t *ecx, uint32_t *edx) >> { >> - if ( sub_idx != 0 ) >> + if ( sub_idx != 0 || is_pvh_vcpu(current) ) >> return; >> if ( cpu_has_vmx_apic_reg_virt ) > > The addition would belong on this line imo (in the && !is_pvh form). Then I would also have to add another is_pvh gate on the next if: if ( cpu_has_vmx_virtualize_x2apic_mode && cpu_has_vmx_apic_reg_virt && cpu_has_vmx_virtual_intr_delivery && !is_pvh_vcpu(current) ) *eax |= XEN_HVM_CPUID_X2APIC_VIRT; IMHO it seems easier to gate it on the first if and just return, although I understand it is more correct to gate it on a feature by feature basis. Roger.