From: Jan Kiszka <[email protected]> Will be needed to avoid injecting interrupts from masked vectors.
Signed-off-by: Jan Kiszka <[email protected]> --- include/jailhouse/cell-config.h | 3 ++- pyjailhouse/sysfs_parser.py | 2 ++ tools/root-cell-config.c.tmpl | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/jailhouse/cell-config.h b/include/jailhouse/cell-config.h index 5739f332..76c9e56f 100644 --- a/include/jailhouse/cell-config.h +++ b/include/jailhouse/cell-config.h @@ -168,7 +168,8 @@ struct jailhouse_pci_device { __u16 caps_start; __u16 num_caps; __u8 num_msi_vectors; - __u8 msi_64bits; + __u8 msi_64bits:1; + __u8 msi_maskable:1; __u16 num_msix_vectors; __u16 msix_region_size; __u64 msix_address; diff --git a/pyjailhouse/sysfs_parser.py b/pyjailhouse/sysfs_parser.py index 3db61980..9555d07e 100644 --- a/pyjailhouse/sysfs_parser.py +++ b/pyjailhouse/sysfs_parser.py @@ -682,6 +682,7 @@ class PCIDevice: self.num_caps = len(caps) self.num_msi_vectors = 0 self.msi_64bits = 0 + self.msi_maskable = 0 self.num_msix_vectors = 0 self.msix_region_size = 0 self.msix_address = 0 @@ -691,6 +692,7 @@ class PCIDevice: if c.id == PCI_CAP_ID.MSI: self.num_msi_vectors = 1 << ((msg_ctrl >> 1) & 0x7) self.msi_64bits = (msg_ctrl >> 7) & 1 + self.msi_maskable = (msg_ctrl >> 8) & 1 else: # MSI-X if c.msix_address != 0: vectors = (msg_ctrl & 0x7ff) + 1 diff --git a/tools/root-cell-config.c.tmpl b/tools/root-cell-config.c.tmpl index b6ac8637..81d3a92b 100644 --- a/tools/root-cell-config.c.tmpl +++ b/tools/root-cell-config.c.tmpl @@ -183,6 +183,7 @@ struct { .num_caps = ${d.num_caps}, .num_msi_vectors = ${d.num_msi_vectors}, .msi_64bits = ${d.msi_64bits}, + .msi_maskable = ${d.msi_maskable}, .num_msix_vectors = ${d.num_msix_vectors}, .msix_region_size = ${hex(d.msix_region_size)}, .msix_address = ${hex(d.msix_address).strip('L')}, -- 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/ac81edf1aa7ed9f58e4ee5a5e1dca8ea00762143.1561357723.git.jan.kiszka%40siemens.com. For more options, visit https://groups.google.com/d/optout.
