* [PULL 1/9] .travis.yml: Shorten the runtime of the problematic jobs
2024-03-25 14:12 [PULL 0/9] Patches for QEMU 9.0-rc1 Thomas Huth
@ 2024-03-25 14:12 ` Thomas Huth
2024-03-25 14:12 ` [PULL 2/9] .travis.yml: Remove the unused xfslib-dev package Thomas Huth
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2024-03-25 14:12 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell
The "[s390x] GCC (other-system)" and the "[s390x] GCC check-tcg"
jobs are hitting the 50 minutes timeout in Travis quite frequently
since a while.
To fix it, we've got to drop a lot of the targets from the target
list in the jobs to make them work again.
With regards to the "check-tcg" test, we can move the check with
"s390x-linux-user" to the "user" job instead which also builds
the s390x-linux-user target.
And while we're at it, remove the "--enable-fdt=system" configure
switch (since this is not required nowadays anymore).
Message-ID: <20240320104144.823425-2-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
.travis.yml | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 597d151b80..a8d1e12190 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -184,8 +184,8 @@ jobs:
- genisoimage
env:
- TEST_CMD="make check check-tcg V=1"
- - CONFIG="--disable-containers --enable-fdt=system
- --target-list=${MAIN_SYSTEM_TARGETS},s390x-linux-user"
+ - CONFIG="--disable-containers
+ --target-list=hppa-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
- UNRELIABLE=true
script:
- BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
@@ -225,8 +225,8 @@ jobs:
# Tests dependencies
- genisoimage
env:
- - CONFIG="--disable-containers --enable-fdt=system --audio-drv-list=sdl
- --disable-user --target-list-exclude=${MAIN_SYSTEM_TARGETS}"
+ - CONFIG="--disable-containers --audio-drv-list=sdl --disable-user
+ --target-list=arm-softmmu,avr-softmmu,microblaze-softmmu,sh4eb-softmmu,sparc64-softmmu,xtensaeb-softmmu"
- name: "[s390x] GCC (user)"
arch: s390x
@@ -240,6 +240,7 @@ jobs:
- flex
- bison
env:
+ - TEST_CMD="make check check-tcg V=1"
- CONFIG="--disable-containers --disable-system"
- name: "[s390x] Clang (disable-tcg)"
--
2.44.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PULL 2/9] .travis.yml: Remove the unused xfslib-dev package
2024-03-25 14:12 [PULL 0/9] Patches for QEMU 9.0-rc1 Thomas Huth
2024-03-25 14:12 ` [PULL 1/9] .travis.yml: Shorten the runtime of the problematic jobs Thomas Huth
@ 2024-03-25 14:12 ` Thomas Huth
2024-03-25 14:12 ` [PULL 3/9] hw/microblaze: Do not allow xlnx-zynqmp-pmu-soc to be created by the user Thomas Huth
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2024-03-25 14:12 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Philippe Mathieu-Daudé
Drop the "xfslibs-dev" package which should not be necessary anymore
since commit a5730b8bd3 ("block/file-posix: Simplify the XFS_IOC_DIOINFO
handling").
Message-ID: <20240320104144.823425-3-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
.travis.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index a8d1e12190..8a3ae76a7c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -220,7 +220,6 @@ jobs:
- libsnappy-dev
- libzstd-dev
- nettle-dev
- - xfslibs-dev
- ninja-build
# Tests dependencies
- genisoimage
--
2.44.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PULL 3/9] hw/microblaze: Do not allow xlnx-zynqmp-pmu-soc to be created by the user
2024-03-25 14:12 [PULL 0/9] Patches for QEMU 9.0-rc1 Thomas Huth
2024-03-25 14:12 ` [PULL 1/9] .travis.yml: Shorten the runtime of the problematic jobs Thomas Huth
2024-03-25 14:12 ` [PULL 2/9] .travis.yml: Remove the unused xfslib-dev package Thomas Huth
@ 2024-03-25 14:12 ` Thomas Huth
2024-03-25 14:12 ` [PULL 4/9] aspeed: Make the ast2600-a3 SoC not user creatable Thomas Huth
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2024-03-25 14:12 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell
Using xlnx-zynqmp-pmu-soc on the command line causes QEMU to crash:
./qemu-system-microblazeel -M petalogix-ml605 -device xlnx-zynqmp-pmu-soc
**
ERROR:tcg/tcg.c:813:tcg_register_thread: assertion failed: (n < tcg_max_ctxs)
Bail out!
Aborted (core dumped)
Mark the device with "user_creatable = false" to avoid that this can happen.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2229
Message-ID: <20240322183153.1023359-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/microblaze/xlnx-zynqmp-pmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pmu.c
index 5a2016672a..1bfc9641d2 100644
--- a/hw/microblaze/xlnx-zynqmp-pmu.c
+++ b/hw/microblaze/xlnx-zynqmp-pmu.c
@@ -125,6 +125,8 @@ static void xlnx_zynqmp_pmu_soc_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
+ /* xlnx-zynqmp-pmu-soc causes crashes when cold-plugged twice */
+ dc->user_creatable = false;
dc->realize = xlnx_zynqmp_pmu_soc_realize;
}
--
2.44.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PULL 4/9] aspeed: Make the ast2600-a3 SoC not user creatable
2024-03-25 14:12 [PULL 0/9] Patches for QEMU 9.0-rc1 Thomas Huth
` (2 preceding siblings ...)
2024-03-25 14:12 ` [PULL 3/9] hw/microblaze: Do not allow xlnx-zynqmp-pmu-soc to be created by the user Thomas Huth
@ 2024-03-25 14:12 ` Thomas Huth
2024-03-25 14:12 ` [PULL 5/9] aspeed: Make the ast1030-a1 " Thomas Huth
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2024-03-25 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Cédric Le Goater, Philippe Mathieu-Daudé
From: Cédric Le Goater <clg@redhat.com>
Aspeed SoCs are complex devices that can not be specified on the
command line. Fix that to avoid QEMU aborts.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2227
Fixes: f25c0ae1079d ("aspeed/soc: Add AST2600 support")
Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240319150903.413662-1-clg@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/arm/aspeed_ast2600.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
index 174be53770..31713de74a 100644
--- a/hw/arm/aspeed_ast2600.c
+++ b/hw/arm/aspeed_ast2600.c
@@ -656,6 +656,8 @@ static void aspeed_soc_ast2600_class_init(ObjectClass *oc, void *data)
AspeedSoCClass *sc = ASPEED_SOC_CLASS(oc);
dc->realize = aspeed_soc_ast2600_realize;
+ /* Reason: The Aspeed SoC can only be instantiated from a board */
+ dc->user_creatable = false;
sc->name = "ast2600-a3";
sc->valid_cpu_types = valid_cpu_types;
--
2.44.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PULL 5/9] aspeed: Make the ast1030-a1 SoC not user creatable
2024-03-25 14:12 [PULL 0/9] Patches for QEMU 9.0-rc1 Thomas Huth
` (3 preceding siblings ...)
2024-03-25 14:12 ` [PULL 4/9] aspeed: Make the ast2600-a3 SoC not user creatable Thomas Huth
@ 2024-03-25 14:12 ` Thomas Huth
2024-03-25 14:12 ` [PULL 6/9] misc/pca955*: Move models under hw/gpio Thomas Huth
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2024-03-25 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Cédric Le Goater, Philippe Mathieu-Daudé
From: Cédric Le Goater <clg@redhat.com>
Aspeed SoCs are complex devices that can not be specified on the
command line. Fix that to avoid QEMU aborts.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2227
Fixes: 356b230ed138 ("aspeed/soc : Add AST1030 support")
Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240319150903.413662-2-clg@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/arm/aspeed_ast10x0.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/arm/aspeed_ast10x0.c b/hw/arm/aspeed_ast10x0.c
index 2634e0f654..9f98ad8e87 100644
--- a/hw/arm/aspeed_ast10x0.c
+++ b/hw/arm/aspeed_ast10x0.c
@@ -424,6 +424,8 @@ static void aspeed_soc_ast1030_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
AspeedSoCClass *sc = ASPEED_SOC_CLASS(dc);
+ /* Reason: The Aspeed SoC can only be instantiated from a board */
+ dc->user_creatable = false;
dc->realize = aspeed_soc_ast1030_realize;
sc->name = "ast1030-a1";
--
2.44.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PULL 6/9] misc/pca955*: Move models under hw/gpio
2024-03-25 14:12 [PULL 0/9] Patches for QEMU 9.0-rc1 Thomas Huth
` (4 preceding siblings ...)
2024-03-25 14:12 ` [PULL 5/9] aspeed: Make the ast1030-a1 " Thomas Huth
@ 2024-03-25 14:12 ` Thomas Huth
2024-03-25 14:12 ` [PULL 7/9] libqos/virtio.c: Correct 'flags' reading in qvirtqueue_kick Thomas Huth
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2024-03-25 14:12 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Cédric Le Goater, Glenn Miles
From: Cédric Le Goater <clg@redhat.com>
The PCA9552 and PCA9554 devices are both I2C GPIO controllers and the
PCA9552 also can drive LEDs. Do all the necessary adjustments to move
the models under hw/gpio.
Cc: Glenn Miles <milesg@linux.vnet.ibm.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Message-ID: <20240325134833.1484265-1-clg@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
MAINTAINERS | 4 ++--
include/hw/{misc => gpio}/pca9552.h | 0
include/hw/{misc => gpio}/pca9552_regs.h | 0
include/hw/{misc => gpio}/pca9554.h | 0
include/hw/{misc => gpio}/pca9554_regs.h | 0
hw/arm/aspeed.c | 2 +-
hw/{misc => gpio}/pca9552.c | 4 ++--
hw/{misc => gpio}/pca9554.c | 4 ++--
tests/qtest/pca9552-test.c | 2 +-
tests/qtest/pnv-host-i2c-test.c | 4 ++--
hw/gpio/meson.build | 2 ++
hw/gpio/trace-events | 4 ++++
hw/misc/meson.build | 2 --
hw/misc/trace-events | 4 ----
14 files changed, 16 insertions(+), 16 deletions(-)
rename include/hw/{misc => gpio}/pca9552.h (100%)
rename include/hw/{misc => gpio}/pca9552_regs.h (100%)
rename include/hw/{misc => gpio}/pca9554.h (100%)
rename include/hw/{misc => gpio}/pca9554_regs.h (100%)
rename hw/{misc => gpio}/pca9552.c (99%)
rename hw/{misc => gpio}/pca9554.c (99%)
diff --git a/MAINTAINERS b/MAINTAINERS
index 409d7db4d4..a07af6b9d4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1549,8 +1549,8 @@ M: Glenn Miles <milesg@linux.vnet.ibm.com>
L: qemu-ppc@nongnu.org
L: qemu-arm@nongnu.org
S: Odd Fixes
-F: hw/misc/pca955*.c
-F: include/hw/misc/pca955*.h
+F: hw/gpio/pca955*.c
+F: include/hw/gpio/pca955*.h
virtex_ml507
M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
diff --git a/include/hw/misc/pca9552.h b/include/hw/gpio/pca9552.h
similarity index 100%
rename from include/hw/misc/pca9552.h
rename to include/hw/gpio/pca9552.h
diff --git a/include/hw/misc/pca9552_regs.h b/include/hw/gpio/pca9552_regs.h
similarity index 100%
rename from include/hw/misc/pca9552_regs.h
rename to include/hw/gpio/pca9552_regs.h
diff --git a/include/hw/misc/pca9554.h b/include/hw/gpio/pca9554.h
similarity index 100%
rename from include/hw/misc/pca9554.h
rename to include/hw/gpio/pca9554.h
diff --git a/include/hw/misc/pca9554_regs.h b/include/hw/gpio/pca9554_regs.h
similarity index 100%
rename from include/hw/misc/pca9554_regs.h
rename to include/hw/gpio/pca9554_regs.h
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 8854581ca8..93ca87fda2 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -18,7 +18,7 @@
#include "hw/block/flash.h"
#include "hw/i2c/i2c_mux_pca954x.h"
#include "hw/i2c/smbus_eeprom.h"
-#include "hw/misc/pca9552.h"
+#include "hw/gpio/pca9552.h"
#include "hw/nvram/eeprom_at24c.h"
#include "hw/sensor/tmp105.h"
#include "hw/misc/led.h"
diff --git a/hw/misc/pca9552.c b/hw/gpio/pca9552.c
similarity index 99%
rename from hw/misc/pca9552.c
rename to hw/gpio/pca9552.c
index 2ae13af35e..27d4db0680 100644
--- a/hw/misc/pca9552.c
+++ b/hw/gpio/pca9552.c
@@ -15,8 +15,8 @@
#include "qemu/module.h"
#include "qemu/bitops.h"
#include "hw/qdev-properties.h"
-#include "hw/misc/pca9552.h"
-#include "hw/misc/pca9552_regs.h"
+#include "hw/gpio/pca9552.h"
+#include "hw/gpio/pca9552_regs.h"
#include "hw/irq.h"
#include "migration/vmstate.h"
#include "qapi/error.h"
diff --git a/hw/misc/pca9554.c b/hw/gpio/pca9554.c
similarity index 99%
rename from hw/misc/pca9554.c
rename to hw/gpio/pca9554.c
index 778b32e443..affc9b2d61 100644
--- a/hw/misc/pca9554.c
+++ b/hw/gpio/pca9554.c
@@ -11,8 +11,8 @@
#include "qemu/module.h"
#include "qemu/bitops.h"
#include "hw/qdev-properties.h"
-#include "hw/misc/pca9554.h"
-#include "hw/misc/pca9554_regs.h"
+#include "hw/gpio/pca9554.h"
+#include "hw/gpio/pca9554_regs.h"
#include "hw/irq.h"
#include "migration/vmstate.h"
#include "qapi/error.h"
diff --git a/tests/qtest/pca9552-test.c b/tests/qtest/pca9552-test.c
index ccca2b3d91..7474957692 100644
--- a/tests/qtest/pca9552-test.c
+++ b/tests/qtest/pca9552-test.c
@@ -12,7 +12,7 @@
#include "libqtest.h"
#include "libqos/qgraph.h"
#include "libqos/i2c.h"
-#include "hw/misc/pca9552_regs.h"
+#include "hw/gpio/pca9552_regs.h"
#define PCA9552_TEST_ID "pca9552-test"
#define PCA9552_TEST_ADDR 0x60
diff --git a/tests/qtest/pnv-host-i2c-test.c b/tests/qtest/pnv-host-i2c-test.c
index c635177252..7f64d597ac 100644
--- a/tests/qtest/pnv-host-i2c-test.c
+++ b/tests/qtest/pnv-host-i2c-test.c
@@ -8,8 +8,8 @@
*/
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "hw/misc/pca9554_regs.h"
-#include "hw/misc/pca9552_regs.h"
+#include "hw/gpio/pca9554_regs.h"
+#include "hw/gpio/pca9552_regs.h"
#include "pnv-xscom.h"
#define PPC_BIT(bit) (0x8000000000000000ULL >> (bit))
diff --git a/hw/gpio/meson.build b/hw/gpio/meson.build
index 791e93a97b..a7495d196a 100644
--- a/hw/gpio/meson.build
+++ b/hw/gpio/meson.build
@@ -2,6 +2,8 @@ system_ss.add(when: 'CONFIG_GPIO_KEY', if_true: files('gpio_key.c'))
system_ss.add(when: 'CONFIG_GPIO_MPC8XXX', if_true: files('mpc8xxx.c'))
system_ss.add(when: 'CONFIG_GPIO_PWR', if_true: files('gpio_pwr.c'))
system_ss.add(when: 'CONFIG_MAX7310', if_true: files('max7310.c'))
+system_ss.add(when: 'CONFIG_PCA9552', if_true: files('pca9552.c'))
+system_ss.add(when: 'CONFIG_PCA9554', if_true: files('pca9554.c'))
system_ss.add(when: 'CONFIG_PL061', if_true: files('pl061.c'))
system_ss.add(when: 'CONFIG_ZAURUS', if_true: files('zaurus.c'))
diff --git a/hw/gpio/trace-events b/hw/gpio/trace-events
index 9331f4289d..b91cc7e9a4 100644
--- a/hw/gpio/trace-events
+++ b/hw/gpio/trace-events
@@ -13,6 +13,10 @@ nrf51_gpio_write(uint64_t offset, uint64_t value) "offset 0x%" PRIx64 " value 0x
nrf51_gpio_set(int64_t line, int64_t value) "line %" PRIi64 " value %" PRIi64
nrf51_gpio_update_output_irq(int64_t line, int64_t value) "line %" PRIi64 " value %" PRIi64
+# pca9552.c
+pca955x_gpio_status(const char *description, const char *buf) "%s GPIOs 0-15 [%s]"
+pca955x_gpio_change(const char *description, unsigned id, unsigned prev_state, unsigned current_state) "%s GPIO id:%u status: %u -> %u"
+
# pl061.c
pl061_update(const char *id, uint32_t dir, uint32_t data, uint32_t pullups, uint32_t floating) "%s GPIODIR 0x%x GPIODATA 0x%x pullups 0x%x floating 0x%x"
pl061_set_output(const char *id, int gpio, int level) "%s setting output %d to %d"
diff --git a/hw/misc/meson.build b/hw/misc/meson.build
index 265b2c2627..86596a3888 100644
--- a/hw/misc/meson.build
+++ b/hw/misc/meson.build
@@ -3,8 +3,6 @@ system_ss.add(when: 'CONFIG_EDU', if_true: files('edu.c'))
system_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('vmcoreinfo.c'))
system_ss.add(when: 'CONFIG_ISA_DEBUG', if_true: files('debugexit.c'))
system_ss.add(when: 'CONFIG_ISA_TESTDEV', if_true: files('pc-testdev.c'))
-system_ss.add(when: 'CONFIG_PCA9552', if_true: files('pca9552.c'))
-system_ss.add(when: 'CONFIG_PCA9554', if_true: files('pca9554.c'))
system_ss.add(when: 'CONFIG_PCI_TESTDEV', if_true: files('pci-testdev.c'))
system_ss.add(when: 'CONFIG_UNIMP', if_true: files('unimp.c'))
system_ss.add(when: 'CONFIG_EMPTY_SLOT', if_true: files('empty_slot.c'))
diff --git a/hw/misc/trace-events b/hw/misc/trace-events
index 7cab1d5cb5..5d241cb40a 100644
--- a/hw/misc/trace-events
+++ b/hw/misc/trace-events
@@ -327,10 +327,6 @@ grlib_apb_pnp_read(uint64_t addr, unsigned size, uint32_t value) "APB PnP read a
led_set_intensity(const char *color, const char *desc, uint8_t intensity_percent) "LED desc:'%s' color:%s intensity: %u%%"
led_change_intensity(const char *color, const char *desc, uint8_t old_intensity_percent, uint8_t new_intensity_percent) "LED desc:'%s' color:%s intensity %u%% -> %u%%"
-# pca9552.c
-pca955x_gpio_status(const char *description, const char *buf) "%s GPIOs 0-15 [%s]"
-pca955x_gpio_change(const char *description, unsigned id, unsigned prev_state, unsigned current_state) "%s GPIO id:%u status: %u -> %u"
-
# bcm2835_cprman.c
bcm2835_cprman_read(uint64_t offset, uint64_t value) "offset:0x%" PRIx64 " value:0x%" PRIx64
bcm2835_cprman_write(uint64_t offset, uint64_t value) "offset:0x%" PRIx64 " value:0x%" PRIx64
--
2.44.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PULL 7/9] libqos/virtio.c: Correct 'flags' reading in qvirtqueue_kick
2024-03-25 14:12 [PULL 0/9] Patches for QEMU 9.0-rc1 Thomas Huth
` (5 preceding siblings ...)
2024-03-25 14:12 ` [PULL 6/9] misc/pca955*: Move models under hw/gpio Thomas Huth
@ 2024-03-25 14:12 ` Thomas Huth
2024-03-25 14:12 ` [PULL 8/9] target/s390x: Use mutable temporary value for op_ts Thomas Huth
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2024-03-25 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Zheyu Ma, Philippe Mathieu-Daudé,
Stefan Hajnoczi
From: Zheyu Ma <zheyuma97@gmail.com>
In qvirtqueue_kick(), the 'flags' were previously being incorrectly read from
vq->avail instead of the correct vq->used location. This update ensures 'flags'
are read from the correct location as per the virtio standard.
Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20240320090442.267525-1-zheyuma97@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/libqos/virtio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qtest/libqos/virtio.c b/tests/qtest/libqos/virtio.c
index 82a6e122bf..a21b6eee9c 100644
--- a/tests/qtest/libqos/virtio.c
+++ b/tests/qtest/libqos/virtio.c
@@ -394,7 +394,7 @@ void qvirtqueue_kick(QTestState *qts, QVirtioDevice *d, QVirtQueue *vq,
qvirtio_writew(d, qts, vq->avail + 2, idx + 1);
/* Must read after idx is updated */
- flags = qvirtio_readw(d, qts, vq->avail);
+ flags = qvirtio_readw(d, qts, vq->used);
avail_event = qvirtio_readw(d, qts, vq->used + 4 +
sizeof(struct vring_used_elem) * vq->size);
--
2.44.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PULL 8/9] target/s390x: Use mutable temporary value for op_ts
2024-03-25 14:12 [PULL 0/9] Patches for QEMU 9.0-rc1 Thomas Huth
` (6 preceding siblings ...)
2024-03-25 14:12 ` [PULL 7/9] libqos/virtio.c: Correct 'flags' reading in qvirtqueue_kick Thomas Huth
@ 2024-03-25 14:12 ` Thomas Huth
2024-03-25 14:12 ` [PULL 9/9] tests/tcg/s390x: Test TEST AND SET Thomas Huth
2024-03-25 16:46 ` [PULL 0/9] Patches for QEMU 9.0-rc1 Peter Maydell
9 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2024-03-25 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Ido Plat, qemu-stable, Ilya Leoshkevich,
Richard Henderson, David Hildenbrand
From: Ido Plat <ido.plat@ibm.com>
Otherwise TCG would assume the register that holds t1 would be constant
and reuse whenever it needs the value within it.
Cc: qemu-stable@nongnu.org
Fixes: f1ea739bd598 ("target/s390x: Use tcg_constant_* in local contexts")
Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
[iii: Adjust a newline and capitalization, add tags]
Signed-off-by: Ido Plat <ido.plat@ibm.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-ID: <20240318202722.20675-1-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
target/s390x/tcg/translate.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 0d0c672c95..57b7db1ee9 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -4781,9 +4781,10 @@ static DisasJumpType op_trXX(DisasContext *s, DisasOps *o)
static DisasJumpType op_ts(DisasContext *s, DisasOps *o)
{
- TCGv_i32 t1 = tcg_constant_i32(0xff);
+ TCGv_i32 ff = tcg_constant_i32(0xff);
+ TCGv_i32 t1 = tcg_temp_new_i32();
- tcg_gen_atomic_xchg_i32(t1, o->in2, t1, get_mem_index(s), MO_UB);
+ tcg_gen_atomic_xchg_i32(t1, o->in2, ff, get_mem_index(s), MO_UB);
tcg_gen_extract_i32(cc_op, t1, 7, 1);
set_cc_static(s);
return DISAS_NEXT;
--
2.44.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PULL 9/9] tests/tcg/s390x: Test TEST AND SET
2024-03-25 14:12 [PULL 0/9] Patches for QEMU 9.0-rc1 Thomas Huth
` (7 preceding siblings ...)
2024-03-25 14:12 ` [PULL 8/9] target/s390x: Use mutable temporary value for op_ts Thomas Huth
@ 2024-03-25 14:12 ` Thomas Huth
2024-03-25 16:46 ` [PULL 0/9] Patches for QEMU 9.0-rc1 Peter Maydell
9 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2024-03-25 14:12 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Ilya Leoshkevich, Richard Henderson
From: Ilya Leoshkevich <iii@linux.ibm.com>
Add a small test to prevent regressions.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240318202722.20675-2-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/tcg/s390x/ts.c | 35 +++++++++++++++++++++++++++++++++
tests/tcg/s390x/Makefile.target | 1 +
2 files changed, 36 insertions(+)
create mode 100644 tests/tcg/s390x/ts.c
diff --git a/tests/tcg/s390x/ts.c b/tests/tcg/s390x/ts.c
new file mode 100644
index 0000000000..441faf30d9
--- /dev/null
+++ b/tests/tcg/s390x/ts.c
@@ -0,0 +1,35 @@
+/*
+ * Test the TEST AND SET instruction.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+#include <assert.h>
+#include <stdlib.h>
+
+static int ts(char *p)
+{
+ int cc;
+
+ asm("ts %[p]\n"
+ "ipm %[cc]"
+ : [cc] "=r" (cc)
+ , [p] "+Q" (*p)
+ : : "cc");
+
+ return (cc >> 28) & 3;
+}
+
+int main(void)
+{
+ char c;
+
+ c = 0x80;
+ assert(ts(&c) == 1);
+ assert(c == 0xff);
+
+ c = 0x7f;
+ assert(ts(&c) == 0);
+ assert(c == 0xff);
+
+ return EXIT_SUCCESS;
+}
diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target
index e2aba2ec27..a8f86c9449 100644
--- a/tests/tcg/s390x/Makefile.target
+++ b/tests/tcg/s390x/Makefile.target
@@ -47,6 +47,7 @@ TESTS+=add-logical-with-carry
TESTS+=lae
TESTS+=cvd
TESTS+=cvb
+TESTS+=ts
cdsg: CFLAGS+=-pthread
cdsg: LDFLAGS+=-pthread
--
2.44.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PULL 0/9] Patches for QEMU 9.0-rc1
2024-03-25 14:12 [PULL 0/9] Patches for QEMU 9.0-rc1 Thomas Huth
` (8 preceding siblings ...)
2024-03-25 14:12 ` [PULL 9/9] tests/tcg/s390x: Test TEST AND SET Thomas Huth
@ 2024-03-25 16:46 ` Peter Maydell
9 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2024-03-25 16:46 UTC (permalink / raw)
To: Thomas Huth; +Cc: qemu-devel
On Mon, 25 Mar 2024 at 14:12, Thomas Huth <thuth@redhat.com> wrote:
>
> The following changes since commit 853546f8128476eefb701d4a55b2781bb3a46faa:
>
> Merge tag 'pull-loongarch-20240322' of https://gitlab.com/gaosong/qemu into staging (2024-03-22 10:59:57 +0000)
>
> are available in the Git repository at:
>
> https://gitlab.com/thuth/qemu.git tags/pull-request-2024-03-25
>
> for you to fetch changes up to f9b29c636442e917a56a725d774ea99be3b28111:
>
> tests/tcg/s390x: Test TEST AND SET (2024-03-25 15:05:59 +0100)
>
> ----------------------------------------------------------------
> * Fix timeouts in Travis-CI jobs
> * Mark devices with user_creatable = false that can crash QEMU otherwise
> * Fix s390x TEST-AND-SET TCG instruction emulation
> * Move pc955* devices to hw/gpio/
>
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/9.0
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 11+ messages in thread