]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm: Ignore PCI config space accesses
authorPekka Enberg <penberg@cs.helsinki.fi>
Sun, 11 Apr 2010 12:01:02 +0000 (15:01 +0300)
committerPekka Enberg <penberg@cs.helsinki.fi>
Sun, 11 Apr 2010 12:01:02 +0000 (15:01 +0300)
Lets try to cheat a bit and just flat out ignore PCI config space accesses.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
tools/kvm/ioport.c

index a627e8c1721137e45704e04f0c3b9ddc4f56b626..8f50ffdd9cec037a2195107931c79e956e916fe7 100644 (file)
@@ -30,11 +30,21 @@ static struct ioport_operations cmos_ram_rtc_ops = {
        .io_out         = cmos_ram_rtc_io_out,
 };
 
+static bool dummy_io_in(struct kvm *self, uint16_t port, void *data, int size, uint32_t count)
+{
+       return true;
+}
+
 static bool dummy_io_out(struct kvm *self, uint16_t port, void *data, int size, uint32_t count)
 {
        return true;
 }
 
+static struct ioport_operations dummy_read_write_ioport_ops = {
+       .io_in          = dummy_io_in,
+       .io_out         = dummy_io_out,
+};
+
 static struct ioport_operations dummy_write_only_ioport_ops = {
        .io_out         = dummy_io_out,
 };
@@ -51,6 +61,11 @@ static struct ioport_operations *ioport_ops[USHRT_MAX] = {
        /* 0x00F0 - 0x00FF - Math co-processor */
        [0xF0]          = &dummy_write_only_ioport_ops,
        [0xF1]          = &dummy_write_only_ioport_ops,
+
+       /* PORT 0CF8-0CFF - PCI Configuration Mechanism 1 - Configuration Registers */
+       [0x0CF8]        = &dummy_write_only_ioport_ops,
+       [0x0CFC]        = &dummy_read_write_ioport_ops,
+       [0x0CFE]        = &dummy_read_write_ioport_ops,
 };
 
 static const char *to_direction(int direction)