All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 00/15] Trivial branch for 8.0 patches
@ 2023-01-18  7:52 Laurent Vivier
  2023-01-18  7:52 ` [PULL 01/15] Call qemu_socketpair() instead of socketpair() when possible Laurent Vivier
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Laurent Vivier

The following changes since commit a8d6abe1292e1db1ad9be5b2b124b9c01bcda094:

  Merge tag 'mips-20230113' of https://github.com/philmd/qemu into staging (2023-01-16 11:24:11 +0000)

are available in the Git repository at:

  https://gitlab.com/laurent_vivier/qemu.git tags/trivial-branch-for-8.0-pull-request

for you to fetch changes up to b93b3cb1bb72f313d8c33791e0a82a25da780cf0:

  hw/ssi/sifive_spi.c: spelling: reigster (2023-01-17 10:02:37 +0100)

----------------------------------------------------------------
trivial branch pull request 20230118

----------------------------------------------------------------

Guoyi Tu (1):
  Call qemu_socketpair() instead of socketpair() when possible

Hoa Nguyen (1):
  hw/cxl/cxl-host: Fix an error message typo

Marc-André Lureau (1):
  ccid-card-emulated: fix cast warning/error

Michael Tokarev (2):
  hw/cxl/cxl-cdat.c: spelling: missmatch
  hw/ssi/sifive_spi.c: spelling: reigster

Philippe Mathieu-Daudé (5):
  hw/display: Move omap_lcdc.c out of target-specific source set
  hw/intc: Move some files out of the target-specific source set
  hw/tpm: Move tpm_ppi.c out of target-specific source set
  hw/arm: Move various units to softmmu_ss[]
  hw/i386/pc: Remove unused 'owner' argument from pc_pci_as_mapping_init

Thomas Huth (4):
  hw/cpu: Mark arm11 and realview mpcore as target-independent code
  hw/intc: Mark more interrupt-controller files as target independent
  hw/usb: Mark the XLNX_VERSAL-related files as target-independent
  tests/qtest/test-hmp: Improve the check for verbose mode

Yuval Shaia (1):
  hw/pvrdma: Protect against buggy or malicious guest driver

 backends/tpm/tpm_emulator.c         |  2 +-
 hw/arm/meson.build                  | 11 +++++++----
 hw/cpu/meson.build                  |  4 ++--
 hw/cxl/cxl-cdat.c                   |  2 +-
 hw/cxl/cxl-host.c                   |  2 +-
 hw/display/meson.build              |  2 +-
 hw/i386/pc.c                        |  2 +-
 hw/intc/meson.build                 | 12 ++++++------
 hw/pci-host/i440fx.c                |  3 +--
 hw/pci-host/q35.c                   |  3 +--
 hw/rdma/vmw/pvrdma_cmd.c            |  6 ++++++
 hw/ssi/sifive_spi.c                 |  2 +-
 hw/tpm/meson.build                  |  4 ++--
 hw/usb/ccid-card-emulated.c         |  2 +-
 hw/usb/meson.build                  |  4 ++--
 include/hw/i386/pc.h                |  2 +-
 tests/qtest/dbus-display-test.c     |  5 +++--
 tests/qtest/migration-test.c        |  2 +-
 tests/qtest/test-hmp.c              |  2 +-
 tests/unit/test-crypto-tlssession.c |  4 ++--
 tests/unit/test-io-channel-tls.c    |  2 +-
 21 files changed, 43 insertions(+), 35 deletions(-)

-- 
2.38.1



^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PULL 01/15] Call qemu_socketpair() instead of socketpair() when possible
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-18  7:52 ` [PULL 02/15] hw/display: Move omap_lcdc.c out of target-specific source set Laurent Vivier
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Guoyi Tu, Thomas Huth, Philippe Mathieu-Daudé,
	Laurent Vivier

From: Guoyi Tu <tugy@chinatelecom.cn>

As qemu_socketpair() was introduced in commit 3c63b4e9
("oslib-posix: Introduce qemu_socketpair()"), it's time
to replace the other existing socketpair() calls with
qemu_socketpair() if possible

Signed-off-by: Guoyi Tu <tugy@chinatelecom.cn>
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <cd28916a-f1f3-b54e-6ade-8a3647c3a9a5@chinatelecom.cn>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 backends/tpm/tpm_emulator.c         | 2 +-
 tests/qtest/dbus-display-test.c     | 5 +++--
 tests/qtest/migration-test.c        | 2 +-
 tests/unit/test-crypto-tlssession.c | 4 ++--
 tests/unit/test-io-channel-tls.c    | 2 +-
 5 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/backends/tpm/tpm_emulator.c b/backends/tpm/tpm_emulator.c
index 49cc3d749dc4..67e7b212e3eb 100644
--- a/backends/tpm/tpm_emulator.c
+++ b/backends/tpm/tpm_emulator.c
@@ -553,7 +553,7 @@ static int tpm_emulator_prepare_data_fd(TPMEmulator *tpm_emu)
     Error *err = NULL;
     int fds[2] = { -1, -1 };
 
-    if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) {
+    if (qemu_socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) {
         error_report("tpm-emulator: Failed to create socketpair");
         return -1;
     }
diff --git a/tests/qtest/dbus-display-test.c b/tests/qtest/dbus-display-test.c
index cb1b62d1d11a..fef025ac6f83 100644
--- a/tests/qtest/dbus-display-test.c
+++ b/tests/qtest/dbus-display-test.c
@@ -1,5 +1,6 @@
 #include "qemu/osdep.h"
 #include "qemu/dbus.h"
+#include "qemu/sockets.h"
 #include <gio/gio.h>
 #include <gio/gunixfdlist.h>
 #include "libqtest.h"
@@ -36,7 +37,7 @@ test_setup(QTestState **qts, GDBusConnection **conn)
 
     *qts = qtest_init("-display dbus,p2p=yes -name dbus-test");
 
-    g_assert_cmpint(socketpair(AF_UNIX, SOCK_STREAM, 0, pair), ==, 0);
+    g_assert_cmpint(qemu_socketpair(AF_UNIX, SOCK_STREAM, 0, pair), ==, 0);
 
     qtest_qmp_add_client(*qts, "@dbus-display", pair[1]);
 
@@ -152,7 +153,7 @@ test_dbus_display_console(void)
 
     test_setup(&qts, &conn);
 
-    g_assert_cmpint(socketpair(AF_UNIX, SOCK_STREAM, 0, pair), ==, 0);
+    g_assert_cmpint(qemu_socketpair(AF_UNIX, SOCK_STREAM, 0, pair), ==, 0);
     fd_list = g_unix_fd_list_new();
     idx = g_unix_fd_list_append(fd_list, pair[1], NULL);
 
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index dbde726adf8c..1dd32c9506bf 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -1661,7 +1661,7 @@ static void *test_migrate_fd_start_hook(QTestState *from,
     int pair[2];
 
     /* Create two connected sockets for migration */
-    ret = socketpair(PF_LOCAL, SOCK_STREAM, 0, pair);
+    ret = qemu_socketpair(PF_LOCAL, SOCK_STREAM, 0, pair);
     g_assert_cmpint(ret, ==, 0);
 
     /* Send the 1st socket to the target */
diff --git a/tests/unit/test-crypto-tlssession.c b/tests/unit/test-crypto-tlssession.c
index 615a1344b4aa..b12e7b687927 100644
--- a/tests/unit/test-crypto-tlssession.c
+++ b/tests/unit/test-crypto-tlssession.c
@@ -82,7 +82,7 @@ static void test_crypto_tls_session_psk(void)
     int ret;
 
     /* We'll use this for our fake client-server connection */
-    ret = socketpair(AF_UNIX, SOCK_STREAM, 0, channel);
+    ret = qemu_socketpair(AF_UNIX, SOCK_STREAM, 0, channel);
     g_assert(ret == 0);
 
     /*
@@ -236,7 +236,7 @@ static void test_crypto_tls_session_x509(const void *opaque)
     int ret;
 
     /* We'll use this for our fake client-server connection */
-    ret = socketpair(AF_UNIX, SOCK_STREAM, 0, channel);
+    ret = qemu_socketpair(AF_UNIX, SOCK_STREAM, 0, channel);
     g_assert(ret == 0);
 
     /*
diff --git a/tests/unit/test-io-channel-tls.c b/tests/unit/test-io-channel-tls.c
index cc39247556f3..e036ac5df4c2 100644
--- a/tests/unit/test-io-channel-tls.c
+++ b/tests/unit/test-io-channel-tls.c
@@ -121,7 +121,7 @@ static void test_io_channel_tls(const void *opaque)
     GMainContext *mainloop;
 
     /* We'll use this for our fake client-server connection */
-    g_assert(socketpair(AF_UNIX, SOCK_STREAM, 0, channel) == 0);
+    g_assert(qemu_socketpair(AF_UNIX, SOCK_STREAM, 0, channel) == 0);
 
 #define CLIENT_CERT_DIR "tests/test-io-channel-tls-client/"
 #define SERVER_CERT_DIR "tests/test-io-channel-tls-server/"
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PULL 02/15] hw/display: Move omap_lcdc.c out of target-specific source set
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
  2023-01-18  7:52 ` [PULL 01/15] Call qemu_socketpair() instead of socketpair() when possible Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-18  7:52 ` [PULL 03/15] hw/intc: Move some files out of the " Laurent Vivier
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Philippe Mathieu-Daudé,
	Thomas Huth, Richard Henderson, Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@linaro.org>

While only used by the ARM targets, this device can be built
once for all.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221209170042.71169-2-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230112134928.1026006-2-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/display/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/display/meson.build b/hw/display/meson.build
index f860c2c562ac..f470179122c5 100644
--- a/hw/display/meson.build
+++ b/hw/display/meson.build
@@ -115,7 +115,7 @@ if config_all_devices.has_key('CONFIG_VIRTIO_VGA')
   hw_display_modules += {'virtio-vga-gl': virtio_vga_gl_ss}
 endif
 
-specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_lcdc.c'))
+softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_lcdc.c'))
 
 softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-vga-stub.c'))
 modules += { 'hw-display': hw_display_modules }
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PULL 03/15] hw/intc: Move some files out of the target-specific source set
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
  2023-01-18  7:52 ` [PULL 01/15] Call qemu_socketpair() instead of socketpair() when possible Laurent Vivier
  2023-01-18  7:52 ` [PULL 02/15] hw/display: Move omap_lcdc.c out of target-specific source set Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-18  7:52 ` [PULL 04/15] hw/tpm: Move tpm_ppi.c out of " Laurent Vivier
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Philippe Mathieu-Daudé,
	Thomas Huth, Richard Henderson, Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@linaro.org>

The Goldfish interrupt controller is not target specific.

While the Exynos interrupt combiner is only used by the ARM
targets, we can build this device once for all.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221209170042.71169-3-philmd@linaro.org>
[thuth: Change patch title, and also move 'exynos4210_gic.c']
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230112134928.1026006-3-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/intc/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/intc/meson.build b/hw/intc/meson.build
index cd9f1ee8880f..0988cae8ab06 100644
--- a/hw/intc/meson.build
+++ b/hw/intc/meson.build
@@ -13,6 +13,8 @@ softmmu_ss.add(when: 'CONFIG_ARM_GICV3_TCG', if_true: files(
   'arm_gicv3_redist.c',
 ))
 softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_pic.c'))
+softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_gic.c', 'exynos4210_combiner.c'))
+softmmu_ss.add(when: 'CONFIG_GOLDFISH_PIC', if_true: files('goldfish_pic.c'))
 softmmu_ss.add(when: 'CONFIG_HEATHROW_PIC', if_true: files('heathrow_pic.c'))
 softmmu_ss.add(when: 'CONFIG_I8259', if_true: files('i8259_common.c', 'i8259.c'))
 softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_avic.c', 'imx_gpcv2.c'))
@@ -39,7 +41,6 @@ specific_ss.add(when: 'CONFIG_ARM_GIC_KVM', if_true: files('arm_gic_kvm.c'))
 specific_ss.add(when: ['CONFIG_ARM_GIC_KVM', 'TARGET_AARCH64'], if_true: files('arm_gicv3_kvm.c', 'arm_gicv3_its_kvm.c'))
 specific_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_nvic.c'))
 specific_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_vic.c'))
-specific_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_gic.c', 'exynos4210_combiner.c'))
 specific_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_irqmp.c'))
 specific_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic.c'))
 specific_ss.add(when: 'CONFIG_LOONGSON_LIOINTC', if_true: files('loongson_liointc.c'))
@@ -66,7 +67,6 @@ specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('xics_spapr.c', 'spapr_xi
 specific_ss.add(when: 'CONFIG_XIVE', if_true: files('xive.c'))
 specific_ss.add(when: ['CONFIG_KVM', 'CONFIG_XIVE'],
 		if_true: files('spapr_xive_kvm.c'))
-specific_ss.add(when: 'CONFIG_GOLDFISH_PIC', if_true: files('goldfish_pic.c'))
 specific_ss.add(when: 'CONFIG_M68K_IRQC', if_true: files('m68k_irqc.c'))
 specific_ss.add(when: 'CONFIG_NIOS2_VIC', if_true: files('nios2_vic.c'))
 specific_ss.add(when: 'CONFIG_LOONGARCH_IPI', if_true: files('loongarch_ipi.c'))
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PULL 04/15] hw/tpm: Move tpm_ppi.c out of target-specific source set
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
                   ` (2 preceding siblings ...)
  2023-01-18  7:52 ` [PULL 03/15] hw/intc: Move some files out of the " Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-18  7:52 ` [PULL 05/15] hw/arm: Move various units to softmmu_ss[] Laurent Vivier
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Philippe Mathieu-Daudé,
	Thomas Huth, Richard Henderson, Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@linaro.org>

The TPM Physical Presence Interface is not target specific.
Build this file once for all targets.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221209170042.71169-4-philmd@linaro.org>
[thuth: Drop the CONFIG_SOFTMMU statements, they are not needed here]
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230112134928.1026006-4-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/tpm/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/tpm/meson.build b/hw/tpm/meson.build
index 1c68d81d6ab2..7abc2d794a84 100644
--- a/hw/tpm/meson.build
+++ b/hw/tpm/meson.build
@@ -2,7 +2,7 @@ softmmu_ss.add(when: 'CONFIG_TPM_TIS', if_true: files('tpm_tis_common.c'))
 softmmu_ss.add(when: 'CONFIG_TPM_TIS_ISA', if_true: files('tpm_tis_isa.c'))
 softmmu_ss.add(when: 'CONFIG_TPM_TIS_SYSBUS', if_true: files('tpm_tis_sysbus.c'))
 softmmu_ss.add(when: 'CONFIG_TPM_CRB', if_true: files('tpm_crb.c'))
+softmmu_ss.add(when: 'CONFIG_TPM_TIS', if_true: files('tpm_ppi.c'))
+softmmu_ss.add(when: 'CONFIG_TPM_CRB', if_true: files('tpm_ppi.c'))
 
-specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TPM_TIS'], if_true: files('tpm_ppi.c'))
-specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TPM_CRB'], if_true: files('tpm_ppi.c'))
 specific_ss.add(when: 'CONFIG_TPM_SPAPR', if_true: files('tpm_spapr.c'))
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PULL 05/15] hw/arm: Move various units to softmmu_ss[]
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
                   ` (3 preceding siblings ...)
  2023-01-18  7:52 ` [PULL 04/15] hw/tpm: Move tpm_ppi.c out of " Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-18  7:52 ` [PULL 06/15] hw/cpu: Mark arm11 and realview mpcore as target-independent code Laurent Vivier
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Philippe Mathieu-Daudé,
	Thomas Huth, Richard Henderson, Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@linaro.org>

