Re: [PATCH] fdc: fix floppy boot for Red Hat Linux 5.2

2021-03-12 Thread Thomas Huth
On 12/03/2021 07.32, John Snow wrote: The image size indicates it's an 81 track floppy disk image, which we don't have a listing for in the geometry table. When you force the drive type to 1.44MB, it guesses the reasonably close 18/80. When the drive type is allowed to auto-detect or set to 2.88,

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Thomas Huth
On 12/03/2021 08.42, Marc-André Lureau wrote: On Fri, Mar 12, 2021 at 3:14 AM Philippe Mathieu-Daudé > wrote: [...] +## +# @AcceleratorInfo: +# +# Accelerator information. +# +# @name: The accelerator name. +# +# Since: 6.0 +##

Re: [RFC] adding a generic QAPI event for failed device hotunplug

2021-03-12 Thread Markus Armbruster
David Gibson writes: > On Thu, Mar 11, 2021 at 05:50:42PM -0300, Daniel Henrique Barboza wrote: >> >> >> On 3/9/21 3:22 AM, Markus Armbruster wrote: >> > Cc: Paolo and Julia in addition to Igor, because the thread is wandering >> > towards DeviceState member pending_deleted_event. >> > >> > Cc

Re: [PULL 5/9] char: add goldfish-tty

2021-03-12 Thread Laurent Vivier
Le 11/03/2021 à 23:34, Philippe Mathieu-Daudé a écrit : > On 3/11/21 11:04 PM, Laurent Vivier wrote: >> Le 11/03/2021 à 22:57, Peter Maydell a écrit : >>> On Thu, 11 Mar 2021 at 21:22, Laurent Vivier wrote: Implement the goldfish tty device as defined in https://android.googles

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-12 Thread Markus Armbruster
Paolo Bonzini writes: > On 11/03/21 15:08, Markus Armbruster wrote: >>> I would rather keep the OptsVisitor here. Do the same check for JSON >>> syntax that you have in qobject_input_visitor_new_str, and whenever >>> you need to walk all -object arguments, use something like this: >>> >>> t

Re: [PATCH 2/6] tests/qtest: Add qtest_probe_accel() method

2021-03-12 Thread Thomas Huth
On 12/03/2021 00.11, Philippe Mathieu-Daudé wrote: Introduce the qtest_probe_accel() method which allows to query at runtime if a QEMU instance has an accelerator built-in. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/libqos/libqtest.h | 9 + tests/qtest/libqtest.c|

Re: [PATCH v2 0/3] char: Deprecate backend aliases

2021-03-12 Thread Markus Armbruster
Kevin Wolf writes: > A small series from November that has fallen through the cracks... Glad you remembered! > These aliases only work the command line, but not in QMP. Command line > QAPIfication involves writing some compatibility glue for them, which > I'm doing, but I think it's desirable t

Re: [PULL 47/53] scripts: Coccinelle script to use ERRP_GUARD()

2021-03-12 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 7/7/20 11:24 PM, Markus Armbruster wrote: >> From: Vladimir Sementsov-Ogievskiy >> >> Script adds ERRP_GUARD() macro invocations where appropriate and >> does corresponding changes in code (look for details in >> include/qapi/error.h) >> >> Usage example: >>

Re: [PULL 03/16] net: validate that ids are well formed

2021-03-12 Thread Paolo Bonzini
On 12/03/21 07:16, Jason Wang wrote: From: Paolo Bonzini When a network or network device is created from the command line or HMP, QemuOpts ensures that the id passes the id_wellformed check. However, QMP skips this: $ qemu-system-x86_64 -qmp stdio -S -nic user,id=123/456 qemu-system-

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Claudio Fontana
On 3/12/21 8:42 AM, Marc-André Lureau wrote: > On Fri, Mar 12, 2021 at 3:14 AM Philippe Mathieu-Daudé > wrote: > >> Introduce the 'query-accels' QMP command which returns a list >> of built-in accelerators names. >> >> - Accelerator is an QAPI enum of all existing accelerators, >> >> - Accelerato

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-12 Thread Paolo Bonzini
On 12/03/21 09:14, Markus Armbruster wrote: Paolo Bonzini writes: On 11/03/21 15:08, Markus Armbruster wrote: I would rather keep the OptsVisitor here. Do the same check for JSON syntax that you have in qobject_input_visitor_new_str, and whenever you need to walk all -object arguments, use s

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Andrew Jones
On Fri, Mar 12, 2021 at 09:11:45AM +0100, Thomas Huth wrote: > On 12/03/2021 08.42, Marc-André Lureau wrote: > > > > > > On Fri, Mar 12, 2021 at 3:14 AM Philippe Mathieu-Daudé > > mailto:phi...@redhat.com>> wrote: > > > [...] > > +## > > +# @AcceleratorInfo: > > +# > > +# Acceler

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Claudio Fontana
On 3/12/21 9:48 AM, Andrew Jones wrote: > On Fri, Mar 12, 2021 at 09:11:45AM +0100, Thomas Huth wrote: >> On 12/03/2021 08.42, Marc-André Lureau wrote: >>> >>> >>> On Fri, Mar 12, 2021 at 3:14 AM Philippe Mathieu-Daudé >>> mailto:phi...@redhat.com>> wrote: >>> >> [...] >>> +## >>> +# @Accel

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-12 Thread Peter Krempa
On Fri, Mar 12, 2021 at 09:46:54 +0100, Paolo Bonzini wrote: > On 12/03/21 09:14, Markus Armbruster wrote: > > Paolo Bonzini writes: > > > > > On 11/03/21 15:08, Markus Armbruster wrote: > > > > > I would rather keep the OptsVisitor here. Do the same check for JSON > > > > > syntax that you have

