Re: arm_cpu_post_init (Was: Re: arm: "max" CPU class hierarchy changes possible?)

2021-03-18 Thread Andrew Jones
On Thu, Mar 18, 2021 at 12:32:30PM +0100, Claudio Fontana wrote: > And why do we have a separate arm_cpu_finalize_features()? Separate, because it's not just called from arm_cpu_realizefn(). > > Nothing in the ARM cpu classes initializations ever seems to be "final" to me. Some CPU features can

Re: [PATCH v2 6/6] tests/qtest: add tests for am53c974 device

2021-03-18 Thread Paolo Bonzini
On 18/03/21 00:02, Mark Cave-Ayland wrote: Use the autogenerated fuzzer test cases as the basis for a set of am53c974 regression tests. Signed-off-by: Mark Cave-Ayland Most of these should be easy to change to libqos, but it's good enough to have them like this so that there'll be an example

Re: [PULL 00/11] emulated nvme updates and fixes

2021-03-18 Thread Daniel P . Berrangé
On Thu, Mar 18, 2021 at 01:01:58PM +0100, Klaus Jensen wrote: > On Mar 18 11:28, Peter Maydell wrote: > > On Thu, 18 Mar 2021 at 11:27, Klaus Jensen wrote: > > > > > > On Mar 18 11:26, Peter Maydell wrote: > > > > On Tue, 16 Mar 2021 at 21:47, Klaus Jensen wrote: > > > > Hi. This tag includes a s

[PULL v3 0/6] QOM and fdc patches patches for 2021-03-16

2021-03-18 Thread Markus Armbruster
The following changes since commit 571d413b5da6bc6f1c2aaca8484717642255ddb0: Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20210316' into staging (2021-03-17 21:02:37 +) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qom-fdc-2021-0

Re: [PATCH v2 1/1] docs/devel: Add VFIO device migration documentation

2021-03-18 Thread Cornelia Huck
On Tue, 16 Mar 2021 21:48:38 +0530 "Tarun Gupta (SW-GPU)" wrote: > On 3/15/2021 10:52 PM, Cornelia Huck wrote: > > > > On Thu, 11 Mar 2021 00:50:09 +0530 > > Tarun Gupta wrote: > > > >> Document interfaces used for VFIO device migration. Added flow of state > >> changes > >> during live mig

Re: [RFC PATCH 0/3] vfio/migration: Support manual clear vfio dirty log

2021-03-18 Thread Kunkun Jiang
Hi Kevin, On 2021/3/18 17:04, Tian, Kevin wrote: From: Kunkun Jiang Sent: Thursday, March 18, 2021 3:59 PM Hi Kevin, On 2021/3/18 14:28, Tian, Kevin wrote: From: Kunkun Jiang Sent: Wednesday, March 10, 2021 5:41 PM Hi all, In the past, we clear dirty log immediately after sync dirty log to

[Bug 1920013] [NEW] Unable to pass-through PCIe devices from a ppc64le host to an x86_64 guest

2021-03-18 Thread cyrozap
Public bug reported: Attempting to pass through a PCIe device from a ppc64le host to an x86_64 guest with QEMU v5.2.0-3031-g571d413b5d (built from git master) fails with the following error: include/exec/memory.h:43:IOMMU_MEMORY_REGION: Object 0x10438eb00 is not an instance of type qemu:iommu

RE: [RFC PATCH 0/3] vfio/migration: Support manual clear vfio dirty log

2021-03-18 Thread Tian, Kevin
> From: Kunkun Jiang > Sent: Thursday, March 18, 2021 8:29 PM > > Hi Kevin, > > On 2021/3/18 17:04, Tian, Kevin wrote: > >> From: Kunkun Jiang > >> Sent: Thursday, March 18, 2021 3:59 PM > >> > >> Hi Kevin, > >> > >> On 2021/3/18 14:28, Tian, Kevin wrote: > From: Kunkun Jiang > Sent:

Re: [PATCH v2 3/3] target/arm: Restrict v7A TCG cpus to TCG accel

2021-03-18 Thread Andrew Jones
On Thu, Mar 18, 2021 at 11:38:51AM +, Peter Maydell wrote: > On Thu, 18 Mar 2021 at 11:31, Philippe Mathieu-Daudé > wrote: > > I tend to agree. The problem is for the running VMs started before > > 82bf7ae84ce (so up to any fork based on v5.2). I don't know what > > the forks are supposed to

Re: arm_cpu_post_init (Was: Re: arm: "max" CPU class hierarchy changes possible?)

2021-03-18 Thread Claudio Fontana
On 3/18/21 1:08 PM, Andrew Jones wrote: > On Thu, Mar 18, 2021 at 12:32:30PM +0100, Claudio Fontana wrote: >> And why do we have a separate arm_cpu_finalize_features()? > > Separate, because it's not just called from arm_cpu_realizefn(). In particular it is also called by the monitor.c in qmp_qu

Re: [PATCH v2 3/3] target/arm: Restrict v7A TCG cpus to TCG accel

2021-03-18 Thread Claudio Fontana
On 3/18/21 1:37 PM, Andrew Jones wrote: > On Thu, Mar 18, 2021 at 11:38:51AM +, Peter Maydell wrote: >> On Thu, 18 Mar 2021 at 11:31, Philippe Mathieu-Daudé >> wrote: >>> I tend to agree. The problem is for the running VMs started before >>> 82bf7ae84ce (so up to any fork based on v5.2). I do

