Skip to content
Browse files

Documentation: x86: test-device: document the test-device

There was no documentation so far. Let's mention it in, and add some comments to the code.

Signed-off-by: Ralf Ramsauer <>
Signed-off-by: Jan Kiszka <>
  • Loading branch information...
rralf authored and jan-kiszka committed May 7, 2019
1 parent 7fa3f90 commit fe7ec7cf9340cdc616bba017676f7a8092528a54
@@ -41,3 +41,9 @@ General configuration parameters
* configurations.
* Only available on x86. This debugging option that needs to be activated
* when running mmio-access tests.
@@ -67,6 +67,7 @@ static unsigned long testdev_get_mmio_base(struct cell *cell)
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)
return mem->virt_start + PAGE_SIZE;
@@ -29,6 +29,14 @@ static void evaluate(u64 a, u64 b, int line)

* 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);

0 comments on commit fe7ec7c

Please sign in to comment.
You can’t perform that action at this time.