Skip to content

Commit

Permalink
Update QEMU to 9.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Aug 11, 2024
1 parent 3e0fc79 commit d85279b
Show file tree
Hide file tree
Showing 16 changed files with 76 additions and 102 deletions.
4 changes: 2 additions & 2 deletions .qubesbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ source:
# it treats component as external source like "xen", "grub", etc.
create-archive: true
files:
- url: https://download.qemu.org/qemu-8.1.2.tar.xz
signature: https://download.qemu.org/qemu-8.1.2.tar.xz.sig
- url: https://download.qemu.org/qemu-9.0.2.tar.xz
signature: https://download.qemu.org/qemu-9.0.2.tar.xz.sig
pubkeys:
- keys/qemu/mdroth.asc
- keys/qemu/pbonzini.asc
Expand Down
1 change: 0 additions & 1 deletion Makefile.stubdom
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ build/qemu/build/config.status: build/qemu/.patched build/qemu/.gui-agent-copied
--disable-virglrenderer \
--disable-tools \
--disable-replication \
--disable-hax \
--disable-opengl \
--disable-virglrenderer \
--disable-tcg \
Expand Down
2 changes: 1 addition & 1 deletion Makefile.vars
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
QEMU_VERSION := 8.1.2
QEMU_VERSION := 9.0.2
LINUX_VERSION := 6.6.44
BUSYBOX_VERSION := 1.36.1
PULSEAUDIO_VERSION := 14.2
Expand Down
2 changes: 1 addition & 1 deletion qemu/gui-agent
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
From e66aa97dca5120f22e015c19710b2ff04f525720 Mon Sep 17 00:00:00 2001
Message-Id: <e66aa97dca5120f22e015c19710b2ff04f525720.1711505965.git-series.marmarek@invisiblethingslab.com>
In-Reply-To: <cover.23e6b4d5c3fde23f2b53481b6d2b159fbed14513.1711505965.git-series.marmarek@invisiblethingslab.com>
References: <cover.23e6b4d5c3fde23f2b53481b6d2b159fbed14513.1711505965.git-series.marmarek@invisiblethingslab.com>
From: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek@invisiblethingslab.com>
Date: Sat, 17 Feb 2024 03:51:44 +0100
Subject: [PATCH v3 1/2] hw/xen: detect when running inside stubdomain
Subject: [PATCH 1/2] hw/xen: detect when running inside stubdomain
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Introduce global xen_is_stubdomain variable when qemu is running inside
a stubdomain instead of dom0. This will be relevant for subsequent
Expand All @@ -22,11 +23,11 @@ Changes in v2:
---
hw/i386/xen/xen-hvm.c | 22 ++++++++++++++++++++++
include/hw/xen/xen.h | 1 +
softmmu/globals.c | 1 +
system/globals.c | 1 +
3 files changed, 24 insertions(+)

diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index 7745cb3..3291c17 100644
index 7745cb3963..3291c177d3 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen/xen-hvm.c
@@ -583,6 +583,26 @@ static void xen_wakeup_notifier(Notifier *notifier, void *data)
Expand Down Expand Up @@ -66,7 +67,7 @@ index 7745cb3..3291c17 100644
xen_read_physmap(state);

diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index 37ecc91..ecb89ec 100644
index 37ecc91fc3..ecb89ecfc1 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -36,6 +36,7 @@ enum xen_mode {
Expand All @@ -77,10 +78,10 @@ index 37ecc91..ecb89ec 100644

int xen_pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num);
int xen_set_pci_link_route(uint8_t link, uint8_t irq);
diff --git a/softmmu/globals.c b/softmmu/globals.c
index e353584..d602a04 100644
--- a/softmmu/globals.c
+++ b/softmmu/globals.c
diff --git a/system/globals.c b/system/globals.c
index e353584201..d602a04fa2 100644
--- a/system/globals.c
+++ b/system/globals.c
@@ -60,6 +60,7 @@ bool qemu_uuid_set;
uint32_t xen_domid;
enum xen_mode xen_mode = XEN_DISABLED;
Expand All @@ -90,4 +91,5 @@ index e353584..d602a04 100644
struct gnttab_backend_ops *xen_gnttab_ops;
struct foreignmem_backend_ops *xen_foreignmem_ops;
--
git-series 0.9.1
2.45.2

