summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-05-05 07:05:44 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-05-05 21:17:38 +0100
commit092e092ee590ae268d1ebf34c09621fc826a6e10 (patch)
tree8465786806d43d208af554d2571e7638c63c6dd9 /meta/recipes-devtools/qemu/qemu
parent5202d296e81403242cff6443519ec141d26f6aa5 (diff)
downloadpoky-092e092ee590ae268d1ebf34c09621fc826a6e10.tar.gz
qemu: update 6.2.0 -> 7.0.0
Drop xfs/libxml2 options no longer offered upstream. Dropped patches all found their way upstream, particularly 0001-qemu-Add-missing-wacom-HID-descriptor.patch as well. (From OE-Core rev: ab6bd34a07d10583aeb9377a7fdb9392242b6a8c) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu')
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-acpi-tpm-Add-missing-device-identification-objects.patch83
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-ppc-Include-asm-ptrace.h-for-pt_regs-struct-definiti.patch92
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch (renamed from meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch)17
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch141
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch40
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-vhost-vsock-detach-the-virqueue-element-in-case-of-e.patch60
-rw-r--r--meta/recipes-devtools/qemu/qemu/0002-chardev-connect-socket-to-a-spawned-command.patch (renamed from meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch)59
-rw-r--r--meta/recipes-devtools/qemu/qemu/0002-virtio-net-fix-map-leaking-on-error-during-receive.patch43
-rw-r--r--meta/recipes-devtools/qemu/qemu/0003-apic-fixup-fallthrough-to-PIC.patch (renamed from meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch)17
-rw-r--r--meta/recipes-devtools/qemu/qemu/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch (renamed from meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch)11
-rw-r--r--meta/recipes-devtools/qemu/qemu/0005-qemu-Do-not-include-file-if-not-exists.patch (renamed from meta/recipes-devtools/qemu/qemu/0001-qemu-Do-not-include-file-if-not-exists.patch)16
-rw-r--r--meta/recipes-devtools/qemu/qemu/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch (renamed from meta/recipes-devtools/qemu/qemu/mmap2.patch)23
-rw-r--r--meta/recipes-devtools/qemu/qemu/0007-qemu-Determinism-fixes.patch (renamed from meta/recipes-devtools/qemu/qemu/determinism.patch)24
-rw-r--r--meta/recipes-devtools/qemu/qemu/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch (renamed from meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch)20
-rw-r--r--meta/recipes-devtools/qemu/qemu/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch (renamed from meta/recipes-devtools/qemu/qemu/0001-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch)9
-rw-r--r--meta/recipes-devtools/qemu/qemu/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch (renamed from meta/recipes-devtools/qemu/qemu/pvrdma.patch)32
-rw-r--r--meta/recipes-devtools/qemu/qemu/cross.patch15
-rw-r--r--meta/recipes-devtools/qemu/qemu/no-ps2.patch123
18 files changed, 151 insertions, 674 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/0001-acpi-tpm-Add-missing-device-identification-objects.patch b/meta/recipes-devtools/qemu/qemu/0001-acpi-tpm-Add-missing-device-identification-objects.patch
deleted file mode 100644
index ff91674879..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-acpi-tpm-Add-missing-device-identification-objects.patch
+++ /dev/null
@@ -1,83 +0,0 @@
1From 5903646d3913af6544680f6645fcb7296d0b3a1c Mon Sep 17 00:00:00 2001
2From: Stefan Berger <stefanb@linux.ibm.com>
3Date: Tue, 4 Jan 2022 12:58:05 -0500
4Subject: [PATCH] acpi: tpm: Add missing device identification objects
5
6Add missing TPM device identification objects _STR and _UID. They will
7appear as files 'description' and 'uid' under Linux sysfs.
8
9Following inspection of sysfs entries for hardware TPMs we chose
10uid '1'.
11
12Upstream-Status: Backport [5903646d3913af6544680f6645fcb7296d0b3a1c]
13
14Cc: Shannon Zhao <shannon.zhaosl@gmail.com>
15Cc: Michael S. Tsirkin <mst@redhat.com>
16Cc: Igor Mammedov <imammedo@redhat.com>
17Cc: Ani Sinha <ani@anisinha.ca>
18Resolves: https://gitlab.com/qemu-project/qemu/-/issues/708
19Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
20Reviewed-by: Ani Sinha <ani@anisinha.ca>
21Reviewed-by: Shannon Zhao <shannon.zhaosl@gmail.com>
22Message-id: 20211223022310.575496-3-stefanb@linux.ibm.com
23Message-Id: <20220104175806.872996-3-stefanb@linux.ibm.com>
24Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
25Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
26Reviewed-by: Igor Mammedov <imammedo@redhat.com>
27Signed-off-by: Liwei Song <liwei.song@windriver.com>
28---
29 hw/arm/virt-acpi-build.c | 1 +
30 hw/i386/acpi-build.c | 7 +++++++
31 2 files changed, 8 insertions(+)
32
33diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
34index d0f4867fdfe5..f2514ce77c0b 100644
35--- a/hw/arm/virt-acpi-build.c
36+++ b/hw/arm/virt-acpi-build.c
37@@ -229,6 +229,7 @@ static void acpi_dsdt_add_tpm(Aml *scope, VirtMachineState *vms)
38
39 Aml *dev = aml_device("TPM0");
40 aml_append(dev, aml_name_decl("_HID", aml_string("MSFT0101")));
41+ aml_append(dev, aml_name_decl("_STR", aml_string("TPM 2.0 Device")));
42 aml_append(dev, aml_name_decl("_UID", aml_int(0)));
43
44 Aml *crs = aml_resource_template();
45diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
46index 0234fe7588b7..ce823e8fcb97 100644
47--- a/hw/i386/acpi-build.c
48+++ b/hw/i386/acpi-build.c
49@@ -1812,11 +1812,15 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
50 dev = aml_device("TPM");
51 aml_append(dev, aml_name_decl("_HID",
52 aml_string("MSFT0101")));
53+ aml_append(dev,
54+ aml_name_decl("_STR",
55+ aml_string("TPM 2.0 Device")));
56 } else {
57 dev = aml_device("ISA.TPM");
58 aml_append(dev, aml_name_decl("_HID",
59 aml_eisaid("PNP0C31")));
60 }
61+ aml_append(dev, aml_name_decl("_UID", aml_int(1)));
62
63 aml_append(dev, aml_name_decl("_STA", aml_int(0xF)));
64 crs = aml_resource_template();
65@@ -1844,12 +1848,15 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
66 if (TPM_IS_CRB(tpm)) {
67 dev = aml_device("TPM");
68 aml_append(dev, aml_name_decl("_HID", aml_string("MSFT0101")));
69+ aml_append(dev, aml_name_decl("_STR",
70+ aml_string("TPM 2.0 Device")));
71 crs = aml_resource_template();
72 aml_append(crs, aml_memory32_fixed(TPM_CRB_ADDR_BASE,
73 TPM_CRB_ADDR_SIZE, AML_READ_WRITE));
74 aml_append(dev, aml_name_decl("_CRS", crs));
75
76 aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
77+ aml_append(dev, aml_name_decl("_UID", aml_int(1)));
78
79 tpm_build_ppi_acpi(tpm, dev);
80
81--
822.17.1
83
diff --git a/meta/recipes-devtools/qemu/qemu/0001-ppc-Include-asm-ptrace.h-for-pt_regs-struct-definiti.patch b/meta/recipes-devtools/qemu/qemu/0001-ppc-Include-asm-ptrace.h-for-pt_regs-struct-definiti.patch
deleted file mode 100644
index e8e42007df..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-ppc-Include-asm-ptrace.h-for-pt_regs-struct-definiti.patch
+++ /dev/null
@@ -1,92 +0,0 @@
1From 91e15627fd05d5a59fd2b88bc5c3491d3e0b56b0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 14 Mar 2022 09:58:21 -0700
4Subject: [PATCH] ppc: Include asm/ptrace.h for pt_regs struct definition
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Fixes
10../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete definition of type 'struct pt_regs'
11 return uc->uc_mcontext.regs->nip;
12 ~~~~~~~~~~~~~~~~~~~~^
13
14Upstream-Status: Submitted [https://patchwork.kernel.org/project/qemu-devel/patch/20220314170223.554679-1-raj.khem@gmail.com/]
15
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17Cc: Peter Maydell <peter.maydell@linaro.org>
18Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
19Cc: Richard Henderson <richard.henderson@linaro.org>
20---
21 linux-user/include/host/ppc/host-signal.h | 4 ++++
22 1 file changed, 4 insertions(+)
23
24--- a/linux-user/host/ppc/host-signal.h
25+++ /dev/null
26@@ -1,30 +0,0 @@
27-/*
28- * host-signal.h: signal info dependent on the host architecture
29- *
30- * Copyright (c) 2003-2005 Fabrice Bellard
31- * Copyright (c) 2021 Linaro Limited
32- *
33- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
34- * See the COPYING file in the top-level directory.
35- */
36-
37-#ifndef PPC_HOST_SIGNAL_H
38-#define PPC_HOST_SIGNAL_H
39-
40-static inline uintptr_t host_signal_pc(ucontext_t *uc)
41-{
42- return uc->uc_mcontext.regs->nip;
43-}
44-
45-static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
46-{
47- uc->uc_mcontext.regs->nip = pc;
48-}
49-
50-static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
51-{
52- return uc->uc_mcontext.regs->trap != 0x400
53- && (uc->uc_mcontext.regs->dsisr & 0x02000000);
54-}
55-
56-#endif
57--- a/linux-user/host/ppc64/host-signal.h
58+++ b/linux-user/host/ppc64/host-signal.h
59@@ -1 +1,32 @@
60-#include "../ppc/host-signal.h"
61+/*
62+ * host-signal.h: signal info dependent on the host architecture
63+ *
64+ * Copyright (c) 2003-2005 Fabrice Bellard
65+ * Copyright (c) 2021 Linaro Limited
66+ *
67+ * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
68+ * See the COPYING file in the top-level directory.
69+ */
70+
71+#ifndef PPC_HOST_SIGNAL_H
72+#define PPC_HOST_SIGNAL_H
73+
74+#include <asm/ptrace.h>
75+
76+static inline uintptr_t host_signal_pc(ucontext_t *uc)
77+{
78+ return uc->uc_mcontext.gp_regs[PT_NIP];
79+}
80+
81+static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
82+{
83+ uc->uc_mcontext.gp_regs[PT_NIP] = pc;
84+}
85+
86+static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
87+{
88+ return uc->uc_mcontext.gp_regs[PT_TRAP] != 0x400
89+ && (uc->uc_mcontext.gp_regs[PT_DSISR] & 0x02000000);
90+}
91+
92+#endif
diff --git a/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
index 733789be29..6fb160e6d3 100644
--- a/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
+++ b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
@@ -1,7 +1,7 @@
1From ce1eceab2350d27960ec254650717085f6a11c9a Mon Sep 17 00:00:00 2001 1From de64af82950a6908f9407dfc92b83c17e2af3eab Mon Sep 17 00:00:00 2001
2From: Jason Wessel <jason.wessel@windriver.com> 2From: Jason Wessel <jason.wessel@windriver.com>
3Date: Fri, 28 Mar 2014 17:42:43 +0800 3Date: Fri, 28 Mar 2014 17:42:43 +0800
4Subject: [PATCH] qemu: Add addition environment space to boot loader 4Subject: [PATCH 01/12] qemu: Add addition environment space to boot loader
5 qemu-system-mips 5 qemu-system-mips
6 6
7Upstream-Status: Inappropriate - OE uses deep paths 7Upstream-Status: Inappropriate - OE uses deep paths
@@ -18,11 +18,11 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
18 hw/mips/malta.c | 2 +- 18 hw/mips/malta.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-) 19 1 file changed, 1 insertion(+), 1 deletion(-)
20 20
21Index: qemu-6.0.0/hw/mips/malta.c 21diff --git a/hw/mips/malta.c b/hw/mips/malta.c
22=================================================================== 22index 628851172..12d37f35d 100644
23--- qemu-6.0.0.orig/hw/mips/malta.c 23--- a/hw/mips/malta.c
24+++ qemu-6.0.0/hw/mips/malta.c 24+++ b/hw/mips/malta.c
25@@ -65,7 +65,7 @@ 25@@ -61,7 +61,7 @@
26 #define ENVP_PADDR 0x2000 26 #define ENVP_PADDR 0x2000
27 #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR) 27 #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR)
28 #define ENVP_NB_ENTRIES 16 28 #define ENVP_NB_ENTRIES 16
@@ -31,3 +31,6 @@ Index: qemu-6.0.0/hw/mips/malta.c
31 31
32 /* Hardware addresses */ 32 /* Hardware addresses */
33 #define FLASH_ADDRESS 0x1e000000ULL 33 #define FLASH_ADDRESS 0x1e000000ULL
34--
352.30.2
36
diff --git a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
deleted file mode 100644
index 2f2d19f536..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
+++ /dev/null
@@ -1,141 +0,0 @@
1From 883feb43129dc39b491e492c7ccfe89aefe53c44 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Thu, 27 Nov 2014 14:04:29 +0000
4Subject: [PATCH] qemu: Add missing wacom HID descriptor
5
6The USB wacom device is missing a HID descriptor which causes it
7to fail to operate with recent kernels (e.g. 3.17).
8
9This patch adds a HID desriptor to the device, based upon one from
10real wcom device.
11
12Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
13
14Upstream-Status: Submitted
152014/11/27
16
17[update patch context]
18Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
19---
20 hw/usb/dev-wacom.c | 94 +++++++++++++++++++++++++++++++++++++++++++++-
21 1 file changed, 93 insertions(+), 1 deletion(-)
22
23Index: qemu-6.0.0/hw/usb/dev-wacom.c
24===================================================================
25--- qemu-6.0.0.orig/hw/usb/dev-wacom.c
26+++ qemu-6.0.0/hw/usb/dev-wacom.c
27@@ -69,6 +69,89 @@ static const USBDescStrings desc_strings
28 [STR_SERIALNUMBER] = "1",
29 };
30
31+static const uint8_t qemu_tablet_hid_report_descriptor[] = {
32+ 0x05, 0x01, /* Usage Page (Generic Desktop) */
33+ 0x09, 0x02, /* Usage (Mouse) */
34+ 0xa1, 0x01, /* Collection (Application) */
35+ 0x85, 0x01, /* Report ID (1) */
36+ 0x09, 0x01, /* Usage (Pointer) */
37+ 0xa1, 0x00, /* Collection (Physical) */
38+ 0x05, 0x09, /* Usage Page (Button) */
39+ 0x19, 0x01, /* Usage Minimum (1) */
40+ 0x29, 0x05, /* Usage Maximum (5) */
41+ 0x15, 0x00, /* Logical Minimum (0) */
42+ 0x25, 0x01, /* Logical Maximum (1) */
43+ 0x95, 0x05, /* Report Count (5) */
44+ 0x75, 0x01, /* Report Size (1) */
45+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
46+ 0x95, 0x01, /* Report Count (1) */
47+ 0x75, 0x03, /* Report Size (3) */
48+ 0x81, 0x01, /* Input (Constant) */
49+ 0x05, 0x01, /* Usage Page (Generic Desktop) */
50+ 0x09, 0x30, /* Usage (X) */
51+ 0x09, 0x31, /* Usage (Y) */
52+ 0x15, 0x81, /* Logical Minimum (-127) */
53+ 0x25, 0x7f, /* Logical Maximum (127) */
54+ 0x75, 0x08, /* Report Size (8) */
55+ 0x95, 0x02, /* Report Count (2) */
56+ 0x81, 0x06, /* Input (Data, Variable, Relative) */
57+ 0xc0, /* End Collection */
58+ 0xc0, /* End Collection */
59+ 0x05, 0x0d, /* Usage Page (Digitizer) */
60+ 0x09, 0x01, /* Usage (Digitizer) */
61+ 0xa1, 0x01, /* Collection (Application) */
62+ 0x85, 0x02, /* Report ID (2) */
63+ 0xa1, 0x00, /* Collection (Physical) */
64+ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
65+ 0x09, 0x01, /* Usage (Digitizer) */
66+ 0x15, 0x00, /* Logical Minimum (0) */
67+ 0x26, 0xff, 0x00, /* Logical Maximum (255) */
68+ 0x75, 0x08, /* Report Size (8) */
69+ 0x95, 0x08, /* Report Count (8) */
70+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
71+ 0xc0, /* End Collection */
72+ 0x09, 0x01, /* Usage (Digitizer) */
73+ 0x85, 0x02, /* Report ID (2) */
74+ 0x95, 0x01, /* Report Count (1) */
75+ 0xb1, 0x02, /* FEATURE (2) */
76+ 0xc0, /* End Collection */
77+ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
78+ 0x09, 0x01, /* Usage (Digitizer) */
79+ 0xa1, 0x01, /* Collection (Application) */
80+ 0x85, 0x02, /* Report ID (2) */
81+ 0x05, 0x0d, /* Usage Page (Digitizer) */
82+ 0x09, 0x22, /* Usage (Finger) */
83+ 0xa1, 0x00, /* Collection (Physical) */
84+ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
85+ 0x09, 0x01, /* Usage (Digitizer) */
86+ 0x15, 0x00, /* Logical Minimum (0) */
87+ 0x26, 0xff, 0x00, /* Logical Maximum */
88+ 0x75, 0x08, /* Report Size (8) */
89+ 0x95, 0x02, /* Report Count (2) */
90+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
91+ 0x05, 0x01, /* Usage Page (Generic Desktop) */
92+ 0x09, 0x30, /* Usage (X) */
93+ 0x35, 0x00, /* Physical Minimum */
94+ 0x46, 0xe0, 0x2e, /* Physical Maximum */
95+ 0x26, 0xe0, 0x01, /* Logical Maximum */
96+ 0x75, 0x10, /* Report Size (16) */
97+ 0x95, 0x01, /* Report Count (1) */
98+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
99+ 0x09, 0x31, /* Usage (Y) */
100+ 0x46, 0x40, 0x1f, /* Physical Maximum */
101+ 0x26, 0x40, 0x01, /* Logical Maximum */
102+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
103+ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
104+ 0x09, 0x01, /* Usage (Digitizer) */
105+ 0x26, 0xff, 0x00, /* Logical Maximum */
106+ 0x75, 0x08, /* Report Size (8) */
107+ 0x95, 0x0d, /* Report Count (13) */
108+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
109+ 0xc0, /* End Collection */
110+ 0xc0, /* End Collection */
111+};
112+
113+
114 static const USBDescIface desc_iface_wacom = {
115 .bInterfaceNumber = 0,
116 .bNumEndpoints = 1,
117@@ -86,7 +169,7 @@ static const USBDescIface desc_iface_wac
118 0x00, /* u8 country_code */
119 0x01, /* u8 num_descriptors */
120 USB_DT_REPORT, /* u8 type: Report */
121- 0x6e, 0, /* u16 len */
122+ sizeof(qemu_tablet_hid_report_descriptor), 0, /* u16 len */
123 },
124 },
125 },
126@@ -266,6 +349,15 @@ static void usb_wacom_handle_control(USB
127 }
128
129 switch (request) {
130+ case InterfaceRequest | USB_REQ_GET_DESCRIPTOR:
131+ switch (value >> 8) {
132+ case 0x22:
133+ memcpy(data, qemu_tablet_hid_report_descriptor,
134+ sizeof(qemu_tablet_hid_report_descriptor));
135+ p->actual_length = sizeof(qemu_tablet_hid_report_descriptor);
136+ break;
137+ }
138+ break;
139 case WACOM_SET_REPORT:
140 if (s->mouse_grabbed) {
141 qemu_remove_mouse_event_handler(s->eh_entry);
diff --git a/meta/recipes-devtools/qemu/qemu/0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch b/meta/recipes-devtools/qemu/qemu/0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch
deleted file mode 100644
index ac4b6dcc44..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From 359dc12eb32b2395cf10796157002024e6a58054 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 15 Dec 2021 23:31:11 -0800
4Subject: [PATCH] riscv: Set 5.4 as minimum kernel version for riscv32
5
65.4 is first stable API as far as rv32 is concerned see [1]
7
8[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=7a55dd3fb6d2c307a002a16776be84310b9c8989
9
10Upstream-Status: Submitted [https://lists.nongnu.org/archive/html/qemu-devel/2021-12/msg02495.html]
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13Cc: Palmer Dabbelt <palmer@dabbelt.com>
14Cc: Alistair Francis <alistair.francis@wdc.com>
15Cc: Bin Meng <bin.meng@windriver.com>
16Signed-off-by: Matt Madison <matt@madison.systems>
17---
18 linux-user/riscv/target_syscall.h | 3 ++-
19 1 file changed, 2 insertions(+), 1 deletion(-)
20
21diff --git a/linux-user/riscv/target_syscall.h b/linux-user/riscv/target_syscall.h
22index dc597c897..9b1316132 100644
23--- a/linux-user/riscv/target_syscall.h
24+++ b/linux-user/riscv/target_syscall.h
25@@ -45,10 +45,11 @@ struct target_pt_regs {
26
27 #ifdef TARGET_RISCV32
28 #define UNAME_MACHINE "riscv32"
29+#define UNAME_MINIMUM_RELEASE "5.4.0"
30 #else
31 #define UNAME_MACHINE "riscv64"
32-#endif
33 #define UNAME_MINIMUM_RELEASE "4.15.0"
34+#endif
35
36 #define TARGET_MINSIGSTKSZ 2048
37 #define TARGET_MCL_CURRENT 1
38--
392.32.0
40
diff --git a/meta/recipes-devtools/qemu/qemu/0001-vhost-vsock-detach-the-virqueue-element-in-case-of-e.patch b/meta/recipes-devtools/qemu/qemu/0001-vhost-vsock-detach-the-virqueue-element-in-case-of-e.patch
deleted file mode 100644
index dcea9040c7..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-vhost-vsock-detach-the-virqueue-element-in-case-of-e.patch
+++ /dev/null
@@ -1,60 +0,0 @@
1CVE: CVE-2022-26354
2Upstream-Status: Backport
3Signed-off-by: Ross Burton <ross.burton@arm.com>
4
5From 0190d651a73463dc2b8f170b29326d1f38140a04 Mon Sep 17 00:00:00 2001
6From: Stefano Garzarella <sgarzare@redhat.com>
7Date: Mon, 28 Feb 2022 10:50:58 +0100
8Subject: [PATCH 1/2] vhost-vsock: detach the virqueue element in case of error
9
10In vhost_vsock_common_send_transport_reset(), if an element popped from
11the virtqueue is invalid, we should call virtqueue_detach_element() to
12detach it from the virtqueue before freeing its memory.
13
14Fixes: fc0b9b0e1c ("vhost-vsock: add virtio sockets device")
15Fixes: CVE-2022-26354
16Cc: qemu-stable@nongnu.org
17Reported-by: VictorV <vv474172261@gmail.com>
18Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
19Message-Id: <20220228095058.27899-1-sgarzare@redhat.com>
20Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
21Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
22Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
23---
24 hw/virtio/vhost-vsock-common.c | 10 +++++++---
25 1 file changed, 7 insertions(+), 3 deletions(-)
26
27diff --git a/hw/virtio/vhost-vsock-common.c b/hw/virtio/vhost-vsock-common.c
28index 3f3771274e..ed706681ac 100644
29--- a/hw/virtio/vhost-vsock-common.c
30+++ b/hw/virtio/vhost-vsock-common.c
31@@ -153,19 +153,23 @@ static void vhost_vsock_common_send_transport_reset(VHostVSockCommon *vvc)
32 if (elem->out_num) {
33 error_report("invalid vhost-vsock event virtqueue element with "
34 "out buffers");
35- goto out;
36+ goto err;
37 }
38
39 if (iov_from_buf(elem->in_sg, elem->in_num, 0,
40 &event, sizeof(event)) != sizeof(event)) {
41 error_report("vhost-vsock event virtqueue element is too short");
42- goto out;
43+ goto err;
44 }
45
46 virtqueue_push(vq, elem, sizeof(event));
47 virtio_notify(VIRTIO_DEVICE(vvc), vq);
48
49-out:
50+ g_free(elem);
51+ return;
52+
53+err:
54+ virtqueue_detach_element(vq, elem, 0);
55 g_free(elem);
56 }
57
58--
592.25.1
60
diff --git a/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch b/meta/recipes-devtools/qemu/qemu/0002-chardev-connect-socket-to-a-spawned-command.patch
index cf8b0e7a45..63a99c9620 100644
--- a/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
+++ b/meta/recipes-devtools/qemu/qemu/0002-chardev-connect-socket-to-a-spawned-command.patch
@@ -1,7 +1,7 @@
1From bcc63f775e265df69963a4ad7805b8678ace68f0 Mon Sep 17 00:00:00 2001 1From 14cd62607c9de232edf0a9b8503bd02783e03411 Mon Sep 17 00:00:00 2001
2From: Alistair Francis <alistair.francis@xilinx.com> 2From: Alistair Francis <alistair.francis@xilinx.com>
3Date: Thu, 21 Dec 2017 11:35:16 -0800 3Date: Thu, 21 Dec 2017 11:35:16 -0800
4Subject: [PATCH] chardev: connect socket to a spawned command 4Subject: [PATCH 02/12] chardev: connect socket to a spawned command
5 5
6The command is started in a shell (sh -c) with stdin connect to QEMU 6The command is started in a shell (sh -c) with stdin connect to QEMU
7via a Unix domain stream socket. QEMU then exchanges data via its own 7via a Unix domain stream socket. QEMU then exchanges data via its own
@@ -46,16 +46,16 @@ Upstream-Status: Inappropriate [embedded specific]
46Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> 46Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
47 47
48--- 48---
49 chardev/char-socket.c | 101 ++++++++++++++++++++++++++++++++++++++++++ 49 chardev/char-socket.c | 100 ++++++++++++++++++++++++++++++++++++++++++
50 chardev/char.c | 3 ++ 50 chardev/char.c | 3 ++
51 qapi/char.json | 5 +++ 51 qapi/char.json | 5 +++
52 3 files changed, 109 insertions(+) 52 3 files changed, 108 insertions(+)
53 53
54Index: qemu-6.2.0/chardev/char-socket.c 54diff --git a/chardev/char-socket.c b/chardev/char-socket.c
55=================================================================== 55index fab2d791d..c79641f24 100644
56--- qemu-6.2.0.orig/chardev/char-socket.c 56--- a/chardev/char-socket.c
57+++ qemu-6.2.0/chardev/char-socket.c 57+++ b/chardev/char-socket.c
58@@ -1362,6 +1362,67 @@ static bool qmp_chardev_validate_socket( 58@@ -1315,6 +1315,67 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock,
59 return true; 59 return true;
60 } 60 }
61 61
@@ -123,7 +123,7 @@ Index: qemu-6.2.0/chardev/char-socket.c
123 123
124 static void qmp_chardev_open_socket(Chardev *chr, 124 static void qmp_chardev_open_socket(Chardev *chr,
125 ChardevBackend *backend, 125 ChardevBackend *backend,
126@@ -1370,6 +1431,9 @@ static void qmp_chardev_open_socket(Char 126@@ -1323,6 +1384,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
127 { 127 {
128 SocketChardev *s = SOCKET_CHARDEV(chr); 128 SocketChardev *s = SOCKET_CHARDEV(chr);
129 ChardevSocket *sock = backend->u.socket.data; 129 ChardevSocket *sock = backend->u.socket.data;
@@ -133,7 +133,7 @@ Index: qemu-6.2.0/chardev/char-socket.c
133 bool do_nodelay = sock->has_nodelay ? sock->nodelay : false; 133 bool do_nodelay = sock->has_nodelay ? sock->nodelay : false;
134 bool is_listen = sock->has_server ? sock->server : true; 134 bool is_listen = sock->has_server ? sock->server : true;
135 bool is_telnet = sock->has_telnet ? sock->telnet : false; 135 bool is_telnet = sock->has_telnet ? sock->telnet : false;
136@@ -1440,6 +1504,14 @@ static void qmp_chardev_open_socket(Char 136@@ -1393,6 +1457,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
137 137
138 update_disconnected_filename(s); 138 update_disconnected_filename(s);
139 139
@@ -148,7 +148,7 @@ Index: qemu-6.2.0/chardev/char-socket.c
148 if (s->is_listen) { 148 if (s->is_listen) {
149 if (qmp_chardev_open_socket_server(chr, is_telnet || is_tn3270, 149 if (qmp_chardev_open_socket_server(chr, is_telnet || is_tn3270,
150 is_waitconnect, errp) < 0) { 150 is_waitconnect, errp) < 0) {
151@@ -1459,6 +1531,9 @@ static void qemu_chr_parse_socket(QemuOp 151@@ -1412,6 +1484,9 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
152 const char *host = qemu_opt_get(opts, "host"); 152 const char *host = qemu_opt_get(opts, "host");
153 const char *port = qemu_opt_get(opts, "port"); 153 const char *port = qemu_opt_get(opts, "port");
154 const char *fd = qemu_opt_get(opts, "fd"); 154 const char *fd = qemu_opt_get(opts, "fd");
@@ -158,7 +158,7 @@ Index: qemu-6.2.0/chardev/char-socket.c
158 #ifdef CONFIG_LINUX 158 #ifdef CONFIG_LINUX
159 bool tight = qemu_opt_get_bool(opts, "tight", true); 159 bool tight = qemu_opt_get_bool(opts, "tight", true);
160 bool abstract = qemu_opt_get_bool(opts, "abstract", false); 160 bool abstract = qemu_opt_get_bool(opts, "abstract", false);
161@@ -1466,6 +1541,20 @@ static void qemu_chr_parse_socket(QemuOp 161@@ -1419,6 +1494,20 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
162 SocketAddressLegacy *addr; 162 SocketAddressLegacy *addr;
163 ChardevSocket *sock; 163 ChardevSocket *sock;
164 164
@@ -176,10 +176,10 @@ Index: qemu-6.2.0/chardev/char-socket.c
176+ } else 176+ } else
177+#endif 177+#endif
178+ 178+
179 if ((!!path + !!fd + !!host) != 1) { 179 if ((!!path + !!fd + !!host) > 1) {
180 error_setg(errp, 180 error_setg(errp,
181 "Exactly one of 'path', 'fd' or 'host' required"); 181 "None or one of 'path', 'fd' or 'host' option required.");
182@@ -1516,13 +1605,24 @@ static void qemu_chr_parse_socket(QemuOp 182@@ -1469,13 +1558,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
183 sock->tls_creds = g_strdup(qemu_opt_get(opts, "tls-creds")); 183 sock->tls_creds = g_strdup(qemu_opt_get(opts, "tls-creds"));
184 sock->has_tls_authz = qemu_opt_get(opts, "tls-authz"); 184 sock->has_tls_authz = qemu_opt_get(opts, "tls-authz");
185 sock->tls_authz = g_strdup(qemu_opt_get(opts, "tls-authz")); 185 sock->tls_authz = g_strdup(qemu_opt_get(opts, "tls-authz"));
@@ -204,24 +204,24 @@ Index: qemu-6.2.0/chardev/char-socket.c
204 #ifdef CONFIG_LINUX 204 #ifdef CONFIG_LINUX
205 q_unix->has_tight = true; 205 q_unix->has_tight = true;
206 q_unix->tight = tight; 206 q_unix->tight = tight;
207Index: qemu-6.2.0/chardev/char.c 207diff --git a/chardev/char.c b/chardev/char.c
208=================================================================== 208index 0169d8dde..ce9a21f41 100644
209--- qemu-6.2.0.orig/chardev/char.c 209--- a/chardev/char.c
210+++ qemu-6.2.0/chardev/char.c 210+++ b/chardev/char.c
211@@ -836,6 +836,9 @@ QemuOptsList qemu_chardev_opts = { 211@@ -835,6 +835,9 @@ QemuOptsList qemu_chardev_opts = {
212 },{
212 .name = "path", 213 .name = "path",
213 .type = QEMU_OPT_STRING, 214 .type = QEMU_OPT_STRING,
214 },{ 215+ },{
215+ .name = "cmd", 216+ .name = "cmd",
216+ .type = QEMU_OPT_STRING, 217+ .type = QEMU_OPT_STRING,
217+ },{ 218 },{
218 .name = "host", 219 .name = "host",
219 .type = QEMU_OPT_STRING, 220 .type = QEMU_OPT_STRING,
220 },{ 221diff --git a/qapi/char.json b/qapi/char.json
221Index: qemu-6.2.0/qapi/char.json 222index 7b4215157..37feabdac 100644
222=================================================================== 223--- a/qapi/char.json
223--- qemu-6.2.0.orig/qapi/char.json 224+++ b/qapi/char.json
224+++ qemu-6.2.0/qapi/char.json
225@@ -250,6 +250,10 @@ 225@@ -250,6 +250,10 @@
226 # 226 #
227 # @addr: socket address to listen on (server=true) 227 # @addr: socket address to listen on (server=true)
@@ -241,3 +241,6 @@ Index: qemu-6.2.0/qapi/char.json
241 '*tls-creds': 'str', 241 '*tls-creds': 'str',
242 '*tls-authz' : 'str', 242 '*tls-authz' : 'str',
243 '*server': 'bool', 243 '*server': 'bool',
244--
2452.30.2
246
diff --git a/meta/recipes-devtools/qemu/qemu/0002-virtio-net-fix-map-leaking-on-error-during-receive.patch b/meta/recipes-devtools/qemu/qemu/0002-virtio-net-fix-map-leaking-on-error-during-receive.patch
deleted file mode 100644
index 59ccfdd03c..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0002-virtio-net-fix-map-leaking-on-error-during-receive.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1CVE: CVE-2022-26353
2Upstream-Status: Backport
3Signed-off-by: Ross Burton <ross.burton@arm.com>
4
5From 4d65ecbddd16f38a8cf23b3053ca5c3594f8d4a4 Mon Sep 17 00:00:00 2001
6From: Jason Wang <jasowang@redhat.com>
7Date: Tue, 8 Mar 2022 10:42:51 +0800
8Subject: [PATCH 2/2] virtio-net: fix map leaking on error during receive
9
10Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg")
11tries to fix the use after free of the sg by caching the virtqueue
12elements in an array and unmap them at once after receiving the
13packets, But it forgot to unmap the cached elements on error which
14will lead to leaking of mapping and other unexpected results.
15
16Fixing this by detaching the cached elements on error. This addresses
17CVE-2022-26353.
18
19Reported-by: Victor Tom <vv474172261@gmail.com>
20Cc: qemu-stable@nongnu.org
21Fixes: CVE-2022-26353
22Fixes: bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg")
23Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
24Signed-off-by: Jason Wang <jasowang@redhat.com>
25---
26 hw/net/virtio-net.c | 1 +
27 1 file changed, 1 insertion(+)
28
29diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
30index f2014d5ea0..e1f4748831 100644
31--- a/hw/net/virtio-net.c
32+++ b/hw/net/virtio-net.c
33@@ -1862,6 +1862,7 @@ static ssize_t virtio_net_receive_rcu(NetClientState *nc, const uint8_t *buf,
34
35 err:
36 for (j = 0; j < i; j++) {
37+ virtqueue_detach_element(q->rx_vq, elems[j], lens[j]);
38 g_free(elems[j]);
39 }
40
41--
422.25.1
43
diff --git a/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch b/meta/recipes-devtools/qemu/qemu/0003-apic-fixup-fallthrough-to-PIC.patch
index 3491fa8a53..f350ffce47 100644
--- a/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch
+++ b/meta/recipes-devtools/qemu/qemu/0003-apic-fixup-fallthrough-to-PIC.patch
@@ -1,7 +1,7 @@
1From a59a98d100123030a4145e7efe3b8a001920a9f1 Mon Sep 17 00:00:00 2001 1From dc2a8ccd440ee3741b61606eafed3f7e092f4312 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com> 2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Tue, 26 Feb 2013 11:43:28 -0500 3Date: Tue, 26 Feb 2013 11:43:28 -0500
4Subject: [PATCH] apic: fixup fallthrough to PIC 4Subject: [PATCH 03/12] apic: fixup fallthrough to PIC
5 5
6Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC 6Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC
7interrupts through the local APIC if the local APIC config says so.] 7interrupts through the local APIC if the local APIC config says so.]
@@ -29,11 +29,11 @@ Signed-off-by: He Zhe <zhe.he@windriver.com>
29 hw/intc/apic.c | 2 +- 29 hw/intc/apic.c | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-) 30 1 file changed, 1 insertion(+), 1 deletion(-)
31 31
32Index: qemu-6.0.0/hw/intc/apic.c 32diff --git a/hw/intc/apic.c b/hw/intc/apic.c
33=================================================================== 33index 3df11c34d..9506c88ce 100644
34--- qemu-6.0.0.orig/hw/intc/apic.c 34--- a/hw/intc/apic.c
35+++ qemu-6.0.0/hw/intc/apic.c 35+++ b/hw/intc/apic.c
36@@ -606,7 +606,7 @@ int apic_accept_pic_intr(DeviceState *de 36@@ -605,7 +605,7 @@ int apic_accept_pic_intr(DeviceState *dev)
37 APICCommonState *s = APIC(dev); 37 APICCommonState *s = APIC(dev);
38 uint32_t lvt0; 38 uint32_t lvt0;
39 39
@@ -42,3 +42,6 @@ Index: qemu-6.0.0/hw/intc/apic.c
42 return -1; 42 return -1;
43 43
44 lvt0 = s->lvt[APIC_LVT_LINT0]; 44 lvt0 = s->lvt[APIC_LVT_LINT0];
45--
462.30.2
47
diff --git a/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch b/meta/recipes-devtools/qemu/qemu/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch
index 4298964dfa..6faebd4e09 100644
--- a/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
+++ b/meta/recipes-devtools/qemu/qemu/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch
@@ -1,7 +1,7 @@
1From b51e6dd833172954c718bd600d846540eeb07220 Mon Sep 17 00:00:00 2001 1From d8265abdce5dc2bf74b3fccdf2b7257b4f3894f0 Mon Sep 17 00:00:00 2001
2From: He Zhe <zhe.he@windriver.com> 2From: He Zhe <zhe.he@windriver.com>
3Date: Wed, 28 Aug 2019 19:56:28 +0800 3Date: Wed, 28 Aug 2019 19:56:28 +0800
4Subject: [PATCH] configure: Add pkg-config handling for libgcrypt 4Subject: [PATCH 04/12] configure: Add pkg-config handling for libgcrypt
5 5
6libgcrypt may also be controlled by pkg-config, this patch adds pkg-config 6libgcrypt may also be controlled by pkg-config, this patch adds pkg-config
7handling for libgcrypt. 7handling for libgcrypt.
@@ -15,10 +15,10 @@ Signed-off-by: He Zhe <zhe.he@windriver.com>
15 1 file changed, 1 insertion(+), 1 deletion(-) 15 1 file changed, 1 insertion(+), 1 deletion(-)
16 16
17diff --git a/meson.build b/meson.build 17diff --git a/meson.build b/meson.build
18index b3e7ec0e9..4cbe715b7 100644 18index 861de93c4..d45ff2d7c 100644
19--- a/meson.build 19--- a/meson.build
20+++ b/meson.build 20+++ b/meson.build
21@@ -874,7 +874,7 @@ endif 21@@ -1063,7 +1063,7 @@ endif
22 if not gnutls_crypto.found() 22 if not gnutls_crypto.found()
23 if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled() 23 if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled()
24 gcrypt = dependency('libgcrypt', version: '>=1.8', 24 gcrypt = dependency('libgcrypt', version: '>=1.8',
@@ -27,3 +27,6 @@ index b3e7ec0e9..4cbe715b7 100644
27 required: get_option('gcrypt'), 27 required: get_option('gcrypt'),
28 kwargs: static_kwargs) 28 kwargs: static_kwargs)
29 # Debian has removed -lgpg-error from libgcrypt-config 29 # Debian has removed -lgpg-error from libgcrypt-config
30--
312.30.2
32
diff --git a/meta/recipes-devtools/qemu/qemu/0001-qemu-Do-not-include-file-if-not-exists.patch b/meta/recipes-devtools/qemu/qemu/0005-qemu-Do-not-include-file-if-not-exists.patch
index b8d288d3a2..3f3c39f996 100644
--- a/meta/recipes-devtools/qemu/qemu/0001-qemu-Do-not-include-file-if-not-exists.patch
+++ b/meta/recipes-devtools/qemu/qemu/0005-qemu-Do-not-include-file-if-not-exists.patch
@@ -1,7 +1,7 @@
1From 34247f83095f8cdcdc1f9d7f0c6ffbd46b25d979 Mon Sep 17 00:00:00 2001 1From f39e7bfc5ed07b5ecaeb705c4eae4855ca120d47 Mon Sep 17 00:00:00 2001
2From: Oleksiy Obitotskyy <oobitots@cisco.com> 2From: Oleksiy Obitotskyy <oobitots@cisco.com>
3Date: Wed, 25 Mar 2020 21:21:35 +0200 3Date: Wed, 25 Mar 2020 21:21:35 +0200
4Subject: [PATCH] qemu: Do not include file if not exists 4Subject: [PATCH 05/12] qemu: Do not include file if not exists
5 5
6Script configure checks for if_alg.h and check failed but 6Script configure checks for if_alg.h and check failed but
7if_alg.h still included. 7if_alg.h still included.
@@ -11,14 +11,15 @@ Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
11 11
12[update patch context] 12[update patch context]
13Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> 13Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
14
14--- 15---
15 linux-user/syscall.c | 2 ++ 16 linux-user/syscall.c | 2 ++
16 1 file changed, 2 insertions(+) 17 1 file changed, 2 insertions(+)
17 18
18Index: qemu-6.0.0/linux-user/syscall.c 19diff --git a/linux-user/syscall.c b/linux-user/syscall.c
19=================================================================== 20index f65045efe..340e0c6f0 100644
20--- qemu-6.0.0.orig/linux-user/syscall.c 21--- a/linux-user/syscall.c
21+++ qemu-6.0.0/linux-user/syscall.c 22+++ b/linux-user/syscall.c
22@@ -113,7 +113,9 @@ 23@@ -113,7 +113,9 @@
23 #include <linux/blkpg.h> 24 #include <linux/blkpg.h>
24 #include <netpacket/packet.h> 25 #include <netpacket/packet.h>
@@ -29,3 +30,6 @@ Index: qemu-6.0.0/linux-user/syscall.c
29 #include <linux/rtc.h> 30 #include <linux/rtc.h>
30 #include <sound/asound.h> 31 #include <sound/asound.h>
31 #ifdef HAVE_BTRFS_H 32 #ifdef HAVE_BTRFS_H
33--
342.30.2
35
diff --git a/meta/recipes-devtools/qemu/qemu/mmap2.patch b/meta/recipes-devtools/qemu/qemu/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
index e115473b70..75c0369318 100644
--- a/meta/recipes-devtools/qemu/qemu/mmap2.patch
+++ b/meta/recipes-devtools/qemu/qemu/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
@@ -1,3 +1,9 @@
1From 375cae3dd6151ef33cae8f243f6a2c2da6c0c356 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Fri, 8 Jan 2021 17:27:06 +0000
4Subject: [PATCH 06/12] qemu: Add some user space mmap tweaks to address musl
5 32 bit
6
1When using qemu-i386 to build qemux86 webkitgtk on musl, it sits in an 7When using qemu-i386 to build qemux86 webkitgtk on musl, it sits in an
2infinite loop of mremap calls of ever decreasing/increasing addresses. 8infinite loop of mremap calls of ever decreasing/increasing addresses.
3 9
@@ -13,11 +19,15 @@ rather than ENOMEM so adjust the other part of the test to this.
13Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01355.html] 19Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01355.html]
14Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org 20Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
15 21
16Index: qemu-6.0.0/linux-user/mmap.c 22---
17=================================================================== 23 linux-user/mmap.c | 10 +++++++---
18--- qemu-6.0.0.orig/linux-user/mmap.c 24 1 file changed, 7 insertions(+), 3 deletions(-)
19+++ qemu-6.0.0/linux-user/mmap.c 25
20@@ -733,12 +733,16 @@ abi_long target_mremap(abi_ulong old_add 26diff --git a/linux-user/mmap.c b/linux-user/mmap.c
27index c125031b9..e651834a5 100644
28--- a/linux-user/mmap.c
29+++ b/linux-user/mmap.c
30@@ -749,12 +749,16 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
21 int prot; 31 int prot;
22 void *host_addr; 32 void *host_addr;
23 33
@@ -37,3 +47,6 @@ Index: qemu-6.0.0/linux-user/mmap.c
37 return -1; 47 return -1;
38 } 48 }
39 49
50--
512.30.2
52
diff --git a/meta/recipes-devtools/qemu/qemu/determinism.patch b/meta/recipes-devtools/qemu/qemu/0007-qemu-Determinism-fixes.patch
index 330a31204d..0d7dae3689 100644
--- a/meta/recipes-devtools/qemu/qemu/determinism.patch
+++ b/meta/recipes-devtools/qemu/qemu/0007-qemu-Determinism-fixes.patch
@@ -1,4 +1,9 @@
1When sources are included within debug information, a couple of areas of the 1From 50bab5c2605b609ea7ea154f57a9be96d656725a Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Mon, 1 Mar 2021 13:00:47 +0000
4Subject: [PATCH 07/12] qemu: Determinism fixes
5
6When sources are included within debug information, a couple of areas of the
2qemu build are not reproducible due to either full buildpaths or timestamps. 7qemu build are not reproducible due to either full buildpaths or timestamps.
3 8
4Replace the full paths with relative ones. I couldn't figure out how to get 9Replace the full paths with relative ones. I couldn't figure out how to get
@@ -7,11 +12,15 @@ meson to pass relative paths but we can fix that in the script.
7Upstream-Status: Pending [some version of all/part of this may be accepted] 12Upstream-Status: Pending [some version of all/part of this may be accepted]
8RP 2021/3/1 13RP 2021/3/1
9 14
10Index: qemu-6.0.0/scripts/decodetree.py 15---
11=================================================================== 16 scripts/decodetree.py | 2 +-
12--- qemu-6.0.0.orig/scripts/decodetree.py 17 1 file changed, 1 insertion(+), 1 deletion(-)
13+++ qemu-6.0.0/scripts/decodetree.py 18
14@@ -1304,7 +1304,7 @@ def main(): 19diff --git a/scripts/decodetree.py b/scripts/decodetree.py
20index a03dc6b5e..4ea24c1f3 100644
21--- a/scripts/decodetree.py
22+++ b/scripts/decodetree.py
23@@ -1328,7 +1328,7 @@ def main():
15 toppat = ExcMultiPattern(0) 24 toppat = ExcMultiPattern(0)
16 25
17 for filename in args: 26 for filename in args:
@@ -20,3 +29,6 @@ Index: qemu-6.0.0/scripts/decodetree.py
20 f = open(filename, 'rt', encoding='utf-8') 29 f = open(filename, 'rt', encoding='utf-8')
21 parse_file(f, toppat) 30 parse_file(f, toppat)
22 f.close() 31 f.close()
32--
332.30.2
34
diff --git a/meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch b/meta/recipes-devtools/qemu/qemu/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch
index fcef129181..43d3c7cf1f 100644
--- a/meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch
+++ b/meta/recipes-devtools/qemu/qemu/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch
@@ -1,7 +1,7 @@
1From a4bdc0416134477e4eae386db04b1de7491163bb Mon Sep 17 00:00:00 2001 1From 2bf9388b801d4389e2d57e95a7897bfc1c42786e Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com> 2From: Changqing Li <changqing.li@windriver.com>
3Date: Thu, 14 Jan 2021 06:33:04 +0000 3Date: Thu, 14 Jan 2021 06:33:04 +0000
4Subject: [PATCH] tests/meson.build: use relative path to refer to files 4Subject: [PATCH 08/12] tests/meson.build: use relative path to refer to files
5 5
6Fix error like: 6Fix error like:
7Fatal error: can't create tests/ptimer-test.p/..._qemu-5.2.0_hw_core_ptimer.c.o: File name too long 7Fatal error: can't create tests/ptimer-test.p/..._qemu-5.2.0_hw_core_ptimer.c.o: File name too long
@@ -12,14 +12,15 @@ filename too long. Fixed by using relative path to refer to files
12Upstream-Status: Submitted [send to qemu-devel] 12Upstream-Status: Submitted [send to qemu-devel]
13 13
14Signed-off-by: Changqing Li <changqing.li@windriver.com> 14Signed-off-by: Changqing Li <changqing.li@windriver.com>
15
15--- 16---
16 tests/meson.build | 2 +- 17 tests/unit/meson.build | 4 ++--
17 1 files changed, 1 insertions(+), 1 deletion(-) 18 1 file changed, 2 insertions(+), 2 deletions(-)
18 19
19Index: qemu-6.2.0/tests/unit/meson.build 20diff --git a/tests/unit/meson.build b/tests/unit/meson.build
20=================================================================== 21index 96b295263..e4c3246dc 100644
21--- qemu-6.2.0.orig/tests/unit/meson.build 22--- a/tests/unit/meson.build
22+++ qemu-6.2.0/tests/unit/meson.build 23+++ b/tests/unit/meson.build
23@@ -44,9 +44,9 @@ tests = { 24@@ -44,9 +44,9 @@ tests = {
24 'test-keyval': [testqapi], 25 'test-keyval': [testqapi],
25 'test-logging': [], 26 'test-logging': [],
@@ -32,3 +33,6 @@ Index: qemu-6.2.0/tests/unit/meson.build
32 } 33 }
33 34
34 if have_system or have_tools 35 if have_system or have_tools
36--
372.30.2
38
diff --git a/meta/recipes-devtools/qemu/qemu/0001-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch b/meta/recipes-devtools/qemu/qemu/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
index 4691a3672a..23d0a69802 100644
--- a/meta/recipes-devtools/qemu/qemu/0001-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
+++ b/meta/recipes-devtools/qemu/qemu/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
@@ -1,7 +1,7 @@
1From 444e80e63d35006f41e7d658e2bf6d7c9f7641df Mon Sep 17 00:00:00 2001 1From ebf4bb2f51da83af0c61480414cfa156f7308b34 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 21 Mar 2022 10:09:38 -0700 3Date: Mon, 21 Mar 2022 10:09:38 -0700
4Subject: [PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux 4Subject: [PATCH 09/12] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux
5 systems 5 systems
6 6
7linux only wires MAP_SYNC and MAP_SHARED_VALIDATE for architectures 7linux only wires MAP_SYNC and MAP_SHARED_VALIDATE for architectures
@@ -13,12 +13,13 @@ Upstream-Status: Submitted [https://lists.nongnu.org/archive/html/qemu-devel/202
13Signed-off-by: Khem Raj <raj.khem@gmail.com> 13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14Cc: Zhang Yi <yi.z.zhang@linux.intel.com> 14Cc: Zhang Yi <yi.z.zhang@linux.intel.com>
15Cc: Michael S. Tsirkin <mst@redhat.com> 15Cc: Michael S. Tsirkin <mst@redhat.com>
16
16--- 17---
17 util/mmap-alloc.c | 10 +++++++--- 18 util/mmap-alloc.c | 10 +++++++---
18 1 file changed, 7 insertions(+), 3 deletions(-) 19 1 file changed, 7 insertions(+), 3 deletions(-)
19 20
20diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c 21diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c
21index 893d864354..86d3cda248 100644 22index 893d86435..86d3cda24 100644
22--- a/util/mmap-alloc.c 23--- a/util/mmap-alloc.c
23+++ b/util/mmap-alloc.c 24+++ b/util/mmap-alloc.c
24@@ -10,14 +10,18 @@ 25@@ -10,14 +10,18 @@
@@ -44,5 +45,5 @@ index 893d864354..86d3cda248 100644
44 #include "qemu/host-utils.h" 45 #include "qemu/host-utils.h"
45 #include "qemu/cutils.h" 46 #include "qemu/cutils.h"
46-- 47--
472.35.1 482.30.2
48 49
diff --git a/meta/recipes-devtools/qemu/qemu/pvrdma.patch b/meta/recipes-devtools/qemu/qemu/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch
index 7b0335b1dc..826d42fc20 100644
--- a/meta/recipes-devtools/qemu/qemu/pvrdma.patch
+++ b/meta/recipes-devtools/qemu/qemu/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch
@@ -1,4 +1,8 @@
1hw/pvrdma: Protect against buggy or malicious guest driver 1From 52c38fa9f3a790a7c2805e7d8cce3ea9262d6ae2 Mon Sep 17 00:00:00 2001
2From: Yuval Shaia <yuval.shaia.ml@gmail.com>
3Date: Tue, 12 Apr 2022 11:01:51 +0100
4Subject: [PATCH 10/12] hw/pvrdma: Protect against buggy or malicious guest
5 driver
2 6
3Guest driver might execute HW commands when shared buffers are not yet 7Guest driver might execute HW commands when shared buffers are not yet
4allocated. 8allocated.
@@ -12,10 +16,15 @@ Signed-off-by: Yuval Shaia <yuval.shaia.ml@gmail.com>
12CVE: CVE-2022-1050 16CVE: CVE-2022-1050
13Upstream-Status: Submitted [https://lists.nongnu.org/archive/html/qemu-devel/2022-03/msg05197.html] 17Upstream-Status: Submitted [https://lists.nongnu.org/archive/html/qemu-devel/2022-03/msg05197.html]
14 18
15Index: qemu-6.2.0/hw/rdma/vmw/pvrdma_cmd.c 19---
16=================================================================== 20 hw/rdma/vmw/pvrdma_cmd.c | 6 ++++++
17--- qemu-6.2.0.orig/hw/rdma/vmw/pvrdma_cmd.c 21 hw/rdma/vmw/pvrdma_main.c | 3 ++-
18+++ qemu-6.2.0/hw/rdma/vmw/pvrdma_cmd.c 22 2 files changed, 8 insertions(+), 1 deletion(-)
23
24diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c
25index da7ddfa54..89db963c4 100644
26--- a/hw/rdma/vmw/pvrdma_cmd.c
27+++ b/hw/rdma/vmw/pvrdma_cmd.c
19@@ -796,6 +796,12 @@ int pvrdma_exec_cmd(PVRDMADev *dev) 28@@ -796,6 +796,12 @@ int pvrdma_exec_cmd(PVRDMADev *dev)
20 29
21 dsr_info = &dev->dsr_info; 30 dsr_info = &dev->dsr_info;
@@ -29,11 +38,11 @@ Index: qemu-6.2.0/hw/rdma/vmw/pvrdma_cmd.c
29 if (dsr_info->req->hdr.cmd >= sizeof(cmd_handlers) / 38 if (dsr_info->req->hdr.cmd >= sizeof(cmd_handlers) /
30 sizeof(struct cmd_handler)) { 39 sizeof(struct cmd_handler)) {
31 rdma_error_report("Unsupported command"); 40 rdma_error_report("Unsupported command");
32Index: qemu-6.2.0/hw/rdma/vmw/pvrdma_main.c 41diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c
33=================================================================== 42index 91206dbb8..0b7d908e2 100644
34--- qemu-6.2.0.orig/hw/rdma/vmw/pvrdma_main.c 43--- a/hw/rdma/vmw/pvrdma_main.c
35+++ qemu-6.2.0/hw/rdma/vmw/pvrdma_main.c 44+++ b/hw/rdma/vmw/pvrdma_main.c
36@@ -249,7 +249,8 @@ static void init_dsr_dev_caps(PVRDMADev 45@@ -249,7 +249,8 @@ static void init_dsr_dev_caps(PVRDMADev *dev)
37 { 46 {
38 struct pvrdma_device_shared_region *dsr; 47 struct pvrdma_device_shared_region *dsr;
39 48
@@ -43,3 +52,6 @@ Index: qemu-6.2.0/hw/rdma/vmw/pvrdma_main.c
43 rdma_error_report("Can't initialized DSR"); 52 rdma_error_report("Can't initialized DSR");
44 return; 53 return;
45 } 54 }
55--
562.30.2
57
diff --git a/meta/recipes-devtools/qemu/qemu/cross.patch b/meta/recipes-devtools/qemu/qemu/cross.patch
index bdb77ec7d0..d1256a1229 100644
--- a/meta/recipes-devtools/qemu/qemu/cross.patch
+++ b/meta/recipes-devtools/qemu/qemu/cross.patch
@@ -1,7 +1,7 @@
1From f51ece86f84c877f255746cba22a6745f37d2b7f Mon Sep 17 00:00:00 2001 1From 76c3fc4c87231bed32974ebbbdb5079cff45a6b7 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org> 2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Tue, 5 Jan 2021 23:00:14 +0000 3Date: Tue, 5 Jan 2021 23:00:14 +0000
4Subject: [PATCH] qemu: Upgrade 5.1.0->5.2.0 4Subject: [PATCH 12/12] qemu: Upgrade 5.1.0->5.2.0
5 5
6We need to be able to trigger configure's cross code but we don't want 6We need to be able to trigger configure's cross code but we don't want
7to set cross_prefix as it does other things we don't want. Patch things 7to set cross_prefix as it does other things we don't want. Patch things
@@ -9,23 +9,24 @@ so we can do what we need in the target config case.
9 9
10Upstream-Status: Inappropriate [may be rewritten in a way upstream may accept?] 10Upstream-Status: Inappropriate [may be rewritten in a way upstream may accept?]
11Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> 11Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12
12--- 13---
13 configure | 4 ---- 14 configure | 4 ----
14 1 file changed, 4 deletions(-) 15 1 file changed, 4 deletions(-)
15 16
16diff --git a/configure b/configure 17diff --git a/configure b/configure
17index 9a79a004d..563b7827f 100755 18index 7c08c1835..0613279f9 100755
18--- a/configure 19--- a/configure
19+++ b/configure 20+++ b/configure
20@@ -5128,7 +5128,6 @@ if test "$skip_meson" = no; then 21@@ -3118,7 +3118,6 @@ if test "$skip_meson" = no; then
21 fi 22 fi
22 echo "strip = [$(meson_quote $strip)]" >> $cross 23 echo "strip = [$(meson_quote $strip)]" >> $cross
23 echo "windres = [$(meson_quote $windres)]" >> $cross 24 echo "windres = [$(meson_quote $windres)]" >> $cross
24- if test "$cross_compile" = "yes"; then 25- if test "$cross_compile" = "yes"; then
25 cross_arg="--cross-file config-meson.cross" 26 cross_arg="--cross-file config-meson.cross"
26 echo "[host_machine]" >> $cross 27 echo "[host_machine]" >> $cross
27 if test "$mingw32" = "yes" ; then 28 echo "system = '$targetos'" >> $cross
28@@ -5160,9 +5159,6 @@ if test "$skip_meson" = no; then 29@@ -3136,9 +3135,6 @@ if test "$skip_meson" = no; then
29 else 30 else
30 echo "endian = 'little'" >> $cross 31 echo "endian = 'little'" >> $cross
31 fi 32 fi
@@ -36,5 +37,5 @@ index 9a79a004d..563b7827f 100755
36 37
37 rm -rf meson-private meson-info meson-logs 38 rm -rf meson-private meson-info meson-logs
38-- 39--
392.17.1 402.30.2
40 41
diff --git a/meta/recipes-devtools/qemu/qemu/no-ps2.patch b/meta/recipes-devtools/qemu/qemu/no-ps2.patch
deleted file mode 100644
index 8c167521d7..0000000000
--- a/meta/recipes-devtools/qemu/qemu/no-ps2.patch
+++ /dev/null
@@ -1,123 +0,0 @@
1Upstream-Status: Backport [4ccd5fe22feb95137d325f422016a6473541fe9f]
2Signed-off-by: Ross Burton <ross.burton@arm.com>
3
4From ec2d4aa7ca28127faa7ccdbf89d2bf5a4984b62f Mon Sep 17 00:00:00 2001
5From: Joelle van Dyne <j@getutm.app>
6Date: Sun, 27 Feb 2022 13:06:55 -0800
7Subject: [PATCH] pc: add option to disable PS/2 mouse/keyboard
8
9On some older software like Windows 7 installer, having both a PS/2
10mouse and USB mouse results in only one device working property (which
11might be a different device each boot). While the workaround to not use
12a USB mouse with such software is valid, it creates an inconsistent
13experience if the user wishes to always use a USB mouse.
14
15This introduces a new machine property to inhibit the creation of the
16i8042 PS/2 controller.
17
18Signed-off-by: Joelle van Dyne <j@getutm.app>
19Message-Id: <20220227210655.45592-1-j@getutm.app>
20Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
21Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
22---
23 hw/i386/pc.c | 28 ++++++++++++++++++++++++++--
24 include/hw/i386/pc.h | 2 ++
25 2 files changed, 28 insertions(+), 2 deletions(-)
26
27diff --git a/hw/i386/pc.c b/hw/i386/pc.c
28index a2ef40ecbc..8a6a089ee2 100644
29--- a/hw/i386/pc.c
30+++ b/hw/i386/pc.c
31@@ -1008,7 +1008,8 @@ static const MemoryRegionOps ioportF0_io_ops = {
32 },
33 };
34
35-static void pc_superio_init(ISABus *isa_bus, bool create_fdctrl, bool no_vmport)
36+static void pc_superio_init(ISABus *isa_bus, bool create_fdctrl,
37+ bool create_i8042, bool no_vmport)
38 {
39 int i;
40 DriveInfo *fd[MAX_FD];
41@@ -1030,6 +1031,10 @@ static void pc_superio_init(ISABus *isa_bus, bool create_fdctrl, bool no_vmport)
42 }
43 }
44
45+ if (!create_i8042) {
46+ return;
47+ }
48+
49 i8042 = isa_create_simple(isa_bus, "i8042");
50 if (!no_vmport) {
51 isa_create_simple(isa_bus, TYPE_VMPORT);
52@@ -1125,7 +1130,8 @@ void pc_basic_device_init(struct PCMachineState *pcms,
53 i8257_dma_init(isa_bus, 0);
54
55 /* Super I/O */
56- pc_superio_init(isa_bus, create_fdctrl, pcms->vmport != ON_OFF_AUTO_ON);
57+ pc_superio_init(isa_bus, create_fdctrl, pcms->i8042_enabled,
58+ pcms->vmport != ON_OFF_AUTO_ON);
59 }
60
61 void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bus, PCIBus *pci_bus)
62@@ -1506,6 +1512,20 @@ static void pc_machine_set_hpet(Object *obj, bool value, Error **errp)
63 pcms->hpet_enabled = value;
64 }
65
66+static bool pc_machine_get_i8042(Object *obj, Error **errp)
67+{
68+ PCMachineState *pcms = PC_MACHINE(obj);
69+
70+ return pcms->i8042_enabled;
71+}
72+
73+static void pc_machine_set_i8042(Object *obj, bool value, Error **errp)
74+{
75+ PCMachineState *pcms = PC_MACHINE(obj);
76+
77+ pcms->i8042_enabled = value;
78+}
79+
80 static bool pc_machine_get_default_bus_bypass_iommu(Object *obj, Error **errp)
81 {
82 PCMachineState *pcms = PC_MACHINE(obj);
83@@ -1616,6 +1636,7 @@ static void pc_machine_initfn(Object *obj)
84 pcms->smbus_enabled = true;
85 pcms->sata_enabled = true;
86 pcms->pit_enabled = true;
87+ pcms->i8042_enabled = true;
88 pcms->max_fw_size = 8 * MiB;
89 #ifdef CONFIG_HPET
90 pcms->hpet_enabled = true;
91@@ -1744,6 +1765,9 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
92 object_class_property_add_bool(oc, "hpet",
93 pc_machine_get_hpet, pc_machine_set_hpet);
94
95+ object_class_property_add_bool(oc, PC_MACHINE_I8042,
96+ pc_machine_get_i8042, pc_machine_set_i8042);
97+
98 object_class_property_add_bool(oc, "default-bus-bypass-iommu",
99 pc_machine_get_default_bus_bypass_iommu,
100 pc_machine_set_default_bus_bypass_iommu);
101diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
102index 9ab39e428f..642c915aa3 100644
103--- a/include/hw/i386/pc.h
104+++ b/include/hw/i386/pc.h
105@@ -46,6 +46,7 @@ typedef struct PCMachineState {
106 bool sata_enabled;
107 bool pit_enabled;
108 bool hpet_enabled;
109+ bool i8042_enabled;
110 bool default_bus_bypass_iommu;
111 uint64_t max_fw_size;
112
113@@ -62,6 +63,7 @@ typedef struct PCMachineState {
114 #define PC_MACHINE_SMBUS "smbus"
115 #define PC_MACHINE_SATA "sata"
116 #define PC_MACHINE_PIT "pit"
117+#define PC_MACHINE_I8042 "i8042"
118 #define PC_MACHINE_MAX_FW_SIZE "max-fw-size"
119 /**
120 * PCMachineClass:
121--
1222.25.1
123