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@xxxxxxxxxx> --- 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