mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiaoyao Li <xiaoyao.li@intel.com>
To: Chenyi Qiang <chenyi.qiang@intel.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] KVM: nVMX: Fix nested bus lock VM exit
Date: Wed, 22 Sep 2021 10:00:27 +0800	[thread overview]
Message-ID: <dc6235ff-3d93-0a1c-a5d6-c242809de5d5@intel.com> (raw)
In-Reply-To: <20210914095041.29764-1-chenyi.qiang@intel.com>

On 9/14/2021 5:50 PM, Chenyi Qiang wrote:
> Nested bus lock VM exits are not supported yet. If L2 triggers bus lock
> VM exit, it will be directed to L1 VMM, which would cause unexpected
> behavior. Therefore, handle L2's bus lock VM exits in L0 directly.
> 
> Fixes: fe6b6bc802b4 ("KVM: VMX: Enable bus lock VM exit")
> Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>

Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>

> ---
> Change log
> v1->v2
> - Because nested bus lock VM exit is not supported and how nested
>    support would operate is uncertain. Add a brief comment to state that this
>    feature is never exposed to L1 at present. (Sean)
> - v1: https://lore.kernel.org/lkml/20210827085110.6763-1-chenyi.qiang@intel.com/
> ---
>   arch/x86/kvm/vmx/nested.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
> index bc6327950657..5646cc1e8d4c 100644
> --- a/arch/x86/kvm/vmx/nested.c
> +++ b/arch/x86/kvm/vmx/nested.c
> @@ -5873,6 +5873,12 @@ static bool nested_vmx_l0_wants_exit(struct kvm_vcpu *vcpu,
>   	case EXIT_REASON_VMFUNC:
>   		/* VM functions are emulated through L2->L0 vmexits. */
>   		return true;
> +	case EXIT_REASON_BUS_LOCK:
> +		/*
> +		 * At present, bus lock VM exit is never exposed to L1.
> +		 * Handle L2's bus locks in L0 directly.
> +		 */
> +		return true;
>   	default:
>   		break;
>   	}
> 


      parent reply	other threads:[~2021-09-22  2:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14  9:50 Chenyi Qiang
2021-09-20 14:52 ` Sean Christopherson
2021-09-22  9:57   ` Paolo Bonzini
2021-09-22  2:00 ` Xiaoyao Li [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc6235ff-3d93-0a1c-a5d6-c242809de5d5@intel.com \
    --to=xiaoyao.li@intel.com \
    --cc=chenyi.qiang@intel.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®