From: Greg Edwards <gedwards@ddn.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: <stable@vger.kernel.org>, <kai.huang@linux.intel.com>,
<pfeiner@google.com>
Subject: Re: [PATCH] kvm: vmx: ensure VMCS is current while enabling PML
Date: Tue, 22 Nov 2016 13:55:31 -0700 [thread overview]
Message-ID: <20161122205531.GB6919@psuche> (raw)
In-Reply-To: <20161122154352.25784-2-pbonzini@redhat.com>
On Tue, Nov 22, 2016 at 04:43:52PM +0100, Paolo Bonzini wrote:
> From: Peter Feiner <pfeiner@google.com>
>
> [ upstream commit 4e59516a12a6ef6dcb660cb3a3f70c64bd60cfec, for 4.1.y only ]
>
> Between loading the new VMCS and enabling PML, the CPU was unpinned.
> If the vCPU thread were migrated to another CPU in the interim (e.g.,
> due to preemption or sleeping alloc_page), then the VMWRITEs to enable
> PML would target the wrong VMCS -- or no VMCS at all:
>
> [ 2087.266950] vmwrite error: reg 200e value 3fe1d52000 (err -506126336)
> [ 2087.267062] vmwrite error: reg 812 value 1ff (err 511)
> [ 2087.267125] vmwrite error: reg 401e value 12229c00 (err 304258048)
>
> This patch ensures that the VMCS remains current while enabling PML by
> doing the VMWRITEs while the CPU is pinned. Allocation of the PML buffer
> is hoisted out of the critical section.
>
> Signed-off-by: Peter Feiner <pfeiner@google.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Greg Edwards <gedwards@ddn.com>
prev parent reply other threads:[~2016-11-22 21:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-22 15:43 [PATCH] kvm: vmx: ensure VMCS is current while enabling PML Paolo Bonzini
2016-11-22 20:55 ` Greg Edwards [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=20161122205531.GB6919@psuche \
--to=gedwards@ddn.com \
--cc=kai.huang@linux.intel.com \
--cc=pbonzini@redhat.com \
--cc=pfeiner@google.com \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox