From: Jan Kiszka <[email protected]>

We usually expect our virtual PCI controller to take domain 1 on
platforms that already have physical (but unvirtualizable) PCI host. If
we leave the domain at 0, we may accidentally unplug a real device from
the real host on shutdown. And if the virtual bridge should actually be
at domain 0, we will still unplug the device when we remove its host
controller's device tree overlay fragment.

Signed-off-by: Jan Kiszka <[email protected]>
---
 configs/arm/jetson-tk1.c      | 3 ++-
 configs/arm64/espressobin.c   | 3 ++-
 configs/arm64/hikey.c         | 3 ++-
 configs/arm64/jetson-tx1.c    | 3 ++-
 configs/arm64/qemu-arm64.c    | 3 ++-
 configs/arm64/zynqmp-zcu102.c | 6 ++++--
 6 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/configs/arm/jetson-tk1.c b/configs/arm/jetson-tk1.c
index cafa434e3..cc781ea8e 100644
--- a/configs/arm/jetson-tk1.c
+++ b/configs/arm/jetson-tk1.c
@@ -254,8 +254,9 @@ struct {
        },
 
        .pci_devices = {
-               /* 00:00.0 */ {
+               /* 0001:00:00.0 */ {
                        .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
+                       .domain = 1,
                        .bdf = 0x00,
                        .bar_mask = {
                                0xffffff00, 0xffffffff, 0x00000000,
diff --git a/configs/arm64/espressobin.c b/configs/arm64/espressobin.c
index 291644be1..83a6fee5b 100644
--- a/configs/arm64/espressobin.c
+++ b/configs/arm64/espressobin.c
@@ -110,8 +110,9 @@ struct {
        },
 
        .pci_devices = {
-               /* 00:00.0 */ {
+               /* 0001:00:00.0 */ {
                        .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
+                       .domain = 1,
                        .bdf = 0 << 3,
                        .bar_mask = {
                                0xffffff00, 0xffffffff, 0x00000000,
diff --git a/configs/arm64/hikey.c b/configs/arm64/hikey.c
index a31a00a44..86d677bd9 100644
--- a/configs/arm64/hikey.c
+++ b/configs/arm64/hikey.c
@@ -117,8 +117,9 @@ struct {
        },
 
        .pci_devices = {
-               /* 00:00.0 */ {
+               /* 0001:00:00.0 */ {
                        .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
+                       .domain = 1,
                        .bdf = 0x00,
                        .bar_mask = {
                                0xffffff00, 0xffffffff, 0x00000000,
diff --git a/configs/arm64/jetson-tx1.c b/configs/arm64/jetson-tx1.c
index 2a70196dd..a33fb9caf 100644
--- a/configs/arm64/jetson-tx1.c
+++ b/configs/arm64/jetson-tx1.c
@@ -394,8 +394,9 @@ struct {
        },
 
        .pci_devices = {
-               /* 00:00.0 */ {
+               /* 0001:00:00.0 */ {
                        .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
+                       .domain = 1,
                        .bdf = 0x00,
                        .bar_mask = {
                                0xffffff00, 0xffffffff, 0x00000000,
diff --git a/configs/arm64/qemu-arm64.c b/configs/arm64/qemu-arm64.c
index 2646e7a66..295a156ea 100644
--- a/configs/arm64/qemu-arm64.c
+++ b/configs/arm64/qemu-arm64.c
@@ -103,8 +103,9 @@ struct {
        },
 
        .pci_devices = {
-               /* 00:00.0 */ {
+               /* 0001:00:00.0 */ {
                        .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
+                       .domain = 1,
                        .bdf = 0 << 3,
                        .bar_mask = {
                                0xffffff00, 0xffffffff, 0x00000000,
diff --git a/configs/arm64/zynqmp-zcu102.c b/configs/arm64/zynqmp-zcu102.c
index 842eafdfa..9c7d49e21 100644
--- a/configs/arm64/zynqmp-zcu102.c
+++ b/configs/arm64/zynqmp-zcu102.c
@@ -118,8 +118,9 @@ struct {
        },
 
        .pci_devices = {
-               /* 00:00.0 */ {
+               /* 0001:00:00.0 */ {
                        .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
+                       .domain = 1,
                        .bdf = 0 << 3,
                        .bar_mask = {
                                0xffffff00, 0xffffffff, 0x00000000,
@@ -128,8 +129,9 @@ struct {
                        .shmem_region = 3,
                        .shmem_protocol = JAILHOUSE_SHMEM_PROTO_VETH,
                },
-               /* 00:00.0 */ {
+               /* 0001:00:00.0 */ {
                        .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
+                       .domain = 1,
                        .bdf = 1 << 3,
                        .bar_mask = {
                                0xffffff00, 0xffffffff, 0x00000000,
-- 
2.13.6

-- 
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