22 changes: 12 additions & 10 deletions qemu/patches/0002-xen-fix-stubdom-PCI-addr.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
From 35049e99da634a74578a1ff2cb3ae4cc436ede33 Mon Sep 17 00:00:00 2001
Message-Id: <35049e99da634a74578a1ff2cb3ae4cc436ede33.1711506237.git-series.marmarek@invisiblethingslab.com>
In-Reply-To: <cover.527f002866de2be7c275c5000b6e5edfeb7e8368.1711506237.git-series.marmarek@invisiblethingslab.com>
References: <cover.527f002866de2be7c275c5000b6e5edfeb7e8368.1711506237.git-series.marmarek@invisiblethingslab.com>
From: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek@invisiblethingslab.com>
Date: Wed, 27 Mar 2024 03:23:28 +0100
Subject: [PATCH v3 2/2] xen: fix stubdom PCI addr
Subject: [PATCH 2/2] xen: fix stubdom PCI addr
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

When running in a stubdomain, the config space access via sysfs needs to
use BDF as seen inside stubdomain (connected via xen-pcifront), which is
Expand All @@ -24,12 +25,12 @@ Changes in v2:
- use %d instead of %u to read values written as %d
- add a comment from another iteration of this patch by Jason Andryuk
---
hw/xen/xen-host-pci-device.c | 76 ++++++++++++++++++++++++++++++++++++-
hw/xen/xen-host-pci-device.h | 6 +++-
hw/xen/xen-host-pci-device.c | 76 +++++++++++++++++++++++++++++++++++-
hw/xen/xen-host-pci-device.h | 6 +++
2 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/hw/xen/xen-host-pci-device.c b/hw/xen/xen-host-pci-device.c
index 8c6e9a1..eaf32f2 100644
index 8c6e9a1716..eaf32f2710 100644
--- a/hw/xen/xen-host-pci-device.c
+++ b/hw/xen/xen-host-pci-device.c
@@ -9,6 +9,8 @@
Expand Down Expand Up @@ -136,7 +137,7 @@ index 8c6e9a1..eaf32f2 100644
if (*errp) {
goto error;
diff --git a/hw/xen/xen-host-pci-device.h b/hw/xen/xen-host-pci-device.h
index 4d8d34e..270dcb2 100644
index 4d8d34ecb0..270dcb27f7 100644
--- a/hw/xen/xen-host-pci-device.h
+++ b/hw/xen/xen-host-pci-device.h
@@ -23,6 +23,12 @@ typedef struct XenHostPCIDevice {
Expand All @@ -153,4 +154,5 @@ index 4d8d34e..270dcb2 100644
uint16_t device_id;
uint32_t class_code;
--
git-series 0.9.1
2.45.2

27 changes: 20 additions & 7 deletions qemu/patches/0004-QubesGUI-display-options.patch
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,22 @@ index 37557c3442..3206bcb0ff 100644

if (s->line_offset != s->last_line_offset ||
disp_width != s->last_width ||
diff --git a/include/ui/console.h b/include/ui/console.h
diff --git a/include/ui/surface.h b/include/ui/surface.h
index 3e8b22d6c6..f3f0dfa5c3 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -148,6 +148,7 @@ typedef struct DisplaySurface {
--- a/include/ui/surface.h
+++ b/include/ui/surface.h
@@ -27,6 +27,7 @@ typedef struct DisplaySurface {
HANDLE handle;
uint32_t handle_offset;
#endif
+ uint32_t *xen_refs;
} DisplaySurface;

typedef struct QemuUIInfo {
PixelFormat qemu_default_pixelformat(int bpp);
diff --git a/include/ui/console.h b/include/ui/console.h
index 3e8b22d6c6..f3f0dfa5c3 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -437,6 +438,11 @@ static inline pixman_format_code_t surface_format(DisplaySurface *s)
return s->format;
}
Expand Down Expand Up @@ -107,6 +111,15 @@ index 006616aa77..0950bc05d4 100644
##
# @DisplayType:
#
@@ -1520,6 +1520,8 @@
#
# @dbus: Start a D-Bus service for the display. (Since 7.0)
#
+# @qubes-gui: Qubes GUI
+#
# Since: 2.12
##
{ 'enum' : 'DisplayType',
@@ -1488,7 +1503,8 @@
{ 'name': 'curses', 'if': 'CONFIG_CURSES' },
{ 'name': 'cocoa', 'if': 'CONFIG_COCOA' },
Expand Down Expand Up @@ -147,9 +160,9 @@ index bca610b72a..9d6131e3cf 100644
+ data = qubesgui_alloc_surface_data(width, height, &surface->xen_refs);
+ assert(data != NULL);
+
surface->format = format;
surface->image = pixman_image_create_bits(surface->format,
surface->image = pixman_image_create_bits(format,
width, height,
(void *)data, linesize);
diff --git a/ui/meson.build b/ui/meson.build
index d81609fb0e..c86d533d97 100644
--- a/ui/meson.build
Expand Down
16 changes: 8 additions & 8 deletions qemu/patches/0011-Additional-seccomp-filters.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Author: alcreator

Contributors: fepitre
---
softmmu/qemu-seccomp.c | 16 ++++++++++++++++
system/qemu-seccomp.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/softmmu/qemu-seccomp.c b/softmmu/qemu-seccomp.c
diff --git a/system/qemu-seccomp.c b/system/qemu-seccomp.c
index d66a2a1226..d552fb9377 100644
--- a/softmmu/qemu-seccomp.c
+++ b/softmmu/qemu-seccomp.c
--- a/system/qemu-seccomp.c
+++ b/system/qemu-seccomp.c
@@ -136,6 +136,8 @@ static const struct QemuSeccompSyscall denylist[] = {
0, NULL, SCMP_ACT_TRAP },
{ SCMP_SYS(umount), QEMU_SECCOMP_SET_DEFAULT,
Expand Down Expand Up @@ -53,13 +53,13 @@ index d66a2a1226..d552fb9377 100644
0, NULL, SCMP_ACT_TRAP },
{ SCMP_SYS(sgetmask), QEMU_SECCOMP_SET_OBSOLETE,
@@ -219,6 +233,8 @@ static const struct QemuSeccompSyscall denylist[] = {
0, NULL, SCMP_ACT_TRAP },
0, NULL, SCMP_ACT_ERRNO(EPERM) },
{ SCMP_SYS(execve), QEMU_SECCOMP_SET_SPAWN,
0, NULL, SCMP_ACT_TRAP },
0, NULL, SCMP_ACT_ERRNO(EPERM) },
+ { SCMP_SYS(execveat), QEMU_SECCOMP_SET_SPAWN,
+ 0, NULL, SCMP_ACT_TRAP },
+ 0, NULL, SCMP_ACT_ERRNO(EPERM) },
{ SCMP_SYS(clone), QEMU_SECCOMP_SET_SPAWN,
ARRAY_SIZE(clone_arg_none), clone_arg_none, SCMP_ACT_TRAP },
ARRAY_SIZE(clone_arg_none), clone_arg_none, SCMP_ACT_ERRNO(EPERM) },
RULE_CLONE_FLAG(CLONE_VM),
--
2.41.0
Expand Down
5 changes: 3 additions & 2 deletions qemu/patches/0012-Register-ich6-ich9-soundhw.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index b9ed231fe8..d6277916dc 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -1321,6 +1321,19 @@ static int intel_hda_and_codec_init(PCIBus *bus, const char *audiodev)
@@ -1321,6 +1321,20 @@ static int intel_hda_and_codec_init(PCIBus *bus, const char *audiodev)
return 0;
}

+static int intel_ich9_and_codec_init(PCIBus *bus)
+static int intel_ich9_and_codec_init(PCIBus *bus, const char *audiodev)
+{
+ DeviceState *controller;
+ BusState *hdabus;
Expand All @@ -31,6 +31,7 @@ index b9ed231fe8..d6277916dc 100644
+ controller = DEVICE(pci_create_simple(bus, -1, "ich9-intel-hda"));
+ hdabus = QLIST_FIRST(&controller->child_bus);
+ codec = qdev_new("hda-duplex");
+ qdev_prop_set_string(codec, "audiodev", audiodev);
+ qdev_realize_and_unref(codec, hdabus, &error_fatal);
+ return 0;
+}
Expand Down
4 changes: 2 additions & 2 deletions qemu/patches/0013-pc_piix-suppress-vmdesc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ index ac72e8f5be..ee46f1e1b3 100644
+++ b/hw/i386/pc_piix.c
@@ -473,6 +473,7 @@ static void pc_xen_hvm_init(MachineState *machine)
pc_xen_hvm_init_pci(machine);
xen_igd_reserve_slot(pcms->bus);
pci_create_simple(pcms->bus, -1, "xen-platform");
xen_igd_reserve_slot(pcms->pcibus);
pci_create_simple(pcms->pcibus, -1, "xen-platform");
+ machine->suppress_vmdesc = true;
}
#endif
Expand Down
4 changes: 2 additions & 2 deletions qemu/patches/0014-pc_piix-init-fw_cfg.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ index ee46f1e1b3..e2d127cb4a 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -69,6 +69,7 @@
#include "hw/mem/nvdimm.h"
#include "hw/i386/acpi-build.h"
#include "kvm/kvm-cpu.h"
#include "target/i386/cpu.h"
+#include "hw/i386/fw_cfg.h"

#define MAX_IDE_BUS 2
#define XEN_IOAPIC_NUM_PIRQS 128ULL

@@ -254,6 +255,15 @@ static void pc_init1(MachineState *machine,
if (machine->kernel_filename != NULL) {
/* For xen HVM direct kernel boot, load linux here */
Expand Down
41 changes: 0 additions & 41 deletions qemu/patches/0015-i386-load-kernel-on-xen-using-DMA.patch

This file was deleted.

9 changes: 3 additions & 6 deletions qemu/patches/0019-pc-bios-ignore-prebuilt-binaries.patch
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index a7224ef469..e88fd46d98 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -24,64 +24,18 @@ if unpack_edk2_blobs
@@ -24,61 +24,19 @@ if unpack_edk2_blobs
endif

blobs = [
Expand Down Expand Up @@ -49,10 +49,6 @@ index a7224ef469..e88fd46d98 100644
- 'efi-e1000e.rom',
- 'efi-vmxnet3.rom',
'qemu-nsis.bmp',
- 'bamboo.dtb',
- 'canyonlands.dtb',
- 'petalogix-s3adsp1800.dtb',
- 'petalogix-ml605.dtb',
- 'multiboot.bin',
- 'multiboot_dma.bin',
- 'linuxboot.bin',
Expand All @@ -69,14 +65,15 @@ index a7224ef469..e88fd46d98 100644
'qemu_vga.ndrv',
'edk2-licenses.txt',
'hppa-firmware.img',
'hppa-firmware64.img',
- 'opensbi-riscv32-generic-fw_dynamic.bin',
- 'opensbi-riscv64-generic-fw_dynamic.bin',
- 'npcm7xx_bootrom.bin',
- 'vof.bin',
- 'vof-nvram.bin',
]

if get_option('install_blobs')
dtc = find_program('dtc', required: false)
--
2.41.0

8 changes: 4 additions & 4 deletions qemu/patches/0020-Add-stubdom-xengt-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Subject: [PATCH 20/21] Add stubdom xengt support
hw/pci/pci.c | 4 ++++
include/sysemu/sysemu.h | 2 +-
qemu-options.hx | 7 ++++++-
softmmu/vl.c | 5 +++++
system/vl.c | 5 +++++
4 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
Expand Down Expand Up @@ -63,10 +63,10 @@ index b56f6b2fb2..26d60e1b85 100644
``none``
Disable VGA card.
ERST
diff --git a/softmmu/vl.c b/softmmu/vl.c
diff --git a/system/vl.c b/system/vl.c
index b0b96f67fa..e5a0ee8211 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
--- a/system/vl.c
+++ b/system/vl.c
@@ -941,6 +941,10 @@ static const VGAInterfaceInfo vga_interfaces[VGA_TYPE_MAX] = {
.name = "Xen paravirtualized framebuffer",
},
Expand Down
1 change: 0 additions & 1 deletion qemu/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
0012-Register-ich6-ich9-soundhw.patch
0013-pc_piix-suppress-vmdesc.patch
0014-pc_piix-init-fw_cfg.patch
0015-i386-load-kernel-on-xen-using-DMA.patch
0016-IGD-fix-undefined-behaviour.patch
0017-IGD-improve-legacy-vbios-handling.patch
0018-IGD-move-enabling-opregion-access-to-libxl.patch
Expand Down
Loading

0 comments on commit d85279b

Please sign in to comment.