qemu-devel@nongnu.org

2021-03-12 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Calls passing &error_abort or &error_fatal don't return. Correction: they *can* return. What they can't is return failure. > Any code after such use is dubious. Add a coccinelle patch > to detect such pattern. To be precise: any failure path from such a call i

Re: [PATCH] sockets: update SOCKET_ADDRESS_TYPE_FD listen(2) backlog

2021-03-12 Thread Stefano Garzarella
On Wed, Mar 10, 2021 at 05:30:04PM +, Stefan Hajnoczi wrote: socket_get_fd() fails with the error "socket_get_fd: too many connections" if the given listen backlog value is not 1. Not all callers set the backlog to 1. For example, commit 582d4210eb2f2ab5baac328fe4b479cd86da1647 ("qemu-nbd: U

Re: [PATCH 2/6] tests/qtest: Add qtest_probe_accel() method

2021-03-12 Thread Andrew Jones
On Fri, Mar 12, 2021 at 09:16:01AM +0100, Thomas Huth wrote: > On 12/03/2021 00.11, Philippe Mathieu-Daudé wrote: > > Introduce the qtest_probe_accel() method which allows > > to query at runtime if a QEMU instance has an accelerator > > built-in. > > > > Signed-off-by: Philippe Mathieu-Daudé > >

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Paolo Bonzini
On 12/03/21 09:48, Andrew Jones wrote: I think we definitely need the additional data section here: For KVM on POWER, it would be good to know whether it's KVM-HV or KVM-PR, for KVM on MIPS it would be good to know whether it's KVM_VM_MIPS_VZ or KVM_VM_MIPS_TE, for KVM on x86 whether it's the AMD

[PATCH 2/4] usb/storage: move usb-bot device to separate source file

2021-03-12 Thread Gerd Hoffmann
Pure code motion, no functional change. Signed-off-by: Gerd Hoffmann --- hw/usb/dev-storage-bot.c | 63 hw/usb/dev-storage.c | 42 --- hw/usb/meson.build | 1 + 3 files changed, 64 insertions(+), 42 deletions(-) create

[PATCH 3/4] usb/storage move usb-storage device to separate source file

2021-03-12 Thread Gerd Hoffmann
Pure code motion, no functional change. Signed-off-by: Gerd Hoffmann --- hw/usb/dev-storage-classic.c | 156 +++ hw/usb/dev-storage.c | 135 -- hw/usb/meson.build | 1 + 3 files changed, 157 insertions(+), 135 deleti

Re: [PATCH v6 2/2] target/s390x: Store r1/r2 for page-translation exceptions during MVPG

2021-03-12 Thread Thomas Huth
On 11/03/2021 20.44, David Hildenbrand wrote: The PoP states: When EDAT-1 does not apply, and a program interruption due to a page-translation exception is recognized by the MOVE PAGE instruction, the contents of the R1 field of the instruction are stored in bit positions 0-3

[PATCH 4/4] usb/storage: add kconfig symbols

2021-03-12 Thread Gerd Hoffmann
Add new kconfig symbols so usb-storage and usb-bot can be enabled or disabled individually at build time. Signed-off-by: Gerd Hoffmann --- hw/usb/Kconfig | 13 - hw/usb/meson.build | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/hw/usb/Kconfig b/hw/usb/

[PATCH 1/4] usb/storage: move declarations to usb/msd.h header

2021-03-12 Thread Gerd Hoffmann
In preparation for splitting the usb-storage.c file move declarations to the new usb/msd.h header file. Signed-off-by: Gerd Hoffmann --- include/hw/usb/msd.h | 54 hw/usb/dev-storage.c | 48 +-- 2 files changed, 60

Re: Question about edge-triggered interrupt

2021-03-12 Thread LIU Zhiwei
On 2021/3/12 4:45, Alistair Francis wrote: On Thu, Mar 11, 2021 at 11:21 AM LIU Zhiwei wrote: On 2021/3/11 21:17, Peter Maydell wrote: On Thu, 11 Mar 2021 at 12:59, LIU Zhiwei wrote: From the specification, I find that software will not clean the pending bit on interrupt controller via

[PATCH 0/4] usb/storage: split into multiple source files.

2021-03-12 Thread Gerd Hoffmann
One new file for the usb-bot device. Another new files for the classic usb-storage device. The abstract parent class remains in the original file. Gerd Hoffmann (4): usb/storage: move declarations to usb/msd.h header usb/storage: move usb-bot device to separate source file usb/storage move u

Re: [PATCH 5/6] qtest/arm-cpu-features: Check TCG availability at runtime

2021-03-12 Thread Paolo Bonzini
On 12/03/21 00:12, Philippe Mathieu-Daudé wrote: Now than we can probe if the TCG accelerator is available at runtime with a QMP command, skip these TCG specific tests when TCG is not built into the QEMU binary. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/arm-cpu-features.c | 23 +++

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Paolo Bonzini
On 12/03/21 09:46, Claudio Fontana wrote: Maybe for clarity this could be 'query-accels-available' (which is probably the goal of this series). Possibly a separate one would be 'query-accel-enabled'? The accelerator object is not included in the QOM tree. I think it should be added to /mach

Re: [PATCH] gitlab-ci: Add a job to run common coccinelle checks

2021-03-12 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Add a job to run common coccinelle checks. This makes sense only for coccinelle scripts that come up clean and have a reasonably high confidence. Come up clean: we get no reports for master. Otherwise new reports will drown in the old reports, and soon enough n

Re: [PATCH 4/6] qtest/arm-cpu-features: Check KVM availability at runtime

2021-03-12 Thread Paolo Bonzini
On 12/03/21 00:12, Philippe Mathieu-Daudé wrote: -#define MACHINE_KVM "-machine virt,gic-version=max -accel kvm -accel tcg " +#define MACHINE_KVM "-machine virt,gic-version=max -accel kvm " Wouldn't qtest_init simply fail here if KVM is not available? Paolo

Re: [PATCH v3 3/6] block/qcow2: introduce inflight writes counters: fix discard

2021-03-12 Thread Vladimir Sementsov-Ogievskiy
11.03.2021 22:58, Max Reitz wrote: On 05.03.21 18:35, Vladimir Sementsov-Ogievskiy wrote: There is a bug in qcow2: host cluster can be discarded (refcount becomes 0) and reused during data write. In this case data write may pollute another cluster (recently allocated) or even metadata. I was a

Re: [PATCH 6/6] tests/qtest: Do not restrict bios-tables-test to Aarch64 hosts anymore

2021-03-12 Thread Paolo Bonzini
On 12/03/21 00:12, Philippe Mathieu-Daudé wrote: Since commit 82bf7ae84ce ("target/arm: Remove KVM support for 32-bit Arm hosts") we can remove the comment / check added in commit ab6b6a4 and directly run the bios-tables-test. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/meson.bui

Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io()

2021-03-12 Thread Cédric Le Goater
On 3/11/21 6:27 PM, Peter Xu wrote: > On Thu, Mar 11, 2021 at 05:21:49PM +0100, Philippe Mathieu-Daudé wrote: >> +Aspeed team >> >> On 3/11/21 1:18 PM, Philippe Mathieu-Daudé wrote: >>> On 3/10/21 9:29 PM, Peter Xu wrote: >> Yeah no worry - it's just that I feel one memory_region_init_alias()

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Andrew Jones
On Fri, Mar 12, 2021 at 10:01:43AM +0100, Paolo Bonzini wrote: > On 12/03/21 09:48, Andrew Jones wrote: > > > I think we definitely need the additional data section here: For KVM on > > > POWER, it would be good to know whether it's KVM-HV or KVM-PR, for KVM on > > > MIPS it would be good to know w

Re: Question about edge-triggered interrupt

2021-03-12 Thread LIU Zhiwei
On 2021/3/12 0:50, Peter Maydell wrote: On Thu, 11 Mar 2021 at 16:40, LIU Zhiwei wrote: On 2021/3/12 0:07, Peter Maydell wrote: On Thu, 11 Mar 2021 at 16:01, LIU Zhiwei wrote: I'm pretty sure that there is some interaction between the CPU and the interrupt controller on a return-from-int

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Andrew Jones
On Fri, Mar 12, 2021 at 09:52:33AM +0100, Claudio Fontana wrote: > On 3/12/21 9:48 AM, Andrew Jones wrote: > > On Fri, Mar 12, 2021 at 09:11:45AM +0100, Thomas Huth wrote: > >> On 12/03/2021 08.42, Marc-André Lureau wrote: > >>> > >>> > >>> On Fri, Mar 12, 2021 at 3:14 AM Philippe Mathieu-Daudé > >

[PATCH v2 0/7] virtiofsd: Avoid potential deadlocks

2021-03-12 Thread Greg Kurz
A deadlock condition potentially exists if a vhost-user process needs to request something to QEMU on the slave channel while processing a vhost-user message. This doesn't seem to affect any vhost-user implementation so far, but this is currently biting the upcoming enablement of DAX with virtio-f

[PATCH v2 4/7] vhost-user: Convert slave channel to QIOChannelSocket

2021-03-12 Thread Greg Kurz
The slave channel is implemented with socketpair() : QEMU creates the pair, passes one of the socket to virtiofsd and monitors the other one with the main event loop using qemu_set_fd_handler(). In order to fix a potential deadlock between QEMU and a vhost-user external process (e.g. virtiofsd wit

[PATCH v2 5/7] vhost-user: Introduce nested event loop in vhost_user_read()

2021-03-12 Thread Greg Kurz
A deadlock condition potentially exists if a vhost-user process needs to request something to QEMU on the slave channel while processing a vhost-user message. This doesn't seem to affect any vhost-user implementation so far, but this is currently biting the upcoming enablement of DAX with virtio-f

[PATCH v2 2/7] vhost-user: Fix double-close on slave_read() error path

2021-03-12 Thread Greg Kurz
Some message types, e.g. VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG, can convey file descriptors. These must be closed before returning from slave_read() to avoid being leaked. This can currently be done in two different places: [1] just after the request has been processed [2] on the error path, u

[PATCH v2 1/7] vhost-user: Drop misleading EAGAIN checks in slave_read()

2021-03-12 Thread Greg Kurz
slave_read() checks EAGAIN when reading or writing to the socket fails. This gives the impression that the slave channel is in non-blocking mode, which is certainly not the case with the current code base. And the rest of the code isn't actually ready to cope with non-blocking I/O. Just drop the c

[PATCH v2 7/7] virtiofsd: Release vu_dispatch_lock when stopping queue

2021-03-12 Thread Greg Kurz
QEMU can stop a virtqueue by sending a VHOST_USER_GET_VRING_BASE request to virtiofsd. As with all other vhost-user protocol messages, the thread that runs the main event loop in virtiofsd takes the vu_dispatch lock in write mode. This ensures that no other thread can access virtqueues or memory ta

Re: [PATCH v2 01/10] Remove some duplicate trace code.

2021-03-12 Thread lizhij...@fujitsu.com
On 3/12/21 1:02 PM, leirao wrote: > From: "Rao, Lei" > > There is the same trace code in the colo_compare_packet_payload. > > Signed-off-by: Lei Rao Reviewed-by: Li Zhijian > --- > net/colo-compare.c | 13 - > 1 file changed, 13 deletions(-) > > diff --git a/net/colo-compare.c

Re: [PATCH v2 05/10] Optimize the function of packet_new

2021-03-12 Thread lizhij...@fujitsu.com
On 3/12/21 1:02 PM, leirao wrote: > From: "Rao, Lei" > > if we put the data copy outside the packet_new(), then for the > filter-rewrite module, there will be one less memory copy in the > processing of each network packet. > > Signed-off-by: Lei Rao > --- > net/colo-compare.c| 7 +--

[PATCH v2 3/7] vhost-user: Factor out duplicated slave_fd teardown code

2021-03-12 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/virtio/vhost-user.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index acde1d293684..cb0c98f30a8d 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -1392,6

[PATCH] tests: Move benchmarks into a separate folder

2021-03-12 Thread Thomas Huth
Make it clear that these files are related to benchmarks by moving them into a new folder called "bench". Signed-off-by: Thomas Huth --- Based-on: 20210310063314.1049838-1-th...@redhat.com tests/{ => bench}/atomic64-bench.c | 0 tests/{ => bench}/atomic_add-bench.c| 0 tests

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Paolo Bonzini
On 12/03/21 10:17, Andrew Jones wrote: On Fri, Mar 12, 2021 at 10:01:43AM +0100, Paolo Bonzini wrote: On 12/03/21 09:48, Andrew Jones wrote: I think we definitely need the additional data section here: For KVM on POWER, it would be good to know whether it's KVM-HV or KVM-PR, for KVM on MIPS it

Re: [PATCH v2 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-03-12 Thread lizhij...@fujitsu.com
On 3/12/21 1:02 PM, leirao wrote: > From: "Rao, Lei" > > This patch fixes the following: > qemu-system-x86_64: invalid runstate transition: 'colo' ->'shutdown' > Aborted (core dumped) > > Signed-off-by: Lei Rao Reviewed-by: Li Zhijian > --- > softmmu/runstate.c | 1 + > 1 file ch

Re: [PATCH v2 10/10] Fixed calculation error of pkt->header_size in fill_pkt_tcp_info()

2021-03-12 Thread lizhij...@fujitsu.com
On 3/12/21 1:03 PM, leirao wrote: > From: "Rao, Lei" > > The data pointer has skipped vnet_hdr_len in the function of > parse_packet_early().So, we can not subtract vnet_hdr_len again > when calculating pkt->header_size in fill_pkt_tcp_info(). Otherwise, > it will cause network packet comparsion

Re: [PATCH v2 03/10] Optimize the function of filter_send

2021-03-12 Thread lizhij...@fujitsu.com
On 3/12/21 1:02 PM, leirao wrote: > From: "Rao, Lei" > > The iov_size has been calculated in filter_send(). we can directly > return the size.In this way, this is no need to repeat calculations > in filter_redirector_receive_iov(); > > Signed-off-by: Lei Rao Reviewed-by: Li Zhijian > --- >

all class init functions for all types in QEMU are called in select_machine(). Expected?

2021-03-12 Thread Claudio Fontana
Hello Paolo and all, while debugging a class init ordering issue, I noticed that _all_ class init functions for all types registered in the QEMU QOM are called in select_machine(). Expected? In particular it happens here: static MachineClass *select_machine(void) { GSList *machines = objec

Re: [PATCH] tests: Move benchmarks into a separate folder

2021-03-12 Thread Paolo Bonzini
On 12/03/21 10:22, Thomas Huth wrote: Make it clear that these files are related to benchmarks by moving them into a new folder called "bench". Signed-off-by: Thomas Huth --- Based-on: 20210310063314.1049838-1-th...@redhat.com tests/{ => bench}/atomic64-bench.c | 0 tests/{ => b

Re: [PATCH v2 08/10] Reduce the PVM stop time during Checkpoint

2021-03-12 Thread lizhij...@fujitsu.com
On 3/12/21 1:03 PM, leirao wrote: > From: "Rao, Lei" > > When flushing memory from ram cache to ram during every checkpoint > on secondary VM, we can copy continuous chunks of memory instead of > 4096 bytes per time to reduce the time of VM stop during checkpoint. > > Signed-off-by: Lei Rao > -

Re: [PATCH 4/6] qtest/arm-cpu-features: Check KVM availability at runtime

2021-03-12 Thread Philippe Mathieu-Daudé
On 3/12/21 10:05 AM, Paolo Bonzini wrote: > On 12/03/21 00:12, Philippe Mathieu-Daudé wrote: >> -#define MACHINE_KVM "-machine virt,gic-version=max -accel kvm -accel >> tcg " >> +#define MACHINE_KVM "-machine virt,gic-version=max -accel kvm " > > Wouldn't qtest_init simply fail here if KVM is not

[PATCH v2 6/7] vhost-user: Monitor slave channel in vhost_user_read()

2021-03-12 Thread Greg Kurz
Now that everything is in place, have the nested event loop to monitor the slave channel. The source in the main event loop is destroyed and recreated to ensure any pending even for the slave channel that was previously detected is purged. This guarantees that the main loop wont invoke slave_read()

Re: [PATCH] target/mips: Deprecate Trap-and-Emul KVM support

2021-03-12 Thread Philippe Mathieu-Daudé
+Paolo/Thomas/KVM On 3/12/21 2:03 AM, Jiaxun Yang wrote: > Upstream kernel had removed both host[1] and guest[2] support. > > [1]: > https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=45c7e8af4a5e3f0bea4ac209eea34118dd57ac64 > [2]: > https://git.kernel.org/pub/scm/linux/k

Re: all class init functions for all types in QEMU are called in select_machine(). Expected?

2021-03-12 Thread Philippe Mathieu-Daudé
On 3/12/21 10:31 AM, Claudio Fontana wrote: > Hello Paolo and all, > > while debugging a class init ordering issue, I noticed that > > _all_ class init functions for all types registered in the QEMU QOM are > called in select_machine(). > Expected? > > In particular it happens here: > > static

[Bug 1523811] Re: USB assert failure on dev-storage.c

2021-03-12 Thread Gerd Hoffmann
No, we can't. csw.residue is non-zero if the request didn't complete yet (usb_msd_send_status clears it via memset). We *really* should not be in USB_MSDM_CBW state with a non-zero residue. We need to figure how we end up with this inconsistency. Possibly via usb_msd_handle_reset(). -- You

Re: all class init functions for all types in QEMU are called in select_machine(). Expected?

2021-03-12 Thread Paolo Bonzini
On 12/03/21 10:31, Claudio Fontana wrote: Hello Paolo and all, while debugging a class init ordering issue, I noticed that _all_ class init functions for all types registered in the QEMU QOM are called in select_machine(). Expected? In particular it happens here: static MachineClass *select_

Re: all class init functions for all types in QEMU are called in select_machine(). Expected?

2021-03-12 Thread Claudio Fontana
On 3/12/21 10:46 AM, Paolo Bonzini wrote: > On 12/03/21 10:31, Claudio Fontana wrote: >> Hello Paolo and all, >> >> while debugging a class init ordering issue, I noticed that >> >> _all_ class init functions for all types registered in the QEMU QOM are >> called in select_machine(). >> Expected?

Re: [PATCH 4/6] qtest/arm-cpu-features: Check KVM availability at runtime

2021-03-12 Thread Paolo Bonzini
On 12/03/21 10:32, Philippe Mathieu-Daudé wrote: On 3/12/21 10:05 AM, Paolo Bonzini wrote: On 12/03/21 00:12, Philippe Mathieu-Daudé wrote: -#define MACHINE_KVM "-machine virt,gic-version=max -accel kvm -accel tcg " +#define MACHINE_KVM "-machine virt,gic-version=max -accel kvm " Wouldn't qte

[PATCH] usb/storage: clear csw on reset

2021-03-12 Thread Gerd Hoffmann
Stale data in csw (specifically residue) can confuse the state machine and allows the guest trigger an assert(). So clear csw on reset to avoid this happening in case the guest resets the device in the middle of a request. Buglink: https://bugs.launchpad.net/qemu/+bug/1523811 Signed-off-by: Gerd

Re: [PATCH v2 1/8] powerpc/xive: Use cpu_to_node() instead of ibm,chip-id property

2021-03-12 Thread Cédric Le Goater
On 3/12/21 2:55 AM, David Gibson wrote: > On Tue, 9 Mar 2021 18:26:35 +0100 > Cédric Le Goater wrote: > >> On 3/9/21 6:08 PM, Daniel Henrique Barboza wrote: >>> >>> >>> On 3/9/21 12:33 PM, Cédric Le Goater wrote: On 3/8/21 6:13 PM, Greg Kurz wrote: > On Wed, 3 Mar 2021 18:48:50 +0100

RE: [PATCH v2 05/10] Optimize the function of packet_new

2021-03-12 Thread Rao, Lei
How about redefine a function named packet_new_nocopy? In comments, we can tell the caller don't release the buffer and the packet_destroy will release it. Thanks, Lei. -Original Message- From: lizhij...@fujitsu.com Sent: Friday, March 12, 2021 2:53 PM To: Rao, Lei ; Zhang, Chen ; jas

qemu-devel@nongnu.org

2021-03-12 Thread Philippe Mathieu-Daudé
On 3/12/21 9:58 AM, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> Calls passing &error_abort or &error_fatal don't return. > > Correction: they *can* return. What they can't is return failure. > >> Any code after such use is dubious. Add a coccinelle patch >> to detect such pa

Re: all class init functions for all types in QEMU are called in select_machine(). Expected?

2021-03-12 Thread Claudio Fontana
On 3/12/21 10:45 AM, Philippe Mathieu-Daudé wrote: > On 3/12/21 10:31 AM, Claudio Fontana wrote: >> Hello Paolo and all, >> >> while debugging a class init ordering issue, I noticed that >> >> _all_ class init functions for all types registered in the QEMU QOM are >> called in select_machine(). >>

Re: [PATCH v2 0/7] vhost: replace master/slave with more accurate wording

2021-03-12 Thread Stefano Garzarella
On Thu, Mar 11, 2021 at 05:32:43AM -0500, Paolo Bonzini wrote: Compared to v1, which only affected the prose of the documentation, I am also changing the message names in the docs and code now. Patch 2 was also adjusted according to Stefan's documentation, and "frontend/backend" (with no hyphen)

Re: [PATCH] usb/storage: clear csw on reset

2021-03-12 Thread Philippe Mathieu-Daudé
On 3/12/21 10:49 AM, Gerd Hoffmann wrote: > Stale data in csw (specifically residue) can confuse the state machine > and allows the guest trigger an assert(). So clear csw on reset to > avoid this happening in case the guest resets the device in the middle > of a request. > > Buglink: https://bug

Re: [PULL 00/22] Trivial branch for 6.0 patches

2021-03-12 Thread Peter Maydell
On Wed, 10 Mar 2021 at 21:47, Laurent Vivier wrote: > > The following changes since commit b2ae1009d7cca2701e17eae55ae2d44fd22c942a: > > Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-20210307' in= > to staging (2021-03-09 13:50:35 +) > > are available in the Git repository a

[PATCH 04/27] vhost-user-gpu: fix cursor move/update

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau "move" is incorrectly initialized. Fix it by using a switch statement and also treating unknown commands with a fallback. Signed-off-by: Marc-André Lureau --- contrib/vhost-user-gpu/vhost-user-gpu.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions

[PATCH 01/27] ui: fold qemu_alloc_display in only caller

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau A minor code simplification. Signed-off-by: Marc-André Lureau --- ui/console.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/ui/console.c b/ui/console.c index 171a7bf14b..bab32723b5 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1

[PATCH 00/27] Add D-Bus display backend

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Hi, Both Spice and VNC are relatively complex and inefficient for local-only display/console export. The goal of this display backend is to export over D-Bus an interface close to the QEMU internal console API. Any -display or -audio backend should be possible to implemen

[PATCH 06/27] ui: associate GL context outside of display listener registration

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/console.c | 7 +-- ui/egl-headless.c | 1 + ui/gtk.c | 3 +++ ui/sdl2.c | 3 +++ ui/spice-display.c | 3 +++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ui/console.c b/ui/console.c

[PATCH 08/27] ui: add a gl-unblock warning timer

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Similar to the one that exists for Spice, so we can investigate if something is locked. Signed-off-by: Marc-André Lureau --- ui/console.c | 17 + 1 file changed, 17 insertions(+) diff --git a/ui/console.c b/ui/console.c index fedb9d8b13..808f82fa64 1006

[PATCH 03/27] vhost-user-gpu: fix vugbm_device_init fallback

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau vugbm implements GBM device wrapping, udmabuf and memory fallback. However, the fallback/detection logic is flawed, as if "/dev/udmabuf" failed to be opened, it will not initialize vugbm and crash later. Rework the vugbm_device_init() logic to initialize correctly in all

[PATCH 02/27] vhost-user-gpu: glFlush before notifying clients

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau For similar reasons as commit 3af1671852 ("spice: flush on GL update before notifying client"), vhost-user-gpu must ensure the GL state is flushed before sharing its rendering result. Signed-off-by: Marc-André Lureau --- contrib/vhost-user-gpu/virgl.c | 3 +++ contr

[PATCH 13/27] console: save current scanout details

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Add a new DisplayScanout structure to save the current scanout details. This allows to attach later UI backends and set the scanout. Introduce displaychangelistener_display_console() helper function to handle the dpy_gfx_switch/gl_scanout() & dpy_gfx_update() calls. Sign

[PATCH 11/27] ui: split the GL context in a different object

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau This will allow to have one GL context but a variable number of listeners. Signed-off-by: Marc-André Lureau --- include/ui/console.h | 31 --- include/ui/egl-context.h | 6 +++--- include/ui/gtk.h | 11 ++- include/

[PATCH 07/27] ui: make gl_block use a counter

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Track multiple callers blocking requests. Signed-off-by: Marc-André Lureau --- ui/console.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ui/console.c b/ui/console.c index 53eba2019e..fedb9d8b13 100644 --- a/ui/console.c +++ b/ui

[PATCH 05/27] ui: factor out qemu_console_set_display_gl_ctx()

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau The next patch will make use of this function to dissociate DisplayChangeListener from GL context. Signed-off-by: Marc-André Lureau --- include/ui/console.h | 2 ++ ui/console.c | 21 + 2 files changed, 15 insertions(+), 8 deletions(-) diff

[PATCH 12/27] ui: move qemu_spice_fill_device_address to ui/util.c

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Other backends can use it. Signed-off-by: Marc-André Lureau --- include/ui/console.h | 6 +++ include/ui/spice-display.h | 4 -- hw/display/qxl.c | 5 ++- ui/spice-core.c| 50 - ui/spice-display.c | 5 ++-

[PATCH 18/27] vhost-user-gpu: add vg_send_dmabuf_update()

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- contrib/vhost-user-gpu/vugpu.h | 6 + contrib/vhost-user-gpu/vhost-user-gpu.c | 32 +++-- contrib/vhost-user-gpu/virgl.c | 11 + 3 files changed, 27 insertions(+), 22 deletions(-) di

[PATCH 15/27] audio: add dbusaudio backend

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Add a new -audio backend that accepts DBus clients/listeners to handle playback & recording, to be exported via the -display dbus. Example usage: -audiodev dbus,in.mixing-engine=off,out.mixing-engine=off,id=dbus -display dbus,audiodev=dbus Signed-off-by: Marc-André Lurea

[PATCH 09/27] ui: simplify gl unblock & flush

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau GraphicHw.gl_flushed was introduced to notify the device (vhost-user-gpu) that the GL resources (the display scanout) are no longer needed. It was decoupled from QEMU own gl-blocking mechanism, but that difference isn't really helping. Instead, we can reuse QEMU gl-blocki

[PATCH 16/27] vhost-user-gpu: add vg_send_disable_scanout()

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- contrib/vhost-user-gpu/vugpu.h | 1 + contrib/vhost-user-gpu/vhost-user-gpu.c | 24 contrib/vhost-user-gpu/virgl.c | 8 +--- 3 files changed, 18 insertions(+), 15 deletions(-) diff --g

Re: all class init functions for all types in QEMU are called in select_machine(). Expected?

2021-03-12 Thread Paolo Bonzini
On 12/03/21 10:58, Claudio Fontana wrote: Not really, but I have been using the accel class init function on x86 to register the TCG OPS, and this instead requires a bit more thought for ARM, because we currently register for the ARM M Profile the TCG Ops at arm_v7m_class_init time, which is

[PATCH 10/27] ui: dispatch GL events to all listeners

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau For now, only one listener can receive GL events. Let's dispatch to all listeners. (preliminary check ensure there is a single listener now during regitration, and in next patches, compatible listeners only) Signed-off-by: Marc-André Lureau --- ui/console.c | 58 +++

Re: Question about edge-triggered interrupt

2021-03-12 Thread Peter Maydell
On Fri, 12 Mar 2021 at 09:20, LIU Zhiwei wrote: > > Thanks very much. By the way, in my opinion, the signal line in GICv2 > solution is > something like "QEMU-specific weirdness" . No, for the GICv2 that really is how the hardware works -- the interrupt controller talks to the CPU via the classic

[PATCH 21/27] vhost-user-gpu: add vg_send_cursor_pos()

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- contrib/vhost-user-gpu/vugpu.h | 3 +++ contrib/vhost-user-gpu/vhost-user-gpu.c | 28 +++-- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/contrib/vhost-user-gpu/vugpu.h b/contrib/vhost-

Re: [PATCH v2 04/10] Remove migrate_set_block_enabled in checkpoint

2021-03-12 Thread lizhij...@fujitsu.com
On 3/12/21 1:02 PM, leirao wrote: From: "Rao, Lei" We can detect disk migration in migrate_prepare, if disk migration is enabled in COLO mode, we can directly report an error.and there is no need to disable block migration at every checkpoint. Signed-off-by: Lei

[PATCH 22/27] vhost-user-gpu: add vg_send_update()

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- contrib/vhost-user-gpu/vugpu.h | 11 contrib/vhost-user-gpu/vhost-user-gpu.c | 84 + 2 files changed, 68 insertions(+), 27 deletions(-) diff --git a/contrib/vhost-user-gpu/vugpu.h b/contrib/vhost

just a thank you for the TCG tests in tests/tcg

2021-03-12 Thread Claudio Fontana
Hi Alex, just wanted to say thanks for the TCG tests in tests/tcg. They caught things during my work that nothing else was catching. In particular, the test-armv6m-undef test: qemu/tests/tcg/arm/test-armv6m-undef.S caught a nasty bug that I risked introducing. So, thanks! Ciao, Claudio --

[PATCH 25/27] vhost-user-gpu: implement register_dbus_listener()

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Send the listener fd over the vhost-user connection if the backend supports it. Signed-off-by: Marc-André Lureau --- include/hw/virtio/virtio-gpu.h | 1 + hw/display/vhost-user-gpu.c| 33 + hw/display/virtio-gpu-base.c | 14 +++

Re: [PULL 00/22] Trivial branch for 6.0 patches

2021-03-12 Thread Philippe Mathieu-Daudé
On 3/10/21 10:52 PM, Laurent Vivier wrote: > Peter, > > my "git publish" has failed at patch 20 with: > > Requested action aborted > Mails per session limit exceeded. > > I think my email provider has added new limits :( With GMail I could pass from the 20/session limit to the 1000/day limit ad

[PATCH 23/27] vhost-user: add VHOST_USER_GPU_QEMU_DBUS_LISTENER

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Add a new feature & message to register a QEMU DBus console listener. Signed-off-by: Marc-André Lureau --- docs/interop/vhost-user.rst | 10 ++ include/hw/virtio/vhost-backend.h | 2 ++ subprojects/libvhost-user/libvhost-user.h | 5 +

[PATCH 14/27] ui: add a D-Bus display backend

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau The "dbus" ui/display backend exports the QEMU consoles over a currently unstable D-Bus protocol defined in ui/dbus-display1.xml (it is subject to changes at each releases, so only client shipped with the same QEMU release will be fully compatible). By default, the connec

RE: [PATCH v2 08/10] Reduce the PVM stop time during Checkpoint

2021-03-12 Thread Rao, Lei
I think it's enough to know the start and the number of dirty pages in the bitmap. Because the size of consecutive dirty pages can be calculated. By the way, no problems were found in our automated testing. Thanks, Lei. -Original Message- From: lizhij...@fujitsu.com Sent: Friday, Marc

Re: [PATCH 2/3] qom: move user_creatable_add_opts logic to vl.c and QAPIfy it

2021-03-12 Thread Kevin Wolf
Am 11.03.2021 um 18:24 hat Paolo Bonzini geschrieben: > Emulators are currently using OptsVisitor (via user_creatable_add_opts) > to parse the -object command line option. This has one extra feature, > compared to keyval, which is automatic conversion of integers to lists > as well as support for

[PATCH 27/27] vhost-user-gpu: implement GPU_QEMU_DBUS_LISTENER

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Implement the QEMU DBus listener feature. This allows vhost-user-gpu to notify directly the console/ui clients. However, QEMU is still notified with the vhost-user-gpu protocol, for compatibility reasons. A future mechanism should allow qemu to opt-out for display updates

[PATCH 17/27] vhost-user-gpu: add vg_send_scanout_dmabuf()

2021-03-12 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- contrib/vhost-user-gpu/vugpu.h | 8 contrib/vhost-user-gpu/vhost-user-gpu.c | 57 + contrib/vhost-user-gpu/virgl.c | 23 -- 3 files changed, 56 insertions(+), 32 deletions(-) di

[PATCH v5 1/5] semihosting: move semihosting tests to multiarch

2021-03-12 Thread Alex Bennée
It may be arm-compat-semihosting but more than one architecture uses it so lets move the tests into the multiarch area. We gate it on the feature and split the semicall.h header between the arches. Also clean-up a bit of the Makefile messing about to one common set of runners. Signed-off-by: Alex

  1   2   3   4   5   >