summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7fa3f90)
raw | patch | inline | side by side (parent: 7fa3f90)
author | Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de> | |
Tue, 7 May 2019 19:19:57 +0000 (21:19 +0200) | ||
committer | Jan Kiszka <jan.kiszka@siemens.com> | |
Wed, 8 May 2019 05:53:08 +0000 (07:53 +0200) |
There was no documentation so far. Let's mention it in
hypervisor-configuration.md, and add some comments to the code.
Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor-configuration.md, and add some comments to the code.
Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Documentation/hypervisor-configuration.md | patch | blob | history | |
hypervisor/arch/x86/test-device.c | patch | blob | history | |
inmates/tests/x86/mmio-access.c | patch | blob | history |
index 3e975a00476bc91c55259dcf8ba4a46429879dda..a526d0c4c22ec0888136b2c5aa90e99a1a44cc52 100644 (file)
* configurations.
*/
#define CONFIG_BARE_METAL 1
+
+ /*
+ * Only available on x86. This debugging option that needs to be activated
+ * when running mmio-access tests.
+ */
+ #define CONFIG_TEST_DEVICE 1
index cf81e92cfd9d0b2f5acfa896f0729f2b683eb0c0..d9cee8342157fc7cbb87a2b69e3094f19e95775e 100644 (file)
const struct jailhouse_memory *mem;
unsigned int n;
+ /* The mmio test page is one page after the COMM_REGION */
for_each_mem_region(mem, cell->config, n)
if (mem->flags & JAILHOUSE_MEM_COMM_REGION)
return mem->virt_start + PAGE_SIZE;
index 1c6a35b3d587890f14eb4019e9de041e50342d7d..0e6a56b1318c4d1dac7074a8e2456241868cf0df 100644 (file)
}
}
+/*
+ * mmio-access tests different memory access strategies that are intercepted by
+ * the hypervisor. Therefore, it maps a second page right behind the
+ * comm_region. Access to 0xff8-0xfff within that page will be intercepted by
+ * the hypervisor. The hypervisor will redirect the access to the comm_region.
+ * By reading back those values from the comm_region, we can verify that the
+ * access was successful.
+ */
void inmate_main(void)
{
volatile u64 *comm_page_reg = (void *)(COMM_REGION_BASE + 0xff8);