From: Jan Kiszka <[email protected]>

Signed-off-by: Jan Kiszka <[email protected]>
---
 configs/x86/apic-demo.c      | 10 ++++++----
 configs/x86/e1000-demo.c     | 10 ++++++----
 configs/x86/f2a88xm-hd3.c    | 19 +++++++++++++++----
 configs/x86/imb-a180.c       | 19 +++++++++++++++----
 configs/x86/ioapic-demo.c    | 10 ++++++----
 configs/x86/ivshmem-demo.c   | 10 ++++++----
 configs/x86/linux-x86-demo.c | 13 +++++++++----
 configs/x86/pci-demo.c       | 10 ++++++----
 configs/x86/qemu-x86.c       | 19 +++++++++++++++----
 configs/x86/smp-demo.c       | 16 ++++++++++++----
 configs/x86/tiny-demo.c      | 10 ++++++----
 11 files changed, 102 insertions(+), 44 deletions(-)

diff --git a/configs/x86/apic-demo.c b/configs/x86/apic-demo.c
index d014f267..5d6666a2 100644
--- a/configs/x86/apic-demo.c
+++ b/configs/x86/apic-demo.c
@@ -3,7 +3,7 @@
  *
  * Minimal configuration for demo inmates, 1 CPU, 1 MB RAM, 1 serial port
  *
- * Copyright (c) Siemens AG, 2013
+ * Copyright (c) Siemens AG, 2013-2022
  *
  * Authors:
  *  Jan Kiszka <[email protected]>
