From: Jim Mattson <jmattson@google.com>
To: kvm@vger.kernel.org
Cc: Jim Mattson <jmattson@google.com>
Subject: [kvm-unit-tests PATCH 1/2] x86: Skip some VMX control field tests
Date: Thu, 14 Sep 2017 16:31:46 -0700 [thread overview]
Message-ID: <20170914233149.113141-7-jmattson@google.com> (raw)
In-Reply-To: <20170914233149.113141-1-jmattson@google.com>
When the APIC virtualization address references unbacked memory, kvm
incorrectly fails a VM-entry with "invalid control field(s)." Until
this can be fixed, just skip the VMX control field tests that populate
a VMCS field with a physical address that isn't backed.
Signed-off-by: Jim Mattson <jmattson@google.com>
---
x86/vmx_tests.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 088d32aaee0b..e82bc04d72e2 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -3359,6 +3359,12 @@ static void test_vmcs_page_addr(const char *name,
bool ignored,
u64 addr)
{
+ /*
+ * Skip tests that reference unbacked memory for now, because
+ * kvm doesn't always handle this situation correctly.
+ */
+ if (addr > fwcfg_get_u64(FW_CFG_RAM_SIZE) - PAGE_SIZE)
+ return;
report_prefix_pushf("%s = %lx", name, addr);
vmcs_write(encoding, addr);
test_vmx_controls(ignored || (IS_ALIGNED(addr, PAGE_SIZE) &&
--
2.14.1.690.gbb1197296e-goog
next prev parent reply other threads:[~2017-09-14 23:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-14 23:31 [PATCH 1/3] kvm: nVMX: Remove nested_vmx_succeed after successful VM-entry Jim Mattson
2017-09-14 23:31 ` Jim Mattson
2017-09-14 23:31 ` [PATCH 2/3] kvm: vmx: Handle VMLAUNCH/VMRESUME failure properly Jim Mattson
2017-09-14 23:31 ` Jim Mattson
2017-09-14 23:31 ` [PATCH 3/3] kvm: nVMX: Handle deferred early " Jim Mattson
2017-09-14 23:31 ` Jim Mattson
2017-09-14 23:31 ` Jim Mattson [this message]
2017-09-14 23:31 ` [kvm-unit-tests PATCH 1/2] x86: Skip some VMX control field tests Jim Mattson
2017-09-15 16:40 ` Paolo Bonzini
2017-09-15 17:49 ` Jim Mattson
2017-09-17 12:28 ` Andrew Jones
2017-09-14 23:31 ` [kvm-unit-tests PATCH 2/2] x86: Add test for TPR threshold check on VM-entry Jim Mattson
2017-09-14 23:31 ` Jim Mattson
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=20170914233149.113141-7-jmattson@google.com \
--to=jmattson@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox