All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH kvm-unit-tests] x86: vmx: test access to L1 MMIO-mapped device via EPT page tables
@ 2014-08-21 11:14 Paolo Bonzini
  0 siblings, 0 replies; only message in thread
From: Paolo Bonzini @ 2014-08-21 11:14 UTC (permalink / raw)
  To: kvm

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 x86/vmx_tests.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 7594c03..5afc7e1 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -1036,6 +1036,8 @@ static int setup_ept()
 	return 0;
 }
 
+static int apic_version;
+
 static int ept_init()
 {
 	unsigned long base_addr1, base_addr2;
@@ -1071,6 +1073,8 @@ static int ept_init()
 			EPT_WA | EPT_RA | EPT_EA);
 	install_ept(pml4, (unsigned long)data_page1, (unsigned long)data_page2,
 			EPT_RA | EPT_WA | EPT_EA);
+
+	apic_version = *((u32 *)0xfee00030);
 	return VMX_TEST_START;
 }
 
@@ -1124,6 +1128,10 @@ t1:
 		report("EPT violation - paging structure", 1);
 	else
 		report("EPT violation - paging structure", 0);
+
+	// Test EPT access to L1 MMIO
+	vmx_set_test_stage(6);
+	report("EPT - MMIO access", *((u32 *)0xfee00030) == apic_version);
 }
 
 static int ept_exit_handler()
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-21 11:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-21 11:14 [PATCH kvm-unit-tests] x86: vmx: test access to L1 MMIO-mapped device via EPT page tables Paolo Bonzini

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.