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 c62befee..9609d6f1 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]; @@ -29,7 +29,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, @@ -44,7 +44,9 @@ struct { }, .cpus = { - 0x8, + { + .phys_id = 3, + }, }, .mem_regions = { diff --git a/configs/x86/e1000-demo.c b/configs/x86/e1000-demo.c index 58868c0c..05b59663 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]; @@ -32,7 +32,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), @@ -47,7 +47,9 @@ struct { }, .cpus = { - 0x4, + { + .phys_id = 2, + }, }, .mem_regions = { diff --git a/configs/x86/f2a88xm-hd3.c b/configs/x86/f2a88xm-hd3.c index 85f201d2..1517b152 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]; @@ -64,7 +64,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), @@ -74,7 +74,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 02cc0fbe..eac0b91b 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]; @@ -52,7 +52,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), @@ -62,7 +62,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 a224036b..3edf3af5 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]; @@ -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 = ARRAY_SIZE(config.irqchips), .num_pio_regions = ARRAY_SIZE(config.pio_regions), @@ -45,7 +45,9 @@ struct { }, .cpus = { - 0x4, + { + .phys_id = 2, + }, }, .mem_regions = { diff --git a/configs/x86/ivshmem-demo.c b/configs/x86/ivshmem-demo.c index 8738c70a..3ca32b66 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]; @@ -32,7 +32,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), @@ -47,7 +47,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 b24a1d16..31a713ed 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 @@ -41,7 +41,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), @@ -51,7 +51,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 137fd2e9..775fe9a1 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]; @@ -32,7 +32,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), @@ -47,7 +47,9 @@ struct { }, .cpus = { - 0x4, + { + .phys_id = 2, + }, }, .mem_regions = { diff --git a/configs/x86/qemu-x86.c b/configs/x86/qemu-x86.c index cdd3dd6d..369e0b8b 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[13]; @@ -61,7 +61,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), @@ -71,7 +71,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 98b32bd7..056cc614 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 = { @@ -29,7 +29,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), @@ -43,7 +43,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 6d5fbac9..2b50d803 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]; @@ -31,7 +31,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, @@ -46,7 +46,9 @@ struct { }, .cpus = { - 0x4, + { + .phys_id = 2, + }, }, .mem_regions = { -- 2.40.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/20230519204033.643200-17-ralf.ramsauer%40oth-regensburg.de.
