]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
x86: Reject PCI config space writes to unowned devices
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 21 Jul 2014 18:37:45 +0000 (20:37 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Sat, 26 Jul 2014 11:00:12 +0000 (13:00 +0200)
Align the PIO path with MMIO accesses: We should report any write to a
non-existing or unowned device as failure than silently swallowing it.

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

index ef370f57c1f761d1ea4b38dedf84a35a4628263c..8426ad372dbba2022114c53181236be1adfc9fda 100644 (file)
@@ -87,7 +87,7 @@ static int data_port_out_handler(struct registers *guest_regs, u16 port,
        u32 reg_data;
 
        if (!device)
-               return 1;
+               return -1;
 
        reg_data = get_rax_reg(guest_regs, size);