In order to inject interrupts from virtual devices, we need to know the
(virtual) mapping of the VPCI host controller interrupts on the system
interrupt space. Introduce a per-cell config field that encodes this
base. It will only be used on targets without (suitable) physical MSI
support, which excludes x86.

Signed-off-by: Jan Kiszka <[email protected]>
---
 hypervisor/include/jailhouse/cell-config.h | 2 ++
 tools/jailhouse-cell-linux                 | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/hypervisor/include/jailhouse/cell-config.h 
b/hypervisor/include/jailhouse/cell-config.h
index 1f88514..4360640 100644
--- a/hypervisor/include/jailhouse/cell-config.h
+++ b/hypervisor/include/jailhouse/cell-config.h
@@ -65,6 +65,8 @@ struct jailhouse_cell_desc {
        __u32 pio_bitmap_size;
        __u32 num_pci_devices;
        __u32 num_pci_caps;
+
+       __u32 vpci_irq_base;
 } __attribute__((packed));
 
 #define JAILHOUSE_MEM_READ             0x0001
diff --git a/tools/jailhouse-cell-linux b/tools/jailhouse-cell-linux
index 5d9749b..151f3e4 100755
--- a/tools/jailhouse-cell-linux
+++ b/tools/jailhouse-cell-linux
@@ -509,7 +509,7 @@ class MemoryRegion:
 
 
 class Config:
-    _HEADER_FORMAT = '8x32s4xIIIIIIII'
+    _HEADER_FORMAT = '8x32s4xIIIIIIIII'
 
     def __init__(self, config_file):
         self.data = config_file.read()
@@ -522,7 +522,8 @@ class Config:
          self.num_irqchips,
          self.pio_bitmap_size,
          self.num_pci_devices,
-         self.num_pci_caps) = \
+         self.num_pci_caps,
+         self.vpci_irq_base) = \
             struct.unpack_from(Config._HEADER_FORMAT, self.data)
         self.name = str(name.decode())
 
-- 
2.1.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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to