Misleading configure failure GLIB_SIZEOF_SIZE_T

2021-03-18 Thread Markus Armbruster
I just ran into this failure: $ ../configure --disable-tools --disable-system --static ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T. You probably need to set PKG_CONFIG_LIBDIR to point to the right pkg-config files for your build target My confi

Re: [PATCH] docs/devel/testing.rst: Fix referencies to unit tests

2021-03-18 Thread Wainer dos Santos Moschetta
On 3/17/21 6:55 PM, John Snow wrote: typo in the commit summary; "references to" On 3/17/21 3:48 PM, Wainer dos Santos Moschetta wrote: With the recent move of the unit tests to tests/unit directory some instructions under the "Unit tests" section became imprecise, which are fixed by this cha

Re: arm_cpu_post_init (Was: Re: arm: "max" CPU class hierarchy changes possible?)

2021-03-18 Thread Andrew Jones
On Thu, Mar 18, 2021 at 01:42:36PM +0100, Claudio Fontana wrote: > On 3/18/21 1:08 PM, Andrew Jones wrote: > > On Thu, Mar 18, 2021 at 12:32:30PM +0100, Claudio Fontana wrote: > >> And why do we have a separate arm_cpu_finalize_features()? > > > > Separate, because it's not just called from arm_cp

Re: arm_cpu_post_init (Was: Re: arm: "max" CPU class hierarchy changes possible?)

2021-03-18 Thread Eduardo Habkost
On Thu, Mar 18, 2021 at 01:59:08PM +0100, Andrew Jones wrote: > On Thu, Mar 18, 2021 at 01:42:36PM +0100, Claudio Fontana wrote: > > On 3/18/21 1:08 PM, Andrew Jones wrote: > > > On Thu, Mar 18, 2021 at 12:32:30PM +0100, Claudio Fontana wrote: > > >> And why do we have a separate arm_cpu_finalize_f

Re: [RFC PATCH 0/3] vfio/migration: Support manual clear vfio dirty log

2021-03-18 Thread Kunkun Jiang
On 2021/3/18 20:36, Tian, Kevin wrote: From: Kunkun Jiang Sent: Thursday, March 18, 2021 8:29 PM Hi Kevin, On 2021/3/18 17:04, Tian, Kevin wrote: From: Kunkun Jiang Sent: Thursday, March 18, 2021 3:59 PM Hi Kevin, On 2021/3/18 14:28, Tian, Kevin wrote: From: Kunkun Jiang Sent: Wednesday,

Re: [PATCH v2 3/3] target/arm: Restrict v7A TCG cpus to TCG accel

2021-03-18 Thread Philippe Mathieu-Daudé
On 3/18/21 1:50 PM, Claudio Fontana wrote: > On 3/18/21 1:37 PM, Andrew Jones wrote: >> On Thu, Mar 18, 2021 at 11:38:51AM +, Peter Maydell wrote: >>> On Thu, 18 Mar 2021 at 11:31, Philippe Mathieu-Daudé >>> wrote: I tend to agree. The problem is for the running VMs started before 8

KVM_MEM_READONLY slot flag not working properly

2021-03-18 Thread Lorenzo Susini
Hello, Have some of you successfully used the KVM_MEM_READONLY slot flag? I'm working on a project and I'm trying to protect the guest's IDT by using KVM, modifying kvm-all.c. I'm able to correctly locate the IDT in the host by reading IDTR with KVM_GET_SREGS, translating it with KVM_TRANSLATE an

Re: [PATCH v1 5/5] target/riscv: Use RiscVException enum for CSR access

