[PATCH for-6.2 23/23] target/xtensa: Drop check for singlestep_enabled

2021-07-21 Thread Richard Henderson
GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 20399d6a04..3fbf76f4dd 100644

[PATCH for-6.2 15/23] target/openrisc: Drop checks for singlestep_enabled

2021-07-21 Thread Richard Henderson
GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/openrisc/translate.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index d6ea536744..7e1aace63a 100644 -

[PATCH for-6.2 22/23] target/tricore: Drop check for singlestep_enabled

2021-07-21 Thread Richard Henderson
GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/tricore/helper.h| 1 - target/tricore/op_helper.c | 7 --- target/tricore/translate.c | 14 +- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/target/tricore/helper.h

Re: [PATCH v1 27/29] gitlab: enable a very minimal build with the tricore container

2021-07-21 Thread Thomas Huth
On 21/07/2021 01.27, Alex Bennée wrote: Rather than base of the shared Debian 10 container which would require us to bring in even more dependencies just bring in what is needed for building tricore-softmmu in GitLab. We don't even remove the container from the DOCKER_PARTIAL_IMAGES lest we cause

Re: [PATCH 2/2] qom: Improve error message in module_object_class_by_name()

2021-07-21 Thread Claudio Fontana
On 7/21/21 12:31 AM, Jose R. Ziviani wrote: > module_object_class_by_name() calls module_load_qom_one if the object > is provided by a dynamically linked library. Such library might not be > available at this moment - for instance, it can be a package not yet > installed. Thus, instead of assert er

Re: Disabling TLS address caching to help QEMU on GNU/Linux