arm_ss[] units are built twice: once for 32-bit word size and
once for 64-bit. The following units don't require any word
size knowledge and can be moved to softmmu_ss[] (where they
are built once):

 - smmu-common.c
 - exynos4_boards.c
 - bcm2835_peripherals.c
 - tosa.c

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230110164406.94366-2-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230112134928.1026006-5-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/arm/meson.build | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/hw/arm/meson.build b/hw/arm/meson.build
index 76d4d650e42e..b03604560392 100644
--- a/hw/arm/meson.build
+++ b/hw/arm/meson.build
@@ -3,7 +3,6 @@ arm_ss.add(files('boot.c'), fdt)
 arm_ss.add(when: 'CONFIG_ARM_VIRT', if_true: files('virt.c'))
 arm_ss.add(when: 'CONFIG_ACPI', if_true: files('virt-acpi-build.c'))
 arm_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic_boards.c'))
-arm_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4_boards.c'))
 arm_ss.add(when: 'CONFIG_EMCRAFT_SF2', if_true: files('msf2-som.c'))
 arm_ss.add(when: 'CONFIG_HIGHBANK', if_true: files('highbank.c'))
 arm_ss.add(when: 'CONFIG_INTEGRATOR', if_true: files('integratorcp.c'))
@@ -19,7 +18,6 @@ arm_ss.add(when: 'CONFIG_SX1', if_true: files('omap_sx1.c'))
 arm_ss.add(when: 'CONFIG_CHEETAH', if_true: files('palm.c'))
 arm_ss.add(when: 'CONFIG_GUMSTIX', if_true: files('gumstix.c'))
 arm_ss.add(when: 'CONFIG_SPITZ', if_true: files('spitz.c'))
-arm_ss.add(when: 'CONFIG_TOSA', if_true: files('tosa.c'))
 arm_ss.add(when: 'CONFIG_Z2', if_true: files('z2.c'))
 arm_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview.c'))
 arm_ss.add(when: 'CONFIG_SBSA_REF', if_true: files('sbsa-ref.c'))
@@ -39,7 +37,7 @@ arm_ss.add(when: 'CONFIG_OMAP', if_true: files('omap1.c', 'omap2.c'))
 arm_ss.add(when: 'CONFIG_STRONGARM', if_true: files('strongarm.c'))
 arm_ss.add(when: 'CONFIG_ALLWINNER_A10', if_true: files('allwinner-a10.c', 'cubieboard.c'))
 arm_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-h3.c', 'orangepi.c'))
-arm_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_peripherals.c', 'bcm2836.c', 'raspi.c'))
+arm_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2836.c', 'raspi.c'))
 arm_ss.add(when: 'CONFIG_STM32F100_SOC', if_true: files('stm32f100_soc.c'))
 arm_ss.add(when: 'CONFIG_STM32F205_SOC', if_true: files('stm32f205_soc.c'))
 arm_ss.add(when: 'CONFIG_STM32F405_SOC', if_true: files('stm32f405_soc.c'))
@@ -60,8 +58,13 @@ arm_ss.add(when: 'CONFIG_MSF2', if_true: files('msf2-soc.c'))
 arm_ss.add(when: 'CONFIG_MUSCA', if_true: files('musca.c'))
 arm_ss.add(when: 'CONFIG_ARMSSE', if_true: files('armsse.c'))
 arm_ss.add(when: 'CONFIG_FSL_IMX7', if_true: files('fsl-imx7.c', 'mcimx7d-sabre.c'))
-arm_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmu-common.c', 'smmuv3.c'))
+arm_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmuv3.c'))
 arm_ss.add(when: 'CONFIG_FSL_IMX6UL', if_true: files('fsl-imx6ul.c', 'mcimx6ul-evk.c'))
 arm_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_soc.c'))
 
+softmmu_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmu-common.c'))
+softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4_boards.c'))
+softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_peripherals.c'))
+softmmu_ss.add(when: 'CONFIG_TOSA', if_true: files('tosa.c'))
+
 hw_arch += {'arm': arm_ss}
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PULL 06/15] hw/cpu: Mark arm11 and realview mpcore as target-independent code
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
                   ` (4 preceding siblings ...)
  2023-01-18  7:52 ` [PULL 05/15] hw/arm: Move various units to softmmu_ss[] Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-18  7:52 ` [PULL 07/15] hw/intc: Mark more interrupt-controller files as target independent Laurent Vivier
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Thomas Huth, Richard Henderson, Laurent Vivier

From: Thomas Huth <thuth@redhat.com>

Seems like there is nothing target-specific in here, so these files
can be moved to softmmu_ss to avoid that they get compiled twice
(once for qemu-system-arm and once for qemu-system-aarch64).

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230112134928.1026006-6-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/cpu/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/cpu/meson.build b/hw/cpu/meson.build
index 9e52fee9e778..e37490074f5e 100644
--- a/hw/cpu/meson.build
+++ b/hw/cpu/meson.build
@@ -1,6 +1,6 @@
 softmmu_ss.add(files('core.c', 'cluster.c'))
 
-specific_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c'))
-specific_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c'))
+softmmu_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c'))
+softmmu_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c'))
 specific_ss.add(when: 'CONFIG_A9MPCORE', if_true: files('a9mpcore.c'))
 specific_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c'))
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PULL 07/15] hw/intc: Mark more interrupt-controller files as target independent
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
                   ` (5 preceding siblings ...)
  2023-01-18  7:52 ` [PULL 06/15] hw/cpu: Mark arm11 and realview mpcore as target-independent code Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-18  7:52 ` [PULL 08/15] hw/usb: Mark the XLNX_VERSAL-related files as target-independent Laurent Vivier
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Thomas Huth, Richard Henderson, Laurent Vivier