2021-03-18 Thread Richard Henderson
On 3/17/21 11:40 AM, Alistair Francis wrote: result = riscv_csrrw_debug(env, n - 32, &val, 0, 0); -if (result == 0) { +if (result != RISCV_EXCP_NONE) { This was intending == NONE. I.e. no exception raised, let gdb proceed. r~

Re: [PATCH v8 16/35] Hexagon (target/hexagon/conv_emu.[ch]) utility functions

2021-03-18 Thread Richard Henderson
On 3/17/21 9:57 PM, Taylor Simpson wrote: -Original Message- From: Richard Henderson Sent: Sunday, February 14, 2021 2:57 PM To: Taylor Simpson ; qemu-devel@nongnu.org Cc: phi...@redhat.com; alex.ben...@linaro.org; laur...@vivier.eu; a...@rev.ng; Brian Cain Subject: Re: [PATCH v8 16/

Re: Misleading configure failure GLIB_SIZEOF_SIZE_T

2021-03-18 Thread Peter Maydell
On Thu, 18 Mar 2021 at 12:53, Markus Armbruster wrote: > > I just ran into this failure: > > $ ../configure --disable-tools --disable-system --static > > ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T. >You probably need to set PKG_CONFIG_LIBDIR >to point to

Re: [PATCH v4 1/6] block: Add bdrv_reopen_queue_free()

2021-03-18 Thread Vladimir Sementsov-Ogievskiy
17.03.2021 20:15, Alberto Garcia wrote: Move the code to free a BlockReopenQueue to a separate function. It will be used in a subsequent patch. Signed-off-by: Alberto Garcia Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v6 02/10] qapi: Implement deprecated-output=hide for QMP command results

2021-03-18 Thread Markus Armbruster
Markus Armbruster writes: > This policy suppresses deprecated bits in output, and thus permits > "testing the future". Implement it for QMP command results. Example: > when QEMU is run with -compat deprecated-output=hide, then > > {"execute": "query-cpus-fast"} > > yields > > {"return":

[PATCH] monitor/qmp: fix race on CHR_EVENT_CLOSED without OOB

2021-03-18 Thread Stefan Reiter
If OOB is disabled, events received in monitor_qmp_event will be handled in the main context. Thus, we must not acquire a qmp_queue_lock there, as the dispatcher coroutine holds one over a yield point, where it expects to be rescheduled from the main context. If a CHR_EVENT_CLOSED event is received

Re: [PULL for-6.0 0/6] qemu-ga patch queue for soft-freeze

2021-03-18 Thread Peter Maydell
On Wed, 17 Mar 2021 at 03:22, Michael Roth wrote: > > The following changes since commit 5b7f5586d182b0cafb1f8d558992a14763e2953e: > > Merge remote-tracking branch > 'remotes/kraxel/tags/usb-20210315-pull-request' into staging (2021-03-16 > 13:17:54 +) > > are available in the Git reposito

RE: [PATCH v8 16/35] Hexagon (target/hexagon/conv_emu.[ch]) utility functions

2021-03-18 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Thursday, March 18, 2021 8:30 AM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: phi...@redhat.com; alex.ben...@linaro.org; laur...@vivier.eu; > a...@rev.ng; Brian Cain > Subject: Re: [PATCH v8 16/35] Hexagon (target/hexagon/conv

Re: [PATCH v4 2/6] block: Allow changing bs->file on reopen

2021-03-18 Thread Vladimir Sementsov-Ogievskiy
17.03.2021 20:15, Alberto Garcia wrote: When the x-blockdev-reopen was added it allowed reconfiguring the graph by replacing backing files, but changing the 'file' option was forbidden. Because of this restriction some operations are not possible, notably inserting and removing block filters. Th

Re: [PATCH v4 4/6] block: Support multiple reopening with x-blockdev-reopen

2021-03-18 Thread Vladimir Sementsov-Ogievskiy
17.03.2021 20:15, Alberto Garcia wrote: Signed-off-by: Alberto Garcia --- qapi/block-core.json | 18 + blockdev.c | 78 +++--- tests/qemu-iotests/155 | 9 +++-- tests/qemu-iotests/165 | 4 +- tests/qemu-iotests/245

Re: [PULL 0/5] Acceptance Tests and Python libs patches for 2021-03-16

2021-03-18 Thread Peter Maydell
On Wed, 17 Mar 2021 at 03:52, Cleber Rosa wrote: > > The following changes since commit 5b7f5586d182b0cafb1f8d558992a14763e2953e: > > Merge remote-tracking branch 'remotes/kraxel/tags/usb-20210315-pull-request= > ' into staging (2021-03-16 13:17:54 +) > > are available in the Git repository

[PATCH 1/3] target/i386: allow modifying TCG phys-addr-bits

2021-03-18 Thread Paolo Bonzini
TCG can support any number of physical address bits as long as the core memory API does. We only need to compute the reserved bits mask dynamically. Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 23 --- target/i386/cpu.h | 1 - target/i386/tcg

[PATCH 3/3] target/i386: svm: do not discard high 32 bits of EXITINFO1

2021-03-18 Thread Paolo Bonzini
env->error_code is only 32-bits wide, so the high 32 bits of EXITINFO1 are being lost. However, even though saving guest state and restoring host state must be delayed to do_vmexit, because they might take tb_lock, it is always possible to write to the VMCB. So do this for the exit code and EXITI

[PATCH 2/3] target/i386: fail if toggling LA57 in 64-bit mode

2021-03-18 Thread Paolo Bonzini
This fixes kvm-unit-tests access.flat with -cpu qemu64,la57. Signed-off-by: Paolo Bonzini --- target/i386/tcg/misc_helper.c | 4 1 file changed, 4 insertions(+) diff --git a/target/i386/tcg/misc_helper.c b/target/i386/tcg/misc_helper.c index 90b87fdef0..a25428c36e 100644 --- a/target/i386/

[PATCH 0/3] target/i386: kvm-unit-tests fixes related to page table lookup

2021-03-18 Thread Paolo Bonzini
The first two patches allow access.flat to pass with TCG and "-cpu max,phys-bits=52", and the last one fixes most NPT tests in svm.flat. I found these while trying to unify the NPT and regular page table walk, but those other patches are not appropriate for soft freeze. Paolo Paolo Bonzini (3):

Re: [PATCH v6 00/10] Configurable policy for handling deprecated interfaces

2021-03-18 Thread Markus Armbruster
This series needs fixups to not break --disable-system --disable-tools builds. It's not much (see appended diff), but enough to make me respin it as v7. I'll respin the pull request, too. diff --git a/include/qapi/compat-policy.h b/include/qapi/compat-policy.h index b8c6638156..1083f95122 10064

Re: "make check" broken with everything but tools disabled

2021-03-18 Thread Philippe Mathieu-Daudé
On 3/18/21 10:16 AM, Claudio Fontana wrote: > On 3/16/21 2:28 PM, Markus Armbruster wrote: >> Watch this: >> >> $ mkdir bld-tools >> $ cd bld-tools >> $ ../configure --disable-system --disable-user --enable-tools >> $ make check >> [...] >> make: *** No rule to make target '

Re: [PATCH 0/3] target/i386: kvm-unit-tests fixes related to page table lookup

2021-03-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210318150022.1824646-1-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210318150022.1824646-1-pbonz...@redhat.com Subject: [PATCH 0/3] target/i386: kvm-unit

Re: Can not use hmp block_resize command with -blockdev option

2021-03-18 Thread zhao xiaojun
Thanks you, that's really good idea. And I also have the following question: There are some hmp and qmp commands in my scripts, they need the device as an argument. Recently. i used the -blockdev replace the -drive to specify the disk drive, then use qmp's query_block to query the device, but the

Re: [PATCH] tools/virtiofsd: include --socket-group in help

2021-03-18 Thread Connor Kuehl
On 3/18/21 5:09 AM, Alex Bennée wrote: I confused myself wandering if this had been merged by looking at the help output. It seems fuse_opt doesn't automagically add to help output so lets do it now. Updates: f6698f2b03 ("tools/virtiofsd: add support for --socket-group") Signed-off-by: Alex Benn

Re: [PATCH v8 16/35] Hexagon (target/hexagon/conv_emu.[ch]) utility functions

2021-03-18 Thread Richard Henderson
On 3/18/21 8:11 AM, Taylor Simpson wrote: Actually, softfloat raises inexact instead of invalid. Is there a way to override? Not true: switch (p.cls) { case float_class_snan: case float_class_qnan: s->float_exception_flags = orig_flags | float_flag_invalid; return

Re: [PULL 5/5] m68k: add Virtual M68k Machine

2021-03-18 Thread Philippe Mathieu-Daudé
On 3/18/21 11:06 AM, Laurent Vivier wrote: > Le 18/03/2021 à 11:02, Philippe Mathieu-Daudé a écrit : >> On 3/18/21 10:52 AM, Laurent Vivier wrote: >>> Le 18/03/2021 à 10:19, Philippe Mathieu-Daudé a écrit : Hi Laurent, +Paolo / Thomas On 3/15/21 9:42 PM, Laurent Vivier wrot

Re: [PATCH] target/i386/sev: Ensure sev_fw_errlist is sync with update-linux-headers

2021-03-18 Thread Philippe Mathieu-Daudé
ping^2? On 3/8/21 11:21 AM, Philippe Mathieu-Daudé wrote: > ping? > > On 2/19/21 7:01 PM, Philippe Mathieu-Daudé wrote: >> Ensure sev_fw_errlist[] is updated after running >> the update-linux-headers.sh script. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> Based-on: <20210218151633.21537

Re: [PATCH v2(RFC) 0/3] qcow2: fix parallel rewrite and discard

2021-03-18 Thread Vladimir Sementsov-Ogievskiy
12.03.2021 18:24, Kevin Wolf wrote: Am 25.02.2021 um 12:52 hat Vladimir Sementsov-Ogievskiy geschrieben: Hi all! It occurs that nothing prevents discarding and reallocating host cluster during data writing. This way data writing will pollute another newly allocated cluster of data or metadata.

Re: [PATCH] memory: Display MemoryRegion name in read/write ops trace events

2021-03-18 Thread Philippe Mathieu-Daudé
ping? On 3/7/21 8:48 AM, Philippe Mathieu-Daudé wrote: > MemoryRegion names is cached on first call to memory_region_name(), > so displaying the name is trace events is cheap. Add it for read / > write ops. > > Signed-off-by: Philippe Mathieu-Daudé > --- > softmmu/memory.c | 12

[PATCH] MAINTAINERS: add virtio-fs mailing list

2021-03-18 Thread Connor Kuehl
General discussion and patch reviews take place on this list for both virtiofsd (tools/virtiofsd/*) and the guest kernel module. Signed-off-by: Connor Kuehl --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 25fc49d1dc..8921bc2119 100644 --- a/MAI

[PATCH] intc/i8259: avoid (false positive) gcc warning

2021-03-18 Thread Christian Borntraeger
some copiler versions are smart enough to detect a potentially uninitialized variable, but are not smart enough to detect that this cannot happen due to the code flow: ../hw/intc/i8259.c: In function ‘pic_read_irq’: ../hw/intc/i8259.c:203:13: error: ‘irq2’ may be used uninitialized in this functi

[PULL v2 11/11] hw/block/pflash_cfi: Replace DPRINTF with trace events

2021-03-18 Thread Philippe Mathieu-Daudé
From: David Edmondson Rather than having a device specific debug implementation in pflash_cfi01.c and pflash_cfi02.c, use the standard tracing facility. Signed-off-by: David Edmondson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210216142721.1985543-2-david.edmond...@oracle.com> [PMD: Re

[PULL v2 00/11] pflash patches for 2021-03-18

2021-03-18 Thread Philippe Mathieu-Daudé
ository at: https://github.com/philmd/qemu.git tags/pflash-20210318 for you to fetch changes up to 91316cbb3830bb845c42da2d6eab06de56b889b0: hw/block/pflash_cfi: Replace DPRINTF with trace events (2021-03-18 11:16:31 +0100) Pa

Re: [PATCH v2(RFC) 0/3] qcow2: fix parallel rewrite and discard

2021-03-18 Thread Vladimir Sementsov-Ogievskiy
18.03.2021 18:37, Vladimir Sementsov-Ogievskiy wrote: 12.03.2021 18:24, Kevin Wolf wrote: Am 25.02.2021 um 12:52 hat Vladimir Sementsov-Ogievskiy geschrieben: Hi all! It occurs that nothing prevents discarding and reallocating host cluster during data writing. This way data writing will pollute

[PATCH v7 08/11] test-util-sockets: Add stub for monitor_set_cur()

2021-03-18 Thread Markus Armbruster
Without this stub, the next commit fails to link. I suspect the real cause is 947e47448d "monitor: Use getter/setter functions for cur_mon". Cc: Kevin Wolf Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/unit/test-util-sockets.c | 1 + 1 file changed, 1 insertion(+) diff -

[PATCH v7 00/11] Configurable policy for handling deprecated interfaces

2021-03-18 Thread Markus Armbruster
New option -compat lets you configure what to do when deprecated interfaces get used. This is intended for testing users of the management interfaces. It is experimental. -compat deprecated-input= configures what to do when deprecated input is received. Available policies: * accept: Accept dep

Re: [PULL 5/5] m68k: add Virtual M68k Machine

2021-03-18 Thread Laurent Vivier
Le 18/03/2021 à 16:36, Philippe Mathieu-Daudé a écrit : > On 3/18/21 11:06 AM, Laurent Vivier wrote: >> Le 18/03/2021 à 11:02, Philippe Mathieu-Daudé a écrit : >>> On 3/18/21 10:52 AM, Laurent Vivier wrote: Le 18/03/2021 à 10:19, Philippe Mathieu-Daudé a écrit : > Hi Laurent, > > +

[PATCH v7 01/11] qemuutil: remove qemu_set_fd_handler duplicate symbol

2021-03-18 Thread Markus Armbruster
From: Paolo Bonzini libqemuutil has two definitions of qemu_set_fd_handler. This is not needed since the only users of the function are qemu-io.c and the emulators, both of which already include util/main-loop.c. Signed-off-by: Paolo Bonzini Message-Id: Tested-by: Markus Armbruster Signed-of

[PATCH v7 07/11] qapi: Implement deprecated-output=hide for QMP introspection

2021-03-18 Thread Markus Armbruster
This policy suppresses deprecated bits in output, and thus permits "testing the future". Implement it for QMP command query-qmp-schema: suppress information on deprecated commands, events and object type members, i.e. anything that has the special feature flag "deprecated". Signed-off-by: Markus

Re: [PULL 5/5] m68k: add Virtual M68k Machine

2021-03-18 Thread Laurent Vivier
Le 18/03/2021 à 16:51, Laurent Vivier a écrit : > Le 18/03/2021 à 16:36, Philippe Mathieu-Daudé a écrit : >> On 3/18/21 11:06 AM, Laurent Vivier wrote: >>> Le 18/03/2021 à 11:02, Philippe Mathieu-Daudé a écrit : On 3/18/21 10:52 AM, Laurent Vivier wrote: > Le 18/03/2021 à 10:19, Philippe M

[PATCH v7 02/11] qemu-options: New -compat to set policy for deprecated interfaces

2021-03-18 Thread Markus Armbruster
New option -compat lets you configure what to do when deprecated interfaces get used. This is intended for testing users of the management interfaces. It is experimental. -compat deprecated-input= configures what to do when deprecated input is received. Input policy can be "accept" (accept sile

[PATCH v7 03/11] qapi: Implement deprecated-output=hide for QMP command results

2021-03-18 Thread Markus Armbruster
This policy suppresses deprecated bits in output, and thus permits "testing the future". Implement it for QMP command results. Example: when QEMU is run with -compat deprecated-output=hide, then {"execute": "query-cpus-fast"} yields {"return": [{"thread-id": 9805, "props": {"core-id":

[PATCH v7 09/11] qapi: Implement deprecated-input=reject for QMP commands

2021-03-18 Thread Markus Armbruster
This policy rejects deprecated input, and thus permits "testing the future". Implement it for QMP commands: make deprecated ones fail. Example: when QEMU is run with -compat deprecated-input=reject, then {"execute": "query-cpus"} fails like this {"error": {"class": "CommandNotFound", "d

[PATCH v7 05/11] qapi: Implement deprecated-output=hide for QMP event data

2021-03-18 Thread Markus Armbruster
This policy suppresses deprecated bits in output, and thus permits "testing the future". Implement it for QMP event data: suppress deprecated members. No QMP event data is deprecated right now. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/unit/test-qmp-event.c

[PATCH v7 11/11] qapi: New -compat deprecated-input=crash

2021-03-18 Thread Markus Armbruster
Policy "crash" calls abort() when deprecated input is received. Bugs in integration tests may mask the error from policy "reject". Provide a larger hammer: crash outright. Masking that seems unlikely. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qapi/compat.json |

[PATCH v7 04/11] qapi: Implement deprecated-output=hide for QMP events

2021-03-18 Thread Markus Armbruster
This policy suppresses deprecated bits in output, and thus permits "testing the future". Implement it for QMP events: suppress deprecated ones. No QMP event is deprecated right now. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/unit/test-qmp-event.c | 20 +

[PATCH 3/3] i386: Make sure kvm_arch_set_tsc_khz() succeeds on migration when 'hv-reenlightenment' was exposed

2021-03-18 Thread Vitaly Kuznetsov
KVM doesn't fully support Hyper-V reenlightenment notifications on migration. In particular, it doesn't support emulating TSC frequency of the source host by trapping all TSC accesses so unless TSC scaling is supported on the destination host and KVM_SET_TSC_KHZ succeeds, it is unsafe to proceed wi

[PATCH v7 06/11] monitor: Drop query-qmp-schema 'gen': false hack

2021-03-18 Thread Markus Armbruster
QMP commands return their response as a generated QAPI type, which the monitor core converts to JSON via QObject. query-qmp-schema's response is the generated introspection data. This is a QLitObject since commit 7d0f982bfb "qapi: generate a literal qobject for introspection", v2.12). Before, it

[PATCH for 6.0 v2] hw/intc/i8259: Refactor pic_read_irq() to avoid uninitialized variable

2021-03-18 Thread Philippe Mathieu-Daudé
Some compiler versions are smart enough to detect a potentially uninitialized variable, but are not smart enough to detect that this cannot happen due to the code flow: ../hw/intc/i8259.c: In function ‘pic_read_irq’: ../hw/intc/i8259.c:203:13: error: ‘irq2’ may be used uninitialized in this funct

[PATCH v7 10/11] qapi: Implement deprecated-input=reject for QMP command arguments

2021-03-18 Thread Markus Armbruster
This policy rejects deprecated input, and thus permits "testing the future". Implement it for QMP command arguments: reject commands with deprecated ones. Example: when QEMU is run with -compat deprecated-input=reject, then {"execute": "eject", "arguments": {"device": "cd"}} fails like this

[PATCH 0/3] i386: Make sure TSC frequency is preserved across migration when Hyper-V reenlightenment is in use

2021-03-18 Thread Vitaly Kuznetsov
KVM doesn't fully support Hyper-V reenlightenment notifications on migration. In particular, it doesn't support emulating TSC frequency of the source host by trapping all TSC accesses so unless TSC scaling is supported on the destination host and KVM_SET_TSC_KHZ succeeded, it is unsafe to proceed w

Re: [PATCH] target/i386/sev: Ensure sev_fw_errlist is sync with update-linux-headers

2021-03-18 Thread Brijesh Singh
On 3/18/21 10:38 AM, Philippe Mathieu-Daudé wrote: > ping^2? > > On 3/8/21 11:21 AM, Philippe Mathieu-Daudé wrote: >> ping? >> >> On 2/19/21 7:01 PM, Philippe Mathieu-Daudé wrote: >>> Ensure sev_fw_errlist[] is updated after running >>> the update-linux-headers.sh script. >>> >>> Signed-off-by: P

[PATCH 2/3] i386: Fix 'hypercall_hypercall' typo

2021-03-18 Thread Vitaly Kuznetsov
Even the name of this section is 'cpu/msr_hyperv_hypercall', 'hypercall_hypercall' is clearly a typo. Signed-off-by: Vitaly Kuznetsov --- target/i386/machine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/machine.c b/target/i386/machine.c index a4777a73b0a9

Re: [PATCH] intc/i8259: avoid (false positive) gcc warning

2021-03-18 Thread Christian Borntraeger
On 18.03.21 17:03, Paolo Bonzini wrote: On 18/03/21 16:47, Christian Borntraeger wrote: some copiler versions are smart enough to detect a potentially uninitialized variable, but are not smart enough to detect that this cannot happen due to the code flow: ../hw/intc/i8259.c: In function ‘pic

Re: [PATCH 1/3] i386: Make Hyper-V related sections KVM only

2021-03-18 Thread Paolo Bonzini
On 18/03/21 17:02, Vitaly Kuznetsov wrote: Currently, Hyper-V enlightenments are only implemented by KVM so there's no need to have corresponding vmstate_x86_cpu sections when !CONFIG_KVM. Signed-off-by: Vitaly Kuznetsov I expect WHPX may implement at least some, so I'll leave this out. Paol

Re: [PATCH 3/3] i386: Make sure kvm_arch_set_tsc_khz() succeeds on migration when 'hv-reenlightenment' was exposed

2021-03-18 Thread Paolo Bonzini
On 18/03/21 17:02, Vitaly Kuznetsov wrote: KVM doesn't fully support Hyper-V reenlightenment notifications on migration. In particular, it doesn't support emulating TSC frequency of the source host by trapping all TSC accesses so unless TSC scaling is supported on the destination host and KVM_SET

Re: KVM_MEM_READONLY slot flag not working properly

2021-03-18 Thread Laszlo Ersek
On 03/18/21 12:28, Lorenzo Susini wrote: > Hello, > > Have some of you successfully used the KVM_MEM_READONLY slot flag? I think the operation of the pflash device is based on that, yes. One related commit is 235e8982ad39 ("kvm: support using KVM_MEM_READONLY flag for regions", 2013-05-29). So

Re: [PULL 5/5] m68k: add Virtual M68k Machine

2021-03-18 Thread Philippe Mathieu-Daudé
On 3/18/21 4:56 PM, Laurent Vivier wrote: > Le 18/03/2021 à 16:51, Laurent Vivier a écrit : >> Le 18/03/2021 à 16:36, Philippe Mathieu-Daudé a écrit : >>> On 3/18/21 11:06 AM, Laurent Vivier wrote: Le 18/03/2021 à 11:02, Philippe Mathieu-Daudé a écrit : > On 3/18/21 10:52 AM, Laurent Vivie

Re: [PATCH 2/3] i386: Fix 'hypercall_hypercall' typo

2021-03-18 Thread Paolo Bonzini
On 18/03/21 17:02, Vitaly Kuznetsov wrote: Even the name of this section is 'cpu/msr_hyperv_hypercall', 'hypercall_hypercall' is clearly a typo. Signed-off-by: Vitaly Kuznetsov --- target/i386/machine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/machi

[PATCH 1/3] i386: Make Hyper-V related sections KVM only

2021-03-18 Thread Vitaly Kuznetsov
Currently, Hyper-V enlightenments are only implemented by KVM so there's no need to have corresponding vmstate_x86_cpu sections when !CONFIG_KVM. Signed-off-by: Vitaly Kuznetsov --- target/i386/machine.c | 4 1 file changed, 4 insertions(+) diff --git a/target/i386/machine.c b/target/i386/

[PATCH] tests/migration: introduce multifd into guestperf

2021-03-18 Thread huangy81
From: Hyman Current guestperf tool does not support multifd migration, introducing multifd is good idea so that we can compare the performence of all type of migration. To request that multifd is enabled, with 4 channels: $ ./tests/migration/guestperf.py \ --multifd --multifd-channels 4 --ou

Re: [PATCH] intc/i8259: avoid (false positive) gcc warning

2021-03-18 Thread Paolo Bonzini
On 18/03/21 16:47, Christian Borntraeger wrote: some copiler versions are smart enough to detect a potentially uninitialized variable, but are not smart enough to detect that this cannot happen due to the code flow: ../hw/intc/i8259.c: In function ‘pic_read_irq’: ../hw/intc/i8259.c:203:13: error

Re: [PATCH for 6.0 v2] hw/intc/i8259: Refactor pic_read_irq() to avoid uninitialized variable

2021-03-18 Thread Philippe Mathieu-Daudé
On 3/18/21 5:24 PM, BALATON Zoltan wrote: > On Thu, 18 Mar 2021, Philippe Mathieu-Daudé wrote: >> Some compiler versions are smart enough to detect a potentially >> uninitialized variable, but are not smart enough to detect that this >> cannot happen due to the code flow: >> >> ../hw/intc/i8259.c:

Re: Can not use hmp block_resize command with -blockdev option

2021-03-18 Thread Kevin Wolf
Am 18.03.2021 um 16:15 hat zhao xiaojun geschrieben: > Thanks you, that's really good idea. And I also have the following question: > > There are some hmp and qmp commands in my scripts, they need the device as > an argument. Recently. i used the -blockdev replace the -drive to > specify the disk

Re: [PATCH] intc/i8259: avoid (false positive) gcc warning

2021-03-18 Thread Philippe Mathieu-Daudé
On 3/18/21 5:11 PM, Christian Borntraeger wrote: > On 18.03.21 17:03, Paolo Bonzini wrote: >> On 18/03/21 16:47, Christian Borntraeger wrote: >>> some copiler versions are smart enough to detect a potentially >>> uninitialized variable, but are not smart enough to detect that this >>> cannot happen

[RFC v5 6/6] hmp: add virtio commands

2021-03-18 Thread Jonah Palmer
From: Laurent Vivier This patch implements HMP version of the virtio QMP commands [Jonah: Added relative indicies, device type, and used index in HMP virtio queue-status command.] Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- docs/system/monitor.rst | 2 + hmp-commands-virt

[PULL v2 07/11] qapi: Implement deprecated-output=hide for QMP introspection

2021-03-18 Thread Markus Armbruster
This policy suppresses deprecated bits in output, and thus permits "testing the future". Implement it for QMP command query-qmp-schema: suppress information on deprecated commands, events and object type members, i.e. anything that has the special feature flag "deprecated". Signed-off-by: Markus

Re: [PATCH for 6.0 v2] hw/intc/i8259: Refactor pic_read_irq() to avoid uninitialized variable

2021-03-18 Thread BALATON Zoltan
On Thu, 18 Mar 2021, Philippe Mathieu-Daudé wrote: Some compiler versions are smart enough to detect a potentially uninitialized variable, but are not smart enough to detect that this cannot happen due to the code flow: ../hw/intc/i8259.c: In function ‘pic_read_irq’: ../hw/intc/i8259.c:203:13: e

[PULL v2 03/11] qapi: Implement deprecated-output=hide for QMP command results

2021-03-18 Thread Markus Armbruster
This policy suppresses deprecated bits in output, and thus permits "testing the future". Implement it for QMP command results. Example: when QEMU is run with -compat deprecated-output=hide, then {"execute": "query-cpus-fast"} yields {"return": [{"thread-id": 9805, "props": {"core-id":

[RFC v5 3/6] qmp: decode feature bits in virtio-status

2021-03-18 Thread Jonah Palmer
From: Laurent Vivier Display feature names instead of a features bitmap for host, guest, and backend. Decode features according to device type, transport features are on the first line. Undecoded bits (if any) are stored in a separate field. Signed-off-by: Laurent Vivier Signed-off-by: Jonah P

[PULL v2 00/11] QAPI patches patches for 2021-03-16

2021-03-18 Thread Markus Armbruster
The following changes since commit 1db136a29ce8594b693938ab8e788d8bcef54770: Merge remote-tracking branch 'remotes/cleber-gitlab/tags/python-next-pull-request' into staging (2021-03-18 14:07:31 +) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qapi-2

[RFC v5 5/6] qmp: add QMP command x-debug-virtio-queue-element

2021-03-18 Thread Jonah Palmer
From: Laurent Vivier This new command shows the information of a VirtQueue element. Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 9 hw/virtio/virtio.c | 135 qapi/virtio.json| 94 +

[PULL v2 08/11] test-util-sockets: Add stub for monitor_set_cur()

2021-03-18 Thread Markus Armbruster
Without this stub, the next commit fails to link. I suspect the real cause is 947e47448d "monitor: Use getter/setter functions for cur_mon". Cc: Kevin Wolf Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20210318155519.1224118-9-arm...@redhat.com> --- tests/unit/test-uti

[RFC v5 4/6] qmp: add QMP command x-debug-virtio-queue-status

2021-03-18 Thread Jonah Palmer
From: Laurent Vivier This new command shows internal status of a VirtQueue. (vrings and indexes). [Jonah: Added 'device-type' field to VirtQueueStatus and qmp command x-debug-virtio-queue-status.] Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 6 +++

[RFC v5 0/6] hmp,qmp: Add some commands to introspect virtio deices

2021-03-18 Thread Jonah Palmer
This series introduces new QMP/HMP commands to dump the status of a virtio device at different levels. [Jonah: Rebasing and upstreaming Laurent's qmp/hmp virtio commands from last May (here: https://lore.kernel.org/qemu-devel/20200507134800.10837-1-lviv...@redhat.com/) which mainly included Makef

[PULL v2 06/11] monitor: Drop query-qmp-schema 'gen': false hack

2021-03-18 Thread Markus Armbruster
QMP commands return their response as a generated QAPI type, which the monitor core converts to JSON via QObject. query-qmp-schema's response is the generated introspection data. This is a QLitObject since commit 7d0f982bfb "qapi: generate a literal qobject for introspection", v2.12). Before, it

[RFC v5 2/6] qmp: add QMP command x-debug-virtio-status

2021-03-18 Thread Jonah Palmer
From: Laurent Vivier This new command shows the status of a VirtIODevice (features, endianness and number of virtqueues) Next patch will improve output by decoding feature bits. Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 5 hw/virtio/virtio.

[RFC v5 1/6] qmp: add QMP command x-debug-query-virtio

2021-03-18 Thread Jonah Palmer
From: Laurent Vivier This new command lists all the instances of VirtIODevice with their path and virtio type Signed-off-by: Laurent Vivier Reviewed-by: Eric Blake Signed-off-by: Jonah Palmer --- hw/virtio/meson.build | 2 ++ hw/virtio/virtio-stub.c| 14 ++ hw/virtio/virtio

[PULL v2 05/11] qapi: Implement deprecated-output=hide for QMP event data

2021-03-18 Thread Markus Armbruster
This policy suppresses deprecated bits in output, and thus permits "testing the future". Implement it for QMP event data: suppress deprecated members. No QMP event data is deprecated right now. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20210318155519.1224118-6-arm..

[PATCH for 6.0 v3] hw/intc/i8259: Refactor pic_read_irq() to avoid uninitialized variable

2021-03-18 Thread Philippe Mathieu-Daudé
Some compiler versions are smart enough to detect a potentially uninitialized variable, but are not smart enough to detect that this cannot happen due to the code flow: ../hw/intc/i8259.c: In function ‘pic_read_irq’: ../hw/intc/i8259.c:203:13: error: ‘irq2’ may be used uninitialized in this funct

Re: [PATCH for 6.0 v3] hw/intc/i8259: Refactor pic_read_irq() to avoid uninitialized variable

2021-03-18 Thread Christian Borntraeger
On 18.03.21 17:30, Philippe Mathieu-Daudé wrote: Some compiler versions are smart enough to detect a potentially uninitialized variable, but are not smart enough to detect that this cannot happen due to the code flow: ../hw/intc/i8259.c: In function ‘pic_read_irq’: ../hw/intc/i8259.c:203:13:

Re: Can not use hmp block_resize command with -blockdev option

2021-03-18 Thread LKML
On Thu, 18 Mar 2021 17:17:50 +0100 Kevin Wolf wrote: > Am 18.03.2021 um 16:15 hat zhao xiaojun geschrieben: > > Thanks you, that's really good idea. And I also have the following > > question: > > > > There are some hmp and qmp commands in my scripts, they need the > > device as an argument. Rec

iotest 051 failure on s390

2021-03-18 Thread Christian Borntraeger
On s390 with latest master I do get 051 fail [17:30:00] [17:30:05] 5.4s output mismatch (see 051.out.bad) --- /home/cborntra/REPOS/qemu/tests/qemu-iotests/051.out +++ 051.out.bad @@ -61,13 +61,13 @@ (qemu) quit Testing: -drive file=TEST_DIR/t.qcow2,node-name=123foo -

[PULL v2 02/11] qemu-options: New -compat to set policy for deprecated interfaces

2021-03-18 Thread Markus Armbruster
New option -compat lets you configure what to do when deprecated interfaces get used. This is intended for testing users of the management interfaces. It is experimental. -compat deprecated-input= configures what to do when deprecated input is received. Input policy can be "accept" (accept sile

Re: [RFC v5 0/6] hmp, qmp: Add some commands to introspect virtio deices

2021-03-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1616084984-11263-1-git-send-email-jonah.pal...@oracle.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1616084984-11263-1-git-send-email-jonah.pal...@oracle.com Subject: [RFC v5

[PULL v2 09/11] qapi: Implement deprecated-input=reject for QMP commands

2021-03-18 Thread Markus Armbruster
This policy rejects deprecated input, and thus permits "testing the future". Implement it for QMP commands: make deprecated ones fail. Example: when QEMU is run with -compat deprecated-input=reject, then {"execute": "query-cpus"} fails like this {"error": {"class": "CommandNotFound", "d

<    1   2   3   4   >