[PULL v2 34/36] ui/dbus: add chardev backend & interface

2021-12-21 Thread marcandre . lureau
From: Marc-André Lureau Add a new chardev backend which allows D-Bus client to handle the chardev stream & events. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- qapi/char.json| 27 include/chardev/char-socket.h | 2 + include/qemu/dbus.h | 5

Re: [PATCH 1/2] ui/vnc: refactor arrays of addresses to SocketAddressList

2021-12-21 Thread Marc-André Lureau
Hi On Mon, Dec 20, 2021 at 10:21 PM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > Let's use SocketAddressList instead of dynamic arrays. > Benefits: > - Automatic cleanup: don't need specific freeing function and drop >some gotos. > - Less indirection: no triple asterix

Re: [PATCH v2 1/9] hw/intc: sifive_plic: Add a reset function

2021-12-21 Thread Bin Meng
On Thu, Dec 16, 2021 at 12:54 PM Alistair Francis wrote: > > From: Alistair Francis > > Signed-off-by: Alistair Francis > --- > hw/intc/sifive_plic.c | 18 ++ > 1 file changed, 18 insertions(+) > Reviewed-by: Bin Meng

[PATCH] target/riscv/pmp: fix no pmp illegal intrs

2021-12-21 Thread Nikita Shubin
From: Nikita Shubin As per the privilege specification, any access from S/U mode should fail if no pmp region is configured and pmp is present, othwerwise access should succeed. Fixes: d102f19a208 (target/riscv/pmp: Raise exception if no PMP entry is configured) Resolves: https://gitlab.com/qem

Re: [PATCH 4/4] ui: Fix gtk/gl when the scaled virtual console does not fit the window

2021-12-21 Thread Alexander Orzechowski
On 12/21/21 02:48, Marc-André Lureau wrote: Hi On Sun, Dec 19, 2021 at 6:32 AM Alexander Orzechowski wrote: gtk/gl was incorrectly always rendering as if the 'Zoom to Fit' was always checked even if it wasn't. This is now using logic closer to what is being used for the existing

Re: [PATCH] tests/qtest: Make the filter tests independent from a specific NIC

2021-12-21 Thread Thomas Huth
On 21/12/2021 07.38, Zhang, Chen wrote: -Original Message- From: Qemu-devel On Behalf Of Thomas Huth Sent: Monday, December 20, 2021 6:30 PM To: qemu-devel@nongnu.org; Laurent Vivier Cc: Paolo Bonzini ; Yang Hongyang ; Zhang Chen Subject: [PATCH] tests/qtest: Make the filter tests i

Re: [PATCH 2/2] qapi/ui: introduce change-vnc-listen

2021-12-21 Thread Marc-André Lureau
Hi On Mon, Dec 20, 2021 at 10:24 PM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > Add command that can change addresses where VNC server listens for new > connections. Prior to 6.0 this functionality was available through > 'change' qmp command which was deleted. > > Signed-of

[PATCH] MAINTAINERS: Update COLO Proxy section

2021-12-21 Thread Zhang Chen
Signed-off-by: Zhang Chen --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1de6ce6e44..5479b9376e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2983,6 +2983,7 @@ F: docs/colo-proxy.txt F: net/colo* F: net/filter-rewriter.c F: net/filter-mirro

RE: [PATCH] tests/qtest: Make the filter tests independent from a specific NIC

2021-12-21 Thread Zhang, Chen
> -Original Message- > From: Thomas Huth > Sent: Tuesday, December 21, 2021 3:35 PM > To: Zhang, Chen ; qemu-devel@nongnu.org; > Laurent Vivier > Cc: Paolo Bonzini > Subject: Re: [PATCH] tests/qtest: Make the filter tests independent from a > specific NIC > > On 21/12/2021 07.38, Zhan

Re: powernv gitlab ci regression

2021-12-21 Thread Cédric Le Goater
On 12/21/21 03:37, Daniel Henrique Barboza wrote: Hey, On 12/20/21 18:35, Richard Henderson wrote: Hi guys, Somewhere within Merge tag 'pull-ppc-20211217' of https://github.com/legoater/qemu into staging ppc 7.0 queue: * General cleanup for Mac machines (Peter) * Fixes for FPU exceptions (L

Re: [PATCH v2 4/9] hw/intc: sifive_plic: Cleanup remaining functions

2021-12-21 Thread Bin Meng
On Thu, Dec 16, 2021 at 12:55 PM Alistair Francis wrote: > > From: Alistair Francis > > We can remove the original sifive_plic_irqs_pending() function and > instead just use the sifive_plic_claim() function (renamed to > sifive_plic_claimed()) to determine if any interrupts are pending. > > This

Re: [PATCH] MAINTAINERS: Update COLO Proxy section

2021-12-21 Thread Philippe Mathieu-Daudé
Cc'ing qemu-trivial@ On 12/21/21 09:04, Zhang Chen wrote: > Signed-off-by: Zhang Chen > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 1de6ce6e44..5479b9376e 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -2983,6 +2983,7 @@ F: d

