From: Jan Kiszka <[email protected]>

This ensures two things: Physical devices active prior to
CELL_SET_LOADABLE will be silenced (no more DMA) and cannot conflict
with the load operation anymore. And ivshmem devices can send the
information about the reset to their peer earlier than during a later
CELL_START-reset.

This comes at the price of resetting the devices again on CELL_START.
Could be optimized, but not worth it at this point.

Signed-off-by: Jan Kiszka <[email protected]>
---
 hypervisor/control.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hypervisor/control.c b/hypervisor/control.c
index 0290bea7..ac8e18fa 100644
--- a/hypervisor/control.c
+++ b/hypervisor/control.c
@@ -698,6 +698,8 @@ static int cell_set_loadable(struct per_cpu *cpu_data, 
unsigned long id)
        cell->comm_page.comm_region.cell_state = JAILHOUSE_CELL_SHUT_DOWN;
        cell->loadable = true;

+       pci_cell_reset(cell);
+
        /* map all loadable memory regions into the root cell */
        for_each_mem_region(mem, cell->config, n)
                if (mem->flags & JAILHOUSE_MEM_LOADABLE) {
--
2.16.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/d973f654-32ce-b98e-68a1-a851d84620f8%40web.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to