@@ -17,7 +17,7 @@
 
 struct {
        struct jailhouse_cell_desc cell;
-       __u64 cpus[1];
+       struct jailhouse_cpu cpus[1];
        struct jailhouse_memory mem_regions[2];
        struct jailhouse_cache cache_regions[1];
        struct jailhouse_pio pio_regions[3];
@@ -28,7 +28,7 @@ struct {
                .name = "apic-demo",
                .flags = JAILHOUSE_CELL_VIRTUAL_CONSOLE_PERMITTED,
 
-               .cpu_set_size = sizeof(config.cpus),
+               .num_cpus = ARRAY_SIZE(config.cpus),
                .num_memory_regions = ARRAY_SIZE(config.mem_regions),
                .num_cache_regions = ARRAY_SIZE(config.cache_regions),
                .num_irqchips = 0,
@@ -43,7 +43,9 @@ struct {
        },
 
        .cpus = {
-               0x8,
+               {
+                       .phys_id = 3,
+               },
        },
 
        .mem_regions = {
diff --git a/configs/x86/e1000-demo.c b/configs/x86/e1000-demo.c
index 8ae31220..99db56b8 100644
--- a/configs/x86/e1000-demo.c
+++ b/configs/x86/e1000-demo.c
@@ -4,7 +4,7 @@
  * Minimal configuration for PCI demo inmate:
  * 1 CPU, 1 MB RAM, 1 serial port, 1 Intel HDA PCI device
  *
- * Copyright (c) Siemens AG, 2014
+ * Copyright (c) Siemens AG, 2014-2022
  *
  * Authors:
  *  Jan Kiszka <[email protected]>
@@ -18,7 +18,7 @@
 
 struct {
        struct jailhouse_cell_desc cell;
-       __u64 cpus[1];
+       struct jailhouse_cpu cpus[1];
        struct jailhouse_memory mem_regions[3];
        struct jailhouse_pio pio_regions[4];
        struct jailhouse_pci_device pci_devices[1];
@@ -31,7 +31,7 @@ struct {
                .flags = JAILHOUSE_CELL_PASSIVE_COMMREG |
                        JAILHOUSE_CELL_VIRTUAL_CONSOLE_PERMITTED,
 
-               .cpu_set_size = sizeof(config.cpus),
+               .num_cpus = ARRAY_SIZE(config.cpus),
                .num_memory_regions = ARRAY_SIZE(config.mem_regions),
                .num_irqchips = 0,
                .num_pio_regions = ARRAY_SIZE(config.pio_regions),
@@ -46,7 +46,9 @@ struct {
        },
 
        .cpus = {
-               0x4,
+               {
+                       .phys_id = 2,
+               },
        },
 
        .mem_regions = {
diff --git a/configs/x86/f2a88xm-hd3.c b/configs/x86/f2a88xm-hd3.c
index b529e6a6..d44897fa 100644
--- a/configs/x86/f2a88xm-hd3.c
+++ b/configs/x86/f2a88xm-hd3.c
@@ -4,7 +4,7 @@
  * Configuration for Gigabyte Technology Co., Ltd. GA-F2A88XM-HD3 Rev. 3.0
  * board with AMD A10-7800 APU and 1G RAM.
  *
- * Copyright (c) Siemens AG, 2014
+ * Copyright (c) Siemens AG, 2014-2022
  * Copyright (c) Valentine Sinitsyn, 2014
  *
  * This work is licensed under the terms of the GNU GPL, version 2.  See
@@ -22,7 +22,7 @@
 
 struct {
        struct jailhouse_system header;
-       __u64 cpus[1];
+       struct jailhouse_cpu cpus[4];
        struct jailhouse_memory mem_regions[35];
        struct jailhouse_irqchip irqchips[2];
        struct jailhouse_pio pio_regions[8];
@@ -63,7 +63,7 @@ struct {
                },
                .root_cell = {
                        .name = "F2A88XM-HD3",
-                       .cpu_set_size = sizeof(config.cpus),
+                       .num_cpus = ARRAY_SIZE(config.cpus),
                        .num_memory_regions = ARRAY_SIZE(config.mem_regions),
                        .num_irqchips = ARRAY_SIZE(config.irqchips),
                        .num_pio_regions = ARRAY_SIZE(config.pio_regions),
@@ -73,7 +73,18 @@ struct {
        },
 
        .cpus = {
-               0x000000000000000f,
+               {
+                       .phys_id = 0,
+               },
+               {
+                       .phys_id = 1,
+               },
+               {
+                       .phys_id = 2,
+               },
+               {
+                       .phys_id = 3,
+               },
        },
 
        .mem_regions = {
diff --git a/configs/x86/imb-a180.c b/configs/x86/imb-a180.c
index 05f7279a..ce1b9179 100644
--- a/configs/x86/imb-a180.c
+++ b/configs/x86/imb-a180.c
@@ -4,7 +4,7 @@
  * Configuration for ASRock IMB-A180 G-Series (4G RAM) board
  * created with 'jailhouse config create imb-a180.c'
  *
- * Copyright (c) Siemens AG, 2014
+ * Copyright (c) Siemens AG, 2014-2022
  * Copyright (c) Valentine Sinitsyn, 2014
  *
  * This work is licensed under the terms of the GNU GPL, version 2.  See
@@ -21,7 +21,7 @@
 
 struct {
        struct jailhouse_system header;
-       __u64 cpus[1];
+       struct jailhouse_cpu cpus[4];
        struct jailhouse_memory mem_regions[42];
        struct jailhouse_irqchip irqchips[1];
        struct jailhouse_pio pio_regions[8];
@@ -51,7 +51,7 @@ struct {
                },
                .root_cell = {
                        .name = "IMB-A180",
-                       .cpu_set_size = sizeof(config.cpus),
+                       .num_cpus = ARRAY_SIZE(config.cpus),
                        .num_memory_regions = ARRAY_SIZE(config.mem_regions),
                        .num_irqchips = ARRAY_SIZE(config.irqchips),
                        .num_pio_regions = ARRAY_SIZE(config.pio_regions),
@@ -61,7 +61,18 @@ struct {
        },
 
        .cpus = {
-               0x000000000000000f,
+               {
+                       .phys_id = 0,
+               },
+               {
+                       .phys_id = 1,
+               },
+               {
+                       .phys_id = 2,
+               },
+               {
+                       .phys_id = 3,
+               },
        },
 
        .mem_regions = {
diff --git a/configs/x86/ioapic-demo.c b/configs/x86/ioapic-demo.c
index 863b3ea7..a964823f 100644
--- a/configs/x86/ioapic-demo.c
+++ b/configs/x86/ioapic-demo.c
@@ -4,7 +4,7 @@
  * Minimal configuration for IOAPIC demo inmate:
  * 1 CPU, 1 MB RAM, serial ports, 1 ACPI IRQ pin
  *
- * Copyright (c) Siemens AG, 2014
+ * Copyright (c) Siemens AG, 2014-2022
  *
  * Authors:
  *  Jan Kiszka <[email protected]>
@@ -18,7 +18,7 @@
 
 struct {
        struct jailhouse_cell_desc cell;
-       __u64 cpus[1];
+       struct jailhouse_cpu cpus[1];
        struct jailhouse_memory mem_regions[2];
        struct jailhouse_irqchip irqchips[1];
        struct jailhouse_pio pio_regions[5];
@@ -30,7 +30,7 @@ struct {
                .flags = JAILHOUSE_CELL_PASSIVE_COMMREG |
                        JAILHOUSE_CELL_VIRTUAL_CONSOLE_PERMITTED,
 
-               .cpu_set_size = sizeof(config.cpus),
+               .num_cpus = ARRAY_SIZE(config.cpus),
                .num_memory_regions = ARRAY_SIZE(config.mem_regions),
                .num_irqchips = ARRAY_SIZE(config.irqchips),
                .num_pio_regions = ARRAY_SIZE(config.pio_regions),
@@ -44,7 +44,9 @@ struct {
        },
 
        .cpus = {
-               0x4,
+               {
+                       .phys_id = 2,
+               },
        },
 
        .mem_regions = {
diff --git a/configs/x86/ivshmem-demo.c b/configs/x86/ivshmem-demo.c
index ce05b6b5..0c0a2377 100644
--- a/configs/x86/ivshmem-demo.c
+++ b/configs/x86/ivshmem-demo.c
@@ -4,7 +4,7 @@
  * Minimal configuration for ivshmem inmate demo:
  * 1 CPU, 1MB RAM, serial ports, 4K shmem
  *
- * Copyright (c) Siemens AG, 2013, 2014
+ * Copyright (c) Siemens AG, 2013-2022
  *
  * Authors:
  *  Henning Schild <[email protected]>
@@ -18,7 +18,7 @@
 
 struct {
        struct jailhouse_cell_desc cell;
-       __u64 cpus[1];
+       struct jailhouse_cpu cpus[1];
        struct jailhouse_memory mem_regions[7];
        struct jailhouse_pio pio_regions[2];
        struct jailhouse_pci_device pci_devices[1];
@@ -31,7 +31,7 @@ struct {
                .flags = JAILHOUSE_CELL_PASSIVE_COMMREG |
                        JAILHOUSE_CELL_VIRTUAL_CONSOLE_PERMITTED,
 
-               .cpu_set_size = sizeof(config.cpus),
+               .num_cpus = ARRAY_SIZE(config.cpus),
                .num_memory_regions = ARRAY_SIZE(config.mem_regions),
                .num_irqchips = 0,
                .num_pio_regions = ARRAY_SIZE(config.pio_regions),
@@ -46,7 +46,9 @@ struct {
        },
 
        .cpus = {
-               0b0010,
+               {
+                       .phys_id = 1,
+               },
        },
 
        .mem_regions = {
diff --git a/configs/x86/linux-x86-demo.c b/configs/x86/linux-x86-demo.c
index 47cb6517..4b22a257 100644
--- a/configs/x86/linux-x86-demo.c
+++ b/configs/x86/linux-x86-demo.c
@@ -3,7 +3,7 @@
  *
  * Configuration for Linux inmate, 1 CPU, 74 MB RAM, ~1MB shmem, serial ports
  *
- * Copyright (c) Siemens AG, 2013-2015
+ * Copyright (c) Siemens AG, 2013-2022
  *
  * Authors:
  *  Jan Kiszka <[email protected]>
@@ -17,7 +17,7 @@
 
 struct {
        struct jailhouse_cell_desc cell;
-       __u64 cpus[1];
+       struct jailhouse_cpu cpus[2];
 #ifdef CONFIG_QEMU_E1000E_ASSIGNMENT
        struct jailhouse_memory mem_regions[24];
 #else
@@ -40,7 +40,7 @@ struct {
                .flags = JAILHOUSE_CELL_PASSIVE_COMMREG |
                         JAILHOUSE_CELL_VIRTUAL_CONSOLE_PERMITTED,
 
-               .cpu_set_size = sizeof(config.cpus),
+               .num_cpus = ARRAY_SIZE(config.cpus),
                .num_memory_regions = ARRAY_SIZE(config.mem_regions),
                .num_cache_regions = ARRAY_SIZE(config.cache_regions),
                .num_irqchips = ARRAY_SIZE(config.irqchips),
@@ -50,7 +50,12 @@ struct {
        },
 
        .cpus = {
-               0b1100,
+               {
+                       .phys_id = 2,
+               },
+               {
+                       .phys_id = 3,
+               },
        },
 
        .mem_regions = {
diff --git a/configs/x86/pci-demo.c b/configs/x86/pci-demo.c
index a4115744..8bfb00e6 100644
--- a/configs/x86/pci-demo.c
+++ b/configs/x86/pci-demo.c
@@ -4,7 +4,7 @@
  * Minimal configuration for PCI demo inmate:
  * 1 CPU, 1 MB RAM, serial ports, 1 Intel HDA PCI device
  *
- * Copyright (c) Siemens AG, 2014
+ * Copyright (c) Siemens AG, 2014-2022
  *
  * Authors:
  *  Jan Kiszka <[email protected]>
@@ -18,7 +18,7 @@
 
 struct {
        struct jailhouse_cell_desc cell;
-       __u64 cpus[1];
+       struct jailhouse_cpu cpus[1];
        struct jailhouse_memory mem_regions[3];
        struct jailhouse_pio pio_regions[3];
        struct jailhouse_pci_device pci_devices[1];
@@ -31,7 +31,7 @@ struct {
                .flags = JAILHOUSE_CELL_PASSIVE_COMMREG |
                        JAILHOUSE_CELL_VIRTUAL_CONSOLE_PERMITTED,
 
-               .cpu_set_size = sizeof(config.cpus),
+               .num_cpus = ARRAY_SIZE(config.cpus),
                .num_memory_regions = ARRAY_SIZE(config.mem_regions),
                .num_irqchips = 0,
                .num_pio_regions = ARRAY_SIZE(config.pio_regions),
@@ -46,7 +46,9 @@ struct {
        },
 
        .cpus = {
-               0x4,
+               {
+                       .phys_id = 2,
+               },
        },
 
        .mem_regions = {
diff --git a/configs/x86/qemu-x86.c b/configs/x86/qemu-x86.c
index 9ca5c528..387a1514 100644
--- a/configs/x86/qemu-x86.c
+++ b/configs/x86/qemu-x86.c
@@ -4,7 +4,7 @@
  * Test configuration for QEMU Q35 VM, 1 GB RAM, 4 cores,
  * 6 MB hypervisor, 74 MB inmates, 1MB shared mem devices
  *
- * Copyright (c) Siemens AG, 2013-2016
+ * Copyright (c) Siemens AG, 2013-2022
  *
  * Authors:
  *  Jan Kiszka <[email protected]>
@@ -21,7 +21,7 @@
 
 struct {
        struct jailhouse_system header;
-       __u64 cpus[1];
+       struct jailhouse_cpu cpus[4];
        struct jailhouse_memory mem_regions[31];
        struct jailhouse_irqchip irqchips[1];
        struct jailhouse_pio pio_regions[12];
@@ -60,7 +60,7 @@ struct {
                .root_cell = {
                        .name = "QEMU-VM",
 
-                       .cpu_set_size = sizeof(config.cpus),
+                       .num_cpus = ARRAY_SIZE(config.cpus),
                        .num_memory_regions = ARRAY_SIZE(config.mem_regions),
                        .num_irqchips = ARRAY_SIZE(config.irqchips),
                        .num_pio_regions = ARRAY_SIZE(config.pio_regions),
@@ -70,7 +70,18 @@ struct {
        },
 
        .cpus = {
-               0xf,
+               {
+                       .phys_id = 0,
+               },
+               {
+                       .phys_id = 1,
+               },
+               {
+                       .phys_id = 2,
+               },
+               {
+                       .phys_id = 3,
+               },
        },
 
        .mem_regions = {
diff --git a/configs/x86/smp-demo.c b/configs/x86/smp-demo.c
index 35bf9504..b2c80951 100644
--- a/configs/x86/smp-demo.c
+++ b/configs/x86/smp-demo.c
@@ -3,7 +3,7 @@
  *
  * Minimal configuration for SMP demo inmates, 3 CPUs, 1 MB RAM, serial ports
  *
- * Copyright (c) Siemens AG, 2013-2015
+ * Copyright (c) Siemens AG, 2013-2022
  *
  * Authors:
  *  Jan Kiszka <[email protected]>
@@ -17,7 +17,7 @@
 
 struct {
        struct jailhouse_cell_desc cell;
-       __u64 cpus[1];
+       struct jailhouse_cpu cpus[3];
        struct jailhouse_memory mem_regions[2];
        struct jailhouse_pio pio_regions[3];
 } __attribute__((packed)) config = {
@@ -28,7 +28,7 @@ struct {
                .flags = JAILHOUSE_CELL_PASSIVE_COMMREG |
                        JAILHOUSE_CELL_VIRTUAL_CONSOLE_PERMITTED,
 
-               .cpu_set_size = sizeof(config.cpus),
+               .num_cpus = ARRAY_SIZE(config.cpus),
                .num_memory_regions = ARRAY_SIZE(config.mem_regions),
                .num_irqchips = 0,
                .num_pio_regions = ARRAY_SIZE(config.pio_regions),
@@ -42,7 +42,15 @@ struct {
        },
 
        .cpus = {
-               0xe,
+               {
+                       .phys_id = 1,
+               },
+               {
+                       .phys_id = 2,
+               },
+               {
+                       .phys_id = 3,
+               },
        },
 
        .mem_regions = {
diff --git a/configs/x86/tiny-demo.c b/configs/x86/tiny-demo.c
index 464c7acb..cad21951 100644
--- a/configs/x86/tiny-demo.c
+++ b/configs/x86/tiny-demo.c
@@ -3,7 +3,7 @@
  *
  * Minimal configuration for demo inmates, 1 CPU, 1 MB RAM, serial ports
  *
- * Copyright (c) Siemens AG, 2013, 2014
+ * Copyright (c) Siemens AG, 2013-2022
  *
  * Authors:
  *  Jan Kiszka <[email protected]>
@@ -17,7 +17,7 @@
 
 struct {
        struct jailhouse_cell_desc cell;
-       __u64 cpus[1];
+       struct jailhouse_cpu cpus[1];
        struct jailhouse_memory mem_regions[2];
        struct jailhouse_cache cache_regions[1];
        struct jailhouse_pio pio_regions[3];
@@ -30,7 +30,7 @@ struct {
                        JAILHOUSE_CELL_TEST_DEVICE |
                        JAILHOUSE_CELL_VIRTUAL_CONSOLE_PERMITTED,
 
-               .cpu_set_size = sizeof(config.cpus),
+               .num_cpus = ARRAY_SIZE(config.cpus),
                .num_memory_regions = ARRAY_SIZE(config.mem_regions),
                .num_cache_regions = ARRAY_SIZE(config.cache_regions),
                .num_irqchips = 0,
@@ -45,7 +45,9 @@ struct {
        },
 
        .cpus = {
-               0x4,
+               {
+                       .phys_id = 2,
+               },
        },
 
        .mem_regions = {
-- 
2.36.1

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/20220627131329.3659-17-ralf.ramsauer%40oth-regensburg.de.

Reply via email to