From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Mattson Subject: [kvm-unit-tests PATCH 1/2] x86: Skip some VMX control field tests Date: Thu, 14 Sep 2017 16:31:46 -0700 Message-ID: <20170914233149.113141-7-jmattson@google.com> References: <20170914233149.113141-1-jmattson@google.com> Cc: Jim Mattson To: kvm@vger.kernel.org Return-path: Received: from mail-pf0-f176.google.com ([209.85.192.176]:53719 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751583AbdINXdX (ORCPT ); Thu, 14 Sep 2017 19:33:23 -0400 Received: by mail-pf0-f176.google.com with SMTP id x78so473208pff.10 for ; Thu, 14 Sep 2017 16:33:22 -0700 (PDT) In-Reply-To: <20170914233149.113141-1-jmattson@google.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 --- 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