From: Thomas Huth <thuth@redhat.com>

Seems like there is also nothing target-specific in here, so these
files can be moved to softmmu_ss to avoid that they get compiled
twice (once for qemu-system-arm and once for qemu-system-aarch64).

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230112134928.1026006-7-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/intc/meson.build | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/intc/meson.build b/hw/intc/meson.build
index 0988cae8ab06..8be459b41c6e 100644
--- a/hw/intc/meson.build
+++ b/hw/intc/meson.build
@@ -12,6 +12,8 @@ softmmu_ss.add(when: 'CONFIG_ARM_GICV3_TCG', if_true: files(
   'arm_gicv3_its.c',
   'arm_gicv3_redist.c',
 ))
+softmmu_ss.add(when: 'CONFIG_ALLWINNER_A10_PIC', if_true: files('allwinner-a10-pic.c'))
+softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_vic.c'))
 softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_pic.c'))
 softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_gic.c', 'exynos4210_combiner.c'))
 softmmu_ss.add(when: 'CONFIG_GOLDFISH_PIC', if_true: files('goldfish_pic.c'))
@@ -19,8 +21,10 @@ softmmu_ss.add(when: 'CONFIG_HEATHROW_PIC', if_true: files('heathrow_pic.c'))
 softmmu_ss.add(when: 'CONFIG_I8259', if_true: files('i8259_common.c', 'i8259.c'))
 softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_avic.c', 'imx_gpcv2.c'))
 softmmu_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic_common.c'))
+softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_intc.c'))
 softmmu_ss.add(when: 'CONFIG_OPENPIC', if_true: files('openpic.c'))
 softmmu_ss.add(when: 'CONFIG_PL190', if_true: files('pl190.c'))
+softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_ic.c', 'bcm2836_control.c'))
 softmmu_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_gic.c'))
 softmmu_ss.add(when: 'CONFIG_SLAVIO', if_true: files('slavio_intctl.c'))
 softmmu_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_intc.c'))
@@ -33,25 +37,21 @@ if config_all_devices.has_key('CONFIG_APIC') or \
     softmmu_ss.add(files('kvm_irqcount.c'))
 endif
 
-specific_ss.add(when: 'CONFIG_ALLWINNER_A10_PIC', if_true: files('allwinner-a10-pic.c'))
 specific_ss.add(when: 'CONFIG_APIC', if_true: files('apic.c', 'apic_common.c'))
 specific_ss.add(when: 'CONFIG_ARM_GIC', if_true: files('arm_gicv3_cpuif_common.c'))
 specific_ss.add(when: 'CONFIG_ARM_GICV3_TCG', if_true: files('arm_gicv3_cpuif.c'))
 specific_ss.add(when: 'CONFIG_ARM_GIC_KVM', if_true: files('arm_gic_kvm.c'))
 specific_ss.add(when: ['CONFIG_ARM_GIC_KVM', 'TARGET_AARCH64'], if_true: files('arm_gicv3_kvm.c', 'arm_gicv3_its_kvm.c'))
 specific_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_nvic.c'))
-specific_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_vic.c'))
 specific_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_irqmp.c'))
 specific_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic.c'))
 specific_ss.add(when: 'CONFIG_LOONGSON_LIOINTC', if_true: files('loongson_liointc.c'))
 specific_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_gic.c'))
-specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_intc.c'))
 specific_ss.add(when: 'CONFIG_OMPIC', if_true: files('ompic.c'))
 specific_ss.add(when: ['CONFIG_KVM', 'CONFIG_OPENPIC'],
 		if_true: files('openpic_kvm.c'))
 specific_ss.add(when: 'CONFIG_POWERNV', if_true: files('xics_pnv.c', 'pnv_xive.c', 'pnv_xive2.c'))
 specific_ss.add(when: 'CONFIG_PPC_UIC', if_true: files('ppc-uic.c'))
