[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v8 1/2] xen+tools: Report Interrupt Controller Virtualization capabilities on x86


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jane Malalane <Jane.Malalane@xxxxxxxxxx>
  • Date: Thu, 31 Mar 2022 10:58:39 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ax6YuIQ+H1vrl0gmBoICT37b/vsZoAfrOZoI50BgVEY=; b=gVJjGsjHeWvVbwx/jJ56QJ16xmFsZOAqaK8QdrMcjyMLpqbyRVuy6kpEGf2AGrl/xrUk0ReSWuPkoy1hMMWFFZRqUFi/7xjpoRrwFS8TLlbG3PvPN7Gw2ShyqhQIJeDRPd9/bp1Icv9XYYZfSJPSZFjztL90GJFLcNbEjTnODw7Zf4H6/Hb8MQT89z9UUWCkXdqEUNayyRFWRh9CTUvDtpcs1drOKienJ33dRLgl0uzTUoSfjhPNQi/FTm1JecJzZ3fnbT2Kd3EoYsqMP93mR0BBZ/UCBXPmGEGoVAuIv3Pyb3y+RqP99bmFEAAESqZk0Dk60TaC7oZrWrjtVwhQVw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aNv9CtVd/Md1/3VA9Td9dQC+vr8XFjlMb7p5dDQRLGkskVZkcYQaWKMnkN8HeOlyH26s6JRifR28bPIEF2ZyrIvd1KSsQJ9e6YccLFJKjsUGDdM4aFJeWYKhsjPK4dTfsXAZWSEVry6LwQiYRUW0tPuYkafKY1VsC4Jt3NQmP+GsbIydZsqViQw5bS2rMgnaieEgM3r7gkKUbRaJv2ZoB+6ydPh7wzvO281i500A6EhvVlptHiMoyfFssUvjUwaOrLTVLeIhFCLpYXRnzq89RYjFyqnbuhfrCGXP+FRfh9a1zAQ92GuE42BiDzMRZwA8dbDj/GArUXud1JtBO79Gag==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "Anthony Perard" <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Andrew Cooper" <Andrew.Cooper3@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Thu, 31 Mar 2022 10:58:54 +0000
  • Ironport-data: A9a23:AGywR6yIIFpliTSK2jJ6t+eBxirEfRIJ4+MujC+fZmUNrF6WrkUAy msXCj2EaKyJMWb2L4xwa4rloExX75eHztYwTwBvrSAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnj/0bv656yMUOZigHtIQMsadUsxKbVIiGX9JZS5LwbZj2NYz2oHhWWthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ Npl6LOcQyxuZbXwx+EBcxtDSwhzF7V00eqSSZS/mZT7I0zudnLtx7NlDV0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+7VJVoLUmyyXcX2+ks1NWZMjUO0VHAROsO0WKI+VzdMhy72ulB1b pxN4hSYeeAaGSSVPyKgzVQxexQouW6zA==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYORYstIW/2ErvFUCgC13K5YqhFqzM4H0AgAyJ4oA=
  • Thread-topic: [PATCH v8 1/2] xen+tools: Report Interrupt Controller Virtualization capabilities on x86

On 23/03/2022 11:30, Roger Pau Monné wrote:
> On Wed, Mar 16, 2022 at 09:13:14AM +0000, Jane Malalane wrote:
>> diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
>> index e1e1fa14e6..77ce0b2121 100644
>> --- a/xen/arch/x86/hvm/vmx/vmcs.c
>> +++ b/xen/arch/x86/hvm/vmx/vmcs.c
>> @@ -343,6 +343,15 @@ static int vmx_init_vmcs_config(bool bsp)
>>               MSR_IA32_VMX_PROCBASED_CTLS2, &mismatch);
>>       }
>>   
>> +    /* Check whether hardware supports accelerated xapic and x2apic. */
>> +    if ( bsp )
>> +    {
>> +        assisted_xapic_available = cpu_has_vmx_virtualize_apic_accesses;
>> +        assisted_x2apic_available = cpu_has_vmx_virtualize_x2apic_mode &&
>> +                                    (cpu_has_vmx_apic_reg_virt ||
>> +                                     cpu_has_vmx_virtual_intr_delivery);
>> +    }
> 
> I'm afraid using cpu_has_vmx_* is not correct here. The
> vmx_secondary_exec_control variable hasn't been set here, so you will
> need to move those checks to the end of the function, after
> vmx_secondary_exec_control has been set.

Sorry I missed that. As Jan previously suggested, maybe I could also 
just move this to vmx_vmcs_init() and thus drop the "if ( bsp )" ?

Thank you,

Jane.

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.