Re: [PATCH] qmp: Stabilize preconfig

2021-11-11 Thread Paolo Bonzini
On 11/11/21 07:11, Markus Armbruster wrote: Paolo Bonzini writes: On 11/3/21 09:02, Markus Armbruster wrote: I wonder whether we really have to step through three states x-exit-preconfig cont preconfig ---> pre run ---> run and not two cont pre run ---

Re: [PATCH v2 1/2] tests/unit/test-smp-parse: Make an unified name for the tested machine

2021-11-11 Thread Andrew Jones
On Thu, Nov 11, 2021 at 10:44:28AM +0800, Yanan Wang wrote: > Currently, the name of the tested machine in the expected error > messages is hardcoded as "(null)" which is not good, because the > actual generated name of the machine maybe "(null)" or "(NULL)" > which will cause an unexpected test fa

Re: [PATCH 0/6] RfC: try improve native hotplug for pcie root ports

2021-11-11 Thread Michael S. Tsirkin
On Thu, Nov 11, 2021 at 08:53:06AM +0100, Gerd Hoffmann wrote: > Hi, > > > Given it's a bugfix, and given that I hear through internal channels > > that QE results so far have been encouraging, I am inclined to bite the > > bullet and merge this for -rc1. > > Fine with me. > > > I don't think

Re: [PATCH v3 3/5] numa: Support SGX numa in the monitor and Libvirt interfaces

2021-11-11 Thread Yang Zhong
On Thu, Nov 11, 2021 at 08:55:35AM +0100, Philippe Mathieu-Daudé wrote: > On 11/11/21 07:18, Yang Zhong wrote: > > On Wed, Nov 10, 2021 at 10:55:40AM -0600, Eric Blake wrote: > >> On Mon, Nov 01, 2021 at 12:20:07PM -0400, Yang Zhong wrote: > >>> Add the SGXEPCSection list into SGXInfo to show the m

Re: [PATCH 1/2] virtio: use virtio accessor to access packed descriptor flags

2021-11-11 Thread Michael S. Tsirkin
On Thu, Nov 11, 2021 at 02:38:53PM +0800, Jason Wang wrote: > We used to access packed descriptor flags via > address_space_{write|read}_cached(). When we hit the cache, memcpy() > is used which is not an atomic operation which may lead a wrong value > is read or wrote. Could you clarify where's t

Re: [PATCH for 6.2 v2 5/5] bios-tables-test: Update golden binaries

2021-11-11 Thread Michael S. Tsirkin
On Wed, Nov 10, 2021 at 04:11:40PM -0500, Igor Mammedov wrote: > From: Julia Suvorova > > The changes are the result of > 'hw/i386/acpi-build: Deny control on PCIe Native Hot-Plug in _OSC' > and listed here: > > Method (_OSC, 4, NotSerialized) // _OSC: Operating System Capabilities >

Re: [PATCH v2 2/2] tests/unit/test-smp-parse: Fix a check-patch complain

2021-11-11 Thread Andrew Jones
On Thu, Nov 11, 2021 at 10:44:29AM +0800, Yanan Wang wrote: > Checkpatch.pl reports errors like below for commit 9e8e393bb7. > Let's fix it with a simpler format. > ERROR: space required after that close brace '}' > +SMPTestData *data = &(SMPTestData){{ }}; > > Fixes: 9e8e393bb7 ("tests/unit:

Re: [PATCH v2 2/2] tests/unit/test-smp-parse: Fix a check-patch complain

2021-11-11 Thread Thomas Huth
On 11/11/2021 09.43, Andrew Jones wrote: On Thu, Nov 11, 2021 at 10:44:29AM +0800, Yanan Wang wrote: Checkpatch.pl reports errors like below for commit 9e8e393bb7. Let's fix it with a simpler format. ERROR: space required after that close brace '}' +SMPTestData *data = &(SMPTestData){{ }};

Re: [RFC PATCH v3 2/2] s390x: Implement the USER_SIGP_BUSY capability

2021-11-11 Thread David Hildenbrand
On 10.11.21 21:45, Eric Farman wrote: > With the USER_SIGP capability, the kernel will pass most (but not all) > SIGP orders to userspace for processing. But that means that the kernel > is unable to determine if/when the order has been completed by userspace, > and could potentially return an inco

Re: [PATCH v9 3/8] qmp: add QMP command x-query-virtio

2021-11-11 Thread Jonah Palmer
On 11/10/21 07:03, Markus Armbruster wrote: Jonah Palmer writes: From: Laurent Vivier This new command lists all the instances of VirtIODevice with their QOM paths and virtio type/name. Signed-off-by: Jonah Palmer [...] diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json index 491

Re: [PATCH v9 4/8] qmp: add QMP command x-query-virtio-status

2021-11-11 Thread Jonah Palmer
On 11/10/21 08:08, Markus Armbruster wrote: Jonah Palmer writes: From: Laurent Vivier This new command shows the status of a VirtIODevice, including its corresponding vhost device status (if active). Next patch will improve output by decoding feature bits, including vhost device's feature b

Re: [PATCH v4 2/2] tests/unit: Add an unit test for smp parsing

2021-11-11 Thread Philippe Mathieu-Daudé
On 10/28/21 17:09, Philippe Mathieu-Daudé wrote: > From: Yanan Wang > > Now that we have a generic parser smp_parse(), let's add an unit > test for the code. All possible valid/invalid SMP configurations > that the user can specify are covered. > > Signed-off-by: Yanan Wang > Reviewed-by: Andre

