Re: [PATCH] microvm: turn off io reservations for pcie root ports

2022-06-29 Thread Gerd Hoffmann
On Mon, Jun 27, 2022 at 06:37:50PM -0400, Michael S. Tsirkin wrote: > On Thu, Jun 09, 2022 at 09:28:38AM +0200, Gerd Hoffmann wrote: > > On Wed, Jun 08, 2022 at 12:06:17PM -0400, Michael S. Tsirkin wrote: > > > On Fri, Jun 03, 2022 at 10:59:20AM +0200, Gerd Hoffmann wrote: > > > > The pcie host bri

Re: [PATCH] microvm: turn off io reservations for pcie root ports

2022-06-29 Thread Michael S. Tsirkin
On Wed, Jun 29, 2022 at 09:10:23AM +0200, Gerd Hoffmann wrote: > On Mon, Jun 27, 2022 at 06:37:50PM -0400, Michael S. Tsirkin wrote: > > On Thu, Jun 09, 2022 at 09:28:38AM +0200, Gerd Hoffmann wrote: > > > On Wed, Jun 08, 2022 at 12:06:17PM -0400, Michael S. Tsirkin wrote: > > > > On Fri, Jun 03, 2

Re: [RESEND PATCH] hw/dma: fix crash caused by race condition

2022-06-29 Thread David Hildenbrand
On 06.05.22 18:31, Tong Zhang wrote: > assert(dbs->acb) is meant to check the return value of io_func per > documented in commit 6bee44ea34 ("dma: the passed io_func does not > return NULL"). However, there is a chance that after calling > aio_context_release(dbs->ctx); the dma_blk_cb function is c

Re: [RFC PATCH] tests/9p: introduce declarative function calls

2022-06-29 Thread Greg Kurz
Hi Christian, On Fri, 24 Jun 2022 19:46:18 +0200 Christian Schoenebeck wrote: > There are currently 3 different functions for sending a 9p 'Twalk' > request. They are all doing the same thing, just in a slightly different > way and with slightly different function arguments. > > Merge those 3 f

Re: [PATCH v5 2/2] target/xtensa: Use semihosting/syscalls.h

2022-06-29 Thread Alex Bennée
Richard Henderson writes: > On 6/28/22 19:08, Max Filippov wrote: >> On Tue, Jun 28, 2022 at 4:43 AM Richard Henderson >> wrote: >>> >>> This separates guest file descriptors from host file descriptors, >>> and utilizes shared infrastructure for integration with gdbstub. >>> Remove the xtensa

Re: qemu-system-s390x hang in tcg (was: Re: [PATCH v8 23/70] mm/mmap: change do_brk_flags() to expand existing VMA and add do_brk_munmap())

2022-06-29 Thread Alex Bennée
Sven Schnelle writes: > Hi, > > David Hildenbrand writes: > >> On 04.05.22 09:37, Janosch Frank wrote: >>> I had a short look yesterday and the boot usually hangs in the raid6 >>> code. Disabling vector instructions didn't make a difference but a few >>> interruptions via GDB solve the probl

[PULL v2 6/9] block/copy-before-write: implement cbw-timeout option

2022-06-29 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy In some scenarios, when copy-before-write operations lasts too long time, it's better to cancel it. Most useful would be to use the new option together with on-cbw-error=break-snapshot: this way if cbw operation takes too long time we'll just cancel backup proc

[PULL v2 0/9] Block jobs & NBD patches

2022-06-29 Thread Vladimir Sementsov-Ogievskiy
The following changes since commit ad4c7f529a279685da84297773b4ec8080153c2d: Merge tag 'pull-semi-20220628' of https://gitlab.com/rth7680/qemu into staging (2022-06-28 10:24:31 +0530) are available in the Git repository at: https://gitlab.com/vsementsov/qemu.git tags/pull-block-2022-06-14-v

[PULL v2 3/9] iotests: add copy-before-write: on-cbw-error tests

2022-06-29 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Add tests for new option of copy-before-write filter: on-cbw-error. Note that we use QEMUMachine instead of VM class, because in further commit we'll want to use throttling which doesn't work with -accel qtest used by VM. We also touch pylintrc to not break io

Re: [PATCH v2 02/13] hw/i2c/aspeed: Fix DMA len write-enable bit handling