-specific_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_ic.c', 'bcm2836_control.c'))
 specific_ss.add(when: 'CONFIG_RX_ICU', if_true: files('rx_icu.c'))
 specific_ss.add(when: 'CONFIG_S390_FLIC', if_true: files('s390_flic.c'))
 specific_ss.add(when: 'CONFIG_S390_FLIC_KVM', if_true: files('s390_flic_kvm.c'))
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PULL 08/15] hw/usb: Mark the XLNX_VERSAL-related files as target-independent
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
                   ` (6 preceding siblings ...)
  2023-01-18  7:52 ` [PULL 07/15] hw/intc: Mark more interrupt-controller files as target independent Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-18  7:52 ` [PULL 09/15] tests/qtest/test-hmp: Improve the check for verbose mode Laurent Vivier
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Thomas Huth, Richard Henderson, Laurent Vivier

From: Thomas Huth <thuth@redhat.com>

Seems like there is nothing target-specific in here, so these files
can be moved to softmmu_ss to avoid that they get compiled twice
(once for qemu-system-arm and once for qemu-system-aarch64).

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230112134928.1026006-8-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/usb/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/usb/meson.build b/hw/usb/meson.build
index 793df42e2127..bdf34cbd3e30 100644
--- a/hw/usb/meson.build
+++ b/hw/usb/meson.build
@@ -30,8 +30,8 @@ softmmu_ss.add(when: 'CONFIG_TUSB6010', if_true: files('tusb6010.c'))
 softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('chipidea.c'))
 softmmu_ss.add(when: 'CONFIG_IMX_USBPHY', if_true: files('imx-usb-phy.c'))
 softmmu_ss.add(when: 'CONFIG_VT82C686', if_true: files('vt82c686-uhci-pci.c'))
-specific_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-usb2-ctrl-regs.c'))
-specific_ss.add(when: 'CONFIG_XLNX_USB_SUBSYS', if_true: files('xlnx-usb-subsystem.c'))
+softmmu_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-usb2-ctrl-regs.c'))
+softmmu_ss.add(when: 'CONFIG_XLNX_USB_SUBSYS', if_true: files('xlnx-usb-subsystem.c'))
 
 # emulated usb devices
 softmmu_ss.add(when: 'CONFIG_USB', if_true: files('dev-hub.c'))
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PULL 09/15] tests/qtest/test-hmp: Improve the check for verbose mode
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
                   ` (7 preceding siblings ...)
  2023-01-18  7:52 ` [PULL 08/15] hw/usb: Mark the XLNX_VERSAL-related files as target-independent Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-18  7:52 ` [PULL 10/15] hw/i386/pc: Remove unused 'owner' argument from pc_pci_as_mapping_init Laurent Vivier
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Thomas Huth, Philippe Mathieu-Daudé, Laurent Vivier

From: Thomas Huth <thuth@redhat.com>

