aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
Diffstat (limited to 'community')
-rw-r--r--community/qemu/0001-hw-arm-virt-Add-a-control-for-the-the-highmem-PCIe-M.patch112
-rw-r--r--community/qemu/0002-hw-arm-virt-Add-a-control-for-the-the-highmem-redist.patch82
-rw-r--r--community/qemu/0003-hw-arm-virt-Honor-highmem-setting-when-computing-the.patch66
-rw-r--r--community/qemu/0004-hw-arm-virt-Use-the-PA-range-to-compute-the-memory-m.patch151
-rw-r--r--community/qemu/0005-hw-arm-virt-Disable-highmem-devices-that-don-t-fit-i.patch75
-rw-r--r--community/qemu/0006-hw-arm-virt-Drop-superfluous-checks-against-highmem.patch58
-rw-r--r--community/qemu/APKBUILD115
-rw-r--r--community/qemu/fix-ppc.patch17
8 files changed, 87 insertions, 589 deletions
diff --git a/community/qemu/0001-hw-arm-virt-Add-a-control-for-the-the-highmem-PCIe-M.patch b/community/qemu/0001-hw-arm-virt-Add-a-control-for-the-the-highmem-PCIe-M.patch
deleted file mode 100644
index 1ebbf062ea..0000000000
--- a/community/qemu/0001-hw-arm-virt-Add-a-control-for-the-the-highmem-PCIe-M.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From c8f008c40fb9dc35bc0fdcd52d747c920d614725 Mon Sep 17 00:00:00 2001
-From: Marc Zyngier <maz@kernel.org>
-Date: Fri, 14 Jan 2022 14:07:36 +0000
-Subject: [PATCH 1/6] hw/arm/virt: Add a control for the the highmem PCIe MMIO
-
-Just like we can control the enablement of the highmem PCIe ECAM
-region using highmem_ecam, let's add a control for the highmem
-PCIe MMIO region.
-
-Similarily to highmem_ecam, this region is disabled when highmem
-is off.
-
-Signed-off-by: Marc Zyngier <maz@kernel.org>
-Reviewed-by: Eric Auger <eric.auger@redhat.com>
-Message-id: 20220114140741.1358263-2-maz@kernel.org
-Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
----
- hw/arm/virt-acpi-build.c | 10 ++++------
- hw/arm/virt.c | 7 +++++--
- include/hw/arm/virt.h | 1 +
- 3 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
-index f2514ce77c..449fab0080 100644
---- a/hw/arm/virt-acpi-build.c
-+++ b/hw/arm/virt-acpi-build.c
-@@ -158,10 +158,9 @@ static void acpi_dsdt_add_virtio(Aml *scope,
- }
-
- static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,
-- uint32_t irq, bool use_highmem, bool highmem_ecam,
-- VirtMachineState *vms)
-+ uint32_t irq, VirtMachineState *vms)
- {
-- int ecam_id = VIRT_ECAM_ID(highmem_ecam);
-+ int ecam_id = VIRT_ECAM_ID(vms->highmem_ecam);
- struct GPEXConfig cfg = {
- .mmio32 = memmap[VIRT_PCIE_MMIO],
- .pio = memmap[VIRT_PCIE_PIO],
-@@ -170,7 +169,7 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,
- .bus = vms->bus,
- };
-
-- if (use_highmem) {
-+ if (vms->highmem_mmio) {
- cfg.mmio64 = memmap[VIRT_HIGH_PCIE_MMIO];
- }
-
-@@ -869,8 +868,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
- acpi_dsdt_add_fw_cfg(scope, &memmap[VIRT_FW_CFG]);
- acpi_dsdt_add_virtio(scope, &memmap[VIRT_MMIO],
- (irqmap[VIRT_MMIO] + ARM_SPI_BASE), NUM_VIRTIO_TRANSPORTS);
-- acpi_dsdt_add_pci(scope, memmap, (irqmap[VIRT_PCIE] + ARM_SPI_BASE),
-- vms->highmem, vms->highmem_ecam, vms);
-+ acpi_dsdt_add_pci(scope, memmap, irqmap[VIRT_PCIE] + ARM_SPI_BASE, vms);
- if (vms->acpi_dev) {
- build_ged_aml(scope, "\\_SB."GED_DEVICE,
- HOTPLUG_HANDLER(vms->acpi_dev),
-diff --git a/hw/arm/virt.c b/hw/arm/virt.c
-index a76d86b592..16369ce10e 100644
---- a/hw/arm/virt.c
-+++ b/hw/arm/virt.c
-@@ -1419,7 +1419,7 @@ static void create_pcie(VirtMachineState *vms)
- mmio_reg, base_mmio, size_mmio);
- memory_region_add_subregion(get_system_memory(), base_mmio, mmio_alias);
-
-- if (vms->highmem) {
-+ if (vms->highmem_mmio) {
- /* Map high MMIO space */
- MemoryRegion *high_mmio_alias = g_new0(MemoryRegion, 1);
-
-@@ -1473,7 +1473,7 @@ static void create_pcie(VirtMachineState *vms)
- qemu_fdt_setprop_sized_cells(ms->fdt, nodename, "reg",
- 2, base_ecam, 2, size_ecam);
-
-- if (vms->highmem) {
-+ if (vms->highmem_mmio) {
- qemu_fdt_setprop_sized_cells(ms->fdt, nodename, "ranges",
- 1, FDT_PCI_RANGE_IOPORT, 2, 0,
- 2, base_pio, 2, size_pio,
-@@ -2112,6 +2112,8 @@ static void machvirt_init(MachineState *machine)
-
- virt_flash_fdt(vms, sysmem, secure_sysmem ?: sysmem);
-
-+ vms->highmem_mmio &= vms->highmem;
-+
- create_gic(vms, sysmem);
-
- virt_cpu_post_init(vms, sysmem);
-@@ -2899,6 +2901,7 @@ static void virt_instance_init(Object *obj)
- vms->gic_version = VIRT_GIC_VERSION_NOSEL;
-
- vms->highmem_ecam = !vmc->no_highmem_ecam;
-+ vms->highmem_mmio = true;
-
- if (vmc->no_its) {
- vms->its = false;
-diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
-index be0534608f..cf5d8b83de 100644
---- a/include/hw/arm/virt.h
-+++ b/include/hw/arm/virt.h
-@@ -143,6 +143,7 @@ struct VirtMachineState {
- bool secure;
- bool highmem;
- bool highmem_ecam;
-+ bool highmem_mmio;
- bool its;
- bool tcg_its;
- bool virt;
---
-2.35.0
-
diff --git a/community/qemu/0002-hw-arm-virt-Add-a-control-for-the-the-highmem-redist.patch b/community/qemu/0002-hw-arm-virt-Add-a-control-for-the-the-highmem-redist.patch
deleted file mode 100644
index 94e7df0637..0000000000
--- a/community/qemu/0002-hw-arm-virt-Add-a-control-for-the-the-highmem-redist.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From a63618b147443de2485fb93705e21879b25c64c2 Mon Sep 17 00:00:00 2001
-From: Marc Zyngier <maz@kernel.org>
-Date: Fri, 14 Jan 2022 14:07:37 +0000
-Subject: [PATCH 2/6] hw/arm/virt: Add a control for the the highmem
- redistributors
-
-Just like we can control the enablement of the highmem PCIe region
-using highmem_ecam, let's add a control for the highmem GICv3
-redistributor region.
-
-Similarily to highmem_ecam, these redistributors are disabled when
-highmem is off.
-
-Reviewed-by: Andrew Jones <drjones@redhat.com>
-Signed-off-by: Marc Zyngier <maz@kernel.org>
-Reviewed-by: Eric Auger <eric.auger@redhat.com>
-Message-id: 20220114140741.1358263-3-maz@kernel.org
-Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
----
- hw/arm/virt-acpi-build.c | 2 ++
- hw/arm/virt.c | 2 ++
- include/hw/arm/virt.h | 4 +++-
- 3 files changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
-index 449fab0080..0757c28f69 100644
---- a/hw/arm/virt-acpi-build.c
-+++ b/hw/arm/virt-acpi-build.c
-@@ -947,6 +947,8 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
- acpi_add_table(table_offsets, tables_blob);
- build_fadt_rev5(tables_blob, tables->linker, vms, dsdt);
-
-+ vms->highmem_redists &= vms->highmem;
-+
- acpi_add_table(table_offsets, tables_blob);
- build_madt(tables_blob, tables->linker, vms);
-
-diff --git a/hw/arm/virt.c b/hw/arm/virt.c
-index 16369ce10e..62bdce1eb4 100644
---- a/hw/arm/virt.c
-+++ b/hw/arm/virt.c
-@@ -2113,6 +2113,7 @@ static void machvirt_init(MachineState *machine)
- virt_flash_fdt(vms, sysmem, secure_sysmem ?: sysmem);
-
- vms->highmem_mmio &= vms->highmem;
-+ vms->highmem_redists &= vms->highmem;
-
- create_gic(vms, sysmem);
-
-@@ -2902,6 +2903,7 @@ static void virt_instance_init(Object *obj)
-
- vms->highmem_ecam = !vmc->no_highmem_ecam;
- vms->highmem_mmio = true;
-+ vms->highmem_redists = true;
-
- if (vmc->no_its) {
- vms->its = false;
-diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
-index cf5d8b83de..c1ea17d0de 100644
---- a/include/hw/arm/virt.h
-+++ b/include/hw/arm/virt.h
-@@ -144,6 +144,7 @@ struct VirtMachineState {
- bool highmem;
- bool highmem_ecam;
- bool highmem_mmio;
-+ bool highmem_redists;
- bool its;
- bool tcg_its;
- bool virt;
-@@ -191,7 +192,8 @@ static inline int virt_gicv3_redist_region_count(VirtMachineState *vms)
-
- assert(vms->gic_version == VIRT_GIC_VERSION_3);
-
-- return MACHINE(vms)->smp.cpus > redist0_capacity ? 2 : 1;
-+ return (MACHINE(vms)->smp.cpus > redist0_capacity &&
-+ vms->highmem_redists) ? 2 : 1;
- }
-
- #endif /* QEMU_ARM_VIRT_H */
---
-2.35.0
-
diff --git a/community/qemu/0003-hw-arm-virt-Honor-highmem-setting-when-computing-the.patch b/community/qemu/0003-hw-arm-virt-Honor-highmem-setting-when-computing-the.patch
deleted file mode 100644
index 675adf9437..0000000000
--- a/community/qemu/0003-hw-arm-virt-Honor-highmem-setting-when-computing-the.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 0152b169ce163b99660b80a8ed6664707e889052 Mon Sep 17 00:00:00 2001
-From: Marc Zyngier <maz@kernel.org>
-Date: Fri, 14 Jan 2022 14:07:38 +0000
-Subject: [PATCH 3/6] hw/arm/virt: Honor highmem setting when computing the
- memory map
-
-Even when the VM is configured with highmem=off, the highest_gpa
-field includes devices that are above the 4GiB limit.
-Similarily, nothing seem to check that the memory is within
-the limit set by the highmem=off option.
-
-This leads to failures in virt_kvm_type() on systems that have
-a crippled IPA range, as the reported IPA space is larger than
-what it should be.
-
-Instead, honor the user-specified limit to only use the devices
-at the lowest end of the spectrum, and fail if we have memory
-crossing the 4GiB limit.
-
-Reviewed-by: Andrew Jones <drjones@redhat.com>
-Reviewed-by: Eric Auger <eric.auger@redhat.com>
-Signed-off-by: Marc Zyngier <maz@kernel.org>
-Message-id: 20220114140741.1358263-4-maz@kernel.org
-Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
----
- hw/arm/virt.c | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/hw/arm/virt.c b/hw/arm/virt.c
-index 62bdce1eb4..3b839ba78b 100644
---- a/hw/arm/virt.c
-+++ b/hw/arm/virt.c
-@@ -1670,7 +1670,7 @@ static uint64_t virt_cpu_mp_affinity(VirtMachineState *vms, int idx)
- static void virt_set_memmap(VirtMachineState *vms)
- {
- MachineState *ms = MACHINE(vms);
-- hwaddr base, device_memory_base, device_memory_size;
-+ hwaddr base, device_memory_base, device_memory_size, memtop;
- int i;
-
- vms->memmap = extended_memmap;
-@@ -1697,7 +1697,11 @@ static void virt_set_memmap(VirtMachineState *vms)
- device_memory_size = ms->maxram_size - ms->ram_size + ms->ram_slots * GiB;
-
- /* Base address of the high IO region */
-- base = device_memory_base + ROUND_UP(device_memory_size, GiB);
-+ memtop = base = device_memory_base + ROUND_UP(device_memory_size, GiB);
-+ if (!vms->highmem && memtop > 4 * GiB) {
-+ error_report("highmem=off, but memory crosses the 4GiB limit\n");
-+ exit(EXIT_FAILURE);
-+ }
- if (base < device_memory_base) {
- error_report("maxmem/slots too huge");
- exit(EXIT_FAILURE);
-@@ -1714,7 +1718,7 @@ static void virt_set_memmap(VirtMachineState *vms)
- vms->memmap[i].size = size;
- base += size;
- }
-- vms->highest_gpa = base - 1;
-+ vms->highest_gpa = (vms->highmem ? base : memtop) - 1;
- if (device_memory_size > 0) {
- ms->device_memory = g_malloc0(sizeof(*ms->device_memory));
- ms->device_memory->base = device_memory_base;
---
-2.35.0
-
diff --git a/community/qemu/0004-hw-arm-virt-Use-the-PA-range-to-compute-the-memory-m.patch b/community/qemu/0004-hw-arm-virt-Use-the-PA-range-to-compute-the-memory-m.patch
deleted file mode 100644
index c7c1ae6ef2..0000000000
--- a/community/qemu/0004-hw-arm-virt-Use-the-PA-range-to-compute-the-memory-m.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From 3715c251cc781b263fbd7f7c535fde7a4da401c3 Mon Sep 17 00:00:00 2001
-From: Marc Zyngier <maz@kernel.org>
-Date: Fri, 14 Jan 2022 14:07:39 +0000
-Subject: [PATCH 4/6] hw/arm/virt: Use the PA range to compute the memory map
-
-The highmem attribute is nothing but another way to express the
-PA range of a VM. To support HW that has a smaller PA range then
-what QEMU assumes, pass this PA range to the virt_set_memmap()
-function, allowing it to correctly exclude highmem devices
-if they are outside of the PA range.
-
-Signed-off-by: Marc Zyngier <maz@kernel.org>
-Reviewed-by: Eric Auger <eric.auger@redhat.com>
-Message-id: 20220114140741.1358263-5-maz@kernel.org
-Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
----
- hw/arm/virt.c | 64 +++++++++++++++++++++++++++++++++++++++++----------
- 1 file changed, 52 insertions(+), 12 deletions(-)
-
-diff --git a/hw/arm/virt.c b/hw/arm/virt.c
-index 3b839ba78b..8627f5ab95 100644
---- a/hw/arm/virt.c
-+++ b/hw/arm/virt.c
-@@ -1667,7 +1667,7 @@ static uint64_t virt_cpu_mp_affinity(VirtMachineState *vms, int idx)
- return arm_cpu_mp_affinity(idx, clustersz);
- }
-
--static void virt_set_memmap(VirtMachineState *vms)
-+static void virt_set_memmap(VirtMachineState *vms, int pa_bits)
- {
- MachineState *ms = MACHINE(vms);
- hwaddr base, device_memory_base, device_memory_size, memtop;
-@@ -1685,6 +1685,14 @@ static void virt_set_memmap(VirtMachineState *vms)
- exit(EXIT_FAILURE);
- }
-
-+ /*
-+ * !highmem is exactly the same as limiting the PA space to 32bit,
-+ * irrespective of the underlying capabilities of the HW.
-+ */
-+ if (!vms->highmem) {
-+ pa_bits = 32;
-+ }
-+
- /*
- * We compute the base of the high IO region depending on the
- * amount of initial and device memory. The device memory start/size
-@@ -1698,8 +1706,9 @@ static void virt_set_memmap(VirtMachineState *vms)
-
- /* Base address of the high IO region */
- memtop = base = device_memory_base + ROUND_UP(device_memory_size, GiB);
-- if (!vms->highmem && memtop > 4 * GiB) {
-- error_report("highmem=off, but memory crosses the 4GiB limit\n");
-+ if (memtop > BIT_ULL(pa_bits)) {
-+ error_report("Addressing limited to %d bits, but memory exceeds it by %llu bytes\n",
-+ pa_bits, memtop - BIT_ULL(pa_bits));
- exit(EXIT_FAILURE);
- }
- if (base < device_memory_base) {
-@@ -1718,7 +1727,13 @@ static void virt_set_memmap(VirtMachineState *vms)
- vms->memmap[i].size = size;
- base += size;
- }
-- vms->highest_gpa = (vms->highmem ? base : memtop) - 1;
-+
-+ /*
-+ * If base fits within pa_bits, all good. If it doesn't, limit it
-+ * to the end of RAM, which is guaranteed to fit within pa_bits.
-+ */
-+ vms->highest_gpa = (base <= BIT_ULL(pa_bits) ? base : memtop) - 1;
-+
- if (device_memory_size > 0) {
- ms->device_memory = g_malloc0(sizeof(*ms->device_memory));
- ms->device_memory->base = device_memory_base;
-@@ -1909,12 +1924,43 @@ static void machvirt_init(MachineState *machine)
- unsigned int smp_cpus = machine->smp.cpus;
- unsigned int max_cpus = machine->smp.max_cpus;
-
-+ if (!cpu_type_valid(machine->cpu_type)) {
-+ error_report("mach-virt: CPU type %s not supported", machine->cpu_type);
-+ exit(1);
-+ }
-+
-+ possible_cpus = mc->possible_cpu_arch_ids(machine);
-+
- /*
- * In accelerated mode, the memory map is computed earlier in kvm_type()
- * to create a VM with the right number of IPA bits.
- */
- if (!vms->memmap) {
-- virt_set_memmap(vms);
-+ Object *cpuobj;
-+ ARMCPU *armcpu;
-+ int pa_bits;
-+
-+ /*
-+ * Instanciate a temporary CPU object to find out about what
-+ * we are about to deal with. Once this is done, get rid of
-+ * the object.
-+ */
-+ cpuobj = object_new(possible_cpus->cpus[0].type);
-+ armcpu = ARM_CPU(cpuobj);
-+
-+ if (object_property_get_bool(cpuobj, "aarch64", NULL)) {
-+ pa_bits = arm_pamax(armcpu);
-+ } else if (arm_feature(&armcpu->env, ARM_FEATURE_LPAE)) {
-+ /* v7 with LPAE */
-+ pa_bits = 40;
-+ } else {
-+ /* Anything else */
-+ pa_bits = 32;
-+ }
-+
-+ object_unref(cpuobj);
-+
-+ virt_set_memmap(vms, pa_bits);
- }
-
- /* We can probe only here because during property set
-@@ -1922,11 +1968,6 @@ static void machvirt_init(MachineState *machine)
- */
- finalize_gic_version(vms);
-
-- if (!cpu_type_valid(machine->cpu_type)) {
-- error_report("mach-virt: CPU type %s not supported", machine->cpu_type);
-- exit(1);
-- }
--
- if (vms->secure) {
- /*
- * The Secure view of the world is the same as the NonSecure,
-@@ -1996,7 +2037,6 @@ static void machvirt_init(MachineState *machine)
-
- create_fdt(vms);
-
-- possible_cpus = mc->possible_cpu_arch_ids(machine);
- assert(possible_cpus->len == max_cpus);
- for (n = 0; n < possible_cpus->len; n++) {
- Object *cpuobj;
-@@ -2735,7 +2775,7 @@ static int virt_kvm_type(MachineState *ms, const char *type_str)
- max_vm_pa_size = kvm_arm_get_max_vm_ipa_size(ms, &fixed_ipa);
-
- /* we freeze the memory map to compute the highest gpa */
-- virt_set_memmap(vms);
-+ virt_set_memmap(vms, max_vm_pa_size);
-
- requested_pa_size = 64 - clz64(vms->highest_gpa);
-
---
-2.35.0
-
diff --git a/community/qemu/0005-hw-arm-virt-Disable-highmem-devices-that-don-t-fit-i.patch b/community/qemu/0005-hw-arm-virt-Disable-highmem-devices-that-don-t-fit-i.patch
deleted file mode 100644
index 7b4b2a728b..0000000000
--- a/community/qemu/0005-hw-arm-virt-Disable-highmem-devices-that-don-t-fit-i.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From d9afe24c29a0985b29d7535b2f1615affbd1a888 Mon Sep 17 00:00:00 2001
-From: Marc Zyngier <maz@kernel.org>
-Date: Fri, 14 Jan 2022 14:07:40 +0000
-Subject: [PATCH 5/6] hw/arm/virt: Disable highmem devices that don't fit in
- the PA range
-
-In order to only keep the highmem devices that actually fit in
-the PA range, check their location against the range and update
-highest_gpa if they fit. If they don't, mark them as disabled.
-
-Signed-off-by: Marc Zyngier <maz@kernel.org>
-Reviewed-by: Eric Auger <eric.auger@redhat.com>
-Message-id: 20220114140741.1358263-6-maz@kernel.org
-Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
----
- hw/arm/virt.c | 34 ++++++++++++++++++++++++++++------
- 1 file changed, 28 insertions(+), 6 deletions(-)
-
-diff --git a/hw/arm/virt.c b/hw/arm/virt.c
-index 8627f5ab95..8d02c2267d 100644
---- a/hw/arm/virt.c
-+++ b/hw/arm/virt.c
-@@ -1719,21 +1719,43 @@ static void virt_set_memmap(VirtMachineState *vms, int pa_bits)
- base = vms->memmap[VIRT_MEM].base + LEGACY_RAMLIMIT_BYTES;
- }
-
-+ /* We know for sure that at least the memory fits in the PA space */
-+ vms->highest_gpa = memtop - 1;
-+
- for (i = VIRT_LOWMEMMAP_LAST; i < ARRAY_SIZE(extended_memmap); i++) {
- hwaddr size = extended_memmap[i].size;
-+ bool fits;
-
- base = ROUND_UP(base, size);
- vms->memmap[i].base = base;
- vms->memmap[i].size = size;
-+
-+ /*
-+ * Check each device to see if they fit in the PA space,
-+ * moving highest_gpa as we go.
-+ *
-+ * For each device that doesn't fit, disable it.
-+ */
-+ fits = (base + size) <= BIT_ULL(pa_bits);
-+ if (fits) {
-+ vms->highest_gpa = base + size - 1;
-+ }
-+
-+ switch (i) {
-+ case VIRT_HIGH_GIC_REDIST2:
-+ vms->highmem_redists &= fits;
-+ break;
-+ case VIRT_HIGH_PCIE_ECAM:
-+ vms->highmem_ecam &= fits;
-+ break;
-+ case VIRT_HIGH_PCIE_MMIO:
-+ vms->highmem_mmio &= fits;
-+ break;
-+ }
-+
- base += size;
- }
-
-- /*
-- * If base fits within pa_bits, all good. If it doesn't, limit it
-- * to the end of RAM, which is guaranteed to fit within pa_bits.
-- */
-- vms->highest_gpa = (base <= BIT_ULL(pa_bits) ? base : memtop) - 1;
--
- if (device_memory_size > 0) {
- ms->device_memory = g_malloc0(sizeof(*ms->device_memory));
- ms->device_memory->base = device_memory_base;
---
-2.35.0
-
diff --git a/community/qemu/0006-hw-arm-virt-Drop-superfluous-checks-against-highmem.patch b/community/qemu/0006-hw-arm-virt-Drop-superfluous-checks-against-highmem.patch
deleted file mode 100644
index d26e130d69..0000000000
--- a/community/qemu/0006-hw-arm-virt-Drop-superfluous-checks-against-highmem.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 2dcb74e5c271b9bb581013b949e4ef3bb3f6969b Mon Sep 17 00:00:00 2001
-From: Marc Zyngier <maz@kernel.org>
-Date: Fri, 14 Jan 2022 14:07:41 +0000
-Subject: [PATCH 6/6] hw/arm/virt: Drop superfluous checks against highmem
-
-Now that the devices present in the extended memory map are checked
-against the available PA space and disabled when they don't fit,
-there is no need to keep the same checks against highmem, as
-highmem really is a shortcut for the PA space being 32bit.
-
-Reviewed-by: Eric Auger <eric.auger@redhat.com>
-Signed-off-by: Marc Zyngier <maz@kernel.org>
-Message-id: 20220114140741.1358263-7-maz@kernel.org
-Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
----
- hw/arm/virt-acpi-build.c | 2 --
- hw/arm/virt.c | 5 +----
- 2 files changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
-index 0757c28f69..449fab0080 100644
---- a/hw/arm/virt-acpi-build.c
-+++ b/hw/arm/virt-acpi-build.c
-@@ -947,8 +947,6 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
- acpi_add_table(table_offsets, tables_blob);
- build_fadt_rev5(tables_blob, tables->linker, vms, dsdt);
-
-- vms->highmem_redists &= vms->highmem;
--
- acpi_add_table(table_offsets, tables_blob);
- build_madt(tables_blob, tables->linker, vms);
-
-diff --git a/hw/arm/virt.c b/hw/arm/virt.c
-index 8d02c2267d..141350bf21 100644
---- a/hw/arm/virt.c
-+++ b/hw/arm/virt.c
-@@ -2178,9 +2178,6 @@ static void machvirt_init(MachineState *machine)
-
- virt_flash_fdt(vms, sysmem, secure_sysmem ?: sysmem);
-
-- vms->highmem_mmio &= vms->highmem;
-- vms->highmem_redists &= vms->highmem;
--
- create_gic(vms, sysmem);
-
- virt_cpu_post_init(vms, sysmem);
-@@ -2199,7 +2196,7 @@ static void machvirt_init(MachineState *machine)
- machine->ram_size, "mach-virt.tag");
- }
-
-- vms->highmem_ecam &= vms->highmem && (!firmware_loaded || aarch64);
-+ vms->highmem_ecam &= (!firmware_loaded || aarch64);
-
- create_rtc(vms);
-
---
-2.35.0
-
diff --git a/community/qemu/APKBUILD b/community/qemu/APKBUILD
index f6501a2677..2036ba31f6 100644
--- a/community/qemu/APKBUILD
+++ b/community/qemu/APKBUILD
@@ -3,8 +3,8 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=qemu
-pkgver=6.2.0
-pkgrel=5
+pkgver=7.0.0
+pkgrel=0
pkgdesc="QEMU is a generic machine emulator and virtualizer"
url="https://qemu.org/"
arch="all"
@@ -65,6 +65,13 @@ options="suid !strip !check"
[ "$CARCH" = "riscv64" ] && options="$options textrels"
subpackages="$pkgname-doc $pkgname-lang $pkgname-guest-agent:guest
+ $pkgname-tools:_tools
+ $pkgname-hppa-firmware:_hppa_firmware
+ $pkgname-ppc-firmware:_ppc_firmware
+ $pkgname-s390x-firmware:_s390x_firmware
+ $pkgname-pr-helper:_pr_helper
+ $pkgname-vhost-user-gpu:_vhost_user_gpu
+ $pkgname-virtiofsd:_virtiofsd
"
_subsystems="
@@ -74,6 +81,7 @@ _subsystems="
arm
armeb
cris
+ hexagon
hppa
i386
m68k
@@ -138,31 +146,33 @@ done
_modules="
audio-alsa
+ audio-dbus
audio-oss
audio-pa
audio-sdl
+ audio-spice
block-curl
block-dmg-bz2
block-nfs
block-ssh
- hw-display-qxl
- hw-usb-redirect
- ui-curses
- ui-gtk
- ui-sdl
- ui-spice-app
- audio-spice
chardev-spice
- hw-display-virtio-gpu-pci
+ hw-display-qxl
hw-display-virtio-gpu
- hw-display-virtio-vga
hw-display-virtio-gpu-gl
+ hw-display-virtio-gpu-pci
hw-display-virtio-gpu-pci-gl
+ hw-display-virtio-vga
hw-display-virtio-vga-gl
hw-s390x-virtio-gpu-ccw
hw-usb-host
+ hw-usb-redirect
+ ui-curses
+ ui-dbus
ui-egl-headless
+ ui-gtk
ui-opengl
+ ui-sdl
+ ui-spice-app
ui-spice-core
"
@@ -184,7 +194,6 @@ subpackages="$subpackages $pkgname-img" # -img must be declared the last
source="https://wiki.qemu-project.org/download/qemu-$pkgver.tar.xz
0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch
xattr_size_max.patch
- fix-ppc.patch
MAP_SYNC-fix.patch
fix-sockios-header.patch
guest-agent-shutdown.patch
@@ -192,12 +201,6 @@ source="https://wiki.qemu-project.org/download/qemu-$pkgver.tar.xz
musl-initialise-msghdr.patch
CVE-2021-20255.patch
- 0001-hw-arm-virt-Add-a-control-for-the-the-highmem-PCIe-M.patch
- 0002-hw-arm-virt-Add-a-control-for-the-the-highmem-redist.patch
- 0003-hw-arm-virt-Honor-highmem-setting-when-computing-the.patch
- 0004-hw-arm-virt-Use-the-PA-range-to-compute-the-memory-m.patch
- 0005-hw-arm-virt-Disable-highmem-devices-that-don-t-fit-i.patch
- 0006-hw-arm-virt-Drop-superfluous-checks-against-highmem.patch
$pkgname-guest-agent.confd
$pkgname-guest-agent.initd
@@ -410,14 +413,76 @@ _subsys() {
amove /usr/bin/qemu-$name
+ local _arch=${name#system-}
case "$name" in
+ system-aarch64)
+ amove /usr/share/qemu/edk2-aarch64-code.fd
+ ;;
+ system-arm)
+ amove /usr/share/qemu/edk2-arm-code.fd \
+ /usr/share/qemu/edk2-arm-vars.fd
+ ;;
system-x86_64|system-i386)
- provides="qemu-accel-tcg-${name#system-}"
- amove /usr/lib/qemu/accel-tcg-${name#system-}.so
+ provides="qemu-accel-tcg-$_arch"
+ amove /usr/lib/qemu/accel-tcg-$_arch.so \
+ /usr/share/qemu/edk2-$_arch-code.fd \
+ /usr/share/qemu/edk2-$_arch-secure-code.fd
+ ;;
+ system-s390x|system-hppa|system-ppc)
+ depends="$pkgname-$_arch-firmware"
;;
esac
}
+_tools() {
+ pkgdesc="QEMU support tools"
+ depends=""
+ options=""
+ amove /usr/bin/qemu-edid \
+ /usr/bin/qemu-keymap \
+ /usr/bin/elf2dmp
+}
+
+# keep s390x boot files in subpackage to prevent abuild from stripping it
+_s390x_firmware() {
+ pkgdesc="QEMU s390x boot devices"
+ depends=""
+ amove /usr/share/qemu/s390-ccw.img \
+ /usr/share/qemu/s390-netboot.img
+}
+
+_hppa_firmware() {
+ pkgdesc="QEMU hppa firmware"
+ depends=""
+ amove /usr/share/qemu/hppa-firmware.img
+}
+
+_ppc_firmware() {
+ pkgdesc="QEMU ppc firmware"
+ depends=""
+ amove /usr/share/qemu/openbios-ppc
+}
+
+_vhost_user_gpu() {
+ pkgdesc="QEMU vhost user GPU device"
+ depends=""
+ options=""
+ amove /usr/lib/qemu/vhost-user-gpu \
+ /usr/share/qemu/vhost-user/50-qemu-gpu.json
+}
+
+_virtiofsd() {
+ pkgdesc="QEMU virtio-fs shared file system daemon"
+ amove /usr/lib/qemu/virtiofsd \
+ /usr/share/qemu/vhost-user/50-qemu-virtiofsd.json
+}
+
+_pr_helper() {
+ pkgdesc="QEMU pr helper utility"
+ amove /usr/bin/qemu-pr-helper
+}
+
+
img() {
pkgdesc="QEMU command line tool for manipulating disk images"
depends=""
@@ -427,6 +492,7 @@ img() {
mv "$pkgdir"/usr/bin/qemu-img \
"$pkgdir"/usr/bin/qemu-io \
"$pkgdir"/usr/bin/qemu-nbd \
+ "$pkgdir"/usr/bin/qemu-storage-daemon \
"$subpkgdir"/usr/bin/
# We exploit the fact that -img subpackage are created last
@@ -482,22 +548,15 @@ _all_modules() {
}
sha512sums="
-e9f8231c9e1cfcc41cb47f10a55d63f6b8aee307af00cf6acf64acb7aa4f49fa7e9d6330703a2abea15d8b7bbaba7d3cb08c83edd98d82642367b527df730817 qemu-6.2.0.tar.xz
+44ecd10c018a3763e1bc87d1d35b98890d0d5636acd69fe9b5cadf5024d5af6a31684d60cbe1c3370e02986434c1fb0ad99224e0e6f6fe7eda169992508157b1 qemu-7.0.0.tar.xz
98db5e23397cfad4a7210f9f7e1c5fa5c48f065785439521c5b39325c429f2dc367c40925adff6aa8677b3192a1a98a30e93d5b9c879df523deb019c40edd9d9 0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch
4b1e26ba4d53f9f762cbd5cea8ef6f8062d827ae3ae07bc36c5b0c0be4e94fc1856ad2477e8e791b074b8a25d51ed6d0ddd75e605e54600e5dd0799143793ce4 xattr_size_max.patch
-90c5424230914da5c8f04663892521c6a2775510cec980d7021ca99154465e56312620235827ec5fa71a909f16a85222aac8205d21b46ce3f70f49507d7f98a2 fix-ppc.patch
d7de79ea74e36702cac4a59e472564a55f0a663be7e63c3755e32b4b5dfbc04b390ee79f09f43f6ae706ee2aec9e005eade3c0fd4a202db60d11f436874a17d7 MAP_SYNC-fix.patch
39590476a4ebd7c1e79a4f0451b24c75b1817a2a83abaa1f71bb60b225d772152f0af8f3e51ff65645e378c536ffa6ff551dade52884d03a14b7c6a19c5c97d4 fix-sockios-header.patch
d6b81846cefd46b8fd1fb04450d4898f97dc77d11e049fb1bc8e2553bbb88c8325151d0e4bec70cc6820a5863c1d1749b99100b4747d91182856c3ca1946cb28 guest-agent-shutdown.patch
e3acdab38c17eccb87bce1dfec22ce9474dae281474b886860848ae206006b071378882b855023916bb00a86cfbe55216c3fa4336b4e402399df2a9937b8c21c mips-softfloat.patch
7387fb02371268072291c80c54a2785030a55aeb697c5e84a1c7a0179c42059338a70f384602a508d2189d63f35a2ca3591109dcc9ab8bc1ccfcc9dd7e89d0a5 musl-initialise-msghdr.patch
e9389a6e3b2c3b59f66ea13eb7a3515e87341a68ca14afeb1ddd0084717bf4a13f5f58dc41dadbf0f2faf8fe1ae94ba7d1469c41539c79e45fa1624c6081e904 CVE-2021-20255.patch
-88d2599275f64b67ee56b110241c4ad3e74aaf8a18d031e9c9323c8d887adeb4171b4b53c5d4991567dfac995c17a309fd10f3a70e72c2d26e4aec3eb526ad63 0001-hw-arm-virt-Add-a-control-for-the-the-highmem-PCIe-M.patch
-0dbc4e0f2cc880886ce1f16587b2dec8f04e478fdcc6378bedc50a6c4dacafec04bf7882db3522e4ee70f26e6d84557d27cd827e8982db31620f2973d4ba4a28 0002-hw-arm-virt-Add-a-control-for-the-the-highmem-redist.patch
-bdc51c430987322af007f966d8c03f7c7ee844e8a8d3bebef4d26a8f163f4b85751bcc6f704b4b5c29f33d02c81b6bc660b5e798e97ab5c3da1fd05eb991548f 0003-hw-arm-virt-Honor-highmem-setting-when-computing-the.patch
-cfb9ffd164284b9822ccd213e368e917e159717a12221c548df7e91382189b56e7e98565fb6c2f4633be163079fe3130b7593cc7aeffc091d117b07fe30edc08 0004-hw-arm-virt-Use-the-PA-range-to-compute-the-memory-m.patch
-198966993e94247067bf2125aa30eb90f83178ec1cd090380b2ecc925d7509d4d22b9c9880c500cc092e84c9ee25cdc25b1f0b17a3b40b3f3fca682f3d0aae5e 0005-hw-arm-virt-Disable-highmem-devices-that-don-t-fit-i.patch
-719f0fd6d985db2b1f7dd95138dfa3a09a5241de6358267d5cdc5a309ab268526cfefe24a04b6ab718d26e65a69f0dbf39154006bdf16a24fe149a6bec732580 0006-hw-arm-virt-Drop-superfluous-checks-against-highmem.patch
d90c034cae3f9097466854ed1a9f32ab4b02089fcdf7320e8f4da13b2b1ff65067233f48809911485e4431d7ec1a22448b934121bc9522a2dc489009e87e2b1f qemu-guest-agent.confd
1cd24c2444c5935a763c501af2b0da31635aad9cf62e55416d6477fcec153cddbe7de205d99616def11b085e0dd366ba22463d2270f831d884edbc307c7864a6 qemu-guest-agent.initd
9b7a89b20fcf737832cb7b4d5dc7d8301dd88169cbe5339eda69fbb51c2e537d8cb9ec7cf37600899e734209e63410d50d0821bce97e401421db39c294d97be2 80-kvm.rules
diff --git a/community/qemu/fix-ppc.patch b/community/qemu/fix-ppc.patch
deleted file mode 100644
index 8ff64371f7..0000000000
--- a/community/qemu/fix-ppc.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/linux-user/host/ppc/host-signal.h b/linux-user/host/ppc/host-signal.h
-index 1d8e658ff..9dc6fdb3e 100644
---- a/linux-user/host/ppc/host-signal.h
-+++ b/linux-user/host/ppc/host-signal.h
-@@ -11,6 +11,12 @@
- #ifndef PPC_HOST_SIGNAL_H
- #define PPC_HOST_SIGNAL_H
-
-+// On PowerPC, ucontext.h uses a pt_regs struct as an incomplete
-+// type. This type must be completed by including asm/ptrace.h.
-+#ifdef __PPC__
-+#include <asm/ptrace.h>
-+#endif
-+
- static inline uintptr_t host_signal_pc(ucontext_t *uc)
- {
- return uc->uc_mcontext.regs->nip;