2021-07-21 Thread Thomas Huth
On 20/07/2021 16.52, Florian Weimer wrote: Currently, the GNU/Linux ABI does not really specify whether the thread pointer (the address of the TCB) may change at a function boundary. [...] One important piece of software for GNU is QEMU (not just for GNU/Linux, Hurd development also benefits fr

[PATCH v6 4/5] hw/nvme: fix mmio read

2021-07-21 Thread Klaus Jensen
From: Klaus Jensen The new PMR test unearthed a long-standing issue with MMIO reads on big-endian hosts. Fix this by unconditionally storing all controller registers in little endian. Cc: Gollu Appalanaidu Reported-by: Peter Maydell Signed-off-by: Klaus Jensen Reviewed-by: Peter Maydell ---

[PATCH v6 0/5] hw/nvme: fix mmio read

2021-07-21 Thread Klaus Jensen
From: Klaus Jensen Fix mmio read issues on big-endian hosts. The core issue is that values in the BAR is not stored in little endian as required. Fix that and add a regression test for this. This required a bit of cleanup, so it blew up into a series. v6: * "hw/nvme: split pmrmsc register int

[PATCH v6 2/5] hw/nvme: use symbolic names for registers

2021-07-21 Thread Klaus Jensen
From: Klaus Jensen Add the NvmeBarRegs enum and use these instead of explicit register offsets. Signed-off-by: Klaus Jensen Reviewed-by: Gollu Appalanaidu Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Keith Busch --- include/block/nvme.h | 29 - hw/nvme/ctrl.c

[PATCH v6 1/5] hw/nvme: split pmrmsc register into upper and lower

2021-07-21 Thread Klaus Jensen
From: Klaus Jensen The specification uses a set of 32 bit PMRMSCL and PMRMSCU registers to make up the 64 bit logical PMRMSC register. Make it so. Signed-off-by: Klaus Jensen --- include/block/nvme.h | 31 --- hw/nvme/ctrl.c | 10 ++ 2 files changed,

[PATCH] vhost: use large iotlb entry if no IOMMU translation is needed

2021-07-21 Thread Chao Gao
If guest enables IOMMU_PLATFORM for virtio-net, severe network performance drop is observed even if there is no IOMMU. And disabling vhost can mitigate the perf issue. Finally, we found the culprit is frequent iotlb misses: kernel vhost-net has 2048 entries and each entry is 4K (qemu uses 4K for i3

[PATCH v6 3/5] hw/nvme: fix out-of-bounds reads

2021-07-21 Thread Klaus Jensen
From: Klaus Jensen Peter noticed that mmio access may read into the NvmeParams member in the NvmeCtrl struct. Fix the bounds check. Reported-by: Peter Maydell Signed-off-by: Klaus Jensen Reviewed-by: Stefan Hajnoczi Reviewed-by: Peter Maydell --- hw/nvme/ctrl.c | 27 +++

Re: [PATCH v1 09/29] gitdm.config: sort the corporate GroupMap entries

2021-07-21 Thread Philippe Mathieu-Daudé
On 7/21/21 1:26 AM, Alex Bennée wrote: > Lets try and keep them that way. > > Signed-off-by: Alex Bennée > Message-Id: <20210714182056.25888-10-alex.ben...@linaro.org> > --- > gitdm.config | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

[PATCH v6 5/5] tests/qtest/nvme-test: add mmio read test

2021-07-21 Thread Klaus Jensen
From: Klaus Jensen Add a regression test for mmio read on big-endian hosts. Signed-off-by: Klaus Jensen Reviewed-by: Gollu Appalanaidu --- tests/qtest/nvme-test.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/qtest/nvme-test.c b/tests/qtest/nvme-test.c

Re: [PATCH v1 23/29] plugins/cache: Fixed "function decl. is not a prototype" warnings

2021-07-21 Thread Philippe Mathieu-Daudé
On 7/21/21 1:26 AM, Alex Bennée wrote: > From: Mahmoud Mandour > > Signed-off-by: Mahmoud Mandour > Reviewed-by: Alex Bennée > Message-Id: <20210714172151.8494-7-ma.mando...@gmail.com> > Signed-off-by: Alex Bennée > --- > contrib/plugins/cache.c | 6 +++--- > 1 file changed, 3 insertions(+),

[PATCH] usb: fix usb-host dependency check

2021-07-21 Thread Gerd Hoffmann
Fixes: 627302afb2f8 ("usb: build usb-host as module") Reported-by: Programmingkid Signed-off-by: Gerd Hoffmann --- hw/usb/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/meson.build b/hw/usb/meson.build index 3ca61279374d..de853d780dd8 100644 --- a/hw/usb/m

Re: [PATCH] usb: fix usb-host dependency check

2021-07-21 Thread Philippe Mathieu-Daudé
On 7/21/21 10:17 AM, Gerd Hoffmann wrote: > Fixes: 627302afb2f8 ("usb: build usb-host as module") > Reported-by: Programmingkid > Signed-off-by: Gerd Hoffmann > --- > hw/usb/meson.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v1 0/3] util/oslib-posix: Support MADV_POPULATE_WRITE for os_mem_prealloc()

2021-07-21 Thread David Hildenbrand
On 20.07.21 16:45, Daniel P. Berrangé wrote: On Wed, Jul 14, 2021 at 01:23:03PM +0200, David Hildenbrand wrote: #1 adds support for MADV_POPULATE_WRITE, #2 cleans up the code to avoid global variables and prepare for concurrency and #3 makes os_mem_prealloc() safe to be called from multiple thre

Re: [PATCH 07/12] ui/vdagent: unregister clipboard peer on finalize

2021-07-21 Thread Marc-André Lureau
Hi On Mon, Jul 19, 2021 at 11:30 AM wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > ui/vdagent.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/ui/vdagent.c b/ui/vdagent.c > index 5ae5734c81..bce9f44b7b 100644 > --- a/ui/vdagent.c > +++ b/ui/vdagent.c >

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-07-21 Thread Max Reitz
On 20.07.21 16:50, Vivek Goyal wrote: On Tue, Jul 13, 2021 at 05:07:31PM +0200, Max Reitz wrote: [..] The next question is, how do we detect temporary failure, because if we look up some new inode, name_to_handle_at() fails, we ignore it, and then it starts to work and we fail all further looku

[PATCH v3 0/4] softmmu/memory_mapping: optimize dump/tpm for virtio-mem

2021-07-21 Thread David Hildenbrand
Minor fixes and cleanups, followed by an optimization for virtio-mem regarding guest dumps and tpm. virtio-mem logically plugs/unplugs memory within a sparse memory region and notifies via the RamDiscardManager interface when parts become plugged (populated) or unplugged (discarded). Currently, g

[PATCH v3 2/4] softmmu/memory_mapping: never merge ranges accross memory regions

2021-07-21 Thread David Hildenbrand
Let's make sure to not merge when different memory regions are involved. Unlikely, but theoretically possible. Acked-by: Stefan Berger Cc: Marc-André Lureau Cc: Paolo Bonzini Cc: "Michael S. Tsirkin" Cc: Eduardo Habkost Cc: Alex Williamson Cc: Dr. David Alan Gilbert Cc: Igor Mammedov Cc: C

[PATCH v3 3/4] softmmu/memory_mapping: factor out adding physical memory ranges

2021-07-21 Thread David Hildenbrand
Let's factor out adding a MemoryRegionSection to the list, to be reused in RamDiscardManager context next. Reviewed-by: Stefan Berger Cc: Marc-André Lureau Cc: Paolo Bonzini Cc: "Michael S. Tsirkin" Cc: Eduardo Habkost Cc: Alex Williamson Cc: Dr. David Alan Gilbert Cc: Igor Mammedov Cc: Cl

[PATCH v2 04/13] ui/gtk-clipboard: fix clipboard enum typo

2021-07-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/gtk-clipboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/gtk-clipboard.c b/ui/gtk-clipboard.c index 5e817ae55c..2c78de9500 100644 --- a/ui/gtk-clipboard.c +++ b/ui/gtk-clipboard.c @@ -155,7 +155,7 @@ s

[PATCH v3 1/4] tpm: mark correct memory region range dirty when clearing RAM

2021-07-21 Thread David Hildenbrand
We might not start at the beginning of the memory region. We could also calculate via the difference in the host address; however, memory_region_set_dirty() also relies on memory_region_get_ram_addr() internally, so let's just use that. Acked-by: Stefan Berger Fixes: ffab1be70692 ("tpm: clear RAM

[PATCH v2 02/13] ui/vdagent: remove copy-pasta comment

2021-07-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index f6ef8d1993..5ae5734c81 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -516,7 +516,7 @@ static void vdagent_chr_recv_cl

[PATCH v2 05/13] ui/clipboard: add helper to retrieve current clipboard

2021-07-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- include/ui/clipboard.h | 9 + ui/clipboard.c | 15 +++ 2 files changed, 24 insertions(+) diff --git a/include/ui/clipboard.h b/include/ui/clipboard.h index eb789a285a..e9fcb15c66 100644 --- a/include/ui/c

[PATCH v3 4/4] softmmu/memory_mapping: optimize for RamDiscardManager sections

2021-07-21 Thread David Hildenbrand
virtio-mem logically plugs/unplugs memory within a sparse memory region and notifies via the RamDiscardManager interface when parts become plugged (populated) or unplugged (discarded). Currently, we end up (via the two users) 1) zeroing all logically unplugged/discarded memory during TPM resets. 2

