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

Re: [PATCH v3 1/3] x86/vmx: implement VMExit based guest Bus Lock detection


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 4 Jul 2022 11:27:37 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=Uq+DUjNhHvZkSs3tU1NX+6HqejUfqZzVsyviXHcgIeo=; b=X+LQXenpeSgqc3Euhz91hJ7owRDHQZlj9XVDRA8qrAm+LLZxOZwOmmP6FlXbM/y5jKtJPP/rGnCG6F13zlYqApYWC2cZjOKf+OthYyl1qors+Zots4kDmzcXY4GB5abzf2f66kygYZdSghmuXNR01i2L8AnDUdOiLn7SAwnGLGj4e2tCnmhLJdyS7FA8LdfJk3QbpJAk5k6VcE4FSDREotJgZYCw11m7XsrgoqcPmLJN+5lpO7zW1abpGqvglO4DC1WJ1upwVFoBHbLl705gvWPHm4YGSUWlRCyMp+wkpZ5ZmOPYetmQAnpbixw0YX2nM/ACW2R+L86CrO5YHBHuBw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iNndCGeNFx5kF5PUiPnPw/z818UOQOc0yXeF0AyLBn49uaLylPLAUd96mra9jcsE/5P+7ciWVah/HYDfS6iq1jzla4TvbS7bHkldx34zIZ02AVRW5I2rSCZjIMP4IRTJJifZJFdePbiUGfexhxFLuX82+leohnUhXsvXbmkbhQac9fD0yTU68NrZGNWXt0AVZ0QUQUsbj5MBWe8Iwkp+p5m6VTeFr/vGT48L1tjzJ2FURgeD0qbLyFu8xyku6AsbPtWnYf9kdnkm7jHWhbD4vlTYd+sjslMFVJQp33mlHl9INbjtcNnS5zfagJyMVlN5ATL38aM2Q+n4qAxYuvzupA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 04 Jul 2022 09:27:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.07.2022 15:16, Roger Pau Monne wrote:
> --- a/xen/arch/x86/hvm/vmx/vmx.c
> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -4065,6 +4065,11 @@ 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) )
> +    {
> +        perfc_incr(buslock);
> +        exit_reason &= ~VMX_EXIT_REASONS_BUS_LOCK;
> +    }

To cover for the flag bit, don't you also need to mask it off in
nvmx_idtv_handling()? Or (didn't go into detail with checking whether
there aren't any counter indications) pass the exit reason there from
vmx_vmexit_handler(), instead of re-reading it from the VMCS?

Jan



 


Rackspace

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