Re: [PATCH 2/2] usb/msd: add usb_msd_fatal_error() and fix guest-triggerable assert

2022-08-30 Thread Qiang Liu
I've checked out the patches and re-run my PoC. I see no crash anymore. I also fuzzed the latest code for a while (with the patches) and I saw no related crashes. Tested-by: Qiang Liu On Tue, Aug 30, 2022 at 2:38 PM Gerd Hoffmann wrote: > > Add handler for fatal errors. Moves device into error

Re: [RFC v4 01/11] blkio: add libblkio block driver

2022-08-30 Thread Markus Armbruster
Stefan Hajnoczi writes: > libblkio (https://gitlab.com/libblkio/libblkio/) is a library for > high-performance disk I/O. It currently supports io_uring, > virtio-blk-vhost-user, and virtio-blk-vhost-vdpa with additional drivers > under development. > > One of the reasons for developing libblkio i

Re: [PATCH v2 1/2] scsi: Add buf_len parameter to scsi_req_new()

2022-08-30 Thread John Millikin
Gentle ping On Sat, Aug 20, 2022 at 10:56:48AM +0900, John Millikin wrote: > When a SCSI command is received from the guest, the CDB length implied > by the first byte might exceed the number of bytes the guest sent. In > this case scsi_req_new() will read uninitialized data, causing > unpredictab

Re: [RFC PATCH 4/4] target/riscv: Support Ventana disassemble

2022-08-30 Thread Alistair Francis
On Wed, Aug 24, 2022 at 5:37 PM LIU Zhiwei wrote: > > Pass through the custom information to disassemble by the target_info > field. In disassemble, select the decode path according to the custom > extension. > > Signed-off-by: LIU Zhiwei > --- > disas/riscv.c | 56 ++

Re: [PATCH v4 2/4] hw/ssi: ibex_spi: fixup coverity issue

2022-08-30 Thread Alistair Francis
On Tue, Aug 23, 2022 at 8:13 AM Wilfred Mallawa wrote: > > From: Wilfred Mallawa > > This patch addresses the coverity issues specified in [1], > as suggested, `FIELD_DP32()`/`FIELD_EX32()` macros have been > implemented to clean up the code. > > [1] https://www.mail-archive.com/qemu-devel@nongnu

Re: [PATCH for-7.2 v4 15/21] qmp/hmp, device_tree.c: introduce 'info fdt' command

2022-08-30 Thread Daniel Henrique Barboza
On 8/29/22 22:50, David Gibson wrote: On Mon, Aug 29, 2022 at 07:00:55PM -0300, Daniel Henrique Barboza wrote: On 8/29/22 00:34, David Gibson wrote: On Fri, Aug 26, 2022 at 11:11:44AM -0300, Daniel Henrique Barboza wrote: Reading the FDT requires that the user saves the fdt_blob and then

Re: [PATCH] hw/display/ati_2d: Fix buffer overflow in ati_2d_blt (CVE-2021-3638)

2022-08-30 Thread Qiang Liu
Hi all, I found this patch is still not merged. Should we merge this and close this issue? Best, Qiang On Tue, Sep 7, 2021 at 2:20 PM Philippe Mathieu-Daudé wrote: > > On 9/6/21 5:31 PM, Philippe Mathieu-Daudé wrote: > > When building QEMU with DEBUG_ATI defined then running with > > '-device a

Re: [PATCH for-7.2 v4 14/21] qmp/hmp, device_tree.c: introduce dumpdtb

2022-08-30 Thread Markus Armbruster
Daniel Henrique Barboza writes: > To save the FDT blob we have the '-machine dumpdtb=' property. > With this property set, the machine saves the FDT in and exit. > The created file can then be converted to plain text dts format using > 'dtc'. > > There's nothing particularly sophisticated into s

Re: [PATCH for-7.2 v4 15/21] qmp/hmp, device_tree.c: introduce 'info fdt' command

2022-08-30 Thread Markus Armbruster
Daniel Henrique Barboza writes: > Reading the FDT requires that the user saves the fdt_blob and then use > 'dtc' to read the contents. Saving the file and using 'dtc' is a strong > use case when we need to compare two FDTs, but it's a lot of steps if > you want to do quick check on a certain node

Re: [PATCH for-7.2 v4 15/21] qmp/hmp, device_tree.c: introduce 'info fdt' command

2022-08-30 Thread Markus Armbruster
David Gibson writes: > On Mon, Aug 29, 2022 at 07:00:55PM -0300, Daniel Henrique Barboza wrote: >> >> >> On 8/29/22 00:34, David Gibson wrote: >> > On Fri, Aug 26, 2022 at 11:11:44AM -0300, Daniel Henrique Barboza wrote: >> > > Reading the FDT requires that the user saves the fdt_blob and then

Re: [PATCH 4/5] virtio-gpu: Handle resource blob commands

2022-08-30 Thread Marc-André Lureau
Hi On Mon, Aug 29, 2022 at 7:44 PM Antonio Caggiano < antonio.caggi...@collabora.com> wrote: > Support BLOB resources creation by calling > virgl_renderer_resource_create_blob. > > Signed-off-by: Antonio Caggiano > Signed-off-by: Dmitry Osipenko > --- > hw/display/virtio-gpu-virgl.c| 1

Re: [RFC PATCH 2/2] kvm/kvm-all.c: listener should delay kvm_vm_ioctl to the commit phase

2022-08-30 Thread David Hildenbrand
On 27.08.22 22:58, Peter Xu wrote: > Hi, Emanuele, > > On Fri, Aug 26, 2022 at 04:07:01PM +0200, Emanuele Giuseppe Esposito wrote: >> >> >> Am 22/08/2022 um 16:10 schrieb Peter Xu: >>> On Thu, Aug 18, 2022 at 09:55:20PM -0300, Leonardo Bras Soares Passos wrote: On Thu, Aug 18, 2022 at 5:05 PM

Re: [PATCH v2 1/1] monitor/hmp: print trace as option in help for log command

2022-08-30 Thread Markus Armbruster
Dongli Zhang writes: > The below is printed when printing help information in qemu-system-x86_64 > command line, and when CONFIG_TRACE_LOG is enabled: > > $ qemu-system-x86_64 -d help > ... ... > trace:PATTERN enable trace events > > Use "-d trace:help" to get a list of trace events. > > Howeve

Re: [PATCH 0/5] virtio-gpu: Blob resources

2022-08-30 Thread Marc-André Lureau
Hi On Mon, Aug 29, 2022 at 7:46 PM Antonio Caggiano < antonio.caggi...@collabora.com> wrote: > Add shared memory and support blob resource creation, mapping and > unmapping through virglrenderer new stable APIs[0] when available. > > [0] > https://gitlab.freedesktop.org/virgl/virglrenderer/-/merg

Re: [PATCH 2/2] util/log: add timestamp to logs via qemu_log()

2022-08-30 Thread Markus Armbruster
Dongli Zhang writes: > The qemu_log is very helpful for diagnostic. Add the timestamp to the log > when it is enabled (e.g., "-msg timestamp=on"). > > While there are many other places that may print to log file, this patch is > only for qemu_log(), e.g., the developer may add qemu_log/qemu_log_m

Re: [PATCH v5 12/18] dump/dump: Add section string table support

2022-08-30 Thread Steffen Eiden
Hi Janosch, On 8/11/22 14:11, Janosch Frank wrote: As sections don't have a type like the notes do we need another way to determine their contents. The string table allows us to assign each section an identification string which architectures can then use to tag their sections with. There will

Re: [PATCH] pci: Abort if pci_add_capability fails

2022-08-30 Thread Markus Armbruster
Alex, got a question for you below. 小田喜陽彦 writes: > From: Akihiko Odaki > > pci_add_capability appears most PCI devices. The error handling required > lots of code, and led to inconsistent behaviors such as: > - passing error_abort > - passing error_fatal > - asserting the returned value > - pr

Re: [PATCH 0/3] target/avr: Fix skips vs interrupts

2022-08-30 Thread Philippe Mathieu-Daudé via
On 26/8/22 22:55, Richard Henderson wrote: Fixes https://gitlab.com/qemu-project/qemu/-/issues/1118 Thanks! Richard Henderson (3): target/avr: Call avr_cpu_do_interrupt directly target/avr: Only execute one interrupt at a time target/avr: Disable interrupts when env->skip set Revi

Re: [PATCH v8 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-08-30 Thread Markus Armbruster
Sam Li writes: > By adding zone management operations in BlockDriver, storage controller > emulation can use the new block layer APIs including Report Zone and > four zone management operations (open, close, finish, reset). > > Add zoned storage commands of the device: zone_report(zrp), zone_open

Re: [PATCH v2] KVM: dirty ring: add missing memory barrier

2022-08-30 Thread Philippe Mathieu-Daudé via
On 27/8/22 10:22, Paolo Bonzini wrote: The KVM_DIRTY_GFN_F_DIRTY flag ensures that the entry is valid. If the read of the fields are not ordered after the read of the flag, QEMU might see stale values. Cc: Peter Xu Cc: Gavin Shan Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 6 +++

Re: [PATCH] softmmu/physmem: Fix address of FlatView access in address_space_(read|write)_cached_slow()

2022-08-30 Thread Philippe Mathieu-Daudé via
On 27/8/22 20:59, Peter Xu wrote: Hi, Alberto, On Fri, Aug 26, 2022 at 05:09:27PM +0100, Alberto Faria wrote: Apply cache->xlat to addr before passing it to flatview_(read|write)_continue(), to convert it from the MemoryRegionCache's address space to the FlatView's. Any bug encountered? It'l

Re: [PATCH 4/7] configure: Add './' on front of glob of */config-devices.mak.d

2022-08-30 Thread Philippe Mathieu-Daudé via
On 25/8/22 17:07, Peter Maydell wrote: Shellcheck warns that in rm -f */config-devices.mak.d the glob might expand to something with a '-' in it, which would then be misinterpreted as an option to rm. Interesting, TIL. Reviewed-by: Philippe Mathieu-Daudé Fix this by adding './'. Signed-o

Re: [PATCH 6/7] configure: Check mkdir result directly, not via $?

2022-08-30 Thread Philippe Mathieu-Daudé via
On 25/8/22 17:07, Peter Maydell wrote: Shellcheck warns that we have one place where we run a command and then check if it failed using $?; this is better written to simply check the command in the 'if' statement directly. It is also safer, in case someone add another command between the two li

Re: [PATCH 5/7] configure: Remove use of backtick `...` syntax

2022-08-30 Thread Philippe Mathieu-Daudé via
On 25/8/22 17:07, Peter Maydell wrote: There's only one place in configure where we use `...` to execute a command and capture the result. Switch to $() to match the rest of the script. This silences a shellcheck warning. Signed-off-by: Peter Maydell --- configure | 2 +- 1 file changed, 1

Re: [PATCH v3 2/3] util/main-loop: Avoid adding the same HANDLE twice

2022-08-30 Thread Philippe Mathieu-Daudé via
On 24/8/22 10:52, Bin Meng wrote: From: Bin Meng Fix the logic in qemu_add_wait_object() to avoid adding the same HANDLE twice, as the behavior is undefined when passing an array that contains same HANDLEs to WaitForMultipleObjects() API. Signed-off-by: Bin Meng --- Changes in v3: - new patc

Re: [PATCH 0/7] configure: fix misc shellcheck warnings

2022-08-30 Thread Philippe Mathieu-Daudé via
On 25/8/22 17:06, Peter Maydell wrote: Currently if you run shellcheck on our configure script it generates a ton of warnings. This patchset fixes some of the easier ones. I wasn't aiming for completeness or consistency; I just wanted to zap some of the ones where the fix is clear and didn't take

Re: [PATCH v3 3/3] util/aio-win32: Correct the event array size in aio_poll()

2022-08-30 Thread Philippe Mathieu-Daudé via
On 24/8/22 10:52, Bin Meng wrote: From: Bin Meng WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS object handles. Correct the event array size in aio_poll() and add a assert() to ensure it does not cause out of bound access. Signed-off-by: Bin Meng Reviewed-by: Stefan Weil Rev

Re: [PATCH 2/2] target/arm: Make boards pass base address to armv7m_load_kernel()

2022-08-30 Thread Philippe Mathieu-Daudé via
On 23/8/22 18:04, Peter Maydell wrote: Currently armv7m_load_kernel() takes the size of the block of memory where it should load the initial guest image, but assumes that it should always load it at address 0. This happens to be true of all our M-profile boards at the moment, but it isn't guaran

Re: [PATCH 40/51] chardev/char-file: Add FILE_SHARE_WRITE when openning the file for win32

2022-08-30 Thread Marc-André Lureau
Hi On Sun, Aug 28, 2022 at 3:19 AM Bin Meng wrote: > On Fri, Aug 26, 2022 at 9:23 PM Marc-André Lureau > wrote: > > > > Hi > > > > On Fri, Aug 26, 2022 at 5:16 PM Bin Meng wrote: > >> > >> On Thu, Aug 25, 2022 at 3:59 PM Marc-André Lureau > >> wrote: > >> > > >> > Hi > >> > > >> > On Wed, Aug

Re: [PATCH v4 3/4] hw/ssi: ibex_spi: fixup/add rw1c functionality

2022-08-30 Thread Philippe Mathieu-Daudé via
On 23/8/22 08:12, Wilfred Mallawa wrote: From: Wilfred Mallawa This patch adds the `rw1c` functionality to the respective registers. The status fields are cleared when the respective field is set. Signed-off-by: Wilfred Mallawa Reviewed-by: Alistair Francis --- hw/ssi/ibex_spi_host.c

Re: [PATCH 1/2] target/arm: Remove useless TARGET_BIG_ENDIAN check in armv7m_load_kernel()

2022-08-30 Thread Philippe Mathieu-Daudé via
On 23/8/22 18:04, Peter Maydell wrote: Arm system emulation targets always have TARGET_BIG_ENDIAN clear, so there is no need to have handling in armv7m_load_kernel() for the case when it is defined. Remove the unnecessary code. Side notes: * our M-profile implementation is always little-endia

Re: [RFC PATCH 4/4] target/riscv: Support Ventana disassemble

2022-08-30 Thread LIU Zhiwei
Hi Alistair, Thanks for your comments. On 2022/8/30 17:03, Alistair Francis wrote: On Wed, Aug 24, 2022 at 5:37 PM LIU Zhiwei wrote: Pass through the custom information to disassemble by the target_info field. In disassemble, select the decode path according to the custom extension. Signed-o

Re: [PATCH v5 12/18] dump/dump: Add section string table support

2022-08-30 Thread Janosch Frank
On 8/30/22 13:35, Steffen Eiden wrote: Hi Janosch, On 8/11/22 14:11, Janosch Frank wrote: As sections don't have a type like the notes do we need another way to determine their contents. The string table allows us to assign each section an identification string which architectures can then use

Re: [PATCH] tpm_crb: Avoid backend startup just before shutdown under Xen

2022-08-30 Thread Stefan Berger
On 8/30/22 09:51, Ross Lagerwall wrote: From: Stefan Berger Sent: Friday, August 26, 2022 5:27 PM To: Ross Lagerwall ; Stefan Berger Cc: qemu-devel@nongnu.org Subject: Re: [PATCH] tpm_crb: Avoid backend startup just before shutdown under Xen On 8/26/22 12:15, Ross Lagerwall wrote: Fro

Re: [PATCH v2] KVM: dirty ring: add missing memory barrier

2022-08-30 Thread Peter Xu
On Sat, Aug 27, 2022 at 10:22:18AM +0200, Paolo Bonzini wrote: > The KVM_DIRTY_GFN_F_DIRTY flag ensures that the entry is valid. If > the read of the fields are not ordered after the read of the flag, > QEMU might see stale values. > > Cc: Peter Xu > Cc: Gavin Shan > Signed-off-by: Paolo Bonzin

Re: [PATCH v8 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-08-30 Thread Sam Li
Markus Armbruster 于2022年8月30日周二 19:57写道: > > Sam Li writes: > > > By adding zone management operations in BlockDriver, storage controller > > emulation can use the new block layer APIs including Report Zone and > > four zone management operations (open, close, finish, reset). > > > > Add zoned st

Re: [PATCH v8 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-08-30 Thread Markus Armbruster
Sam Li writes: > Markus Armbruster 于2022年8月30日周二 19:57写道: >> >> Sam Li writes: >> >> > By adding zone management operations in BlockDriver, storage controller >> > emulation can use the new block layer APIs including Report Zone and >> > four zone management operations (open, close, finish, res

Re: [PATCH v8 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-08-30 Thread Sam Li
Markus Armbruster 于2022年8月30日周二 23:09写道: > > Sam Li writes: > > > Markus Armbruster 于2022年8月30日周二 19:57写道: > >> > >> Sam Li writes: > >> > >> > By adding zone management operations in BlockDriver, storage controller > >> > emulation can use the new block layer APIs including Report Zone and > >

Re: [PATCH 2/2] util/log: add timestamp to logs via qemu_log()

2022-08-30 Thread Richard Henderson
On 8/30/22 04:09, Markus Armbruster wrote: Dongli Zhang writes: The qemu_log is very helpful for diagnostic. Add the timestamp to the log when it is enabled (e.g., "-msg timestamp=on"). While there are many other places that may print to log file, this patch is only for qemu_log(), e.g., the

Re: [PATCH v4 3/4] hw/ssi: ibex_spi: fixup/add rw1c functionality

2022-08-30 Thread Alistair Francis
On Tue, Aug 30, 2022 at 2:37 PM Philippe Mathieu-Daudé via wrote: > > On 23/8/22 08:12, Wilfred Mallawa wrote: > > From: Wilfred Mallawa > > > > This patch adds the `rw1c` functionality to the respective > > registers. The status fields are cleared when the respective > > field is set. > > > > Si

[PATCH v1 02/16] qapi: fix example of query-vnc command

2022-08-30 Thread Victor Toso
Example output has an extra ',' delimiter in member "websocket" and it lacks it in "family" member. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/ui.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v1 01/16] qapi: fix example of query-ballon command

2022-08-30 Thread Victor Toso
Example output has an extra ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/machine.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/machine.json index 6af

[PATCH v1 00/16] qapi examples fixes and rfc for another generator

2022-08-30 Thread Victor Toso
Hi, I've been using the examples as a way to test the qapi-go proposal [0] and I thought it would be neat to have a way to parse those examples and regenerate them in a way that we could use for testing. The first 10 patches are fixes to issues found when loading the Example into python's json li

[PATCH v1 14/16] qapi: fix example of query-migrate command

2022-08-30 Thread Victor Toso
The example's return type has several missing mandatory member names. Fix it. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/migration.json | 56 + 1 file changed, 52 insertions(+), 4 del

[PATCH v1 04/16] qapi: fix example of query-rocker-of-dpa-flows command

2022-08-30 Thread Victor Toso
Example output has an extra ',' delimiter and a foreign comment format. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/rocker.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qapi/rocker.json

[PATCH v1 08/16] qapi: fix example of NIC_RX_FILTER_CHANGED event

2022-08-30 Thread Victor Toso
Example output has an extra ending curly bracket. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/net.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/net.json b/qapi/net.json index 75ba2cb9

[PATCH v1 03/16] qapi: fix example of query-spice command

2022-08-30 Thread Victor Toso
Example output has an extra ',' delimiter and a foreign comment format. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/ui.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qapi/ui.json b/qapi/u

[PATCH v1 15/16] qapi: fix examples of events missing timestamp

2022-08-30 Thread Victor Toso
I've used real timestamp and changing them one by one so they would not be all equal. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/migration.json | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-)

[PATCH v1 11/16] qapi: fix examples of blockdev-add with qcow2

2022-08-30 Thread Victor Toso
The examples use "qcow2" driver with the wrong member name for BlockdevRef alternate type. This patch changes all wrong member names from "file" to "data-file" which is the correct member name in BlockdevOptionsQcow2 for the BlockdevRef field. Problem was noticed when using the example as a test c

[PATCH v1 16/16] RFC: add a generator for qapi's examples

2022-08-30 Thread Victor Toso
The goal of this generator is to validate QAPI examples and transform them into a format that can be used for 3rd party applications to validate their QAPI/QMP introspection. For each Example section, we parse server and client messages into a python dictionary. This step alone has found several i

[PATCH v1 06/16] qapi: fix example of query-blockstats command

2022-08-30 Thread Victor Toso
Example output is missing several ',' delimiter between members. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/block-core.json | 32 1 file changed, 16 insertions(+), 16 deletions(-)

[PATCH v1 05/16] qapi: fix example of query-dump-guest-memory-capability command

2022-08-30 Thread Victor Toso
Example output is missing closing curly brackets. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/dump.json | 1 + 1 file changed, 1 insertion(+) diff --git a/qapi/dump.json b/qapi/dump.json index 90859c5483..22971a991

[PATCH v1 12/16] qapi: fix example of blockdev-add command

2022-08-30 Thread Victor Toso
The example output is setting optional member "backing" with null. This has no runtime impact. Remove it. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/block-core.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[PATCH v1 10/16] qapi: fix example of MEM_UNPLUG_ERROR event

2022-08-30 Thread Victor Toso
Example output was missing ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/machine.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/machine.json index 5f1f

[PATCH v1 07/16] qapi: fix example of BLOCK_JOB_READY event

2022-08-30 Thread Victor Toso
Example output is missing ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/block-core.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json in

[PATCH v1 13/16] qapi: fix example of query-hotpluggable-cpus command

2022-08-30 Thread Victor Toso
The example return type has the wrong member name. Fix it. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/machine.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json in

[PATCH v1 09/16] qapi: fix example of DEVICE_UNPLUG_GUEST_ERROR event

2022-08-30 Thread Victor Toso
Example output is missing a ',' delimiter and it has an extra ending curly bracket. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/qdev.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qapi/qd

Re: [PATCH] softmmu/physmem: Fix address of FlatView access in address_space_(read|write)_cached_slow()

2022-08-30 Thread Peter Xu
On Tue, Aug 30, 2022 at 02:06:32PM +0200, Philippe Mathieu-Daudé wrote: > On 27/8/22 20:59, Peter Xu wrote: > > Hi, Alberto, > > > > On Fri, Aug 26, 2022 at 05:09:27PM +0100, Alberto Faria wrote: > > > Apply cache->xlat to addr before passing it to > > > flatview_(read|write)_continue(), to conver

[PULL 1/6] hw: Add compat machines for 7.2

2022-08-30 Thread Thomas Huth
From: Cornelia Huck Add 7.2 machine types for arm/i440fx/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck Reviewed-by: Daniel Henrique Barboza Reviewed-by: Michael S. Tsirkin Message-Id: <20220727121755.395894-1-coh...@redhat.com> [thuth: fixed conflict with pcmc->legacy_no_rng_seed] Signed

[PULL 6/6] util/mmap-alloc: Remove qemu_mempath_getpagesize()

2022-08-30 Thread Thomas Huth
The last user of this function has just been removed, so we can drop this function now, too. Message-Id: <20220810125720.3849835-4-th...@redhat.com> Reviewed-by: David Hildenbrand Reviewed-by: Claudio Imbrenda Signed-off-by: Thomas Huth --- include/qemu/mmap-alloc.h | 2 -- util/mmap-alloc.c

[PULL 3/6] target/s390x: Fix CLFIT and CLGIT immediate size

2022-08-30 Thread Thomas Huth
From: Ilya Leoshkevich I2 is 16 bits, not 32. Found by running valgrind's none/tests/s390x/traps. Fixes: 1c2687518235 ("target-s390: Implement COMPARE AND TRAP") Signed-off-by: Ilya Leoshkevich Message-Id: <20220817161529.597414-1-...@linux.ibm.com> Reviewed-by: David Hildenbrand Signed-off-b

[PULL 0/6] First s390x updates for QEMU 7.2

2022-08-30 Thread Thomas Huth
Hi Richard, hi Peter! The following changes since commit 9a99f964b152f8095949bbddca7841744ad418da: Update version for v7.1.0-rc4 release (2022-08-24 19:27:56 -0700) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/s390x-pull-request-2022-08-30 for you to fetc

[PULL 5/6] softmmu/physmem: Remove the ifdef __linux__ around the pagesize functions

2022-08-30 Thread Thomas Huth
Now that host_memory_backend_pagesize() is not depending on the hugetlb memory path handling anymore, we can also remove the #ifdef and the TOCTTOU comment from the calling functions - the code should now work equally well on all host architectures. Message-Id: <20220810125720.3849835-3-th...@redh

[PULL 4/6] backends/hostmem: Fix support of memory-backend-memfd in qemu_maxrampagesize()

2022-08-30 Thread Thomas Huth
It is currently not possible yet to use "memory-backend-memfd" on s390x with hugepages enabled. This problem is caused by qemu_maxrampagesize() not taking memory-backend-memfd objects into account yet, so the code in s390_memory_init() fails to enable the huge page support there via s390_set_max_pa

[PULL 2/6] s390x/cpumodel: add stfl197 processor-activity-instrumentation extension 1

2022-08-30 Thread Thomas Huth
From: Christian Borntraeger Add stfle 197 (processor-activity-instrumentation extension 1) to the gen16 default model and fence it off for 7.1 and older. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand Message-Id: <20220727135120.12784-1-borntrae...@linux.ibm.com> Acked-by:

Re: [PATCH] pci: Abort if pci_add_capability fails

2022-08-30 Thread Alex Williamson
On Tue, 30 Aug 2022 13:37:35 +0200 Markus Armbruster wrote: >if (!offset) { >offset = pci_find_space(pdev, size); >/* out of PCI config space is programming error */ >assert(offset); >} else { >/* Verify that capabilities don't overla

[PULL 00/23] First testing patches for QEMU 7.2

2022-08-30 Thread Thomas Huth
Hi Peter, hi Richard, sorry for flooding you with so many pull request mails right after QEMU 7.1 has been tagged, but I'll be away from keyboard starting tomorrow, and I still wanted to get these out before I'm away... The following changes since commit 9a99f964b152f8095949bbddca7841744ad418da:

[PULL 02/23] tests/qtest: Use g_mkdtemp()

2022-08-30 Thread Thomas Huth
From: Bin Meng Windows does not provide a mkdtemp() API, but glib does. Replace mkdtemp() call with the glib version. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Message-Id: <20220824094029.1634519-3-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/qtest/fuzz/generic_fuzz_config

[PULL 07/23] tests/qtest: Build e1000e-test for posix only

2022-08-30 Thread Thomas Huth
From: Bin Meng The whole e1000e-test test case relies on socketpair() which does not exist on win32. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Message-Id: <20220824094029.1634519-17-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/qtest/meson.build | 4 +++- 1 file changed, 3

[PULL 13/23] tests/qtest: device-plug-test: Reverse the usage of double/single quotes

2022-08-30 Thread Thomas Huth
From: Bin Meng The usage of double/single quotes in test_pci_unplug_json_request() should be reversed to work on both win32 and non-win32 platforms: - The value of -device parameter needs to be surrounded by "" as Windows does not drop '' when passing it to QEMU which causes QEMU command lin

[PULL 03/23] tests: Use g_mkdir_with_parents()

2022-08-30 Thread Thomas Huth
From: Bin Meng Use the same g_mkdir_with_parents() call to create a directory on all platforms. Signed-off-by: Bin Meng Reviewed-by: Dr. David Alan Gilbert Message-Id: <20220824094029.1634519-13-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/migration/stress.c | 2 +-

[PULL 04/23] tests/qtest: migration-test: Handle link() for win32

2022-08-30 Thread Thomas Huth
From: Bin Meng Windows does not provide a link() API like POSIX. Instead it provides a similar API CreateHardLink() that does the same thing, but with different argument order and return value. Signed-off-by: Bin Meng Reviewed-by: Dr. David Alan Gilbert Message-Id: <20220824094029.1634519-14-b

[PULL 17/23] tests/vm: Add libslirp to the VM tests

2022-08-30 Thread Thomas Huth
We are going to remove the slirp submodule from the QEMU repository, so we should make sure to install the distro's libslirp to get the same test coverage as before in the VMs. Message-Id: <20220824151122.704946-3-th...@redhat.com> Acked-by: Samuel Thibault Signed-off-by: Thomas Huth --- tests/

[PULL 05/23] backends/tpm: Exclude headers and macros that don't exist on win32

2022-08-30 Thread Thomas Huth
From: Bin Meng These headers and macros do not exist on Windows. Exclude them. Signed-off-by: Bin Meng Reviewed-by: Stefan Berger Message-Id: <20220824094029.1634519-15-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- backends/tpm/tpm_ioctl.h | 4 1 file changed, 4 insertions(+) diff

[PULL 06/23] tests/qtest: Adapt {m48t59,rtc}-test cases for win32

2022-08-30 Thread Thomas Huth
From: Bin Meng There is no tm_gmtoff member in 'struct tm' on Windows. Update rtc-test.c and m48t59-test.c accordingly. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Message-Id: <20220824094029.1634519-16-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/qtest/m48t59-test.c | 2 +-

[PULL 20/23] docs/devel/testing: fix minor typo

2022-08-30 Thread Thomas Huth
From: Matheus Tavares Bernardino Signed-off-by: Matheus Tavares Bernardino Message-Id: <421fb28678d1077c0b14978e359b4e1469cc0168.1661262376.git.quic_mathb...@quicinc.com> Signed-off-by: Thomas Huth --- docs/devel/testing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PULL 08/23] tests/qtest: Build cases that use memory-backend-file for posix only

2022-08-30 Thread Thomas Huth
From: Bin Meng As backends/meson.build tells us, hostmem-file.c is only supported on POSIX platforms, hence any test case that utilizes the memory backend file should be guarded by CONFIG_POSIX too. Signed-off-by: Bin Meng Acked-by: Thomas Huth Message-Id: <20220824094029.1634519-19-bmeng...@g

[PULL 09/23] tests/qtest: i440fx-test: Skip running request_{bios, pflash} for win32

2022-08-30 Thread Thomas Huth
From: Bin Meng The request_{bios,pflash} test cases call mmap() which does not exist on win32. Exclude them. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Message-Id: <20220824094029.1634519-21-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/qtest/i440fx-test.c | 6 ++ 1 file

[PULL 12/23] tests/qtest: libqos: Rename malloc.h to libqos-malloc.h

2022-08-30 Thread Thomas Huth
From: Xuzhou Cheng The qtest/libqos directory is included via the "-I" option to search for header files when building qtest. Unfortunately the malloc.h has a name conflict with the standard libc header, leading to a build failure on the Windows host, due to the MinGW libc stdlib.h header file in

[PATCH v2 03/10] hw/isa/vt82c686: Prefer pci_address_space() over get_system_memory()

2022-08-30 Thread Bernhard Beschow
Unlike get_system_memory(), pci_address_space() respects the memory tree available to the parent device. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 9d12e1cae4..5582c0b179 10

[PULL 01/23] tests/qtest: Use g_setenv()

2022-08-30 Thread Thomas Huth
From: Bin Meng Windows does not provide a setenv() API, but glib does. Replace setenv() call with the glib version. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Message-Id: <20220824094029.1634519-2-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/qtest/fuzz/generic_fuzz.c | 8 ++

[PULL 11/23] tests/qtest: libqos: Drop inclusion of

2022-08-30 Thread Thomas Huth
From: Xuzhou Cheng There is no in the Windows build environment. Actually this is not needed in the non-win32 builds too. Drop it. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Tested-by: Thomas Huth Message-Id: <20220824094029.1634519-25-bmeng...@gmail.com> Signed-off-by: Thomas Huth

[PATCH v2 05/10] hw/isa/vt82c686: Instantiate IDE function in host device

2022-08-30 Thread Bernhard Beschow
The IDE function is closely tied to the ISA function (e.g. the IDE interrupt routing happens there), so it makes sense that the IDE function is instantiated within the south bridge itself. Signed-off-by: Bernhard Beschow --- configs/devices/mips64el-softmmu/default.mak | 1 - hw/isa/Kconfig

[PULL 16/23] tests/qtest: prom-env-test: Use double quotes to pass the prom-env option

2022-08-30 Thread Thomas Huth
From: Bin Meng Single quotes like -prom-env 'nvramrc=cafec0de 4000 l!' in the arguments are not removed in the Windows environment before it is passed to the QEMU executable. Such argument causes a failure in the QEMU prom-env option parser codes. Change to use double quotes which works fine on

[PULL 18/23] tests/avocado: Do not run tests that require libslirp if it is not available

2022-08-30 Thread Thomas Huth
Some avocado tests blindly assume that QEMU has been compiled with libslirp enabled and fail badly if it is missing. Add a proper check to cancel the tests in this case. Message-Id: <20220824151122.704946-6-th...@redhat.com> Acked-by: Samuel Thibault Signed-off-by: Thomas Huth --- tests/avocado

[PULL 10/23] tests/qtest: migration-test: Skip running test_migrate_fd_proto on win32

2022-08-30 Thread Thomas Huth
From: Bin Meng The test case 'test_migrate_fd_proto' calls socketpair() which does not exist on win32. Exclude it. The helper function wait_command_fd() is not needed anymore, hence exclude it too. Signed-off-by: Bin Meng Reviewed-by: Dr. David Alan Gilbert Message-Id: <20220824094029.1634519-

[PATCH v2 06/10] hw/isa/vt82c686: Instantiate USB functions in host device

2022-08-30 Thread Bernhard Beschow
The USB functions can be enabled/disabled through the ISA function. Also its interrupt routing can be influenced there. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 12 hw/mips/fuloong2e.c | 3 --- hw/ppc/pegasos2.c | 4 3 files changed, 12 insertions(+), 7 del

[PULL 14/23] tests/qtest: machine-none-test: Use double quotes to pass the cpu option

2022-08-30 Thread Thomas Huth
From: Bin Meng Single quotes in the arguments (e.g.: -cpu 'qemu64,apic-id=0') are not removed in the Windows environment before it is passed to the QEMU executable. Such argument causes a failure in the QEMU CPU option parser codes. Change to use double quotes which works fine on all platforms.

[PATCH v2 07/10] hw/isa/vt82c686: Instantiate PM function in host device

2022-08-30 Thread Bernhard Beschow
The PM controller has activity bits which monitor activity of other built-in devices in the host device. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 12 hw/mips/fuloong2e.c | 2 +- hw/ppc/pegasos2.c | 3 +-- include/hw/isa/vt82c686.h | 2 -- 4 fi

[PULL 19/23] tests/avocado: Fix trivial typo

2022-08-30 Thread Thomas Huth
The intention was likely to use "intend" instead of "indent" here. Message-Id: <20220824080926.568935-1-th...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- tests/avocado/avocado_qemu/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PULL 15/23] tests/qtest: npcm7xx_emc-test: Skip running test_{tx, rx} on win32

2022-08-30 Thread Thomas Huth
From: Bin Meng The test cases 'test_{tx,rx}' call socketpair() which does not exist on win32. Exclude them. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Message-Id: <20220824094029.1634519-44-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/qtest/npcm7xx_emc-test.c | 8

[PATCH v2 09/10] hw/isa/vt82c686: Embed RTCState in host device

2022-08-30 Thread Bernhard Beschow
Embed the rtc in the host device, analoguous to the other child devices and analoguous to PIIX4. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 150e9401d0..0ef94463

[PULL 22/23] tests/qtest/ac97-test: Correct reference to driver

2022-08-30 Thread Thomas Huth
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau Message-Id: <20220829083301.143527-1-akihiko.od...@daynix.com> Signed-off-by: Thomas Huth --- tests/qtest/ac97-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/ac97-test.c b/t

[PULL 23/23] tests/avocado/migration: Get find_free_port() from the ports

2022-08-30 Thread Thomas Huth
In upstream Avocado, the find_free_port() function is not available from "network" anymore, but must be used via "ports", see: https://github.com/avocado-framework/avocado/commit/22fc98c6ff76cc55c48 To be able to update to a newer Avocado version later, let's use the new way for accessing the fi

[PULL 21/23] gitlab-ci: Only use one process in Windows jobs for compilation

2022-08-30 Thread Thomas Huth
The Windows jobs are currently aborting at weird places - and there's the suspicion that it's due to memory constraints in the Windows containers. Let's switch to single-threaded compilation to decrease the pressure on the memory load, and to make the job more deterministic for further investigatio

[PATCH v2 10/10] hw/isa/vt82c686: Create rtc-time alias in boards instead

2022-08-30 Thread Bernhard Beschow
According to good QOM practice, an object should only deal with objects of its own sub tree. Having devices create an alias on the machine object doesn't respect this good practice. To resolve this, create the alias in the machine's code. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c |

[PATCH v2 00/10] Instantiate VT82xx functions in host device

2022-08-30 Thread Bernhard Beschow
v2: * Keep the call to pci_ide_create_devs() in board code for consistency (Zoltan) * Create rtc-time alias in board rather than in south bridge code * Remove stale comments about PCI functions v1: This series instantiates all PCI functions of the VT82xx south bridges in the south bridges themsel

[PATCH v2 04/10] hw/isa/vt82c686: Reuse errp

2022-08-30 Thread Bernhard Beschow
Rather than terminating abruptly, make use of the already present errp and propagate the error to the caller. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 5582c0b179..37

[PATCH v2 01/10] hw/isa/vt82c686: Resolve chip-specific realize methods

2022-08-30 Thread Bernhard Beschow
The object creation now happens in chip-specific init methods which allows the realize methods to be consolidated into one method. Shifting the logic into the init methods has the addidional advantage that the parent object's init methods are called implicitly - like constructors in object-oriented

[PATCH v2 02/10] hw/isa/vt82c686: Resolve unneeded attribute

2022-08-30 Thread Bernhard Beschow
Now that also the super io device is realized in the common realize method, the isa_bus attribute can be turned into a temporary. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/

  1   2   >