Running the test-hmp with V=2 up to V=9 runs the test in verbose mode,
but running for example with V=10 falls back to non-verbose mode ...
Improve this oddity by properly treating the argument as a number.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230109101306.271444-1-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 tests/qtest/test-hmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/test-hmp.c b/tests/qtest/test-hmp.c
index f8b22abe4cac..b4a920df8983 100644
--- a/tests/qtest/test-hmp.c
+++ b/tests/qtest/test-hmp.c
@@ -151,7 +151,7 @@ int main(int argc, char **argv)
 {
     char *v_env = getenv("V");
 
-    if (v_env && *v_env >= '2') {
+    if (v_env && atoi(v_env) >= 2) {
         verbose = true;
     }
 
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PULL 10/15] hw/i386/pc: Remove unused 'owner' argument from pc_pci_as_mapping_init
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
                   ` (8 preceding siblings ...)
  2023-01-18  7:52 ` [PULL 09/15] tests/qtest/test-hmp: Improve the check for verbose mode Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-18  7:52 ` [PULL 11/15] ccid-card-emulated: fix cast warning/error Laurent Vivier
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Philippe Mathieu-Daudé,
	Bernhard Beschow, Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@linaro.org>

This argument was added 9 years ago in commit 83d08f2673
("pc: map PCI address space as catchall region for not mapped
addresses") and has never been used since, so remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20230105173826.56748-1-philmd@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/i386/pc.c         | 2 +-
 hw/pci-host/i440fx.c | 3 +--
 hw/pci-host/q35.c    | 3 +--
 include/hw/i386/pc.h | 2 +-
 4 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index d489ecc0d1cd..6e592bd969aa 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -782,7 +782,7 @@ void pc_guest_info_init(PCMachineState *pcms)
 }
 
 /* setup pci memory address space mapping into system address space */
-void pc_pci_as_mapping_init(Object *owner, MemoryRegion *system_memory,
+void pc_pci_as_mapping_init(MemoryRegion *system_memory,
                             MemoryRegion *pci_address_space)
 {
     /* Set to lower priority than RAM */
diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c
index d5426ef4a53c..262f82c30380 100644
--- a/hw/pci-host/i440fx.c
+++ b/hw/pci-host/i440fx.c
@@ -272,8 +272,7 @@ PCIBus *i440fx_init(const char *pci_type,
                      IO_APIC_DEFAULT_ADDRESS - 1);
 
     /* setup pci memory mapping */
-    pc_pci_as_mapping_init(OBJECT(f), f->system_memory,
-                           f->pci_address_space);
+    pc_pci_as_mapping_init(f->system_memory, f->pci_address_space);
 
     /* if *disabled* show SMRAM to all CPUs */
     memory_region_init_alias(&f->smram_region, OBJECT(d), "smram-region",
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 20da1213747c..26390863d605 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -574,8 +574,7 @@ static void mch_realize(PCIDevice *d, Error **errp)
     }
 
     /* setup pci memory mapping */
-    pc_pci_as_mapping_init(OBJECT(mch), mch->system_memory,
-                           mch->pci_address_space);
+    pc_pci_as_mapping_init(mch->system_memory, mch->pci_address_space);
 
     /* if *disabled* show SMRAM to all CPUs */
     memory_region_init_alias(&mch->smram_region, OBJECT(mch), "smram-region",
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 991f905f5d25..88a120bc234b 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -156,7 +156,7 @@ void pc_guest_info_init(PCMachineState *pcms);
 #define PCI_HOST_ABOVE_4G_MEM_SIZE     "above-4g-mem-size"
 
 
-void pc_pci_as_mapping_init(Object *owner, MemoryRegion *system_memory,
+void pc_pci_as_mapping_init(MemoryRegion *system_memory,
                             MemoryRegion *pci_address_space);
 
 void xen_load_linux(PCMachineState *pcms);
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PULL 11/15] ccid-card-emulated: fix cast warning/error
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
                   ` (9 preceding siblings ...)
  2023-01-18  7:52 ` [PULL 10/15] hw/i386/pc: Remove unused 'owner' argument from pc_pci_as_mapping_init Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-18  7:52 ` [PULL 12/15] hw/pvrdma: Protect against buggy or malicious guest driver Laurent Vivier
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Marc-André Lureau, Thomas Huth, Laurent Vivier

From: Marc-André Lureau <marcandre.lureau@redhat.com>

../hw/usb/ccid-card-emulated.c: In function 'handle_apdu_thread':
../hw/usb/ccid-card-emulated.c:251:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  251 |                 assert((unsigned long)event > 1000);

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230103110814.3726795-2-marcandre.lureau@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/usb/ccid-card-emulated.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index ee41a818014b..c32866007549 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -248,7 +248,7 @@ static void *handle_apdu_thread(void* arg)
         WITH_QEMU_LOCK_GUARD(&card->vreader_mutex) {
             while (!QSIMPLEQ_EMPTY(&card->guest_apdu_list)) {
                 event = QSIMPLEQ_FIRST(&card->guest_apdu_list);
-                assert((unsigned long)event > 1000);
+                assert(event != NULL);
                 QSIMPLEQ_REMOVE_HEAD(&card->guest_apdu_list, entry);
                 if (event->p.data.type != EMUL_GUEST_APDU) {
                     DPRINTF(card, 1, "unexpected message in handle_apdu_thread\n");
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PULL 12/15] hw/pvrdma: Protect against buggy or malicious guest driver
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
                   ` (10 preceding siblings ...)
  2023-01-18  7:52 ` [PULL 11/15] ccid-card-emulated: fix cast warning/error Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-18  7:52 ` [PULL 13/15] hw/cxl/cxl-cdat.c: spelling: missmatch Laurent Vivier
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Yuval Shaia, Raven, Laurent Vivier

From: Yuval Shaia <yuval.shaia.ml@gmail.com>

Guest driver might execute HW commands when shared buffers are not yet
allocated.
This could happen on purpose (malicious guest) or because of some other
guest/host address mapping error.
We need to protect againts such case.

Fixes: CVE-2022-1050

Reported-by: Raven <wxhusst@gmail.com>
Signed-off-by: Yuval Shaia <yuval.shaia.ml@gmail.com>
Message-Id: <20220403095234.2210-1-yuval.shaia.ml@gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/rdma/vmw/pvrdma_cmd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c
index 1eca6328c924..c6ed02598211 100644
--- a/hw/rdma/vmw/pvrdma_cmd.c
+++ b/hw/rdma/vmw/pvrdma_cmd.c
@@ -776,6 +776,12 @@ int pvrdma_exec_cmd(PVRDMADev *dev)
 
     dsr_info = &dev->dsr_info;
 
+    if (!dsr_info->dsr) {
+            /* Buggy or malicious guest driver */
+            rdma_error_report("Exec command without dsr, req or rsp buffers");
+            goto out;
+    }
+
     if (dsr_info->req->hdr.cmd >= sizeof(cmd_handlers) /
                       sizeof(struct cmd_handler)) {
         rdma_error_report("Unsupported command");
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PULL 13/15] hw/cxl/cxl-cdat.c: spelling: missmatch
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
                   ` (11 preceding siblings ...)
  2023-01-18  7:52 ` [PULL 12/15] hw/pvrdma: Protect against buggy or malicious guest driver Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-18  7:52 ` [PULL 14/15] hw/cxl/cxl-host: Fix an error message typo Laurent Vivier
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Michael Tokarev, Philippe Mathieu-Daudé,
	Laurent Vivier

From: Michael Tokarev <mjt@tls.msk.ru>

Introduced by: aba578bdace5303a441f8a37aad781b5cb06f38c

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221215123749.1026775-1-mjt@msgid.tls.msk.ru>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/cxl/cxl-cdat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/cxl/cxl-cdat.c b/hw/cxl/cxl-cdat.c
index 3653aa56f0d4..137abd0992cb 100644
--- a/hw/cxl/cxl-cdat.c
+++ b/hw/cxl/cxl-cdat.c
@@ -146,7 +146,7 @@ static void ct3_load_cdat(CDATObject *cdat, Error **errp)
         num_ent++;
     }
     if (i != file_size) {
-        error_setg(errp, "CDAT: File length missmatch");
+        error_setg(errp, "CDAT: File length mismatch");
         return;
     }
 
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PULL 14/15] hw/cxl/cxl-host: Fix an error message typo
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
                   ` (12 preceding siblings ...)
  2023-01-18  7:52 ` [PULL 13/15] hw/cxl/cxl-cdat.c: spelling: missmatch Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-18  7:52 ` [PULL 15/15] hw/ssi/sifive_spi.c: spelling: reigster Laurent Vivier
  2023-01-19 18:57 ` [PULL 00/15] Trivial branch for 8.0 patches Peter Maydell
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Hoa Nguyen, Philippe Mathieu-Daudé, Laurent Vivier

From: Hoa Nguyen <hoanguyen@ucdavis.edu>

Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221127032220.2649-1-hoanguyen@ucdavis.edu>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/cxl/cxl-host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/cxl/cxl-host.c b/hw/cxl/cxl-host.c
index 1adf61231ad5..3c1ec8732afd 100644
--- a/hw/cxl/cxl-host.c
+++ b/hw/cxl/cxl-host.c
@@ -47,7 +47,7 @@ static void cxl_fixed_memory_window_config(CXLState *cxl_state,
 
     if (object->size % (256 * MiB)) {
         error_setg(errp,
-                   "Size of a CXL fixed memory window must my a multiple of 256MiB");
+                   "Size of a CXL fixed memory window must be a multiple of 256MiB");
         return;
     }
     fw->size = object->size;
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PULL 15/15] hw/ssi/sifive_spi.c: spelling: reigster
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
                   ` (13 preceding siblings ...)
  2023-01-18  7:52 ` [PULL 14/15] hw/cxl/cxl-host: Fix an error message typo Laurent Vivier
