From: Paolo Bonzini <pbonzini@redhat.com>
To: Wanpeng Li <wanpeng.li@linux.intel.com>
Cc: Nadav Amit <nadav.amit@gmail.com>,
rkrcmar@redhat.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/4] kvm: vmx: fix VMfailValid when write vmcs02/vmcs01
Date: Thu, 04 Dec 2014 15:28:18 +0100 [thread overview]
Message-ID: <54806F82.5090806@redhat.com> (raw)
In-Reply-To: <1417691470-5221-4-git-send-email-wanpeng.li@linux.intel.com>
On 04/12/2014 12:11, Wanpeng Li wrote:
> SDM 30.3 VMWRITE
>
> ELSIF secondary source operand does not correspond to any VMCS field
> THEN VMfailValid(VMREAD/VMWRITE from/to unsupported VMCS component);
>
> We can't suppose L1 VMM expose MPX to L2 just if L0 support MPX. There
> will be VMfailValid if L0 doesn't support MPX and L1 expose MPX to L2
> when L0 writes vmcs02/vmcs01, in addition, there is no need to read
> GUEST_BNDCFGS if L1 VMM doesn't expose it to L2. This patch fix it by
> both check L0 support xsaves and L1 expose MPX to L2.
Did you have a reproducer for this? It should not be needed, because
the bndcfgs entry/exit controls are hidden from
nested_vmx_exit_ctls_high and nested_vmx_entry_ctls_high if
!vmx_mpx_supported().
This hunk is also not correct:
> - if (vmx_mpx_supported())
> + if (vmx_mpx_supported() &&
> + (vmcs12->vm_entry_controls & VM_ENTRY_LOAD_BNDCFGS))
> vmcs12->guest_bndcfgs = vmcs_read64(GUEST_BNDCFGS);
> if (nested_cpu_has_xsaves(vmcs12))
> vmcs12->xss_exit_bitmap = vmcs_read64(XSS_EXIT_BITMAP);
because there is no "save BNDCFGS" exit control; the guest BNDCFGS is
saved unconditionally into the vmcs.
Paolo
next prev parent reply other threads:[~2014-12-04 14:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-04 11:11 [PATCH v2 1/4] kvm: vmx: add nested virtualization support for xsaves Wanpeng Li
2014-12-04 11:11 ` [PATCH v2 2/4] kvm: cpuid: fix the size of xsaves area Wanpeng Li
2014-12-04 13:14 ` Radim Krčmář
2014-12-04 15:49 ` Paolo Bonzini
2014-12-04 16:41 ` Radim Krčmář
2014-12-04 11:11 ` [PATCH v2 3/4] kvm: cpuid: fix xsave area size of XSAVEC Wanpeng Li
2014-12-04 13:19 ` Radim Krčmář
2014-12-04 11:11 ` [PATCH v2 4/4] kvm: vmx: fix VMfailValid when write vmcs02/vmcs01 Wanpeng Li
2014-12-04 14:28 ` Paolo Bonzini [this message]
2014-12-04 14:17 ` [PATCH v2 1/4] kvm: vmx: add nested virtualization support for xsaves Paolo Bonzini
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=54806F82.5090806@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nadav.amit@gmail.com \
--cc=rkrcmar@redhat.com \
--cc=wanpeng.li@linux.intel.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 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.