]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
configs: Remove unmoderated PCI config space access
authorJan Kiszka <jan.kiszka@siemens.com>
Wed, 16 Apr 2014 11:12:56 +0000 (13:12 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Sat, 19 Apr 2014 06:43:31 +0000 (08:43 +0200)
Drop ports 0xcf8 and 0xcfc (and even more) from the configs of QEMU,
H700, W420 and H87i. QEMU requires a proper PCI device list to allow
this.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
configs/celsius-w420.c
configs/h700-8G.c
configs/h87i.c
configs/qemu-vm.c

index a21b5d85cd700175435a2c7faf8f371229808d94..32becba01e85dea31e6acd17c5832d603ccacf75 100644 (file)
@@ -166,8 +166,8 @@ struct {
                [ 0x3e0/8 ...  0x3f7/8] = -1,
                [ 0x3f8/8 ...  0x3ff/8] = 0, /* serial 1 */
                [ 0x400/8 ...  0x47f/8] = 0, /* ACPI...? */
-               [ 0x480/8 ...  0xcf7/8] = -1,
-               [ 0xcf8/8 ... 0xffff/8] = 0, /* HACK: full PCI */
+               [ 0x480/8 ...  0xcff/8] = -1,
+               [ 0xd00/8 ... 0xffff/8] = 0, /* HACK: full PCI */
        },
 
        .pci_devices = {
index 23ec03b4355b29d45eb2ede14415ea7c2694131c..38fa6e9180878ffadf9c9ce1c822d86ce7eb958b 100644 (file)
@@ -137,8 +137,8 @@ struct {
                [ 0x3e0/8 ...  0x3f7/8] = -1,
                [ 0x3f8/8 ...  0x3ff/8] = 0, /* serial 1 */
                [ 0x400/8 ...  0x47f/8] = 0, /* ACPI...? */
-               [ 0x480/8 ...  0xcf7/8] = -1,
-               [ 0xcf8/8 ... 0xffff/8] = 0, /* HACK: full PCI */
+               [ 0x480/8 ...  0xcff/8] = -1,
+               [ 0xd00/8 ... 0xffff/8] = 0, /* HACK: full PCI */
        },
 
        .pci_devices = {
index 19675654040719311325a424cb4a3feda1cabc55..8d9bd92279a8c7dad368038bed5b46b89ef20978 100644 (file)
@@ -126,8 +126,8 @@ struct {
                [  0x80/8 ...   0x8f/8] = 0, /* dma */
                [  0x90/8 ...  0x3af/8] = -1,
                [ 0x3b0/8 ...  0x3df/8] = 0, /* VGA */
-               [ 0x3e0/8 ...  0xcf7/8] = -1,
-               [ 0xcf8/8 ... 0xffff/8] = 0, /* HACK: full PCI */
+               [ 0x3e0/8 ...  0xcff/8] = -1,
+               [ 0xd00/8 ... 0xffff/8] = 0, /* HACK: full PCI */
        },
 
        .pci_devices = {
index ffcea5d06188fc25eac9194c9e2c962f81fdc169..d1cf57e0e5369a8731bfe9eae4086f9ea8458591 100644 (file)
@@ -27,6 +27,7 @@ struct {
        __u64 ALIGN cpus[1];
        struct jailhouse_memory ALIGN mem_regions[5];
        __u8 ALIGN pio_bitmap[0x2000];
+       struct jailhouse_pci_device pci_devices[7];
 } ALIGN config = {
        .header = {
                .hypervisor_memory = {
@@ -44,7 +45,7 @@ struct {
                        .num_memory_regions = ARRAY_SIZE(config.mem_regions),
                        .num_irq_lines = 0,
                        .pio_bitmap_size = ARRAY_SIZE(config.pio_bitmap),
-                       .num_pci_devices = 0,
+                       .num_pci_devices = ARRAY_SIZE(config.pci_devices),
                },
        },
 
@@ -111,9 +112,7 @@ struct {
                [ 0x3b0/8 ...  0x3df/8] = 0, /* VGA */
                [ 0x3e0/8 ...  0x3ef/8] = -1,
                [ 0x3f0/8 ...  0x3f7/8] = 0xbf, /* ide */
-               [ 0x3f8/8 ...  0xcf7/8] = -1,
-               [ 0xcf8/8 ...  0xcff/8] = 0, /* HACK: PCI, PIIX3 RCR */
-               [ 0xd00/8 ... 0x5657/8] = -1,
+               [ 0x3f8/8 ... 0x5657/8] = -1,
                [0x5658/8 ... 0x565f/8] = 0xf0, /* vmport */
                [0x5660/8 ... 0xbfff/8] = -1,
                [0xc000/8 ... 0xc03f/8] = 0, /* e1000 */
@@ -121,4 +120,49 @@ struct {
                [0xc080/8 ... 0xc08f/8] = 0, /* piix bmdma */
                [0xc090/8 ... 0xffff/8] = -1,
        },
+
+       .pci_devices = {
+               {
+                       .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .domain = 0x0000,
+                       .bus = 0x00,
+                       .devfn = 0x00,
+               },
+               {
+                       .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .domain = 0x0000,
+                       .bus = 0x00,
+                       .devfn = 0x08,
+               },
+               {
+                       .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .domain = 0x0000,
+                       .bus = 0x00,
+                       .devfn = 0x09,
+               },
+               {
+                       .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .domain = 0x0000,
+                       .bus = 0x00,
+                       .devfn = 0x0b,
+               },
+               {
+                       .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .domain = 0x0000,
+                       .bus = 0x00,
+                       .devfn = 0x10,
+               },
+               {
+                       .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .domain = 0x0000,
+                       .bus = 0x00,
+                       .devfn = 0x18,
+               },
+               {
+                       .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .domain = 0x0000,
+                       .bus = 0x00,
+                       .devfn = 0x20,
+               },
+       },
 };