2022-06-29 Thread Cédric Le Goater
On 6/29/22 05:36, Peter Delevoryas wrote: I noticed i2c rx transfers were getting shortened to "1" on Zephyr. It seems to be because the Zephyr i2c driver sets the RX DMA len with the RX field write-enable bit set (bit 31) to avoid a read-modify-write. [1] /* 0x1C : I2CM Master DMA Transfer Leng

Re: [PATCH v2 01/13] hw/i2c/aspeed: Fix R_I2CD_FUN_CTRL reference

2022-06-29 Thread Cédric Le Goater
On 6/29/22 05:36, Peter Delevoryas wrote: Very minor, doesn't effect functionality, but this is supposed to be R_I2CC_FUN_CTRL (new-mode, not old-mode). Fixes: ba2cccd64e9 ("aspeed: i2c: Add new mode support") Signed-off-by: Peter Delevoryas Reviewed-by: Cédric Le Goater --- hw/i2c/aspee

Re: [PATCH v2 03/13] hw/i2c/aspeed: Fix MASTER_EN missing error message

2022-06-29 Thread Cédric Le Goater
On 6/29/22 05:36, Peter Delevoryas wrote: aspeed_i2c_bus_is_master is checking if master mode is enabled in the I2C bus controller's function-control register, not that slave mode is enabled or something. The error here is that the guest is trying to trigger an I2C master mode command while mast

Re: [RESEND PATCH] hw/dma: fix crash caused by race condition

2022-06-29 Thread Tong Zhang
On Wed, Jun 29, 2022 at 12:29 AM David Hildenbrand wrote: > On 06.05.22 18:31, Tong Zhang wrote: > > assert(dbs->acb) is meant to check the return value of io_func per > > documented in commit 6bee44ea34 ("dma: the passed io_func does not > > return NULL"). However, there is a chance that after c

Re: [PATCH v5 2/2] target/xtensa: Use semihosting/syscalls.h

2022-06-29 Thread Max Filippov
On Tue, Jun 28, 2022 at 5:36 PM Richard Henderson wrote: > On 6/28/22 19:08, Max Filippov wrote: > > On Tue, Jun 28, 2022 at 4:43 AM Richard Henderson > > wrote: ... > >> diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c > >> index 946c71cb5b..5cca6a170e 100644 > >> --- a/hw/xtensa/sim.c > >> +++

Re: [PATCH v2 08/13] hw/i2c/pmbus: Reset out buf after switching pages

2022-06-29 Thread Cédric Le Goater
On 6/29/22 05:36, Peter Delevoryas wrote: When a pmbus device switches pages, it should clears its output buffer so that the next transaction doesn't emit data from the previous page. Fixes: 3746d5c15e70570b ("hw/i2c: add support for PMBus”) Signed-off-by: Peter Delevoryas --- Reviewed-by: Cé

Re: [PATCH v2 04/13] hw/i2c: support multiple masters

2022-06-29 Thread Cédric Le Goater
Corey, On 6/29/22 05:36, Peter Delevoryas wrote: From: Klaus Jensen Allow slaves to master the bus by registering a bottom halve. If the bus is busy, the bottom half is queued up. When a slave has succesfully mastered the bus, the bottom half is scheduled. Signed-off-by: Klaus Jensen [ clg :

Re: [PATCH v2 09/13] hw/i2c/pmbus: Add read-only IC_DEVICE_ID support

2022-06-29 Thread Cédric Le Goater
On 6/29/22 05:36, Peter Delevoryas wrote: Signed-off-by: Peter Delevoryas This is also adding a "Renesas ISL69259 Digital Multiphase Voltage Regulator" device. There should be 2 patches. Thanks, C. --- hw/i2c/pmbus_device.c| 5 + hw/sensor/isl_pmbus_vr.c | 31

Re: [PATCH v5 2/2] target/xtensa: Use semihosting/syscalls.h

2022-06-29 Thread Max Filippov
On Wed, Jun 29, 2022 at 1:09 AM Alex Bennée wrote: > Richard Henderson writes: > > On 6/28/22 19:08, Max Filippov wrote: > >> On Tue, Jun 28, 2022 at 4:43 AM Richard Henderson > >> wrote: > >>> } > >>> -if (serial_hd(0)) { > >>> -xtensa_sim_open_console(serial_hd(0)); > >>> -

Re: [PATCH] io_uring: fix short read slow path corruptions

2022-06-29 Thread Kevin Wolf
Am 29.06.2022 um 07:23 hat Dominique Martinet geschrieben: > sqeq.off here is the offset to read within the disk image, so obviously > not 'nread' (the amount we just read), but as the author meant to write > its current value incremented by the amount we just read. > > Normally recent versions of

Re: [PATCH] hw/nvme: Use ioeventfd to handle doorbell updates

2022-06-29 Thread Jinhao Fan
Ping~ > @@ -4271,6 +4343,11 @@ static void nvme_init_sq(NvmeSQueue *sq, NvmeCtrl *n, > uint64_t dma_addr, > if (n->dbbuf_enabled) { > sq->db_addr = n->dbbuf_dbs + (sqid << 3); > sq->ei_addr = n->dbbuf_eis + (sqid << 3); > + > +if (n->params.ioeventfd && sq-

[PULL 00/11] Trivial branch for 7.1 patches

2022-06-29 Thread Laurent Vivier
ll request 20220629 Bernhard Beschow (3): hw/pci-host/i440fx: Remove unused parameter from i440fx_init() hw/i386/xen/xen-hvm: Allow for stubbing xen_set_pci_link_route() hw/i386/xen/xen-hvm: Inline xen_piix_pci_write_config_cl

[PULL 06/11] MAINTAINERS: Add softmmu/runstate.c to "Main loop"

2022-06-29 Thread Laurent Vivier
From: Markus Armbruster Signed-off-by: Markus Armbruster Acked-by: Richard Henderson Message-Id: <20220615122338.340426-1-arm...@redhat.com> Signed-off-by: Laurent Vivier --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1cbd6b72fa64..b8637c6f

[PULL 03/11] util: Return void on iova_tree_remove

2022-06-29 Thread Laurent Vivier
From: Eugenio Pérez It always returns IOVA_OK so nobody uses it. Acked-by: Jason Wang Reviewed-by: Peter Xu Signed-off-by: Eugenio Pérez Message-Id: <20220427154931.3166388-1-epere...@redhat.com> Signed-off-by: Laurent Vivier --- include/qemu/iova-tree.h | 4 +--- util/iova-tree.c |

[PULL 11/11] hw/i386/xen/xen-hvm: Inline xen_piix_pci_write_config_client() and remove it

2022-06-29 Thread Laurent Vivier
From: Bernhard Beschow xen_piix_pci_write_config_client() is implemented in the xen sub tree and uses PIIX constants internally, thus creating a direct dependency on PIIX. Now that xen_set_pci_link_route() is stubbable, the logic of xen_piix_pci_write_config_client() can be moved to PIIX which re

[PULL 07/11] hw/pci-host/i440fx: Remove unused parameter from i440fx_init()

2022-06-29 Thread Laurent Vivier
From: Bernhard Beschow pi440fx_state is an out-parameter which is never read by the caller. Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland Message-Id: <20220612192800.40813-1-shen...@gmail.com> Signed-off-by: Laurent Vivier --- hw/i386/pc_piix.c| 3 --- hw/pci-host

[PULL 04/11] Trivial: 3 char repeat typos

2022-06-29 Thread Laurent Vivier
From: "Dr. David Alan Gilbert" Inspired by Julia Lawall's fixing of Linux kernel comments, I looked at qemu, although I did it manually. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Daniel Henrique Barboza Reviewed-by: Klaus Jensen Message-Id: <20220614104045.85728-2-dgilb...@redhat.com

[PULL 01/11] vga: avoid crash if no default vga card

2022-06-29 Thread Laurent Vivier
From: Guo Zhi QEMU in some arch will crash when executing -vga help command, because there is no default vga model. Add check to this case and avoid crash. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/978 Signed-off-by: Guo Zhi Reviewed-by: Thomas Huth Tested-by: Thomas Huth Mess

[PULL 10/11] hw/i386/xen/xen-hvm: Allow for stubbing xen_set_pci_link_route()

2022-06-29 Thread Laurent Vivier
From: Bernhard Beschow The only user of xen_set_pci_link_route() is xen_piix_pci_write_config_client() which implements PIIX-specific logic in the xen namespace. This makes xen-hvm depend on PIIX which could be avoided if xen_piix_pci_write_config_client() was implemented in PIIX. In order to do

[PULL 09/11] hw/ide/atapi.c: Correct typos (CD-CDROM -> CD-ROM)

2022-06-29 Thread Laurent Vivier
From: Lev Kujawski Signed-off-by: Lev Kujawski Reviewed-by: Laurent Vivier Message-Id: <20220528204702.167912-1-lku...@member.fsf.org> Signed-off-by: Laurent Vivier --- hw/ide/atapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index

[PULL 08/11] common-user: Only compile the common user code if have_user is set

2022-06-29 Thread Laurent Vivier
From: Thomas Huth There is no need to waste cycles here if we only compile the system binaries or tools. Additionally, this change is even a hard requirement for building the tools on systems that do not have an entry in the common-user/host/ folder (since common-user/meson.build is trying to add

Re: [PATCH v2 10/13] hw/misc/aspeed: Add PECI controller

2022-06-29 Thread Cédric Le Goater
On 6/29/22 05:36, Peter Delevoryas wrote: This introduces a really basic PECI controller that responses to commands by always setting the response code to success and then raising an interrupt to indicate the command is done. This helps avoid getting hit with constant errors if the driver continu

[PULL 02/11] qom/object: Remove circular include dependency

2022-06-29 Thread Laurent Vivier
From: Philippe Mathieu-Daudé "qom/object.h" doesn't need to include itself. Fixes: db1015e92e04 ("Move QOM typedefs and add missing includes") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Damien Hedde Reviewed-by: Peter Maydell Reviewed-by: Markus Armbruster Message-Id: <20220509084659

Re: [PATCH 12/14] aspeed: Make aspeed_board_init_flashes public

2022-06-29 Thread Cédric Le Goater
On 6/24/22 18:50, Cédric Le Goater wrote: On 6/23/22 20:43, Peter Delevoryas wrote: On Jun 23, 2022, at 8:09 AM, Cédric Le Goater wrote: On 6/23/22 12:26, Peter Delevoryas wrote: Signed-off-by: Peter Delevoryas Let's start simple without flash support. We should be able to load FW blobs

[PULL 05/11] trivial typos: namesapce

2022-06-29 Thread Laurent Vivier
From: "Dr. David Alan Gilbert" 'namespace' is misspelled in a bunch of places. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Klaus Jensen Message-Id: <20220614104045.85728-3-dgilb...@redhat.com> Signed-off-by: Laurent Vivier --- hw/9pfs/9p-xattr-user.c | 8 hw/acpi/nvdimm.c

[PATCH v3 0/4] hmat acpi: Don't require initiator value in -numa

2022-06-29 Thread Brice Goglin
Allow -numa without initiator value when hmat=on so that we may build more complex topologies, e.g. NUMA nodes whose best initiators are not just another single node. changes v2->v3: * improve messages for patches 0/4 and 3/4 changes v1->v2: * add q35 acpi test Brice Goglin (4): hmat acpi: Don

[PATCH v3 2/4] tests: acpi: add and whitelist *.hmat-noinitiator expected blobs

2022-06-29 Thread Brice Goglin
.. which will be used by follow up hmat-noinitiator test-case. Signed-off-by: Brice Goglin Reviewed-by: Jonathan Cameron --- tests/data/acpi/q35/APIC.acpihmat-noinitiator | 0 tests/data/acpi/q35/DSDT.acpihmat-noinitiator | 0 tests/data/acpi/q35/FACP.acpihmat-noinitiator | 0 tests/data/acpi/

[PATCH v3 3/4] tests: acpi: q35: add test for hmat nodes without initiators

2022-06-29 Thread Brice Goglin
Build a machine with 4 cores and 3 NUMA nodes. 1st NUMA is local to cores #0-1. 2nd NUMA is local to cores #2-3. 3rd NUMA has no initiator. HMAT SLLB says memory access performance of 3rd NUMA is lower, but it's identical for all cores hence all cores are its best initiator. Expected HMAT: [000h

Re: [PATCH 1/4] libvduse: Fix the incorrect function name

2022-06-29 Thread Markus Armbruster
Xie Yongji writes: > In vduse_name_is_valid(), we actually check whether > the name is invalid or not. So let's change the > function name to vduse_name_is_invalid() to match > the behavior. > > Signed-off-by: Xie Yongji Reviewed-by: Markus Armbruster

[PATCH v3 4/4] tests: acpi: q35: update expected blobs *.hmat-noinitiators

2022-06-29 Thread Brice Goglin
expected HMAT: [000h 4]Signature : "HMAT"[Heterogeneous Memory Attributes Table] [004h 0004 4] Table Length : 0120 [008h 0008 1] Revision : 02 [009h 0009 1] Checksum : 4F [00Ah 0010 6]

[PATCH v3 1/4] hmat acpi: Don't require initiator value in -numa

2022-06-29 Thread Brice Goglin
The "Memory Proximity Domain Attributes" structure of the ACPI HMAT has a "Processor Proximity Domain Valid" flag that is currently always set because Qemu -numa requires an initiator=X value when hmat=on. Unsetting this flag allows to create more complex memory topologies by having multiple best

Re: [PATCH 3/4] libvduse: Pass positive value to strerror()

2022-06-29 Thread Markus Armbruster
Xie Yongji writes: > The value passed to strerror() should be positive. > So let's fix it. > > Fixes: Coverity CID 1490226, 1490223 > Signed-off-by: Xie Yongji Reviewed-by: Markus Armbruster

Re: [PATCH 2/4] libvduse: Replace strcpy() with strncpy()

2022-06-29 Thread Markus Armbruster
Xie Yongji writes: > Coverity reported a string overflow issue since we copied > "name" to "dev_config->name" without checking the length. > This should be a false positive since we already checked > the length of "name" in vduse_name_is_invalid(). But anyway, > let's replace strcpy() with strncp

Re: [PATCH] hw/arm/virt: dt: add rng-seed property

2022-06-29 Thread Peter Maydell
On Tue, 28 Jun 2022 at 19:45, Jason A. Donenfeld wrote: > > On 6/27/22, Jason A. Donenfeld wrote: > > On 6/27/22, Peter Maydell wrote: > >> On Mon, 27 Jun 2022 at 17:07, Jason A. Donenfeld wrote: > >>> > >>> In 60592cfed2 ("hw/arm/virt: dt: add kaslr-seed property"), the > >>> kaslr-seed proper

Re: [PATCH 4/4] libvduse: Check the return value of some ioctls

2022-06-29 Thread Markus Armbruster
Xie Yongji writes: > Coverity pointed out (CID 1490222, 1490227) that we called > ioctl somewhere without checking the return value. This > patch fixes these issues. > > Fixes: Coverity CID 1490222, 1490227 > Signed-off-by: Xie Yongji > --- > subprojects/libvduse/libvduse.c | 10 -- > 1

[PATCH] e1000: set RX descriptor status in a separate operation

2022-06-29 Thread Ding Hui
The code of setting RX descriptor status field maybe work fine in previously, however with the update of glibc version, it shows two issues when guest using dpdk receive packets: 1. The dpdk has a certain probability getting wrong buffer_addr this impact may be not obvious, such as lost a

Re: [RESEND PATCH] hw/dma: fix crash caused by race condition

2022-06-29 Thread David Hildenbrand
On 29.06.22 10:31, Tong Zhang wrote: > > > On Wed, Jun 29, 2022 at 12:29 AM David Hildenbrand > wrote: > > On 06.05.22 18:31, Tong Zhang wrote: > > assert(dbs->acb) is meant to check the return value of io_func per > > documented in commit 6bee44ea34 ("dma:

Re: [PATCH v5 2/2] target/xtensa: Use semihosting/syscalls.h

2022-06-29 Thread Alex Bennée
Max Filippov writes: > On Wed, Jun 29, 2022 at 1:09 AM Alex Bennée wrote: >> Richard Henderson writes: >> > On 6/28/22 19:08, Max Filippov wrote: >> >> On Tue, Jun 28, 2022 at 4:43 AM Richard Henderson >> >> wrote: > >> >>> } >> >>> -if (serial_hd(0)) { >> >>> -xtensa_sim_o

Re: [PATCH] hw/arm/virt: dt: add rng-seed property

2022-06-29 Thread Alex Bennée
Peter Maydell writes: > On Tue, 28 Jun 2022 at 19:45, Jason A. Donenfeld wrote: >> >> On 6/27/22, Jason A. Donenfeld wrote: >> > On 6/27/22, Peter Maydell wrote: >> >> On Mon, 27 Jun 2022 at 17:07, Jason A. Donenfeld wrote: >> >>> >> >>> In 60592cfed2 ("hw/arm/virt: dt: add kaslr-seed prope

Re: [PATCH] hw/arm/virt: dt: add rng-seed property

2022-06-29 Thread Alex Bennée
Peter Maydell writes: > On Tue, 28 Jun 2022 at 19:45, Jason A. Donenfeld wrote: >> >> On 6/27/22, Jason A. Donenfeld wrote: >> > On 6/27/22, Peter Maydell wrote: >> >> On Mon, 27 Jun 2022 at 17:07, Jason A. Donenfeld wrote: >> >>> >> >>> In 60592cfed2 ("hw/arm/virt: dt: add kaslr-seed prope

Re: [PATCH RFC 0/2] arm: enable MTE for QEMU + kvm

2022-06-29 Thread Eric Auger
Hi Connie, On 6/13/22 18:02, Cornelia Huck wrote: > On Fri, Jun 10 2022, Eric Auger wrote: > >> Hi Connie, >> >> On 5/12/22 15:11, Cornelia Huck wrote: >>> This series enables MTE for kvm guests, if the kernel supports it. >>> Lightly tested while running under the simulator (the arm64/mte/ >>>

Re: [PATCH RFC 1/2] arm/kvm: enable MTE if available

2022-06-29 Thread Eric Auger
Hi Connie, On 6/14/22 10:40, Cornelia Huck wrote: > On Fri, Jun 10 2022, Eric Auger wrote: > >> Hi Connie, >> On 5/12/22 15:11, Cornelia Huck wrote: >>> We need to disable migration, as we do not yet have a way to migrate >>> the tags as well. >> >> This patch does much more than adding a migrat

Re: [PATCH v5 2/2] target/xtensa: Use semihosting/syscalls.h

2022-06-29 Thread Max Filippov
On Wed, Jun 29, 2022 at 3:14 AM Alex Bennée wrote: > Max Filippov writes: > > There's no notion of 'serial hardware' for the xtensa-sim, all it has is > > the three standard stdio file descriptors. > > Which are accessed via semihosting calls? Yes. > Are they implicitly mapped to > 3 chardev d

Re: [RFC PATCH 00/12] Introduce QEMU userspace ebpf support

2022-06-29 Thread Andrew Melnichenko
Hi all, Nice idea. It would be great if future patches would add the BPF map support(if uBPF allows it). On Fri, Jun 17, 2022 at 10:51 AM Zhang Chen wrote: > > Hi All, > > The goal of this series is to bring the power of ebpf to QEMU. > It makes QEMU have the ability to extend the capabilitie

Re: [PATCH v5 03/12] net: simplify net_client_parse() error management

2022-06-29 Thread Markus Armbruster
Laurent Vivier writes: > All net_client_parse() callers exit in case of error. > > Move exit(1) to net_client_parse() and remove error checking from > the callers. > > Suggested-by: Markus Armbruster > Signed-off-by: Laurent Vivier Reviewed-by: Markus Armbruster

Re: [PATCH 0/2] python/qemu/machine: fix potential hang in QMP accept

2022-06-29 Thread Marc-André Lureau
Hi On Tue, Jun 28, 2022 at 9:08 PM John Snow wrote: > > On Tue, Jun 28, 2022 at 9:49 AM wrote: > > > > From: Marc-André Lureau > > > > Hi, > > > > As reported earlier by Richard Henderson ("virgl avocado hang" thread), > > avocado > > tests may hang when QEMU exits before the QMP connection is

Re: [RFC PATCH v4 04/11] qapi: net: add stream and dgram netdevs

2022-06-29 Thread Markus Armbruster
Laurent Vivier writes: > On 24/06/2022 11:41, Markus Armbruster wrote: >> Laurent Vivier writes: >> >>> Copied from socket netdev file and modified to use SocketAddress >>> to be able to introduce new features like unix socket. >>> >>> "udp" and "mcast" are squashed into dgram netdev, multicast

Re: [PATCH 4/4] libvduse: Check the return value of some ioctls

2022-06-29 Thread Yongji Xie
On Wed, Jun 29, 2022 at 5:41 PM Markus Armbruster wrote: > > Xie Yongji writes: > > > Coverity pointed out (CID 1490222, 1490227) that we called > > ioctl somewhere without checking the return value. This > > patch fixes these issues. > > > > Fixes: Coverity CID 1490222, 1490227 > > Signed-off-by

Re: [PATCH v5 05/12] qapi: net: add stream and dgram netdevs

2022-06-29 Thread Markus Armbruster
Laurent Vivier writes: > Copied from socket netdev file and modified to use SocketAddress > to be able to introduce new features like unix socket. > > "udp" and "mcast" are squashed into dgram netdev, multicast is detected > according to the IP address type. > "listen" and "connect" modes are man

Re: [RFC PATCH v4 10/11] qemu-sockets: introduce socket_uri()

2022-06-29 Thread Markus Armbruster
Laurent Vivier writes: > Format a string URI from a SocketAddress. > > Original code from hmp-cmds.c:SocketAddress_to_str() > > Replace 'tcp:' by 'inet:' (because 'inet' can be also 'udp'). This one's merely misleading. > Replace 'tcp:' by 'vsock:' with vsock socket type. This one's positively

Re: [PATCH] hw/arm/virt: dt: add rng-seed property

2022-06-29 Thread Jason A. Donenfeld
On Wed, Jun 29, 2022 at 11:18:23AM +0100, Alex Bennée wrote: > > Peter Maydell writes: > > > On Tue, 28 Jun 2022 at 19:45, Jason A. Donenfeld wrote: > >> > >> On 6/27/22, Jason A. Donenfeld wrote: > >> > On 6/27/22, Peter Maydell wrote: > >> >> On Mon, 27 Jun 2022 at 17:07, Jason A. Donenfeld

Re: [PATCH 4/4] libvduse: Check the return value of some ioctls

2022-06-29 Thread Markus Armbruster
Yongji Xie writes: > On Wed, Jun 29, 2022 at 5:41 PM Markus Armbruster wrote: >> >> Xie Yongji writes: >> >> > Coverity pointed out (CID 1490222, 1490227) that we called >> > ioctl somewhere without checking the return value. This >> > patch fixes these issues. >> > >> > Fixes: Coverity CID 149

Re: [PATCH v8 3/4] target/riscv: Update [m|h]tinst CSR in riscv_cpu_do_interrupt()

2022-06-29 Thread dramforever
On 6/28/22 18:17, Anup Patel wrote: > We should write transformed instruction encoding of the trapped > instruction in [m|h]tinst CSR at time of taking trap as defined > by the RISC-V privileged specification v1.12. > > Reviewed-by: Alistair Francis > Signed-off-by: Anup Patel > --- > target/r

Re: [PATCH] microvm: turn off io reservations for pcie root ports

2022-06-29 Thread Gerd Hoffmann
On Wed, Jun 29, 2022 at 03:16:17AM -0400, Michael S. Tsirkin wrote: > On Wed, Jun 29, 2022 at 09:10:23AM +0200, Gerd Hoffmann wrote: > > On Mon, Jun 27, 2022 at 06:37:50PM -0400, Michael S. Tsirkin wrote: > > > On Thu, Jun 09, 2022 at 09:28:38AM +0200, Gerd Hoffmann wrote: > > > > On Wed, Jun 08, 2

Re: [RFC PATCH] tests/9p: introduce declarative function calls

2022-06-29 Thread Christian Schoenebeck
On Mittwoch, 29. Juni 2022 09:35:02 CEST Greg Kurz wrote: > Hi Christian, Hi Greg, first off, this RFC patch was really just yet intended for discussing the high aspect coding style idea of using named function arguments in general (with a random example), i.e. checking acceptance, but also to se

Re: [PATCH 4/4] libvduse: Check the return value of some ioctls

2022-06-29 Thread Yongji Xie
On Wed, Jun 29, 2022 at 7:39 PM Markus Armbruster wrote: > > Yongji Xie writes: > > > On Wed, Jun 29, 2022 at 5:41 PM Markus Armbruster wrote: > >> > >> Xie Yongji writes: > >> > >> > Coverity pointed out (CID 1490222, 1490227) that we called > >> > ioctl somewhere without checking the return v

[PATCH 03/40] pl050: change PL050State dev pointer from void to PS2State

2022-06-29 Thread Mark Cave-Ayland
This allows the compiler to enforce that the PS2 device pointer is always of type PS2State. Update the name of the pointer from dev to ps2dev to emphasise this type change. Signed-off-by: Mark Cave-Ayland --- hw/input/pl050.c | 13 +++-- include/hw/input/pl050.h | 2 +- 2 files

[PATCH 00/40] PS2 device QOMification - part 2

2022-06-29 Thread Mark Cave-Ayland
Here is the follow-on series from part 1 which completes the work to remove the legacy global device init functions for PS2 devices. Now that part 1 has been applied, the hard part to remove the PS2 function callback and argument has been completed and all that remains is to improve the PS2 device

[PATCH 02/40] pl050: rename pl050_keyboard_init() to pl050_kbd_init()

2022-06-29 Thread Mark Cave-Ayland
This is for consistency with all of the other devices that use the PS2 keyboard device. Signed-off-by: Mark Cave-Ayland --- hw/input/pl050.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/input/pl050.c b/hw/input/pl050.c index c7980b6ed7..8e32b8ed46 100644 --- a/hw/in

[PATCH 01/40] pl050: move PL050State from pl050.c to new pl050.h header file

2022-06-29 Thread Mark Cave-Ayland
This allows the QOM types in pl050.c to be used elsewhere by simply including pl050.h. Signed-off-by: Mark Cave-Ayland --- hw/input/pl050.c | 16 +--- include/hw/input/pl050.h | 35 +++ 2 files changed, 36 insertions(+), 15 deletions(-) create

[PATCH 08/40] pl050: introduce pl050_kbd_class_init() and pl050_kbd_realize()

2022-06-29 Thread Mark Cave-Ayland
Introduce a new pl050_kbd_class_init() function containing a call to device_class_set_parent_realize() which calls a new pl050_kbd_realize() function to initialise the PS2 keyboard device. Signed-off-by: Mark Cave-Ayland --- hw/input/pl050.c | 21 +++-- 1 file changed, 19 inserti

[PATCH 14/40] lasips2: remove legacy lasips2_initfn() function

2022-06-29 Thread Mark Cave-Ayland
There is only one user of the legacy lasips2_initfn() function which is in machine_hppa_init(), so inline its functionality into machine_hppa_init() and then remove it. Signed-off-by: Mark Cave-Ayland --- hw/hppa/machine.c | 6 -- hw/input/lasips2.c | 12 inclu

[PATCH 05/40] pl050: introduce new PL050_MOUSE_DEVICE QOM type

2022-06-29 Thread Mark Cave-Ayland
This will be soon be used to hold the underlying PS2_MOUSE_DEVICE object. Signed-off-by: Mark Cave-Ayland --- hw/input/pl050.c | 3 ++- include/hw/input/pl050.h | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/input/pl050.c b/hw/input/pl050.c index 7f4ac99081

[PATCH 09/40] pl050: introduce pl050_mouse_class_init() and pl050_mouse_realize()

2022-06-29 Thread Mark Cave-Ayland
Introduce a new pl050_mouse_class_init() function containing a call to device_class_set_parent_realize() which calls a new pl050_mouse_realize() function to initialise the PS2 mouse device. Signed-off-by: Mark Cave-Ayland --- hw/input/pl050.c | 23 +++ 1 file changed, 19 inse

[PATCH 04/40] pl050: introduce new PL050_KBD_DEVICE QOM type

2022-06-29 Thread Mark Cave-Ayland
This will be soon be used to hold the underlying PS2_KBD_DEVICE object. Signed-off-by: Mark Cave-Ayland --- hw/input/pl050.c | 3 ++- include/hw/input/pl050.h | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/input/pl050.c b/hw/input/pl050.c index 0d91b0eaea..

[PATCH 06/40] pl050: move logic from pl050_realize() to pl050_init()

2022-06-29 Thread Mark Cave-Ayland
The logic for initialising the register memory region and the sysbus output IRQ does not depend upon any device properties and so can be moved from pl050_realize() to pl050_init(). Signed-off-by: Mark Cave-Ayland --- hw/input/pl050.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions

[PATCH 18/40] lasips2: introduce new LASIPS2_MOUSE_PORT QOM type

2022-06-29 Thread Mark Cave-Ayland
This will be soon be used to hold the underlying PS2_MOUSE_DEVICE object. Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 7 +++ include/hw/input/lasips2.h | 7 +++ 2 files changed, 14 insertions(+) diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c index b043f2e264..

[PATCH 12/40] lasips2: don't use vmstate_register() in lasips2_realize()

2022-06-29 Thread Mark Cave-Ayland
Since lasips2 is a qdev device then vmstate_ps2_mouse can be registered using the DeviceClass vmsd field instead. Note that due to the use of the base parameter in the original vmstate_register() function call, this is actually a migration break for the HPPA B160L machine. Signed-off-by: Mark Ca

[PATCH 15/40] lasips2: change LASIPS2State dev pointer from void to PS2State

2022-06-29 Thread Mark Cave-Ayland
This allows the compiler to enforce that the PS2 device pointer is always of type PS2State. Update the name of the pointer from dev to ps2dev to emphasise this type change. Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 16 include/hw/input/lasips2.h | 3 ++-

[PATCH 19/40] lasips2: move keyboard port initialisation to new lasips2_kbd_port_init() function

2022-06-29 Thread Mark Cave-Ayland
Move the initialisation of the keyboard port from lasips2_init() to a new lasips2_kbd_port_init() function which will be invoked using object_initialize_child() during the LASIPS2 device init. Update LASIPS2State so that it now holds the new LASIPS2KbdPort child object and ensure that it is realis

[PATCH 07/40] pl050: introduce PL050DeviceClass for the PL050 device

2022-06-29 Thread Mark Cave-Ayland
This will soon be used to store the reference to the PL050 parent device for PL050_KBD_DEVICE and PL050_MOUSE_DEVICE. Signed-off-by: Mark Cave-Ayland --- hw/input/pl050.c | 2 ++ include/hw/input/pl050.h | 8 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/input

[PATCH 20/40] lasips2: move mouse port initialisation to new lasips2_mouse_port_init() function

2022-06-29 Thread Mark Cave-Ayland
Move the initialisation of the mouse port from lasips2_init() to a new lasips2_mouse_port_init() function which will be invoked using object_initialize_child() during the LASIPS2 device init. Update LASIPS2State so that it now holds the new LASIPS2MousePort child object and ensure that it is real

[PATCH 11/40] pl050: don't use legacy ps2_mouse_init() function

2022-06-29 Thread Mark Cave-Ayland
Instantiate the PS2 mouse device within PL050MouseState using object_initialize_child() in pl050_mouse_init() and realize it in pl050_mouse_realize() accordingly. Signed-off-by: Mark Cave-Ayland --- hw/input/pl050.c | 13 ++--- include/hw/input/pl050.h | 2 ++ 2 files changed, 1

[PATCH 23/40] lasips2: rename LASIPS2Port irq field to birq

2022-06-29 Thread Mark Cave-Ayland
The existing boolean irq field in LASIPS2Port will soon be replaced by a proper qemu_irq, so rename the field to birq to allow the upcoming qemu_irq to use the irq name. Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 24 include/hw/input/lasips2.h | 2

[PATCH 10/40] pl050: don't use legacy ps2_kbd_init() function

2022-06-29 Thread Mark Cave-Ayland
Instantiate the PS2 keyboard device within PL050KbdState using object_initialize_child() in pl050_kbd_init() and realize it in pl050_kbd_realize() accordingly. Signed-off-by: Mark Cave-Ayland --- hw/input/pl050.c | 13 ++--- include/hw/input/pl050.h | 2 ++ 2 files changed, 12 i

[PATCH 13/40] lasips2: remove the qdev base property and the lasips2_properties array

2022-06-29 Thread Mark Cave-Ayland
The base property was only needed for use by vmstate_register() in order to preserve migration compatibility. Now that the lasips2 migration state is registered through the DeviceClass vmsd field, the base property and also the lasips2_properties array can be removed completely as they are no longe

[PATCH 21/40] lasips2: introduce lasips2_kbd_port_class_init() and lasips2_kbd_port_realize()

2022-06-29 Thread Mark Cave-Ayland
Introduce a new lasips2_kbd_port_class_init() function which uses a new lasips2_kbd_port_realize() function to initialise the PS2 keyboard device. Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/hw/input/

[PATCH 17/40] lasips2: introduce new LASIPS2_KBD_PORT QOM type

2022-06-29 Thread Mark Cave-Ayland
This will be soon be used to hold the underlying PS2_KBD_DEVICE object. Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 7 +++ include/hw/input/lasips2.h | 7 +++ 2 files changed, 14 insertions(+) diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c index 56bfd759af..b0

[PATCH 30/40] lasips2: standardise on lp name for LASIPS2Port variables

2022-06-29 Thread Mark Cave-Ayland
This is shorter to type and keeps the naming convention consistent within the LASIPS2 device. Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 52 +++--- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/hw/input/lasips2.c b/hw/input/

[PATCH 24/40] lasips2: introduce port IRQ and new lasips2_port_init() function

2022-06-29 Thread Mark Cave-Ayland
Introduce a new lasips2_port_init() QOM init function for the LASIPS2_PORT type and use it to initialise a new gpio for use as a port IRQ. Add a new qemu_irq representing the gpio as a new irq field within LASIPS2Port. Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 8

[PATCH 16/40] lasips2: QOMify LASIPS2Port

2022-06-29 Thread Mark Cave-Ayland
This becomes an abstract QOM type which will be a parent type for separate keyboard and mouse port types. Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 8 include/hw/input/lasips2.h | 14 ++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/

[PATCH 29/40] lasips2: rename LASIPS2Port parent pointer to lasips2

2022-06-29 Thread Mark Cave-Ayland
This makes it clearer that the pointer is a reference to the LASIPS2 container device rather than an implied part of the QOM hierarchy. Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 6 +++--- include/hw/input/lasips2.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)

[PATCH 22/40] lasips2: introduce lasips2_mouse_port_class_init() and lasips2_mouse_port_realize()

2022-06-29 Thread Mark Cave-Ayland
Introduce a new lasips2_mouse_port_class_init() function which uses a new lasips2_mouse_port_realize() function to initialise the PS2 mouse device. Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/hw/input

[PATCH 25/40] lasips2: introduce LASIPS2PortDeviceClass for the LASIPS2_PORT device

2022-06-29 Thread Mark Cave-Ayland
This will soon be used to store the reference to the LASIPS2_PORT parent device for LASIPS2_KBD_PORT and LASIPS2_MOUSE_PORT. Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 2 ++ include/hw/input/lasips2.h | 6 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a

[PATCH 27/40] lasips2: add named input gpio to handle incoming port IRQs

2022-06-29 Thread Mark Cave-Ayland
The LASIPS2 device named input gpio is soon to be connected to the port output IRQs. Add a new int_status field to LASIPS2State which is a bitmap representing the port input IRQ status. Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 15 +++ include/hw/input/lasips2.

[PATCH 35/40] pckbd: introduce new vmstate_kbd_mmio VMStateDescription for the I8042_MMIO device

2022-06-29 Thread Mark Cave-Ayland
This enables us to register the VMStateDescription using the DeviceClass vmsd property rather than having to call vmstate_register() from i8042_mmio_realize(). Note that this is a migration break for the MIPS jazz machine which is the only user of the I8042_MMIO device. Signed-off-by: Mark Cave-

[PATCH 28/40] lasips2: switch to using port-based IRQs

2022-06-29 Thread Mark Cave-Ayland
Now we can implement port-based IRQs by wiring the PS2 device IRQs to the LASI2Port named input gpios rather than directly to the LASIPS2 device, and generate the LASIPS2 output IRQ from the int_status bitmap representing the individual port IRQs instead of the birq boolean. This enables us to rem

[PATCH 26/40] lasips2: add named input gpio to port for downstream PS2 device IRQ

2022-06-29 Thread Mark Cave-Ayland
The named input gpio is to be connected to the IRQ output of the downstream PS2 device and used to drive the port IRQ. Initialise the named input gpio in lasips2_port_init() and add new lasips2_port_class_init() and lasips2_port_realize() functions to connect the PS2 device output gpio to the new n

[PATCH 33/40] lasips2: don't use legacy ps2_mouse_init() function

2022-06-29 Thread Mark Cave-Ayland
Instantiate the PS2 mouse device within LASIPS2MousePort using object_initialize_child() in lasips2_mouse_port_init() and realize it in lasips2_mouse_port_realize() accordingly. Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 10 +- include/hw/input/lasips2.h | 2 ++ 2

[PATCH 31/40] lasips2: switch register memory region to DEVICE_BIG_ENDIAN

2022-06-29 Thread Mark Cave-Ayland
The LASI device (and so also the LASIPS2 device) are only used for the HPPA B160L machine which is a big endian architecture. Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c index 0

[PATCH 34/40] lasips2: update VMStateDescription for LASIPS2 device

2022-06-29 Thread Mark Cave-Ayland
Since this series has already introduced a migration break for the HPPA B160L machine, we can use this opportunity to improve the VMStateDescription for the LASIPS2 device. Add the new int_status field to the VMStateDescription and remodel the ports as separate VMSTATE_STRUCT instances. Signed-of

  1   2   3   >