Re: [PATCH v10 00/10]vhost-vdpa: add support for configure interrupt

2021-11-11 Thread Stefan Hajnoczi
On Thu, Nov 11, 2021 at 12:41:02PM +0800, Jason Wang wrote: > > 在 2021/11/8 下午6:53, Stefan Hajnoczi 写道: > > On Fri, Nov 05, 2021 at 12:48:17AM +0800, Cindy Lu wrote: > > > these patches add the support for configure interrupt > > > > > > These codes are all tested in vp-vdpa (support configure in

Re: [PATCH v2 1/6] qapi/qom,target/i386: sev-guest: Introduce kernel-hashes=on|off option

2021-11-11 Thread Daniel P . Berrangé
On Mon, Nov 08, 2021 at 08:20:48PM +0200, Dov Murik wrote: > > > On 08/11/2021 17:51, Markus Armbruster wrote: > > Dov Murik writes: > > > >> Introduce new boolean 'kernel-hashes' option on the sev-guest object. > >> It will be used to to decide whether to add the hashes of > >> kernel/initrd/c

Re: [PATCH for 6.2 v2 5/5] bios-tables-test: Update golden binaries

2021-11-11 Thread Ani Sinha
On Thu, 11 Nov 2021, Michael S. Tsirkin wrote: > On Wed, Nov 10, 2021 at 04:11:40PM -0500, Igor Mammedov wrote: > > From: Julia Suvorova > > > > The changes are the result of > > 'hw/i386/acpi-build: Deny control on PCIe Native Hot-Plug in _OSC' > > and listed here: > > > > Method (_OS

Re: [PATCH v2 1/6] qapi/qom,target/i386: sev-guest: Introduce kernel-hashes=on|off option

2021-11-11 Thread Daniel P . Berrangé
On Mon, Nov 08, 2021 at 01:48:35PM +, Dov Murik wrote: > Introduce new boolean 'kernel-hashes' option on the sev-guest object. > It will be used to to decide whether to add the hashes of > kernel/initrd/cmdline to SEV guest memory when booting with -kernel. > The default value is 'off'. > > Si

Re: [PATCH 1/3] target/ppc: Implement Vector Expand Mask

2021-11-11 Thread Richard Henderson
On 11/10/21 7:56 PM, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst Implement the following PowerISA v3.1 instructions: vexpandbm: Vector Expand Byte Mask vexpandhm: Vector Expand Halfword Mask vexpandwm: Vector Expand Word Mask vexpanddm: Vector Expand Doubleword Mask vexpandqm: Vecto

Re: [PATCH v2 2/6] target/i386/sev: Add kernel hashes only if sev-guest.kernel-hashes=on

2021-11-11 Thread Daniel P . Berrangé
On Mon, Nov 08, 2021 at 01:48:36PM +, Dov Murik wrote: > Commit cff03145ed3c ("sev/i386: Introduce sev_add_kernel_loader_hashes > for measured linux boot", 2021-09-30) introduced measured direct boot > with -kernel, using an OVMF-designated hashes table which QEMU fills. > > However, if OVMF d

Re: [PATCH v4 2/2] tests/unit: Add an unit test for smp parsing

2021-11-11 Thread wangyanan (Y)
On 2021/11/11 17:14, Philippe Mathieu-Daudé wrote: On 10/28/21 17:09, Philippe Mathieu-Daudé wrote: From: Yanan Wang Now that we have a generic parser smp_parse(), let's add an unit test for the code. All possible valid/invalid SMP configurations that the user can specify are covered. Signe

Re: [PATCH v2 5/6] target/i386/sev: Perform padding calculations at compile-time

2021-11-11 Thread Daniel P . Berrangé
On Mon, Nov 08, 2021 at 01:48:39PM +, Dov Murik wrote: > In sev_add_kernel_loader_hashes, the sizes of structs are known at > compile-time, so calculate needed padding at compile-time. > > No functional change intended. > > Signed-off-by: Dov Murik > Reviewed-by: Dr. David Alan Gilbert > Re

Re: [PATCH v2 4/6] target/i386/sev: Fail when invalid hashes table area detected

2021-11-11 Thread Daniel P . Berrangé
On Mon, Nov 08, 2021 at 01:48:38PM +, Dov Murik wrote: > Commit cff03145ed3c ("sev/i386: Introduce sev_add_kernel_loader_hashes > for measured linux boot", 2021-09-30) introduced measured direct boot > with -kernel, using an OVMF-designated hashes table which QEMU fills. > > However, no checks

Re: [PATCH v2 6/6] target/i386/sev: Replace qemu_map_ram_ptr with address_space_map

2021-11-11 Thread Daniel P . Berrangé
On Mon, Nov 08, 2021 at 01:48:40PM +, Dov Murik wrote: > Use address_space_map/unmap and check for errors. > > Signed-off-by: Dov Murik > --- > target/i386/sev.c | 16 +--- > 1 file changed, 13 insertions(+), 3 deletions(-) Reviewed-by: Daniel P. Berrangé Regards, Daniel --

Re: [PATCH 0/6] RfC: try improve native hotplug for pcie root ports

2021-11-11 Thread Gerd Hoffmann
On Thu, Nov 11, 2021 at 03:20:07AM -0500, Michael S. Tsirkin wrote: > On Thu, Nov 11, 2021 at 08:53:06AM +0100, Gerd Hoffmann wrote: > > Hi, > > > > > Given it's a bugfix, and given that I hear through internal channels > > > that QE results so far have been encouraging, I am inclined to bite th

Re: [PATCH 0/6] RfC: try improve native hotplug for pcie root ports

2021-11-11 Thread Daniel P . Berrangé
On Thu, Nov 11, 2021 at 03:20:07AM -0500, Michael S. Tsirkin wrote: > On Thu, Nov 11, 2021 at 08:53:06AM +0100, Gerd Hoffmann wrote: > > Hi, > > > > > Given it's a bugfix, and given that I hear through internal channels > > > that QE results so far have been encouraging, I am inclined to bite th

Re: [PATCH v4 2/2] tests/unit: Add an unit test for smp parsing

2021-11-11 Thread Philippe Mathieu-Daudé
On 11/11/21 10:31, wangyanan (Y) wrote: > > On 2021/11/11 17:14, Philippe Mathieu-Daudé wrote: >> On 10/28/21 17:09, Philippe Mathieu-Daudé wrote: >>> From: Yanan Wang >>> >>> Now that we have a generic parser smp_parse(), let's add an unit >>> test for the code. All possible valid/invalid SMP co

Re: [PATCH v2 1/6] qapi/qom,target/i386: sev-guest: Introduce kernel-hashes=on|off option

2021-11-11 Thread Dov Murik
On 11/11/2021 11:26, Daniel P. Berrangé wrote: > On Mon, Nov 08, 2021 at 08:20:48PM +0200, Dov Murik wrote: >> >> >> On 08/11/2021 17:51, Markus Armbruster wrote: >>> Dov Murik writes: >>> Introduce new boolean 'kernel-hashes' option on the sev-guest object. It will be used to to deci

Re: [PATCH v2 0/6] SEV: add kernel-hashes=on for measured -kernel launch

2021-11-11 Thread Daniel P . Berrangé
On Mon, Nov 08, 2021 at 01:48:34PM +, Dov Murik wrote: > Tom Lendacky and Brijesh Singh reported two issues with launching SEV > guests with the -kernel QEMU option when an old [1] or wrongly configured [2] > OVMF images are used. > > To fix these issues, these series "hides" the whole kernel

Re: [PATCH for 6.2 v2 5/5] bios-tables-test: Update golden binaries

2021-11-11 Thread Ani Sinha
On Thu, 11 Nov 2021, Ani Sinha wrote: > > > On Thu, 11 Nov 2021, Michael S. Tsirkin wrote: > > > On Wed, Nov 10, 2021 at 04:11:40PM -0500, Igor Mammedov wrote: > > > From: Julia Suvorova > > > > > > The changes are the result of > > > 'hw/i386/acpi-build: Deny control on PCIe Native Ho

[PATCH] q35: flip acpi-pci-hotplug-with-bridge-support default back to off

2021-11-11 Thread Gerd Hoffmann
Switch qemu 6.2 back to 6.0 behavior (aka native pcie hotplug) because acpi hotplug for pcie ports caused all kinds of regressions and a fix for those is not in sight. Add compat property for 6.1 to keep it enabled there. Use a separate compat property list so we can apply it to 6.1 only. Fixes:

[PATCH v2 1/3] icount: preserve cflags when custom tb is about to execute

2021-11-11 Thread Pavel Dovgalyuk
When debugging with the watchpoints, qemu may need to create TB with single instruction. This is achieved by setting cpu->cflags_next_tb. But when this block is about to execute, it may be interrupted by another thread. In this case cflags will be lost and next executed TB will not be the special o

[PATCH v2 3/3] softmmu: fix watchpoints on memory used by vCPU internals

2021-11-11 Thread Pavel Dovgalyuk
When vCPU processes interrupt request or exception, it can save register values to the memory. Watchpoints may also be set on these memory cells. In this case watchpoint processing code should not retranslate the block which accessed the memory, because there is no such block at all. "After access"

[PATCH v2 2/3] softmmu: fix watchpoint-interrupt races

2021-11-11 Thread Pavel Dovgalyuk
Watchpoint may be processed in two phases. First one is detecting the instruction with target memory access. And the second one is executing only one instruction and setting the debug interrupt flag. Hardware interrupts can break this sequence when they happen after the first watchpoint phase. This

Re: [PATCH 2/3] target/ppc: Implement Vector Extract Mask

2021-11-11 Thread Richard Henderson
On 11/10/21 7:56 PM, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst Implement the following PowerISA v3.1 instructions: vextractbm: Vector Extract Byte Mask vextracthm: Vector Extract Halfword Mask vextractwm: Vector Extract Word Mask vextractdm: Vector Extract Doubleword Mask vextrac

Re: [PATCH 4/4] icount: preserve cflags when custom tb is about to execute

2021-11-11 Thread Pavel Dovgalyuk
On 28.10.2021 22:26, Richard Henderson wrote: On 10/28/21 4:48 AM, Pavel Dovgalyuk wrote: +    if (cpu->cflags_next_tb == -1 +    && (!use_icount || !(tb->cflags & CF_USE_ICOUNT) +    || cpu_neg(cpu)->icount_decr.u16.low >= tb->icount)) { +    /* + * i

[PATCH v2 0/3] Some watchpoint-related patches

2021-11-11 Thread Pavel Dovgalyuk
The series includes several watchpoint-related patches. v2 changes: - added patch to fix races with interrupts - added patch to process watchpoints-on-stack - removed upstreamed patches --- Pavel Dovgalyuk (3): icount: preserve cflags when custom tb is about to execute softmmu: fi

[PATCH v3 5/6] target/i386/sev: Perform padding calculations at compile-time

2021-11-11 Thread Dov Murik
In sev_add_kernel_loader_hashes, the sizes of structs are known at compile-time, so calculate needed padding at compile-time. No functional change intended. Signed-off-by: Dov Murik Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Acked-b

[PATCH v3 3/6] target/i386/sev: Rephrase error message when no hashes table in guest firmware

2021-11-11 Thread Dov Murik
Signed-off-by: Dov Murik Acked-by: Brijesh Singh --- target/i386/sev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index e3abbeef68..6ff196f7ad 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -1232,7 +1232,8 @@ bool sev_ad

[PATCH v3 2/6] target/i386/sev: Add kernel hashes only if sev-guest.kernel-hashes=on

2021-11-11 Thread Dov Murik
Commit cff03145ed3c ("sev/i386: Introduce sev_add_kernel_loader_hashes for measured linux boot", 2021-09-30) introduced measured direct boot with -kernel, using an OVMF-designated hashes table which QEMU fills. However, if OVMF doesn't designate such an area, QEMU would completely abort the VM lau

[PATCH v3 4/6] target/i386/sev: Fail when invalid hashes table area detected

2021-11-11 Thread Dov Murik
Commit cff03145ed3c ("sev/i386: Introduce sev_add_kernel_loader_hashes for measured linux boot", 2021-09-30) introduced measured direct boot with -kernel, using an OVMF-designated hashes table which QEMU fills. However, no checks are performed on the validity of the hashes area designated by OVMF.

[PATCH-for-6.2 v3 0/6] tests/unit: Fix test-smp-parse

2021-11-11 Thread Philippe Mathieu-Daudé
Yet another approach to fix test-smp-parse. v2 from Yanan Wang: https://lore.kernel.org/qemu-devel/2021024429.10568-1-wangyana...@huawei.com/ Here we use the QOM class_init() to avoid having to deal with object_unref() and deinit(). I suggest to rename smp_parse() -> machine_parse_smp_config

[PATCH v3 6/6] target/i386/sev: Replace qemu_map_ram_ptr with address_space_map

2021-11-11 Thread Dov Murik
Use address_space_map/unmap and check for errors. Signed-off-by: Dov Murik Reviewed-by: Daniel P. Berrangé Acked-by: Brijesh Singh --- target/i386/sev.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index 4fd258a570.

[PATCH-for-6.2 v3 2/6] tests/unit/test-smp-parse: QOM'ify smp_machine_class_init()

2021-11-11 Thread Philippe Mathieu-Daudé
smp_machine_class_init() is the actual TypeInfo::class_init(). Declare it as such in smp_machine_info, and avoid to call it manually in each test. Move smp_machine_info definition just before we register the type to avoid a forward declaration. Signed-off-by: Philippe Mathieu-Daudé --- tests/uni

[PATCH-for-6.2 v3 1/6] tests/unit/test-smp-parse: Restore MachineClass fields after modifying

2021-11-11 Thread Philippe Mathieu-Daudé
There is a single MachineClass object, registered with type_register_static(&smp_machine_info). Since the same object is used multiple times (an MachineState object is instantiated in both test_generic and test_with_dies), we should restore its internal state after modifying for the test purpose.

[PATCH v3 0/6] SEV: add kernel-hashes=on for measured -kernel launch

2021-11-11 Thread Dov Murik
Tom Lendacky and Brijesh Singh reported two issues with launching SEV guests with the -kernel QEMU option when an old [1] or wrongly configured [2] OVMF images are used. To fix these issues, these series "hides" the whole kernel hashes additions behind a kernel-hashes=on option (with default value

[PATCH-for-6.2 v3 4/6] tests/unit/test-smp-parse: Simplify pointer to compound literal use

2021-11-11 Thread Philippe Mathieu-Daudé
We can simply use a local variable (and pass its pointer) instead of a pointer to a compound literal. Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-smp-parse.c | 64 ++--- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/tests/unit/test-

[PATCH v3 1/6] qapi/qom, target/i386: sev-guest: Introduce kernel-hashes=on|off option

2021-11-11 Thread Dov Murik
Introduce new boolean 'kernel-hashes' option on the sev-guest object. It will be used to to decide whether to add the hashes of kernel/initrd/cmdline to SEV guest memory when booting with -kernel. The default value is 'off'. Signed-off-by: Dov Murik Reviewed-by: Daniel P. Berrangé Acked-by: Brij

[PATCH-for-6.2 v3 3/6] tests/unit/test-smp-parse: Explicit MachineClass name

2021-11-11 Thread Philippe Mathieu-Daudé
If the MachineClass::name pointer is not explicitly set, it is NULL. Per the C standard, passing a NULL pointer to printf "%s" format is undefined. Some implementations display it as 'NULL', other as 'null'. Since we are comparing the formatted output, we need a stable value. The easiest is to expl

Re: [PATCH v2 0/6] SEV: add kernel-hashes=on for measured -kernel launch

2021-11-11 Thread Dov Murik
On 11/11/2021 11:39, Daniel P. Berrangé wrote: > On Mon, Nov 08, 2021 at 01:48:34PM +, Dov Murik wrote: >> Tom Lendacky and Brijesh Singh reported two issues with launching SEV >> guests with the -kernel QEMU option when an old [1] or wrongly configured [2] >> OVMF images are used. >> >> To

[PATCH-for-6.2 v3 6/6] hw/core: Rename smp_parse() -> machine_parse_smp_config()

2021-11-11 Thread Philippe Mathieu-Daudé
All methods related to MachineState are prefixed with "machine_". smp_parse() does not need to be an exception. Rename it and const'ify the SMPConfiguration argument, since it doesn't need to be modified. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/boards.h | 3 ++- hw/core/mach

[PATCH-for-6.2 v3 5/6] tests/unit/test-smp-parse: Constify some pointer/struct

2021-11-11 Thread Philippe Mathieu-Daudé
Declare structures const when we don't need to modify them at runtime. Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-smp-parse.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c index 83a5b8ffdc

Re: [PATCH v9 5/8] qmp: decode feature & status bits in virtio-status

2021-11-11 Thread Jonah Palmer
On 11/10/21 08:49, Markus Armbruster wrote: Jonah Palmer writes: From: Laurent Vivier Display feature names instead of bitmaps for host, guest, and backend for VirtIODevice. Display status names instead of bitmaps for VirtIODevice. Display feature names instead of bitmaps for backend, prot

Re: [PATCH v9 7/8] qmp: add QMP command x-query-virtio-queue-element

2021-11-11 Thread Jonah Palmer
On 11/10/21 08:52, Markus Armbruster wrote: Jonah Palmer writes: From: Laurent Vivier This new command shows the information of a VirtQueue element. Signed-off-by: Jonah Palmer [...] diff --git a/qapi/virtio.json b/qapi/virtio.json index 0f65044..c57fbc5 100644 --- a/qapi/virtio.json +++

Re: [PATCH v3 3/6] target/i386/sev: Rephrase error message when no hashes table in guest firmware

2021-11-11 Thread Daniel P . Berrangé
On Thu, Nov 11, 2021 at 10:00:45AM +, Dov Murik wrote: > Signed-off-by: Dov Murik > Acked-by: Brijesh Singh > --- > target/i386/sev.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé Regards, Daniel -- |: https://berrange.com -o-https://

Re: [PATCH v9 8/8] hmp: add virtio commands

2021-11-11 Thread Jonah Palmer
On 11/10/21 08:30, Markus Armbruster wrote: Jonah Palmer writes: From: Laurent Vivier This patch implements the HMP versions of the virtio QMP commands. Signed-off-by: Jonah Palmer --- hmp-commands-info.hx | 218 ++ include/monitor/hmp.h | 5 + monitor/hmp

Re: [PATCH v2 1/1] ppc/mmu_helper.c: do not truncate 'ea' in booke206_invalidate_ea_tlb()

2021-11-11 Thread Cédric Le Goater
On 11/10/21 21:25, Daniel Henrique Barboza wrote: 'tlbivax' is implemented by gen_tlbivax_booke206() via gen_helper_booke206_tlbivax(). In case the TLB needs to be flushed, booke206_invalidate_ea_tlb() is called. All these functions, but booke206_invalidate_ea_tlb(), uses a 64-bit effective addre

Re: [PATCH] Fix tcg_out_vec_op argument type

2021-11-11 Thread Thomas Huth
On 27/10/2021 10.56, Miroslav Rezanina wrote: Newly defined tcg_out_vec_op (34ef767609 tcg/s390x: Add host vector framework) for s390x uses pointer argument definition. This fails on gcc 11 as original declaration uses array argument: In file included from ../tcg/tcg.c:430: /builddir/build/BUILD

Re: [PATCH 3/3] target/ppc: Implement Vector Mask Move insns

2021-11-11 Thread Richard Henderson
On 11/10/21 7:56 PM, matheus.fe...@eldorado.org.br wrote: +static bool do_mtvsrm(DisasContext *ctx, arg_VX_tb *a, unsigned vece) +{ +const uint64_t elem_length = 8 << vece, highest_bit = 15 >> vece; +int i; +TCGv_i64 t0, t1, zero, ones; + +REQUIRE_INSNS_FLAGS2(ctx, ISA310); +R

Re: [PATCH] Fix tcg_out_vec_op argument type

2021-11-11 Thread David Hildenbrand
On 11.11.21 11:42, Thomas Huth wrote: > On 27/10/2021 10.56, Miroslav Rezanina wrote: >> Newly defined tcg_out_vec_op (34ef767609 tcg/s390x: Add host vector >> framework) >> for s390x uses pointer argument definition. >> This fails on gcc 11 as original declaration uses array argument: >> >> In fi

Re: [PATCH v2 0/3] Some watchpoint-related patches

2021-11-11 Thread David Hildenbrand
On 11.11.21 10:55, Pavel Dovgalyuk wrote: > The series includes several watchpoint-related patches. > > v2 changes: > - added patch to fix races with interrupts > - added patch to process watchpoints-on-stack > - removed upstreamed patches Out of interest, do we have any reproducer / tests for

Re: [PATCH v2 0/3] Some watchpoint-related patches

2021-11-11 Thread Pavel Dovgalyuk
On 11.11.2021 13:48, David Hildenbrand wrote: On 11.11.21 10:55, Pavel Dovgalyuk wrote: The series includes several watchpoint-related patches. v2 changes: - added patch to fix races with interrupts - added patch to process watchpoints-on-stack - removed upstreamed patches Out of intere

Re: [PATCH] Fix tcg_out_vec_op argument type

2021-11-11 Thread Richard Henderson
On 11/11/21 11:46 AM, David Hildenbrand wrote: On 11.11.21 11:42, Thomas Huth wrote: On 27/10/2021 10.56, Miroslav Rezanina wrote: Newly defined tcg_out_vec_op (34ef767609 tcg/s390x: Add host vector framework) for s390x uses pointer argument definition. This fails on gcc 11 as original declarat

Re: [PULL 0/5] x86, RCU/TCG patches for QEMU 6.2-rc1

2021-11-11 Thread Richard Henderson
On 11/11/21 8:36 AM, Paolo Bonzini wrote: The following changes since commit 114f3c8cc427333dbae331dfd2ecae64676b087e: Merge remote-tracking branch 'remotes/philmd/tags/avocado-20211108' into staging (2021-11-08 18:50:09 +0100) are available in the Git repository at: https://gitlab.com/

[PULL 0/4] Linux user for 6.2 patches

2021-11-11 Thread Laurent Vivier
The following changes since commit 856f9fa9a2c528dc29693d3b3a64a9b93bf866a2: Merge tag 'pull-jobs-2021-11-09' of https://src.openvz.org/scm/~vsementsov/qemu into staging (2021-11-09 21:40:05 +0100) are available in the Git repository at: git://github.com/vivier/qemu.git tags/linux-user-for

[PULL 4/4] linux-user: Rewrite do_getdents, do_getdents64

2021-11-11 Thread Laurent Vivier
From: Richard Henderson Always allocate host storage; this ensures that the struct is sufficiently aligned for the host. Merge the three host implementations of getdents via a few ifdefs. Utilize the same method for do_getdents64. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/704 Sig

[PATCH 2/5] linux-headers: update to 5.16-rc1

2021-11-11 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/standard-headers/drm/drm_fourcc.h | 121 +- include/standard-headers/linux/ethtool.h | 31 + include/standard-headers/linux/fuse.h | 10 +- include/standard-headers/linux/pci_regs.h | 6 + include/standard-heade

[PULL 0/4] tcg patch queue

2021-11-11 Thread Richard Henderson
The following changes since commit 1b9fc6d8ba6667ceb56a3392e84656dcaed0d676: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2021-11-11 09:56:22 +0100) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-2021

[PULL 1/4] linux-user: Split out do_getdents, do_getdents64

2021-11-11 Thread Laurent Vivier
From: Richard Henderson Retain all 3 implementations of getdents for now. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed by: Warner Losh Message-Id: <20211107124845.1174791-2-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.c

[PULL 1/4] tcg/optimize: Add an extra cast to fold_extract2

2021-11-11 Thread Richard Henderson
There is no bug, but silence a warning about computation in int32_t being assigned to a uint64_t. Reported-by: Coverity CID 1465220 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/opt

[PULL 2/4] linux-user: Always use flexible arrays for dirent d_name

2021-11-11 Thread Laurent Vivier
From: Richard Henderson We currently use a flexible array member for target_dirent, but use incorrectly fixed length arrays for target_dirent64, linux_dirent and linux_dirent64. This requires that we adjust the definition of the VFAT READDIR ioctls which hard-code the 256 namelen size into the i

[PULL 3/4] linux-user: Fix member types of target_dirent64

2021-11-11 Thread Laurent Vivier
From: Richard Henderson The host uint64_t (etc) does not have the correct alignment constraint as the guest: use abi_* types. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed by: Warner Losh Message-Id: <20211107124845.1174791-4-richard.hender...@linaro.org> Signe

[PATCH 0/5] Update linux-headers + NOIRQ support for KVM gdbstub

2021-11-11 Thread Paolo Bonzini
The first two patches update linux-headers to 5.16-rc1. This require a small change to virtio-gpu as well. The remaining three patches are a rework of Maxim's patch to support KVM_GUESTDBG_BLOCKIRQ, adjusted to not break compilation on non-x86 architectures. Maxim Levitsky (3): gdbstub: reject

[PATCH 1/5] virtio-gpu: do not byteswap padding

2021-11-11 Thread Paolo Bonzini
In Linux 5.16, the padding of struct virtio_gpu_ctrl_hdr has become a single-byte field followed by a uint8_t[3] array of padding bytes, and virtio_gpu_ctrl_hdr_bswap does not compile anymore. Signed-off-by: Paolo Bonzini --- include/hw/virtio/virtio-gpu-bswap.h | 1 - 1 file changed, 1 deletion

[PULL 2/4] tcg: Remove TCI experimental status

2021-11-11 Thread Richard Henderson
From: Philippe Mathieu-Daudé The following commits (released in v6.0.0) made raised the quality of the TCI backend to the other TCG architectures, thus is is not considerated experimental anymore: - c6fbea47664..2f74f45e32b - dc09f047edd..9e9acb7b348 - b6139eb0578..2fc6f16ca5e - dbcbda2cd84..5e88

[PATCH 3/5] gdbstub: reject unsupported flags in handle_set_qemu_sstep

2021-11-11 Thread Paolo Bonzini
From: Maxim Levitsky handle_query_qemu_sstepbits is reporting NOIRQ and NOTIMER bits even if they are not supported (as is the case with record/replay). Instead, store the supported singlestep flags and reject any unsupported bits in handle_set_qemu_sstep. This removes the need for the get_sstep

[PATCH 4/5] gdbstub, kvm: let KVM report supported singlestep flags

2021-11-11 Thread Paolo Bonzini
From: Maxim Levitsky Signed-off-by: Maxim Levitsky [Extracted from Maxim's patch into a separate commit. - Paolo] Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 12 gdbstub.c| 10 +- include/sysemu/kvm.h | 15 +++ 3 files changed, 36 insert

[PATCH 5/5] kvm: add support for KVM_GUESTDBG_BLOCKIRQ

2021-11-11 Thread Paolo Bonzini
From: Maxim Levitsky Use the KVM_GUESTDBG_BLOCKIRQ debug flag if supported. Signed-off-by: Maxim Levitsky [Extracted from Maxim's patch into a separate commit. - Paolo] Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 17 + 1 file changed, 17 insertions(+) diff --git a

[PULL 3/4] tcg: Document ctpop opcodes

2021-11-11 Thread Richard Henderson
Fixes: a768e4e99247 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/658 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/README | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tcg/README b/tcg/README index c2e7762a37..bc15cc3b32 100644 --- a/tcg/READ

[PULL 4/4] tcg/s390x: Fix tcg_out_vec_op argument type

2021-11-11 Thread Richard Henderson
From: Miroslav Rezanina Newly defined tcg_out_vec_op (34ef767609 tcg/s390x: Add host vector framework) for s390x uses pointer argument definition. This fails on gcc 11 as original declaration uses array argument: In file included from ../tcg/tcg.c:430: /builddir/build/BUILD/qemu-6.1.50/tcg/s390x

Re: [PATCH v3 07/20] target/riscv: Adjust csr write mask with XLEN

2021-11-11 Thread Richard Henderson
On 11/11/21 6:57 AM, LIU Zhiwei wrote: Write mask is representing the bits we care about. Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rvi.c.inc | 4 ++-- target/riscv/op_helper.c| 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) Reviewed-by: Richard H

Re: [PATCH v3 09/20] target/riscv: Alloc tcg global for cur_pm[mask|base]

2021-11-11 Thread Richard Henderson
On 11/11/21 6:57 AM, LIU Zhiwei wrote: Replace the array of pm_mask/pm_base with scalar variables. Remove the cached array value in DisasContext. Signed-off-by: LIU Zhiwei --- target/riscv/translate.c | 32 1 file changed, 8 insertions(+), 24 deletions(-) R

Re: [PATCH v3 04/20] target/riscv: Extend pc for runtime pc write

2021-11-11 Thread Richard Henderson
On 11/11/21 6:57 AM, LIU Zhiwei wrote: In some cases, we must restore the guest PC to the address of the start of the TB, such as when the instruction counter hits zero. So extend pc register according to current xlen for these cases. Signed-off-by: LIU Zhiwei --- target/riscv/cpu.c| 2

Re: [PATCH 1/5] virtio-gpu: do not byteswap padding

2021-11-11 Thread Cornelia Huck
On Thu, Nov 11 2021, Paolo Bonzini wrote: > In Linux 5.16, the padding of struct virtio_gpu_ctrl_hdr has become a > single-byte field followed by a uint8_t[3] array of padding bytes, > and virtio_gpu_ctrl_hdr_bswap does not compile anymore. > > Signed-off-by: Paolo Bonzini > --- > include/hw/vi

Re: [PATCH v3 10/20] target/riscv: Calculate address according to XLEN

2021-11-11 Thread Richard Henderson
On 11/11/21 6:57 AM, LIU Zhiwei wrote: Define one common function to compute a canonical address from a register plus offset. Merge gen_pm_adjust_address into this function. Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rva.c.inc | 9 +++-- target/riscv/insn_trans/trans_rvd

Re: [PATCH v3 11/20] target/riscv: Split pm_enabled into mask and base

2021-11-11 Thread Richard Henderson
On 11/11/21 6:57 AM, LIU Zhiwei wrote: Use cached cur_pmmask and cur_pmbase to infer the current PM mode. This may decrease the TCG IR by one when pm_enabled is true and pm_base_enabled is false. Signed-off-by: LIU Zhiwei --- target/riscv/cpu.h| 3 ++- target/riscv/cpu_helper.c | 25

Re: [PATCH 2/5] linux-headers: update to 5.16-rc1

2021-11-11 Thread Cornelia Huck
On Thu, Nov 11 2021, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > include/standard-headers/drm/drm_fourcc.h | 121 +- > include/standard-headers/linux/ethtool.h | 31 + > include/standard-headers/linux/fuse.h | 10 +- > include/standard-head

Re: [PATCH v3 12/20] target/riscv: Split out the vill from vtype

2021-11-11 Thread Richard Henderson
On 11/11/21 6:57 AM, LIU Zhiwei wrote: We need not specially process vtype when XLEN changes. Signed-off-by: LIU Zhiwei --- target/riscv/cpu.h | 1 + target/riscv/cpu_helper.c| 3 +-- target/riscv/csr.c | 13 - target/riscv/machine.c | 1 + targ

Re: [PATCH 1/5] virtio-gpu: do not byteswap padding

2021-11-11 Thread Philippe Mathieu-Daudé
On 11/11/21 12:06, Paolo Bonzini wrote: > In Linux 5.16, the padding of struct virtio_gpu_ctrl_hdr has become a > single-byte field followed by a uint8_t[3] array of padding bytes, > and virtio_gpu_ctrl_hdr_bswap does not compile anymore. > > Signed-off-by: Paolo Bonzini > --- > include/hw/virti

Re: [PATCH v3 13/20] target/riscv: Fix RESERVED field length in VTYPE

2021-11-11 Thread Richard Henderson
On 11/11/21 12:33 PM, Richard Henderson wrote: On 11/11/21 6:57 AM, LIU Zhiwei wrote: Signed-off-by: LIU Zhiwei ---   target/riscv/cpu.h | 2 +-   1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 52ce670cbe..b48c7c346c 100644 --- a/target/

Re: [PATCH for 6.2 v2 5/5] bios-tables-test: Update golden binaries

2021-11-11 Thread Igor Mammedov
On Thu, 11 Nov 2021 03:34:37 -0500 "Michael S. Tsirkin" wrote: > On Wed, Nov 10, 2021 at 04:11:40PM -0500, Igor Mammedov wrote: > > From: Julia Suvorova > > > > The changes are the result of > > 'hw/i386/acpi-build: Deny control on PCIe Native Hot-Plug in _OSC' > > and listed here: > >

Re: [PATCH v3 13/20] target/riscv: Fix RESERVED field length in VTYPE

2021-11-11 Thread Richard Henderson
On 11/11/21 6:57 AM, LIU Zhiwei wrote: Signed-off-by: LIU Zhiwei --- target/riscv/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 52ce670cbe..b48c7c346c 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -105,7 +

Re: [PATCH v3 15/20] target/riscv: Remove VILL field in VTYPE

2021-11-11 Thread Richard Henderson
On 11/11/21 6:57 AM, LIU Zhiwei wrote: Signed-off-by: LIU Zhiwei --- target/riscv/cpu.h | 1 - 1 file changed, 1 deletion(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index b48c7c346c..5f35217f7d 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -106,7 +106,6 @@ FIELD(VT

Re: [PATCH v3 14/20] target/riscv: Adjust vsetvl according to XLEN

2021-11-11 Thread Richard Henderson
On 11/11/21 6:57 AM, LIU Zhiwei wrote: -DEF_HELPER_3(vsetvl, tl, env, tl, tl) +DEF_HELPER_4(vsetvl, tl, env, tl, tl, tl) Might as well make the argument i32, or don't pass it at all and use cpu_get_xl(). Otherwise, Reviewed-by: Richard Henderson r~

Re: [PATCH 3/5] gdbstub: reject unsupported flags in handle_set_qemu_sstep

2021-11-11 Thread Philippe Mathieu-Daudé
On 11/11/21 12:06, Paolo Bonzini wrote: > From: Maxim Levitsky > > handle_query_qemu_sstepbits is reporting NOIRQ and NOTIMER bits > even if they are not supported (as is the case with record/replay). > Instead, store the supported singlestep flags and reject > any unsupported bits in handle_set_

Re: [PATCH v3 19/20] target/riscv: Adjust scalar reg in vector with XLEN

2021-11-11 Thread Richard Henderson
On 11/11/21 6:57 AM, LIU Zhiwei wrote: @@ -2670,6 +2672,7 @@ static bool trans_vmv_s_x(DisasContext *s, arg_vmv_s_x *a) /* This instruction ignores LMUL and vector register groups */ int maxsz = s->vlen >> 3; TCGv_i64 t1; +TCGv src1 = get_gpr(s, a->rs1, EXT_Z

Re: [PATCH v3 20/20] target/riscv: Enable uxl field write

2021-11-11 Thread Richard Henderson
On 11/11/21 6:58 AM, LIU Zhiwei wrote: Signed-off-by: LIU Zhiwei --- target/riscv/csr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 8f8f170768..43eaa6c710 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -55

Re: [RFC PATCH v2 01/30] target/loongarch: Update README

2021-11-11 Thread chen huacai
Hi, Xiaojuan, On Thu, Nov 11, 2021 at 9:41 AM Xiaojuan Yang wrote: > > Mainly introduce how to run the softmmu > > Signed-off-by: Xiaojuan Yang > Signed-off-by: Song Gao > --- > target/loongarch/README | 20 > 1 file changed, 20 insertions(+) > > diff --git a/target/loonga

[PATCH v2 00/10] block: Attempt on fixing 030-reported errors

2021-11-11 Thread Hanna Reitz
Hi, v1 cover letter: https://lists.nongnu.org/archive/html/qemu-devel/2021-11/msg01287.html In v2 I’ve addressed the comments I’ve received from Kevin and Vladimir. To this end, I’ve retained only the non-controversial part in patch 5, and split everything else (i.e. the stuff relating to bdrv_re

[PATCH v2 01/10] stream: Traverse graph after modification

2021-11-11 Thread Hanna Reitz
bdrv_cor_filter_drop() modifies the block graph. That means that other parties can also modify the block graph before it returns. Therefore, we cannot assume that the result of a graph traversal we did before remains valid afterwards. We should thus fetch `base` and `unfiltered_base` afterwards

[PATCH v2 03/10] block: Unite remove_empty_child and child_free

2021-11-11 Thread Hanna Reitz
Now that bdrv_remove_empty_child() no longer removes the child from the parent's children list but only checks that it is not in such a list, it is only a wrapper around bdrv_child_free() that checks that the child is empty and unused. That should apply to all children that we free, so put those c

[PATCH v2 02/10] block: Manipulate children list in .attach/.detach

2021-11-11 Thread Hanna Reitz
The children list is specific to BDS parents. We should not modify it in the general children modification code, but let BDS parents deal with it in their .attach() and .detach() methods. This also has the advantage that a BdrvChild is removed from the children list before its .bs pointer can bec

  1   2   3   4   >