All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Wincy Van <fanwenyi0529@gmail.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: Handle pml in nested vmx
Date: Tue, 2 May 2017 15:04:47 +0200	[thread overview]
Message-ID: <969292a4-31a2-3cae-d30f-595e7b40e5a8@redhat.com> (raw)
In-Reply-To: <CACzj_yWd7Cusg6QmKn7roxMNgiip1U4s5EmoKTqzpkHYVH5CXw@mail.gmail.com>



On 02/05/2017 13:43, Wincy Van wrote:
> I find that L2 can't boot in the kvm queue branch.
> L0 KVM will inject a nested vmx exit reason 62 (EXIT_REASON_PML_FULL)
> to L1, if L1 can't handle this exit reason, it will report a hardware error.
> 
> According to my test, both RHEL 6.x (kernel 2.6.32) and VirtualBox for Windows
> will be affected by this bug.
> 
> Here is my workaround:
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 379087a..72784ac 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -8135,6 +8135,8 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
>                  * the XSS exit bitmap in vmcs12.
>                  */
>                 return nested_cpu_has2(vmcs12, SECONDARY_EXEC_XSAVES);
> +       case EXIT_REASON_PML_FULL:
> +               return false;
>         case EXIT_REASON_PREEMPTION_TIMER:
>                 return false;
>         default:
> 
> 
> If this patch applied, the bug seems to be fixed, but I can't ensure
> that L0's pml is working properly in this scene.
> 
> Is this patch doing the right thing (without implement nested pml)?

Yes, the patch has been posted already (and will be in 4.12) as "[PATCH]
KVM: nVMX: do not leak PML full vmexit to L1"

Thanks,

Paolo

  reply	other threads:[~2017-05-02 13:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-02 11:43 Handle pml in nested vmx Wincy Van
2017-05-02 13:04 ` Paolo Bonzini [this message]
2017-05-03  1:53   ` Wincy Van

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=969292a4-31a2-3cae-d30f-595e7b40e5a8@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=fanwenyi0529@gmail.com \
    --cc=kvm@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.