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

Re: [PATCH v3] x86/vlapic: call vmx_vlapic_msr_changed through an hvm_function callback


  • To: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 16 Feb 2023 13:41:39 +0000
  • 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=xullL6mmEq5Zh1V0uDrUXzaBP0z22BEXpyXiGPSkOKw=; b=BBTkPhh5hpzh0Hbcft0YG+cWBZNIaeHrORJsgpIUCaR44iXCfx1zqVIj6iATQj4Gl3Azoj34BP1EgU/Vt5Xn7x0jT/GVpM6KRmSUBR8SyXk6tnMY2tJ9iQXrmUeMbLD8jJj72Z8ocMQ5kX8rDKZ4Ol1Xw5y31SgnjTMjTTn3wtcPkj+Z1v3SM79NAwzY1PsnOhGUO8yowXSK86Bu/xbIPq7yuIQ5UieZjAN5TuGQeKZmR8uq0hpgn1HkswiagGCAqLgIUceAews1s9pcBxXZbo0orFP9hID4FbuQS3f0ypyyH+g2HmUy3nfK8HXyZPxZ/n1re9SUMPBIpnjA/cKsYw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LuKfsn9+3IphsrzVm1t4xlZQr6lD5THRNqr8cAzxjaekPNnJ2pOmcJNGKFuJ1eX5YsaIVMXhWhtw56Odx2Iw+KelInWpE21sgBFoM7svHRbAPp9x81tCaXjRdRW1WsVvpdsUrezThth9hFw1SFdKRAHsg45yDXYCiIRI9NX8uBZbeqcvnxwB4TONXGn2/JlasR3yU4XLA2H2N7XUmMhCkXJ1QFhsFef4IYGAy6eo2ifuyX0Ehg6wxsPWFwoTGvS/2kJZWkK8cmEnGunJ8+KTscTs44c9fh5u4FxQCZAUdqd+0u9/y19nPut9cLjUZeL+O4h7Npcb1G3mF2gn4JT1Dw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Thu, 16 Feb 2023 13:42:01 +0000
  • Ironport-data: A9a23:J8vxuK8PQlF66Hf+I2LEDrUDaX+TJUtcMsCJ2f8bNWPcYEJGY0x3y zEXD2yBPPmOZzamc991Pt+yoEwDvpLXnd5jTQFvqC08E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKicYXoZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ire7kIw1BjOkGlA5AdmP6kV5Aa2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDklNz sAJBBcQTyrEgvvmkKq/Rs0838k8eZyD0IM34hmMzBn/JNN/GdXvZvuP4tVVmjAtmspJAPDSI dIDbiZiZwjBZBsJPUoLDJU5n6GjgXyXnz9w8QrJ4/ZopTWDilUpidABM/KMEjCObexTklyVu STt+GPhDwtBHNee1SCE4jSngeqncSbTCd1ITuTnrqYCbFu76zFJVwEHbXKBrKf+rE2BHOttD 3ZP0397xUQ13AnxJjXnZDWyvWSWtxobV91PGsU17QiMzuzf5APxLngJSHtNZcIrsOcyRCc2z RmZktXxHzttvbaJD3WH+d+8rzm/JCwUJm8qfjIfQE0O5NyLiJ43pgLCSJBkCqHdpt/oH3f2y jODrik7jp0Si9IG0+Ow+lWvqzGhuJnPCBI07wP/X2S54wc/b4mgD7FE8nDe5PdEaYqcEF+Iu SFcn9DEtbhXS5aQiCaKXeMBWqmz4OqIOyHdhlgpGIQ98zOq+DioeoU4DCxCGXqF+/0sIVfBC HI/cysLjHOPFBNGtZNKXr8=
  • Ironport-hdrordr: A9a23:Dk7Z4aDrX5r6q8rlHemE55DYdb4zR+YMi2QD/Ep6ICYlCfBwWf re5cjztCWE8Ar5PUtLpTnuAtjkfZqxz+8W3WBVB8bAYOCEggqVxeNZnO/fKlTbckWUygce78 ddmsNFebrN5DZB/KDHCcqDf+rIAuPrzEllv4jjJr5WIz1XVw==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16/02/2023 1:36 pm, Xenia Ragiadakou wrote:
> Hi Andrew,
>
> On 2/16/23 12:28, Andrew Cooper wrote:
>> On 13/02/2023 11:50 am, Xenia Ragiadakou wrote:
>>> diff --git a/xen/arch/x86/include/asm/hvm/vmx/vmx.h
>>> b/xen/arch/x86/include/asm/hvm/vmx/vmx.h
>>> index 234da4a7f4..97d6b810ec 100644
>>> --- a/xen/arch/x86/include/asm/hvm/vmx/vmx.h
>>> +++ b/xen/arch/x86/include/asm/hvm/vmx/vmx.h
>>> @@ -85,7 +85,7 @@ typedef enum {
>>>   void vmx_asm_vmexit_handler(struct cpu_user_regs);
>>>   void vmx_intr_assist(void);
>>>   void noreturn cf_check vmx_do_resume(void);
>>> -void vmx_vlapic_msr_changed(struct vcpu *v);
>>> +void cf_check vmx_vlapic_msr_changed(struct vcpu *v);
>>
>> Hi,
>>
>> I see this patch has been committed, but this public declaration should
>> deleted, and vmx_vlapic_msr_changed() made static now that it's only
>> referenced in vmx.c.
>
> It is also used in vmcs.c

Oh, so it is.  It just doesn't show up on the patch diff.

That use likely won't survive fixing the Intel APIC-V logic, but I guess
we're stuck with it for now.

Sorry for the noise.

>
>>
>> It needs a forward declaration in vmx.c because of its position relative
>> to the vmx_function_table, but that's fine - we've got plenty of other
>> examples like this.
>>
>> Could I talk you into doing an incremental fix?
>>
>> Alternatively, we could get better cleanup by forward declaring just
>> {vmx,svm}_function_table, then moving the tables to the very bottom of
>> {vmx,svm}.c at which point we can drop all the forward declarations.
>>
>> Oh top of that, I suspect we have other public function definitions
>> which can turn static, if you happen to spot any while doing this.
>
> Sure I could try to cleanup {svm,vmx}.c and the corresponding headers.

Thankyou.

~Andrew



 


Rackspace

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