This will allow to match on the whole address to check if we are
actually targeting the MSI address space.

Signed-off-by: Jan Kiszka <[email protected]>
---
 hypervisor/arch/x86/include/asm/apic.h | 7 +++----
 hypervisor/arch/x86/pci.c              | 8 ++++----
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/hypervisor/arch/x86/include/asm/apic.h 
b/hypervisor/arch/x86/include/asm/apic.h
index cfff890..d2cd632 100644
--- a/hypervisor/arch/x86/include/asm/apic.h
+++ b/hypervisor/arch/x86/include/asm/apic.h
@@ -1,7 +1,7 @@
 /*
  * Jailhouse, a Linux-based partitioning hypervisor
  *
- * Copyright (c) Siemens AG, 2013
+ * Copyright (c) Siemens AG, 2013-2017
  *
  * Authors:
  *  Jan Kiszka <[email protected]>
@@ -103,13 +103,12 @@
 
 union x86_msi_vector {
        struct {
-               u32 unused:2,
+               u64 unused:2,
                    dest_logical:1,
                    redir_hint:1,
                    reserved1:8,
                    destination:8,
-                   address:12;
-               u32 reserved2;
+                   address:44;
                u32 vector:8,
                    delivery_mode:3,
                    reserved:21;
diff --git a/hypervisor/arch/x86/pci.c b/hypervisor/arch/x86/pci.c
index cd22742..19d0ea9 100644
--- a/hypervisor/arch/x86/pci.c
+++ b/hypervisor/arch/x86/pci.c
@@ -1,7 +1,7 @@
 /*
  * Jailhouse, a Linux-based partitioning hypervisor
  *
- * Copyright (c) Siemens AG, 2014
+ * Copyright (c) Siemens AG, 2014-2017
  *
  * Authors:
  *  Ivan Kolchin <[email protected]>
@@ -310,7 +310,7 @@ void arch_pci_suppress_msi(struct pci_device *device,
        }
 }
 
-static u32 pci_get_x86_msi_remap_address(unsigned int index)
+static u64 pci_get_x86_msi_remap_address(unsigned int index)
 {
        union x86_msi_vector msi = {
                .remap.int_index15 = index >> 15,
@@ -320,7 +320,7 @@ static u32 pci_get_x86_msi_remap_address(unsigned int index)
                .remap.address = MSI_ADDRESS_VALUE,
        };
 
-       return (u32)msi.raw.address;
+       return msi.raw.address;
 }
 
 int arch_pci_update_msi(struct pci_device *device,
@@ -358,7 +358,7 @@ int arch_pci_update_msi(struct pci_device *device,
        if (info->msi_64bits)
                pci_write_config(bdf, cap->start + 8, 0, 4);
        pci_write_config(bdf, cap->start + 4,
-                        pci_get_x86_msi_remap_address(result), 4);
+                        (u32)pci_get_x86_msi_remap_address(result), 4);
 
        return 0;
 }
-- 
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