Re: [PATCH] vl: Add opts to device opts list when using JSON syntax for -device

2021-12-21 Thread Philippe Mathieu-Daudé
Cc'ing Markus. On 12/20/21 09:45, MkfsSion wrote: > When using JSON syntax for -device, -set option can not find device > specified in JSON by id field. The following commandline is an example: > > $ qemu-system-x86_64 -device '{"id":"foo"}' -set device.foo.bar=1 > qemu-system-x86_64: -set device

Re: [PATCH 2/4] ui: Remove unnecessary checks

2021-12-21 Thread Alexander Orzechowski
On 12/21/21 02:40, Marc-André Lureau wrote: Hi On Sun, Dec 19, 2021 at 6:32 AM Alexander Orzechowski wrote: These conditionals should never be false as scale_x and scale_y should scale the fbw and fbh variables such that the ww and wh variables always have a greater magnitud

Re: [RFC v2 2/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/20/21 10:34, David Edmondson wrote: > Provide information on the number of bytes copied in the pre-copy, > downtime and post-copy phases of migration. > > Signed-off-by: David Edmondson > --- > migration/migration.c | 3 +++ > migration/ram.c | 7 +++ > monitor/hmp-cmds.c|

Re: [RFC v2 1/2] migration: Introduce ram_transferred_add()

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/20/21 10:34, David Edmondson wrote: > ...and use it. FYI Not all mails readers / git tools display subject along with content, so it is more helpful to rewrite the subject. > Signed-off-by: David Edmondson > --- > migration/ram.c | 23 ++- > 1 file changed, 14 insertio

Re: [PATCH v11 00/31] LoongArch64 port of QEMU TCG

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/21/21 06:40, WANG Xuerui wrote: > Hi all, > > This is a port of QEMU TCG to the brand-new CPU architecture LoongArch, > introduced by Loongson with their 3A5000 chips. > > Everything is tested on real 3A5000 board (system emulation, linux-user, > make check) and GitLab (CI jobs), and rebase

Re: [PATCH] MAINTAINERS: Update COLO Proxy section

2021-12-21 Thread Thomas Huth
On 21/12/2021 09.04, Zhang Chen wrote: Signed-off-by: Zhang Chen --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1de6ce6e44..5479b9376e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2983,6 +2983,7 @@ F: docs/colo-proxy.txt F: net/colo*

Re: [PATCH] ps2: Initial horizontal scroll support

2021-12-21 Thread Marc-André Lureau
Hi On Tue, Dec 21, 2021 at 4:10 AM Dmitry Petrov wrote: > This patch introduces horizontal scroll support for the ps/2 mouse. > It includes changes in the ps/2 device driver as well as support > for three display options - cocoa, gtk and sdl, tested and working > on all of them against guest ubu

[PATCH] KVM: x86: ignore interrupt_bitmap field of KVM_GET/SET_SREGS

2021-12-21 Thread Paolo Bonzini
This is unnecessary, because the interrupt would be retrieved and queued anyway by KVM_GET_VCPU_EVENTS and KVM_SET_VCPU_EVENTS respectively, and it makes the flow more similar to the one for KVM_GET/SET_SREGS2. Signed-off-by: Paolo Bonzini --- target/i386/kvm/kvm.c | 22 -- 1

[PATCH v3 1/2] migration: Introduce ram_transferred_add()

2021-12-21 Thread David Edmondson
Replace direct manipulation of ram_counters.transferred with a function. Signed-off-by: David Edmondson Reviewed-by: Philippe Mathieu-Daudé --- migration/ram.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 57

[PATCH v3 0/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-21 Thread David Edmondson
When examining a report of poor migration behaviour, it would often be useful to understand how much data was transferred in different phases of the migration process. For example, if the downtime limit is exceeded, to know how much data was transferred during the downtime. RFC because the name "

Re: [PATCH 3/5] migration: ram_release_pages() always receive 1 page as argument

2021-12-21 Thread Juan Quintela
Philippe Mathieu-Daudé wrote: > On 12/16/21 10:13, Juan Quintela wrote: >> Remove the pages argument. And s/pages/page/ >> >> Signed-off-by: Juan Quintela >> --- >> migration/ram.c | 8 >> 1 file changed, 4 insertions(+), 4 deletions(-) > >> -static void ram_release_pages(const char *r

[PATCH v3 2/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-21 Thread David Edmondson
Provide information on the number of bytes copied in the pre-copy, downtime and post-copy phases of migration. Signed-off-by: David Edmondson Reviewed-by: Philippe Mathieu-Daudé --- migration/migration.c | 3 +++ migration/ram.c | 7 +++ monitor/hmp-cmds.c| 12 qapi

Re: [PATCH v11 00/31] LoongArch64 port of QEMU TCG

2021-12-21 Thread gaosong
Hi, On 2021/12/21 下午4:44, Philippe Mathieu-Daudé wrote: I took few hours to translate and read all Taobao contracts before registering, then got blacklisted at my first login... Maybe others will get more luck. Having someone at Loongson helping with hardware is certainly easier for the communi

Re: powernv gitlab ci regression

2021-12-21 Thread Daniel Henrique Barboza
On 12/21/21 05:20, Cédric Le Goater wrote: On 12/21/21 03:37, Daniel Henrique Barboza wrote: Hey, On 12/20/21 18:35, Richard Henderson wrote: Hi guys, Somewhere within Merge tag 'pull-ppc-20211217' of https://github.com/legoater/qemu into staging ppc 7.0 queue: * General cleanup for Mac

Re: [PATCH RFC] MAINTAINERS: split out s390x sections

2021-12-21 Thread Christian Borntraeger
Am 20.12.21 um 12:54 schrieb Cornelia Huck: Split out some more specialized devices etc., so that we can build smarter lists of people to be put on cc: in the future. Signed-off-by: Cornelia Huck Acked-by: Christian Borntraeger That should help to get additional maintainers (in add-on pa

Re: [PATCH] scsi-generic: replace logical block count of response of READ CAPACITY

2021-12-21 Thread Claudio Fontana
Hi Paolo, Hannes, any thoughts on the following issue? Introduction: When using SAN storage for providing block devices to guests, configured as SCSI-passthrough devices, increasing the space available in the VM is a use case. To do it, it is currently necessary to: 1) expand storage on the

Re: [PATCH RFC] MAINTAINERS: split out s390x sections

2021-12-21 Thread Thomas Huth
On 20/12/2021 12.54, Cornelia Huck wrote: Split out some more specialized devices etc., so that we can build smarter lists of people to be put on cc: in the future. Signed-off-by: Cornelia Huck --- As discussed offlist. Some notes: - The new sections have inherited the maintainers of the secti

Re: [PATCH v2 6/8] migration: Dump sub-cmd name in loadvm_process_command tp

2021-12-21 Thread David Edmondson
On Monday, 2021-12-20 at 16:53:53 +08, Peter Xu wrote: > It'll be easier to read the name rather than index of sub-cmd when debugging. > > Signed-off-by: Peter Xu > --- > migration/savevm.c | 3 ++- > migration/trace-events | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff

Re: [PATCH v2 7/8] migration: Finer grained tracepoints for POSTCOPY_LISTEN

2021-12-21 Thread David Edmondson
On Monday, 2021-12-20 at 16:53:54 +08, Peter Xu wrote: > The enablement of postcopy listening has a few steps, add a few tracepoints to > be there ready for some basic measurements for them. > > Signed-off-by: Peter Xu > --- > migration/savevm.c | 9 - > migration/trace-events | 2 +-

Re: [PATCH] tests/qtest/virtio-net-failover: Use g_random_int() instead of g_test_rand_int()

2021-12-21 Thread Thomas Huth
On 20/12/2021 21.02, Philippe Mathieu-Daudé wrote: On 12/20/21 20:26, Richard Henderson wrote: On 12/20/21 2:27 AM, Thomas Huth wrote:   const gchar *tmpdir = g_get_tmp_dir();   gchar *tmpfile = g_strdup_printf("%s/failover_test_migrate-%u-%u", - tm

[PATCH 1/8] configure: simplify creation of plugin symbol list

2021-12-21 Thread Paolo Bonzini
--dynamic-list is present on all supported ELF (not Windows or Darwin) platforms, since it dates back to 2006; -exported_symbols_list is likewise present on all supported versions of macOS. Do not bother doing a functional test in configure. Remove the file creation from configure as well: for Da

[PATCH 2/8] configure: do not set bsd_user/linux_user early

2021-12-21 Thread Paolo Bonzini
Similar to other optional features, leave the variables empty and compute the actual value later. Use the existence of include or source directories to detect whether an OS or CPU supports respectively bsd-user and linux-user. For now, BSD user-mode emulation is buildable even on TCI-only archite

[PATCH 0/8] Next round of configure/meson cleanups

2021-12-21 Thread Paolo Bonzini
Includes v2 of patches from the previous round, and new patches 3-8. Paolo Paolo Bonzini (8): configure: simplify creation of plugin symbol list configure: do not set bsd_user/linux_user early configure, makefile: remove traces of really old files configure: parse --enable/--disable-strip

[PATCH 4/8] configure: parse --enable/--disable-strip automatically, flip default

2021-12-21 Thread Paolo Bonzini
Always include the STRIP variable in config-host.mak (it's only used by the s390-ccw firmware build, and it adds a default if configure omitted it), and use meson-buildoptions.sh to turn --enable/--disable-strip into -Dstrip. The default is now not to strip the binaries like for almost every other

[PATCH 6/8] meson: build contrib/ executables after generated headers

2021-12-21 Thread Paolo Bonzini
This will be needed as soon as config-poison.h moves from configure to a meson custom_target (which is built at "ninja" time). Signed-off-by: Paolo Bonzini --- contrib/elf2dmp/meson.build| 2 +- contrib/ivshmem-client/meson.build | 2 +- contrib/ivshmem-server/meson.build | 2 +- contrib

[PATCH 7/8] configure, meson: move config-poison.h to meson

2021-12-21 Thread Paolo Bonzini
This ensures that the file is regenerated properly whenever config-target.h or config-devices.h files change. Signed-off-by: Paolo Bonzini --- Makefile | 2 +- configure | 11 --- meson.build | 12 scripts/make-conf

[PATCH 3/8] configure, makefile: remove traces of really old files

2021-12-21 Thread Paolo Bonzini
These files have been removed for more than year in the best case, or for more than ten years for some really old TCG files. Remove any traces of it. Signed-off-by: Paolo Bonzini --- Makefile | 11 --- configure | 9 - 2 files changed, 4 insertions(+), 16 deletions(-) diff --g

[PATCH 5/8] configure: move non-command-line variables away from command-line parsing section

2021-12-21 Thread Paolo Bonzini
This makes it easier to identify candidates for moving to Meson. Signed-off-by: Paolo Bonzini --- configure | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 40dd6e8d1b..810bc36490 100755 --- a/configure +++ b/configure @@ -308,16 +308,

[PATCH 8/8] meson: add comments in the target-specific flags section

2021-12-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- meson.build | 5 + 1 file changed, 5 insertions(+) diff --git a/meson.build b/meson.build index 09ee427ca4..0a6d57125f 100644 --- a/meson.build +++ b/meson.build @@ -233,6 +233,7 @@ endif # Target-specific checks and dependencies # #

Re: Virtio-GPU Xres and Yres seettings

2021-12-21 Thread Gerd Hoffmann
On Mon, Dec 20, 2021 at 10:44:06PM +0530, Pratik Parvati wrote: > > EDID is optional, so you can try disable the EDID feature bit and see > > what happens. > > Thanks Gerd, after disabling the EDID, I was able to get the required > resolution (basically width and height) from the driver. > > Anot

[PATCH] docker: include bison in debian-tricore-cross

2021-12-21 Thread Paolo Bonzini
Binutils sometimes fail to build if bison is not installed: /bin/sh ./ylwrap `test -f arparse.y || echo ./`arparse.y y.tab.c arparse.c y.tab.h arparse.h y.output arparse.output -- -d ./ylwrap: 109: ./ylwrap: -d: not found (the correct invocation of ylwrap would have "bison -d" after the dou

Re: [PATCH] scsi-generic: replace logical block count of response of READ CAPACITY

2021-12-21 Thread Philippe Mathieu-Daudé
Hi Claudio, On 12/21/21 10:48, Claudio Fontana wrote: > Hi Paolo, Hannes, > > any thoughts on the following issue? > > Introduction: > > When using SAN storage for providing block devices to guests, configured as > SCSI-passthrough devices, increasing the space available in the VM is a use >

Re: [PATCH] vl: Add -set options to device opts dict when using JSON syntax for -device

2021-12-21 Thread Markus Armbruster
MkfsSion writes: > When using JSON syntax for -device, -set option can not find device > specified in JSON by id field. The following commandline is an example: > > $ qemu-system-x86_64 -device '{"id":"foo"}' -set device.foo.bar=1 > qemu-system-x86_64: -set device.foo.bar=1: there is no device "f

Re: Virtio-GPU Xres and Yres seettings

2021-12-21 Thread Pratik Parvati
I apologise for not putting the question properly. I am referring virtio spec to understand the driver and device operation - I had a few questions on pixel data, as it was not working as expected. My display is working fine now; thanks for your help. Regards, Pratik On Tue, 21 Dec 2021 at 16:4

Re: [PATCH 5/8] configure: move non-command-line variables away from command-line parsing section

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/21/21 12:05, Paolo Bonzini wrote: > This makes it easier to identify candidates for moving to Meson. > > Signed-off-by: Paolo Bonzini > --- > configure | 13 ++--- > 1 file changed, 6 insertions(+), 7 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 8/8] meson: add comments in the target-specific flags section

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/21/21 12:05, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > meson.build | 5 + > 1 file changed, 5 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 6/8] meson: build contrib/ executables after generated headers

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/21/21 12:05, Paolo Bonzini wrote: > This will be needed as soon as config-poison.h moves from configure to > a meson custom_target (which is built at "ninja" time). > > Signed-off-by: Paolo Bonzini > --- > contrib/elf2dmp/meson.build| 2 +- > contrib/ivshmem-client/meson.build | 2

Re: [PATCH] docker: include bison in debian-tricore-cross

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/21/21 12:16, Paolo Bonzini wrote: > Binutils sometimes fail to build if bison is not installed: > > /bin/sh ./ylwrap `test -f arparse.y || echo ./`arparse.y y.tab.c arparse.c > y.tab.h arparse.h y.output arparse.output -- -d > ./ylwrap: 109: ./ylwrap: -d: not found > > (the correct in

Re: QOM

2021-12-21 Thread Philippe Mathieu-Daudé
Hi Abhijeet, On 12/21/21 12:27, abhijeet inamdar wrote: > Hi, > > 1)What does QOM stand for? QOM: "QEMU Object Model" See https://qemu-project.gitlab.io/qemu/devel/qom.html > 2)Can anyone tell what this error means?  > > (qemu) Unexpected error in object_property_find() at > /home/ocp/vcpu-pl

Re: [PATCH v11 00/31] LoongArch64 port of QEMU TCG

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/21/21 10:36, gaosong wrote: > Hi, > > On 2021/12/21 下午4:44, Philippe Mathieu-Daudé wrote: >> I took few hours to translate and read all Taobao contracts before >> registering, then got blacklisted at my first login... Maybe others >> will get more luck. >> >> Having someone at Loongson helpi

Re: [PATCH v2 0/2] qemu-img convert: Fix sparseness detection

2021-12-21 Thread Peter Lieven
Am 17.12.21 um 17:46 schrieb Vladimir Sementsov-Ogievskiy: > Hi all! > > 01: only update test output rebasing on master > 02: replaced with my proposed solution. > > Kevin Wolf (1): > iotests: Test qemu-img convert of zeroed data cluster > > Vladimir Sementsov-Ogievskiy (1): > qemu-img: make is

Re: QOM

2021-12-21 Thread abhijeet inamdar
Oh, In that case I have to define my irq set for a machine to handle the exception and interrupts. BR. Abhijeet. On Tue, 21 Dec, 2021, 12:59 Philippe Mathieu-Daudé, wrote: > Hi Abhijeet, > > On 12/21/21 12:27, abhijeet inamdar wrote: > > Hi, > > > > 1)What does QOM stand for? > > QOM: "QEMU Ob

Re: QOM

2021-12-21 Thread abhijeet inamdar
As we have almost 80 irq lines and 40-45 NVIC_irq's. Where can I define them? BR. Abhijeet. On Tue, 21 Dec, 2021, 13:18 abhijeet inamdar, wrote: > Oh, > > In that case I have to define my irq set for a machine to handle the > exception and interrupts. > > BR. > Abhijeet. > > On Tue, 21 Dec, 20

Re: [PATCH] failover: Silence warning messages during qtest

2021-12-21 Thread Thomas Huth
On 20/12/2021 15.53, Laurent Vivier wrote: virtio-net-failover test tries several device combinations that produces some expected warnings. These warning can be confusing, so we disable them during the qtest sequence. Reported-by: Thomas Huth Signed-off-by: Laurent Vivier --- hw/net/virtio-n

[PATCH v2 0/6] migration: misc cleanups

2021-12-21 Thread Juan Quintela
Hi Changes since v1: - Add reviewed tags for reviewed patches - Change comment about last_stage (philmd) - Change cast to 1ULL for ram_release_page() - remove TARGET_PAGE_MASK mask. It was used only for compression, and offset should be page aligned already Please, review. Thanks, Juan. [v1]

[PATCH v2 1/6] migration: All this fields are unsigned

2021-12-21 Thread Juan Quintela
So printing it as %d is wrong. Notice that for the channel id, that is an uint8_t, but I changed it anyways for consistency. Signed-off-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé --- migration/multifd-zlib.c | 20 ++-- migration/multifd-zstd.c | 24 --

[PATCH v2 2/6] migration: We only need last_stage in two places

2021-12-21 Thread Juan Quintela
We only need last_stage in two places and we are passing it all around. Just add a field to RAMState that passes it. Signed-off-by: Juan Quintela --- Repeat subject (philmd suggestion) --- migration/ram.c | 41 ++--- 1 file changed, 18 insertions(+), 23 del

[PATCH v2 4/6] migration: Remove masking for compression

2021-12-21 Thread Juan Quintela
Remove the mask in the call to ram_release_pages(). Nothing else does it, and if the offset has that bits set, we have a lot of trouble. Signed-off-by: Juan Quintela --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index 0

[PATCH v2 5/6] migration: simplify do_compress_ram_page

2021-12-21 Thread Juan Quintela
The goto is not needed at all. Signed-off-by: Juan Quintela --- migration/ram.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 4ee0369d6f..eddc85ffb0 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1341,12 +1341,11 @

[PATCH v2 3/6] migration: ram_release_pages() always receive 1 page as argument

2021-12-21 Thread Juan Quintela
Remove the pages argument. And s/pages/page/ Signed-off-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé -- Use 1LL instead of casts Signed-off-by: Juan Quintela --- migration/ram.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/migration/ram.c b/migration/

[PATCH v2 6/6] migration: Move ram_release_pages() call to save_zero_page_to_file()

2021-12-21 Thread Juan Quintela
We always need to call it when we find a zero page, so put it in a single place. Signed-off-by: Juan Quintela --- migration/ram.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index eddc85ffb0..3cd98e19d5 100644 ---

Re: [PATCH] vl: Add -set options to device opts dict when using JSON syntax for -device

2021-12-21 Thread Markus Armbruster
Markus Armbruster writes: > MkfsSion writes: > >> When using JSON syntax for -device, -set option can not find device >> specified in JSON by id field. The following commandline is an example: >> >> $ qemu-system-x86_64 -device '{"id":"foo"}' -set device.foo.bar=1 >> qemu-system-x86_64: -set dev

Re: [PATCH v2 6/8] migration: Dump sub-cmd name in loadvm_process_command tp

2021-12-21 Thread Peter Xu
On Tue, Dec 21, 2021 at 10:08:24AM +, David Edmondson wrote: > > @@ -22,7 +22,7 @@ loadvm_postcopy_handle_resume(void) "" > > loadvm_postcopy_ram_handle_discard(void) "" > > loadvm_postcopy_ram_handle_discard_end(void) "" > > loadvm_postcopy_ram_handle_discard_header(const char *ramid, uint1

Re: [PATCH v2 7/8] migration: Finer grained tracepoints for POSTCOPY_LISTEN

2021-12-21 Thread Peter Xu
On Tue, Dec 21, 2021 at 10:12:34AM +, David Edmondson wrote: > On Monday, 2021-12-20 at 16:53:54 +08, Peter Xu wrote: > > > The enablement of postcopy listening has a few steps, add a few tracepoints > > to > > be there ready for some basic measurements for them. > > > > Signed-off-by: Peter

Re: [PATCH] failover: Silence warning messages during qtest

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/21/21 13:30, Thomas Huth wrote: > On 20/12/2021 15.53, Laurent Vivier wrote: >> virtio-net-failover test tries several device combinations that produces >> some expected warnings. >> These warning can be confusing, so we disable them during the qtest >> sequence. >> >> Reported-by: Thomas Hut

Re: [PATCH v2 5/6] migration: simplify do_compress_ram_page

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/21/21 13:52, Juan Quintela wrote: > The goto is not needed at all. > > Signed-off-by: Juan Quintela > --- > migration/ram.c | 11 +++ > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/migration/ram.c b/migration/ram.c > index 4ee0369d6f..eddc85ffb0 100644 > --- a/

Re: [PATCH 2/2] qapi/ui: introduce change-vnc-listen

2021-12-21 Thread Vladimir Sementsov-Ogievskiy
21.12.2021 11:13, Marc-André Lureau wrote: Hi On Mon, Dec 20, 2021 at 10:24 PM Vladimir Sementsov-Ogievskiy mailto:vsement...@virtuozzo.com>> wrote: Add command that can change addresses where VNC server listens for new connections. Prior to 6.0 this functionality was available through

[PATCH 3/2] avocado/vnc: add test_change_listen

2021-12-21 Thread Vladimir Sementsov-Ogievskiy
Add simple test-case for new change-vnc-listen qmp command. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/avocado/vnc.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/avocado/vnc.py b/tests/avocado/vnc.py index 096432988f..f05ee1e00a 100644 --- a/tests/avocado/vnc

Re: [PATCH 3/2] avocado/vnc: add test_change_listen

2021-12-21 Thread Marc-André Lureau
On Tue, Dec 21, 2021 at 5:38 PM Vladimir Sementsov-Ogievskiy wrote: > > Add simple test-case for new change-vnc-listen qmp command. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Marc-André Lureau thanks > --- > tests/avocado/vnc.py | 10 ++ > 1 file changed, 10 inserti

Re: [PATCH] vl: Add opts to device opts list when using JSON syntax for -device

2021-12-21 Thread MkfsSion
Sorry, the patch is not well tested and it causes duplicate devices creation. I have send another patch to the mailing list to fix the issue. On 2021/12/21 16:25, Philippe Mathieu-Daudé wrote: > Cc'ing Markus. > > On 12/20/21 09:45, MkfsSion wrote: >> When using JSON syntax for -device, -set opt

[PATCH] vl: Add -set options to device opts dict when using JSON syntax for -device

2021-12-21 Thread MkfsSion
When using JSON syntax for -device, -set option can not find device specified in JSON by id field. The following commandline is an example: $ qemu-system-x86_64 -device '{"id":"foo"}' -set device.foo.bar=1 qemu-system-x86_64: -set device.foo.bar=1: there is no device "foo" defined The patch adds

Re: [PATCH RFC] MAINTAINERS: split out s390x sections

2021-12-21 Thread Halil Pasic
On Mon, 20 Dec 2021 12:54:19 +0100 Cornelia Huck wrote: > Split out some more specialized devices etc., so that we can build > smarter lists of people to be put on cc: in the future. > > Signed-off-by: Cornelia Huck LGTM Acked-by: Halil Pasic

Re: [PATCH 2/2] qapi/ui: introduce change-vnc-listen

2021-12-21 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add command that can change addresses where VNC server listens for new > connections. Prior to 6.0 this functionality was available through > 'change' qmp command which was deleted. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > docs/about/removed

Re: [PATCH v4 0/7] nbd reconnect on open

2021-12-21 Thread Vladimir Sementsov-Ogievskiy
13.12.2021 18:32, Vladimir Sementsov-Ogievskiy wrote: Hi all! The functionality is reviewed, python testing part is not. I've dropped the patch "qapi: make blockdev-add a coroutine command": it's optional, I don't want to slow down the whole series because of it. v4: 01-03: wording, add Eric'

Re: [RFC PATCH v2 02/14] job.h: categorize fields in struct Job

2021-12-21 Thread Emanuele Giuseppe Esposito
On 16/12/2021 17:21, Stefan Hajnoczi wrote: On Thu, Nov 04, 2021 at 10:53:22AM -0400, Emanuele Giuseppe Esposito wrote: Categorize the fields in struct Job to understand which ones need to be protected by the job mutex and which don't. Signed-off-by: Emanuele Giuseppe Esposito --- include

[PATCH v3 02/15] pcie: Add some SR/IOV API documentation in docs/pcie_sriov.txt

2021-12-21 Thread Lukasz Maniak
From: Knut Omang Add a small intro + minimal documentation for how to implement SR/IOV support for an emulated device. Signed-off-by: Knut Omang --- docs/pcie_sriov.txt | 115 1 file changed, 115 insertions(+) create mode 100644 docs/pcie_sriov.txt

[PATCH v3 00/15] hw/nvme: SR-IOV with Virtualization Enhancements

2021-12-21 Thread Lukasz Maniak
This is the version of the patch series that we consider ready for staging. We do not intend to work on the v4 unless there are major issues. Changes since v2: - The documentation mentions that SR-IOV support is still an experimental feature. - The default value activates properly when sriov_max

[PATCH v3 05/15] hw/nvme: Add support for SR-IOV

2021-12-21 Thread Lukasz Maniak
This patch implements initial support for Single Root I/O Virtualization on an NVMe device. Essentially, it allows to define the maximum number of virtual functions supported by the NVMe controller via sriov_max_vfs parameter. Passing a non-zero value to sriov_max_vfs triggers reporting of SR-IOV

[PATCH v3 01/15] pcie: Add support for Single Root I/O Virtualization (SR/IOV)

2021-12-21 Thread Lukasz Maniak
From: Knut Omang This patch provides the building blocks for creating an SR/IOV PCIe Extended Capability header and register/unregister SR/IOV Virtual Functions. Signed-off-by: Knut Omang --- hw/pci/meson.build | 1 + hw/pci/pci.c| 97 +--- hw/pci/pcie.c

[PATCH v3 03/15] pcie: Add a helper to the SR/IOV API

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk Convenience function for retrieving the PCIDevice object of the N-th VF. Signed-off-by: Łukasz Gieryk Reviewed-by: Knut Omang --- hw/pci/pcie_sriov.c | 10 +- include/hw/pci/pcie_sriov.h | 5 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --g

[PATCH v3 08/15] hw/nvme: Implement the Function Level Reset

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk This patch implements the Function Level Reset, a feature currently not implemented for the Nvme device, while listed as a mandatory ("shall") in the 1.4 spec. The implementation reuses FLR-related building blocks defined for the pci-bridge module, and follows the same logic:

[PATCH v3 04/15] pcie: Add 1.2 version token for the Power Management Capability

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk Signed-off-by: Łukasz Gieryk --- include/hw/pci/pci_regs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/pci/pci_regs.h b/include/hw/pci/pci_regs.h index 77ba64b931..a590140962 100644 --- a/include/hw/pci/pci_regs.h +++ b/include/hw/pci/pci_regs.h @@ -4,5 +4

[PATCH v3 06/15] hw/nvme: Add support for Primary Controller Capabilities

2021-12-21 Thread Lukasz Maniak
Implementation of Primary Controller Capabilities data structure (Identify command with CNS value of 14h). Currently, the command returns only ID of a primary controller. Handling of remaining fields are added in subsequent patches implementing virtualization enhancements. Signed-off-by: Lukasz M

[PATCH v3 07/15] hw/nvme: Add support for Secondary Controller List

2021-12-21 Thread Lukasz Maniak
Introduce handling for Secondary Controller List (Identify command with CNS value of 15h). Secondary controller ids are unique in the subsystem, hence they are reserved by it upon initialization of the primary controller to the number of sriov_max_vfs. ID reservation requires the addition of an i

[PATCH v3 09/15] hw/nvme: Make max_ioqpairs and msix_qsize configurable in runtime

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk The NVMe device defines two properties: max_ioqpairs, msix_qsize. Having them as constants is problematic for SR-IOV support. SR-IOV introduces virtual resources (queues, interrupts) that can be assigned to PF and its dependent VFs. Each device, following a reset, should work

[PATCH v3 11/15] hw/nvme: Calculate BAR attributes in a function

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk An NVMe device with SR-IOV capability calculates the BAR size differently for PF and VF, so it makes sense to extract the common code to a separate function. Signed-off-by: Łukasz Gieryk --- hw/nvme/ctrl.c | 45 +++-- 1 file changed,

[PATCH v3 12/15] hw/nvme: Initialize capability structures for primary/secondary controllers

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk With four new properties: - sriov_v{i,q}_flexible, - sriov_max_v{i,q}_per_vf, one can configure the number of available flexible resources, as well as the limits. The primary and secondary controller capability structures are initialized accordingly. Since the number of ava

[PATCH v3 15/15] hw/nvme: Update the initalization place for the AER queue

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk This patch updates the initialization place for the AER queue, so it’s initialized once, at controller initialization, and not every time controller is enabled. While the original version works for a non-SR-IOV device, as it’s hard to interact with the controller if it’s not

[PATCH v3 13/15] hw/nvme: Add support for the Virtualization Management command

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk With the new command one can: - assign flexible resources (queues, interrupts) to primary and secondary controllers, - toggle the online/offline state of given controller. Signed-off-by: Łukasz Gieryk --- hw/nvme/ctrl.c | 253 +

[PATCH v3 10/15] hw/nvme: Remove reg_size variable and update BAR0 size calculation

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk The n->reg_size parameter unnecessarily splits the BAR0 size calculation in two phases; removed to simplify the code. With all the calculations done in one place, it seems the pow2ceil, applied originally to reg_size, is unnecessary. The rounding should happen as the last ste

Re: [PATCH 2/2] qapi/ui: introduce change-vnc-listen

2021-12-21 Thread Vladimir Sementsov-Ogievskiy
21.12.2021 17:15, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add command that can change addresses where VNC server listens for new connections. Prior to 6.0 this functionality was available through 'change' qmp command which was deleted. Signed-off-by: Vladimir Sementsov-O

[PATCH v3 14/15] docs: Add documentation for SR-IOV and Virtualization Enhancements

2021-12-21 Thread Lukasz Maniak
Signed-off-by: Lukasz Maniak --- docs/system/devices/nvme.rst | 36 1 file changed, 36 insertions(+) diff --git a/docs/system/devices/nvme.rst b/docs/system/devices/nvme.rst index b5acb2a9c1..166a11abc6 100644 --- a/docs/system/devices/nvme.rst +++ b/docs/sys

Re: [PATCH] vl: Add -set options to device opts dict when using JSON syntax for -device

2021-12-21 Thread Paolo Bonzini
On 12/21/21 13:58, Markus Armbruster wrote: Is this a regression? I suspect commit 5dacda5167 "vl: Enable JSON syntax for -device" (v6.2.0). Obviously not a regression: everything that used to work still works. FWIW I think -set should be deprecated. I'm not aware of any particularly usefu

[PATCH] acpi: validate hotplug selector on access

2021-12-21 Thread Michael S. Tsirkin
When bus is looked up on a pci write, we didn't validate that the lookup succeeded. Fuzzers thus can trigger QEMU crash by dereferencing the NULL bus pointer. Fixes: b32bd763a1 ("pci: introduce acpi-index property for PCI device") Cc: "Igor Mammedov" Fixes: https://gitlab.com/qemu-project/qemu/-/

Re: [PATCH] acpi: validate hotplug selector on access

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/21/21 15:48, Michael S. Tsirkin wrote: > When bus is looked up on a pci write, we didn't > validate that the lookup succeeded. > Fuzzers thus can trigger QEMU crash by dereferencing the NULL > bus pointer. > > Fixes: b32bd763a1 ("pci: introduce acpi-index property for PCI device") > Cc: "Igo

[PATCH v3 02/15] mm/memfd: Introduce MFD_INACCESSIBLE flag

2021-12-21 Thread Chao Peng
Introduce a new memfd_create() flag indicating the content of the created memfd is inaccessible from userspace. It does this by force setting F_SEAL_INACCESSIBLE seal when the file is created. It also set F_SEAL_SEAL to prevent future sealing, which means, it can not coexist with MFD_ALLOW_SEALING.

[PATCH v3 04/15] KVM: Extend the memslot to support fd-based private memory

2021-12-21 Thread Chao Peng
Extend the memslot definition to provide fd-based private memory support by adding two new fields(fd/ofs). The memslot then can maintain memory for both shared and private pages in a single memslot. Shared pages are provided in the existing way by using userspace_addr(hva) field and get_user_pages(

[PATCH v3 01/15] mm/shmem: Introduce F_SEAL_INACCESSIBLE

2021-12-21 Thread Chao Peng
From: "Kirill A. Shutemov" Introduce a new seal F_SEAL_INACCESSIBLE indicating the content of the file is inaccessible from userspace in any possible ways like read(),write() or mmap() etc. It provides semantics required for KVM guest private memory support that a file descriptor with this seal

  1   2   3   >