[PATCH v2 12/13] ui/vdagent: send release when no clipboard owner

2021-07-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index bc8347f995..efb4546045 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -345,6 +345,24 @@ stati

[PATCH v2 10/13] ui/vdagent: use qemu_clipboard_info helper

2021-07-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index 362064213c..bc8347f995 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -47,7 +47,6 @@ st

[PATCH v2 06/13] ui/clipboard: release owned grabs on unregister

2021-07-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/clipboard.c | 9 + 1 file changed, 9 insertions(+) diff --git a/ui/clipboard.c b/ui/clipboard.c index 56c14509fe..a9512f01a7 100644 --- a/ui/clipboard.c +++ b/ui/clipboard.c @@ -13,6 +13,15 @@ void qemu_clipboard_peer_regi

[PATCH v2 00/13] Clipboard fixes (for 6.1?)

2021-07-21 Thread marcandre . lureau
From: Marc-André Lureau Hi, Here is a few fixes I have collected while working on clipboard-related code. There are some obvious code improvements/fixes, and better handling of release & unregister to avoid dangling pointers and improve user experience. v2: - replaced "ui/vdagent: unregister

[PATCH v2 08/13] ui/vdagent: reset outbuf on disconnect

2021-07-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/vdagent.c b/ui/vdagent.c index 1a29016e07..3770c58b6c 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -723,6 +723,7 @@ static void vdagent_chr_accept_input(Chardev *c

[PATCH v2 09/13] ui/vdagent: split clipboard recv message handling

2021-07-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 157 +-- 1 file changed, 89 insertions(+), 68 deletions(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index 3770c58b6c..362064213c 100644 --- a/ui/vdagent.c +++ b/ui/vdagen

[PATCH v2 01/13] ui/vdagent: fix leak on error path

2021-07-21 Thread marcandre . lureau
From: Marc-André Lureau "info" was leaked when more than 10 entries. Signed-off-by: Marc-André Lureau --- include/ui/clipboard.h | 2 ++ ui/vdagent.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/ui/clipboard.h b/include/ui/clipboard.h index b45b984

[PATCH v2 03/13] ui/gtk-clipboard: use existing macros

2021-07-21 Thread marcandre . lureau
From: Marc-André Lureau Hardcoding strings is error prone, use dedicated macros instead. Signed-off-by: Marc-André Lureau --- ui/gtk-clipboard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/gtk-clipboard.c b/ui/gtk-clipboard.c index bff28d2030..5e817ae55c 100644

[PATCH v2 13/13] ui/gtk-clipboard: emit release clipboard events

2021-07-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/gtk-clipboard.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/gtk-clipboard.c b/ui/gtk-clipboard.c index 4e4b3c52bb..16b2e2063e 100644 --- a/ui/gtk-clipboard.c +++ b/ui/gtk-clipboard.c @@ -144,7 +14

[PATCH v2 07/13] ui/vdagent: disconnect handlers and reset state on finalize

2021-07-21 Thread marcandre . lureau
From: Marc-André Lureau Avoid handlers being called with dangling pointers when the object is freed. Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index 5ae5734c81..1

Re: [PATCH v6 0/6] hmp, qmp: Add some commands to introspect virtio devices

2021-07-21 Thread Jonah Palmer
Hi Jason. My apologies for the delayed response, several work-related things came up recently, but they're slowing down now so I'm turning my attention these patches to get taken care of. A few questions and comments below (and in other following patches): On 7/13/21 10:42 PM, Jason Wang wrot

[PATCH v2 11/13] ui/gtk-clipboard: use qemu_clipboard_info helper

2021-07-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- include/ui/gtk.h | 1 - ui/gtk-clipboard.c | 14 ++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/include/ui/gtk.h b/include/ui/gtk.h index 9516670ebc..60e9cdc39c 100644 --- a/include/ui/gtk.h +++ b/inc

Re: [PATCH for-6.2 10/23] target/m68k: Drop checks for singlestep_enabled

2021-07-21 Thread Laurent Vivier
Le 21/07/2021 à 08:41, Richard Henderson a écrit : > GDB single-stepping is now handled generically. > > Signed-off-by: Richard Henderson > --- > target/m68k/translate.c | 44 + > 1 file changed, 9 insertions(+), 35 deletions(-) > > diff --git a/target/m6

Re: [PATCH v3 1/4] vhost-user-rng: Add vhost-user-rng implementation

2021-07-21 Thread Alex Bennée
Mathieu Poirier writes: > Following in the footsteps of what whas done for vhost-user-i2c > and virtiofsd, introduce a random number generator (RNG) backend > that communicates with a vhost-user server to retrieve entropy. > That way another VMM could be using the same vhost-user daemon and > a

Re: [PATCH v3 2/4] vhost-user-rng-pci: Add vhost-user-rng-pci implementation

2021-07-21 Thread Alex Bennée
Mathieu Poirier writes: > This patch provides a PCI bus interface to the vhost-user-rng backed. > The implentation is similar to what was done for vhost-user-i2c-pci and > vhost-user-fs-pci. > > Signed-off-by: Mathieu Poirier > diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build > inde

Re: [PATCH] failover: unregister ram on unplug

2021-07-21 Thread Igor Mammedov
On Tue, 20 Jul 2021 20:16:44 +0200 Laurent Vivier wrote: > This simple change allows to test failover with a simulated device > like e1000e rather than a vfio device. > > This is interesting to developers that want to test failover on > a system with no vfio device. Moreover it simplifies host n

Re: [PATCH v6 4/6] qmp: add QMP command x-debug-virtio-queue-status

2021-07-21 Thread Jonah Palmer
On 7/13/21 10:37 PM, Jason Wang wrote: 在 2021/7/12 下午6:35, Jonah Palmer 写道: From: Laurent Vivier This new command shows internal status of a VirtQueue. (vrings and indexes). Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer ---   hw/virtio/virtio-stub.c |   6 +++   hw/virtio/virti

Re: [PATCH v6 6/6] hmp: add virtio commands

2021-07-21 Thread Jonah Palmer
On 7/13/21 10:40 PM, Jason Wang wrote: 在 2021/7/12 下午6:35, Jonah Palmer 写道: +void hmp_virtio_queue_status(Monitor *mon, const QDict *qdict) +{ +    Error *err = NULL; +    const char *path = qdict_get_try_str(qdict, "path"); +    int queue = qdict_get_int(qdict, "queue"); +    VirtQueueStatus

Re: [PATCH 07/16] vfio: Avoid error_propagate() after migrate_add_blocker()

2021-07-21 Thread Paolo Bonzini
On 20/07/21 14:53, Markus Armbruster wrote: When migrate_add_blocker(blocker, &errp) is followed by Just a nit, &err. Paolo error_propagate(errp, err), we can often just as well do migrate_add_blocker(..., errp). This is the case in vfio_migration_probe().

[PATCH v2 0/6] migration/ram: Optimize for virtio-mem via RamDiscardManager

2021-07-21 Thread David Hildenbrand
virtio-mem exposes a dynamic amount of memory within RAMBlocks by coordinating with the VM. Memory within a RAMBlock can either get plugged and consequently used by the VM, or unplugged and consequently no longer used by the VM. Logical unplug is realized by discarding the physical memory backing f

[PATCH v2 1/6] memory: Introduce replay_discarded callback for RamDiscardManager

2021-07-21 Thread David Hildenbrand
Introduce replay_discarded callback similar to our existing replay_populated callback, to be used my migration code to never migrate discarded memory. Signed-off-by: David Hildenbrand --- include/exec/memory.h | 21 + softmmu/memory.c | 11 +++ 2 files changed, 3

[PATCH v2 3/6] migration/ram: Handle RAMBlocks with a RamDiscardManager on the migration source

2021-07-21 Thread David Hildenbrand
We never want to migrate memory that corresponds to discarded ranges as managed by a RamDiscardManager responsible for the mapped memory region of the RAMBlock. The content of these pages is essentially stale and without any guarantees for the VM ("logically unplugged"). Depending on the underlyin

[PATCH v2 5/6] migration/postcopy: Handle RAMBlocks with a RamDiscardManager on the destination

2021-07-21 Thread David Hildenbrand
Currently, when someone (i.e., the VM) accesses discarded parts inside a RAMBlock with a RamDiscardManager managing the corresponding mapped memory region, postcopy will request migration of the corresponding page from the source. The source, however, will never answer, because it refuses to migrat

[PATCH v2 4/6] virtio-mem: Drop precopy notifier

2021-07-21 Thread David Hildenbrand
Migration code now properly handles RAMBlocks which are indirectly managed by a RamDiscardManager. No need for manual handling via the free page optimization interface, let's get rid of it. Acked-by: Michael S. Tsirkin Signed-off-by: David Hildenbrand --- hw/virtio/virtio-mem.c | 34 ---

[PATCH v2] failover: unregister ROM on unplug

2021-07-21 Thread Laurent Vivier
The intend of failover is to allow to migrate a VM with a VFIO networking card without disrupting the network operation by switching to a virtio-net device during the migration. This simple change allows to test failover with a simulated device like e1000e rather than a vfio device, even if it's u

[PATCH v2 2/6] virtio-mem: Implement replay_discarded RamDiscardManager callback

2021-07-21 Thread David Hildenbrand
Implement it similar to the replay_populated callback. Signed-off-by: David Hildenbrand --- hw/virtio/virtio-mem.c | 58 ++ 1 file changed, 58 insertions(+) diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c index df91e454b2..284096ec5f 100644 -

[PATCH v2 6/6] migration/ram: Handle RAMBlocks with a RamDiscardManager on background snapshots

2021-07-21 Thread David Hildenbrand
We already don't ever migrate memory that corresponds to discarded ranges as managed by a RamDiscardManager responsible for the mapped memory region of the RAMBlock. virtio-mem uses this mechanism to logically unplug parts of a RAMBlock. Right now, we still populate zeropages for the whole usable

[PATCH 2/2] Revert "qxl: add migration blocker to avoid pre-save assert"

2021-07-21 Thread Gerd Hoffmann
This reverts commit 86dbcdd9c7590d06db89ca256c5eaf0b4aba8858. The pre-save assert is gone now, so the migration blocker is not needed any more. Signed-off-by: Gerd Hoffmann --- hw/display/qxl.h | 1 - hw/display/qxl.c | 31 --- 2 files changed, 32 deletions(-) diff

Re: [PATCH 2/2] qom: Improve error message in module_object_class_by_name()

2021-07-21 Thread Daniel P . Berrangé
On Tue, Jul 20, 2021 at 07:31:20PM -0300, Jose R. Ziviani wrote: > module_object_class_by_name() calls module_load_qom_one if the object > is provided by a dynamically linked library. Such library might not be > available at this moment - for instance, it can be a package not yet > installed. Thus,

Re: [PATCH] failover: unregister ram on unplug

2021-07-21 Thread Laurent Vivier
On 21/07/2021 10:58, Igor Mammedov wrote: > On Tue, 20 Jul 2021 20:16:44 +0200 > Laurent Vivier wrote: > >> This simple change allows to test failover with a simulated device >> like e1000e rather than a vfio device. >> >> This is interesting to developers that want to test failover on >> a syste

[PATCH 0/2] qxl: remove assert and migration blocker

2021-07-21 Thread Gerd Hoffmann
Gerd Hoffmann (2): qxl: remove assert in qxl_pre_save. Revert "qxl: add migration blocker to avoid pre-save assert" hw/display/qxl.h | 1 - hw/display/qxl.c | 35 +++ 2 files changed, 3 insertions(+), 33 deletions(-) -- 2.31.1

[PATCH 1/2] qxl: remove assert in qxl_pre_save.

2021-07-21 Thread Gerd Hoffmann
Since commit 551dbd0846d2 ("migration: check pre_save return in vmstate_save_state") the pre_save hook can fail. So lets finally use that to drop the guest-triggerable assert in qxl_pre_save(). Signed-off-by: Gerd Hoffmann --- hw/display/qxl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deleti

[PATCH v3] failover: unregister ROM on unplug

2021-07-21 Thread Laurent Vivier
The intend of failover is to allow to migrate a VM with a VFIO networking card without disrupting the network operation by switching to a virtio-net device during the migration. This simple change allows to test failover with a simulated device like e1000e rather than a vfio device, even if it's u

[PATCH for-6.1? v2 0/3] linux-aio: limit the batch size to reduce queue latency

2021-07-21 Thread Stefano Garzarella
Since it's a performance regression, if possible we could include it in 6.1-rc1. There shouldn't be any particular criticism. v1: https://lists.gnu.org/archive/html/qemu-devel/2021-07/msg01526.html v2: - s/bacth/batch/ [stefanha] - limit the batch with the number of available events [stefanha]

[PATCH for-6.1? v2 3/3] linux-aio: limit the batch size using `aio-max-batch` parameter

2021-07-21 Thread Stefano Garzarella
When there are multiple queues attached to the same AIO context, some requests may experience high latency, since in the worst case the AIO engine queue is only flushed when it is full (MAX_EVENTS) or there are no more queues plugged. Commit 2558cb8dd4 ("linux-aio: increasing MAX_EVENTS to a large

[PATCH for-6.1? v2 1/3] iothread: generalize iothread_set_param/iothread_get_param

2021-07-21 Thread Stefano Garzarella
Changes in preparation for next patches where we add a new parameter not related to the poll mechanism. Let's add two new generic functions (iothread_set_param and iothread_get_param) that we use to set and get IOThread parameters. Signed-off-by: Stefano Garzarella --- iothread.c | 27 +

Re: [PATCH] usb: fix usb-host dependency check

2021-07-21 Thread Paolo Bonzini
On 21/07/21 10:17, Gerd Hoffmann wrote: Fixes: 627302afb2f8 ("usb: build usb-host as module") Reported-by: Programmingkid Signed-off-by: Gerd Hoffmann --- hw/usb/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/meson.build b/hw/usb/meson.build index 3ca6

[PATCH for-6.1? v2 2/3] iothread: add aio-max-batch parameter

2021-07-21 Thread Stefano Garzarella
The `aio-max-batch` parameter will be propagated to AIO engines and it will be used to control the maximum number of queued requests. When there are in queue a number of requests equal to `aio-max-batch`, the engine invokes the system call to forward the requests to the kernel. This parameter all

Re: [PATCH 1/5] migration: Fix missing join() of rp_thread

2021-07-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > It's possible that the migration thread skip the join() of the rp_thread in > below race and crash on src right at finishing migration: > >migration_thread rp_thread > - > mi

Re: [PATCH 2/2] qom: use correct field name when getting/setting alias properties

2021-07-21 Thread Paolo Bonzini
On 20/07/21 03:00, Eric Blake wrote: Deceptively simple; all the work was in the previous patch writing up the forwarding visitor. I still wonder if Kevin's QAPI aliases will do this more gracefully, but if we're trying to justify this as a bug fix worthy of 6.1, this is certainly a smaller appr

[PATCH v2 00/22] Add LoongArch linux-user emulation support

2021-07-21 Thread Song Gao
Hi, This series only adds linux-user emulation support for LoongArch. So there is no introduction of system in docs/system directory, We'll add that in a future series. Changes for v1: * Patch 1, remove unnecessary introduction; * Patch 3, follow the ARM/AVR pattern to add new CPU features;

[PATCH v2 04/22] target/loongarch: Add interrupt handling support

2021-07-21 Thread Song Gao
This patch introduces functions loongarch_cpu_do_interrupt() and loongarch_cpu_exec_interrupt() Signed-off-by: Song Gao --- target/loongarch/cpu.c | 23 +++ target/loongarch/cpu.h | 25 + 2 files changed, 48 insertions(+) diff --git a/target/loongarch

[PATCH v2 02/22] target/loongarch: Add CSR registers definition

2021-07-21 Thread Song Gao
This patch add basic CSR registers definition. The CSR registers definition copy from kernel arch/loongarch/include/asm/loongarchregs.h. Signed-off-by: Song Gao --- target/loongarch/cpu-csr.h | 724 + 1 file changed, 724 insertions(+) create mode 1006

[PATCH v2 18/22] target/loongarch: Add branch instruction translation

2021-07-21 Thread Song Gao
This patch implement branch instruction translation. This includes: - BEQ, BNE, BLT[U], BGE[U] - BEQZ, BNEZ - B - BL - JIRL - BCEQZ, BCNEZ Signed-off-by: Song Gao --- target/loongarch/insns.decode | 30 + target/loongarch/trans.inc.c | 249 ++ 2 fil

[PATCH v2 07/22] target/loongarch: Add fixed point arithmetic instruction translation

2021-07-21 Thread Song Gao
This patch implement fixed point arithemtic instruction translation. This includes: - ADD.{W/D}, SUB.{W/D} - ADDI.{W/D}, ADDU16ID - ALSL.{W[U]/D} - LU12I.W, LU32I.D LU52I.D - SLT[U], SLT[U]I - PCADDI, PCADDU12I, PCADDU18I, PCALAU12I - AND, OR, NOR, XOR, ANDN, ORN - MUL.{W/D}, MULH.{W[U]/D[U]} - MU

[PATCH v2 01/22] target/loongarch: Add README

2021-07-21 Thread Song Gao
This patch give an introduction to the LoongArch target. Signed-off-by: Song Gao --- MAINTAINERS | 5 + target/loongarch/README | 5 + 2 files changed, 10 insertions(+) create mode 100644 target/loongarch/README diff --git a/MAINTAINERS b/MAINTAINERS index 4256ad1..ae87a74

[PATCH v2 03/22] target/loongarch: Add core definition

2021-07-21 Thread Song Gao
This patch add target state header, target definitions and initialization routines. Signed-off-by: Song Gao --- target/loongarch/cpu-param.h | 21 target/loongarch/cpu-qom.h | 40 ++ target/loongarch/cpu.c | 293 +++ target/loongarch/cp

[PATCH v2 19/22] target/loongarch: Add disassembler

2021-07-21 Thread Song Gao
This patch add support for disassembling via option '-d in_asm'. Signed-off-by: Song Gao --- MAINTAINERS |1 + disas/loongarch.c | 2511 +++ disas/meson.build |1 + include/disas/dis-asm.h |2 + meson.build

[PATCH v2 08/22] target/loongarch: Add fixed point shift instruction translation

2021-07-21 Thread Song Gao
This patch implement fixed point shift instruction translation. This includes: - SLL.W, SRL.W, SRA.W, ROTR.W - SLLI.W, SRLI.W, SRAI.W, ROTRI.W - SLL.D, SRL.D, SRA.D, ROTR.D - SLLI.D, SRLI.D, SRAI.D, ROTRI.D Signed-off-by: Song Gao --- target/loongarch/insns.decode | 26 +++ target/loongarch/tr

[PATCH v2 11/22] target/loongarch: Add fixed point atomic instruction translation

2021-07-21 Thread Song Gao
This patch implement fixed point atomic instruction translation. This includes: - LL.{W/D}, SC.{W/D} - AM{SWAP/ADD/AND/OR/XOR/MAX/MIN}[_DB].{W/D} - AM{MAX/MIN}[_DB].{WU/DU} Signed-off-by: Song Gao --- target/loongarch/insns.decode | 44 + target/loongarch/trans.inc.c | 210 +++

[PATCH v2 09/22] target/loongarch: Add fixed point bit instruction translation

2021-07-21 Thread Song Gao
This patch implement fixed point bit instruction translation. This includes: - EXT.W.{B/H} - CL{O/Z}.{W/D}, CT{O/Z}.{W/D} - BYTEPICK.{W/D} - REVB.{2H/4H/2W/D} - REVH.{2W/D} - BITREV.{4B/8B}, BITREV.{W/D} - BSTRINS.{W/D}, BSTRPICK.{W/D} - MASKEQZ, MASKNEZ Signed-off-by: Song Gao --- target/loong

[PATCH v2 22/22] target/loongarch: Add target build suport

2021-07-21 Thread Song Gao
This patch add build loongarch-linux-user target support. Signed-off-by: Song Gao --- target/loongarch/meson.build | 19 +++ target/meson.build | 1 + 2 files changed, 20 insertions(+) create mode 100644 target/loongarch/meson.build diff --git a/target/loongarch/meso

[PATCH v2 16/22] target/loongarch: Add floating point move instruction translation

2021-07-21 Thread Song Gao
This patch implement floationg point move instruction translation. This includes: - FMOV.{S/D} - FSEL - MOVGR2FR.{W/D}, MOVGR2FRH.W - MOVFR2GR.{S/D}, MOVFRH2GR.S - MOVGR2FCSR, MOVFCSR2GR - MOVFR2CF, MOVCF2FR - MOVGR2CF, MOVCF2GR Signed-off-by: Song Gao --- target/loongarch/fpu_helper.c | 80 ++

[PATCH v2 10/22] target/loongarch: Add fixed point load/store instruction translation

2021-07-21 Thread Song Gao
This patch implement fixed point load/store instruction translation. This includes: - LD.{B[U]/H[U]/W[U]/D}, ST.{B/H/W/D} - LDX.{B[U]/H[U]/W[U]/D}, STX.{B/H/W/D} - LDPTR.{W/D}, STPTR.{W/D} - PRELD - LD{GT/LE}.{B/H/W/D}, ST{GT/LE}.{B/H/W/D} - DBAR, IBAR Signed-off-by: Song Gao --- target/loongar

[PATCH v2 13/22] target/loongarch: Add floating point arithmetic instruction translation

2021-07-21 Thread Song Gao
This patch implement floating point arithmetic instruction translation. This includes: - F{ADD/SUB/MUL/DIV}.{S/D} - F{MADD/MSUB/NMADD/NMSUB}.{S/D} - F{MAX/MIN}.{S/D} - F{MAXA/MINA}.{S/D} - F{ABS/NEG}.{S/D} - F{SQRT/RECIP/RSQRT}.{S/D} - F{SCALEB/LOGB/COPYSIGN}.{S/D} - FCLASS.{S/D} Signed-off-by: S

Re: [PATCH 2/2] qom: Improve error message in module_object_class_by_name()

2021-07-21 Thread Claudio Fontana
On 7/21/21 11:34 AM, Daniel P. Berrangé wrote: > On Tue, Jul 20, 2021 at 07:31:20PM -0300, Jose R. Ziviani wrote: >> module_object_class_by_name() calls module_load_qom_one if the object >> is provided by a dynamically linked library. Such library might not be >> available at this moment - for inst

[PATCH v2 20/22] LoongArch Linux User Emulation

2021-07-21 Thread Song Gao
Implementation of linux user emulation for LoongArch. Signed-off-by: Song Gao --- MAINTAINERS | 1 + include/elf.h | 2 + linux-user/elfload.c| 58 ++ linux-user/loongarch64/cpu_loop.c | 177

[PATCH v2 12/22] target/loongarch: Add fixed point extra instruction translation

2021-07-21 Thread Song Gao
This patch implement fixed point extra instruction translation. This includes: - CRC[C].W.{B/H/W/D}.W - SYSCALL - BREAK - ASRT{LE/GT}.D - RDTIME{L/H}.W, RDTIME.D - CPUCFG Signed-off-by: Song Gao --- target/loongarch/helper.h | 4 + target/loongarch/insns.decode | 25 + target/loongar

[PATCH v2 14/22] target/loongarch: Add floating point comparison instruction translation

2021-07-21 Thread Song Gao
This patch implement floating point comparison instruction translation. This includes: - FCMP.cond.{S/D} Signed-off-by: Song Gao --- target/loongarch/fpu_helper.c | 613 ++ target/loongarch/helper.h | 49 target/loongarch/insns.decode | 10 + t

Re: [PATCH 3/5] migration: Introduce migration_ioc_[un]register_yank()

2021-07-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > There're plenty of places in migration/* that checks against either socket or > tls typed ioc for yank operations. Provide two helpers to hide all these > information. > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > migration/ch

[PATCH v2 15/22] target/loongarch: Add floating point conversion instruction translation

2021-07-21 Thread Song Gao
This patch implement floating point conversion instruction translation. This includes: - FCVT.S.D, FCVT.D.S - FFINT.{S/D}.{W/L}, FTINT.{W/L}.{S/D} - FTINT{RM/RP/RZ/RNE}.{W/L}.{S/D} - FRINT.{S/D} Signed-off-by: Song Gao --- target/loongarch/fpu_helper.c | 362 ++

Re: [RFC 3/3] qom: Improve error message in module_object_class_by_name()

2021-07-21 Thread Gerd Hoffmann
> ObjectClass *module_object_class_by_name(const char *typename) > { > ObjectClass *oc; > @@ -1031,8 +1049,20 @@ ObjectClass *module_object_class_by_name(const char > *typename) > oc = object_class_by_name(typename); > #ifdef CONFIG_MODULES > if (!oc) { > +char *module_na

Re: [PATCH for-6.1 v6 11/17] hw/core: Introduce CPUClass.gdb_adjust_breakpoint

2021-07-21 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 7/20/21 11:53 PM, Philippe Mathieu-Daudé wrote: >> On 7/20/21 11:08 PM, Richard Henderson wrote: >>> On 7/20/21 10:56 AM, Peter Maydell wrote: On Tue, 20 Jul 2021 at 20:54, Richard Henderson wrote: > > This will allow a breakpoint hack to m

[PATCH v2 06/22] target/loongarch: Add main translation routines

2021-07-21 Thread Song Gao
This patch add main translation routines and basic functions for translation. Signed-off-by: Song Gao --- target/loongarch/helper.h| 10 + target/loongarch/op_helper.c | 27 +++ target/loongarch/translate.c | 485 +++ target/loongarch/translate.h |

[PATCH v2 17/22] target/loongarch: Add floating point load/store instruction translation

2021-07-21 Thread Song Gao
This patch implement floating point load/store instruction translation. This includes: - FLD.{S/D}, FST.{S/D} - FLDX.{S/D}, FSTX.{S/D} - FLD{GT/LE}.{S/D}, FST{GT/LE}.{S/D} Signed-off-by: Song Gao --- target/loongarch/insns.decode | 24 target/loongarch/trans.inc.c | 257 +

Re: [RFC 3/3] qom: Improve error message in module_object_class_by_name()

2021-07-21 Thread Daniel P . Berrangé
On Wed, Jul 21, 2021 at 11:54:45AM +0200, Gerd Hoffmann wrote: > > ObjectClass *module_object_class_by_name(const char *typename) > > { > > ObjectClass *oc; > > @@ -1031,8 +1049,20 @@ ObjectClass *module_object_class_by_name(const char > > *typename) > > oc = object_class_by_name(typen

Re: [PULL 00/17] Kconfig patches for 2021-07-20

2021-07-21 Thread Peter Maydell
On Tue, 20 Jul 2021 at 16:43, Philippe Mathieu-Daudé wrote: > > The following changes since commit 7457b407edd6e8555e4b46488aab2f13959fccf8: > > Merge remote-tracking branch > 'remotes/thuth-gitlab/tags/pull-request-2021-07-19' into staging (2021-07-19 > 11:34:08 +0100) > > are available in th

[PATCH v2 05/22] target/loongarch: Add memory management support

2021-07-21 Thread Song Gao
This patch introduces one memory-management-related functions - loongarch_cpu_tlb_fill() Signed-off-by: Song Gao --- target/loongarch/cpu.c| 1 + target/loongarch/cpu.h| 9 target/loongarch/tlb_helper.c | 103 ++ 3 files changed, 1

Re: [PATCH 2/5] migration: Shutdown src in await_return_path_close_on_source()

2021-07-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > We have a logic in await_return_path_close_on_source() that we will explicitly > shutdown the socket when migration encounters errors. However it could be > racy > because from_dst_file could have been reset right after checking it but before > passing it t

[PATCH v6 07/33] block/block-copy: introduce block_copy_set_copy_opts()

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
We'll need a possibility to set compress and use_copy_range options after initialization of the state. So make corresponding part of block_copy_state_new() separate and public. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 2 ++ block/block-copy.c | 50 +++

[PATCH v6 00/33] block: publish backup-top filter

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
Hi all! Of course, that's a material for 6.2, still no harm in keeping it up to date. v6: rebase on master Patches without r-b: 9, 10, 19, 20 v5: rebase on master 25: fix pylint complain 'Unnecessary "else" after "return"' [John] 25-26: rebased on moved machine.py use Dict[str, object] t

[PATCH v6 01/33] block: introduce bdrv_replace_child_bs()

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
Add function to transactionally replace bs inside BdrvChild. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/block.h | 2 ++ block.c | 31 +++ 2 files changed, 33 insertions(+) diff --git a/include/block/block.h b/

  1   2   3   4   >