@ 2023-01-18  7:52 ` Laurent Vivier
  2023-01-19 18:57 ` [PULL 00/15] Trivial branch for 8.0 patches Peter Maydell
  15 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-01-18  7:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Michael Tokarev, Alistair Francis, Palmer Dabbelt,
	Laurent Vivier

From: Michael Tokarev <mjt@tls.msk.ru>

Fixes: 0694dabe9763847f3010b54ab3ec7d367d2f0ff0
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Message-Id: <20221105115329.306527-1-mjt@msgid.tls.msk.ru>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/ssi/sifive_spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ssi/sifive_spi.c b/hw/ssi/sifive_spi.c
index 03540cf5ca66..1b4a401ca18a 100644
--- a/hw/ssi/sifive_spi.c
+++ b/hw/ssi/sifive_spi.c
@@ -267,7 +267,7 @@ static void sifive_spi_write(void *opaque, hwaddr addr,
     case R_RXDATA:
     case R_IP:
         qemu_log_mask(LOG_GUEST_ERROR,
-                      "%s: invalid write to read-only reigster 0x%"
+                      "%s: invalid write to read-only register 0x%"
                       HWADDR_PRIx " with 0x%x\n", __func__, addr << 2, value);
         break;
 
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PULL 00/15] Trivial branch for 8.0 patches
  2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
                   ` (14 preceding siblings ...)
  2023-01-18  7:52 ` [PULL 15/15] hw/ssi/sifive_spi.c: spelling: reigster Laurent Vivier
@ 2023-01-19 18:57 ` Peter Maydell
  15 siblings, 0 replies; 17+ messages in thread
From: Peter Maydell @ 2023-01-19 18:57 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: qemu-devel, qemu-trivial

On Wed, 18 Jan 2023 at 07:56, Laurent Vivier <laurent@vivier.eu> wrote:
>
> The following changes since commit a8d6abe1292e1db1ad9be5b2b124b9c01bcda094:
>
>   Merge tag 'mips-20230113' of https://github.com/philmd/qemu into staging (2023-01-16 11:24:11 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/laurent_vivier/qemu.git tags/trivial-branch-for-8.0-pull-request
>
> for you to fetch changes up to b93b3cb1bb72f313d8c33791e0a82a25da780cf0:
>
>   hw/ssi/sifive_spi.c: spelling: reigster (2023-01-17 10:02:37 +0100)
>
> ----------------------------------------------------------------
> trivial branch pull request 20230118
>
> ----------------------------------------------------------------


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/8.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-01-19 18:58 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-18  7:52 [PULL 00/15] Trivial branch for 8.0 patches Laurent Vivier
2023-01-18  7:52 ` [PULL 01/15] Call qemu_socketpair() instead of socketpair() when possible Laurent Vivier
2023-01-18  7:52 ` [PULL 02/15] hw/display: Move omap_lcdc.c out of target-specific source set Laurent Vivier
2023-01-18  7:52 ` [PULL 03/15] hw/intc: Move some files out of the " Laurent Vivier
2023-01-18  7:52 ` [PULL 04/15] hw/tpm: Move tpm_ppi.c out of " Laurent Vivier
2023-01-18  7:52 ` [PULL 05/15] hw/arm: Move various units to softmmu_ss[] Laurent Vivier
2023-01-18  7:52 ` [PULL 06/15] hw/cpu: Mark arm11 and realview mpcore as target-independent code Laurent Vivier
2023-01-18  7:52 ` [PULL 07/15] hw/intc: Mark more interrupt-controller files as target independent Laurent Vivier
2023-01-18  7:52 ` [PULL 08/15] hw/usb: Mark the XLNX_VERSAL-related files as target-independent Laurent Vivier
2023-01-18  7:52 ` [PULL 09/15] tests/qtest/test-hmp: Improve the check for verbose mode Laurent Vivier
2023-01-18  7:52 ` [PULL 10/15] hw/i386/pc: Remove unused 'owner' argument from pc_pci_as_mapping_init Laurent Vivier
2023-01-18  7:52 ` [PULL 11/15] ccid-card-emulated: fix cast warning/error Laurent Vivier
2023-01-18  7:52 ` [PULL 12/15] hw/pvrdma: Protect against buggy or malicious guest driver Laurent Vivier
2023-01-18  7:52 ` [PULL 13/15] hw/cxl/cxl-cdat.c: spelling: missmatch Laurent Vivier
2023-01-18  7:52 ` [PULL 14/15] hw/cxl/cxl-host: Fix an error message typo Laurent Vivier
2023-01-18  7:52 ` [PULL 15/15] hw/ssi/sifive_spi.c: spelling: reigster Laurent Vivier
2023-01-19 18:57 ` [PULL 00/15] Trivial branch for 8.0 patches Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.