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

Re: [PATCH v2 1/3] x86/vmx: implement Bus Lock detection


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 7 Jun 2022 12:03:09 +0200
  • 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=hh1TNP0OG4TWHAc4H1wBDB5R+zLphn5Hzu+hEwe6Sjo=; b=dz7d+FZdvYS1p2bAYSNUka9nsTrziabi/tKVwLcMHEHTSmx379R5mta9q26hJ2tYazlOTKml/BPs8pbpEGGObZjkV2S0H5YY6Leqi2U+/jsBJF6h0IJKRy4SKWK6EXkUSf2kQyOeHGI71V+QOJdBnWySHRUIvLuGNA9bru6gMKfsEDjTVftVYl4IH5W3h8B9B5g46/HZ78nAhIY9IriVOz+W3TgmQxtJMPOi7hoFnQGIgMTpaXqiMrE2cLP4j8desjYNR2l/D8cVVZ5/n7raPPUDXT8S8vVWjyHUR+e7oF0ELRoHd5CB0vSBDXVkjeTM3OhljFDnixV/9fpa7vz9Fg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UQ3JThqEisiahtdEeYh3zttpXtQTV95dvBAT2pSP/OozZX67H8T6ckf98N3756ZalW28VgA5WEoBrba0IK1Qux+UCra7jATrl3GDP7Yij7EEK/YxTp22WjMUI+jwYtiMpDeBaCrPReKhjNp/PJw7D9Aw4Ph5yBCdJAE7kAQieH9ihKLE0y0/Rul2rPlt0Czoiwc82IiW+QKoKN1C+bLoJQ7Wxznv5bdgaAEJcs465Cc8P/eoZkW/HxKXcdC9/aFRr4P7nAlzEt+0+qQHLVdh4RMTlB5C2Wfk24MvhC8dY+HZ5FuIYdH4CmQrtVMofk8wbwcvhCZqNgxuc3b46od5dA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 07 Jun 2022 10:03:36 +0000
  • Ironport-data: A9a23:Xu0zhazYt8x8hRdlbAB6t+ctxyrEfRIJ4+MujC+fZmUNrF6WrkVRz WMZWmiHOqqKZjTyKNonat7l9xwHuJGEmoRmGwo5rSAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnj/0bv656yMUOZigHtIQMsadUsxKbVIiGX5JZS5LwbZj2NY22YfhWmthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ NplrpCQUix0Y6D2w/0TVEh4SwRvPIlvweqSSZS/mZT7I0zuVVLJmqwrJmdmeIoS96BwHH1E8 uEeJHYVdBefiumqwbW9DO5xmsAkK8qtN4Qa0p1i5WiBUbB6HtaeE+OTuoQwMDQY36iiGd7EY MUUc3x3ZQnoaBxTIFYHTpk5mY9Eg1GgKGUC+AnK/8Lb5UD8y1Z+2qSyPOOIRYyged5fuh61n kDZqjGR7hYycYb3JSC+2nCmi/LLnCj7cJkPD7D+/flv6HWR22pVDhQVXFm6pPCRi0iiVtYZI EsRkgItoLYz8gq3T9D7dxy+vHOA+BUbXrJ4DOkS+AyLjK3O7G6xFmUCCzJMdtEinMs3XiAxk E+EmcvzAj5iu6HTTmiSnop4thu3MCkRaGUENSkNSFJc58G5+d5oyBXSUtxkDai5yMXvHi39y CyLqy54gKgPickM1OOw+lWvby+Qm6UlhzUdvm3/Nl9JJCsjDGJ5T+REMWTm0Ms=
  • Ironport-hdrordr: A9a23:gixSlqmz0BGiHPpdMgIvqN11mnbpDfO/imdD5ihNYBxZY6Wkfp +V8cjzhCWftN9OYhodcLC7V5Voj0mskKKdxbNhRYtKPTOWwVdASbsP0WKM+V3d8kHFh41gPO JbAtND4b7LfCRHZKTBkW6F+r8bqbHokZxAx92uqUuFJTsaFp2IhD0JbjpzfHcGJjWvUvECZe ChD4d81nOdkTN9VLXKOlA1G8z44/HbnpPvZhALQzYh9Qm1lDutrJr3CQKR0BsyWy5Ghe5Kyx mPryXJooGY992rwB7V0GHeq7xQhdva09NGQOiBkNIcJDnAghuhIK5hR7qBljYop/zH0idjrP D85zMbe+hj4XLYeW+45TPrxgnbyT4rr0TvzFeJ6EGT1fDRdXYfMY5slIhZehzW5w4Lp9dnyp 9G2Gqfqt5+EQ7AtD6V3amGazha0m6P5VYym+8aiHJSFaEEbqVKkIAZ9ERJVL8dASPB7pw9Gu UGNrCR2B9vSyLaU5nlhBgu/DT1NU5DXStuA3Jy9/B96gIm0kyQlCAjtY4idnRpzuNJd3AL3Z WADk1SrsAxciYnV9MDOA4/e7rHNoXse2O6DIvAGyWQKEk4U0i92KLf0fES2NyAXqAu4d8bpK nhOWkox1LaPXieQ/Gz4A==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Jun 07, 2022 at 08:54:15AM +0200, Jan Beulich wrote:
> On 06.06.2022 15:27, Andrew Cooper wrote:
> > On 26/05/2022 12:11, Roger Pau Monne wrote:
> >> diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
> >> index f08a00dcbb..476ab72463 100644
> >> --- a/xen/arch/x86/hvm/vmx/vmx.c
> >> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> >> @@ -4065,6 +4065,16 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
> >>  
> >>      if ( unlikely(exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY) )
> >>          return vmx_failed_vmentry(exit_reason, regs);
> >> +    if ( unlikely(exit_reason & VMX_EXIT_REASONS_BUS_LOCK) )
> >> +    {
> >> +        /*
> >> +         * Delivery of Bus Lock VM exit was pre-empted by a higher 
> >> priority VM
> >> +         * exit.
> >> +         */
> >> +        exit_reason &= ~VMX_EXIT_REASONS_BUS_LOCK;
> >> +        if ( exit_reason != EXIT_REASON_BUS_LOCK )
> >> +            perfc_incr(buslock);
> >> +    }
> > 
> > I know this post-dates you posting v2, but given the latest update from
> > Intel, VMX_EXIT_REASONS_BUS_LOCK will be set on all exits.
> 
> Mind me asking what "latest update" you're referring to? Neither SDM nor
> ISE have seen a recent update, afaict.

After Andrew's request we got in touch with Intel regarding whether
VMX_EXIT_REASONS_BUS_LOCK is set when exit_reason ==
EXIT_REASON_BUS_LOCK, and they will update the ISE to contain:

"the bit 26 in the exit-reason field will always be set on VM exits
due to bus locks."

So I will apply the changes requested by Andrew to match this
behavior.

Thanks, Roger.



 


Rackspace

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