]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
core: Don't match MMIO accesses if there is no MMCONFIG space
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 22 Jul 2014 16:53:16 +0000 (18:53 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Sat, 26 Jul 2014 11:00:12 +0000 (13:00 +0200)
Without this additional check, we will use addr >= (u64)-1 as upper
boundary if there is no MMCONFIG, which is almost always true.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/pci.c

index c9acca24a8469c30dc1904a9830b6303cfbf1b52..df8383c8419d76bdd89f55b24349cf61c4155eb8 100644 (file)
@@ -199,7 +199,7 @@ int pci_mmio_access_handler(const struct cell *cell, bool is_write,
        const struct jailhouse_pci_device *device;
        enum pci_access access;
 
-       if (addr < pci_mmcfg_addr ||
+       if (!pci_space || addr < pci_mmcfg_addr ||
            addr >= (pci_mmcfg_addr + pci_mmcfg_size - 4))
                return 0;