[RFC PATCH v2 21/30] hw/intc: Add LoongArch extioi interrupt controller(EIOINTC)

2021-11-10 Thread Xiaojuan Yang
This patch realize the EIOINTC interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/intc/Kconfig| 3 + hw/intc/loongarch_extioi.c | 570 + hw/intc/meson.build| 1 + hw/loongarch/Kconfig

[RFC PATCH v2 20/30] hw/intc: Add LoongArch ls7a msi interrupt controller support(PCH-MSI)

2021-11-10 Thread Xiaojuan Yang
This patch realize PCH-MSI interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/intc/Kconfig | 5 ++ hw/intc/loongarch_pch_msi.c | 73 + hw/intc/meson.build | 1 + hw/loongarch/Kconfig

[RFC PATCH v2 25/30] hw/loongarch: Add default bios startup support.

2021-11-10 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/loongarch/Kconfig | 4 +++ hw/loongarch/fw_cfg.c| 33 ++ hw/loongarch/fw_cfg.h| 15 hw/loongarch/ls3a5000_virt.c | 60 +--- hw/loongarch/meson

[RFC PATCH v2 23/30] hw/loongarch: Add some devices support for 3A5000.

2021-11-10 Thread Xiaojuan Yang
1.Add uart,virtio-net,vga and usb for 3A5000. 2.Add irq set and map for the pci host. Non pci device use irq 0-16, pci device use 16-31. 3.Add some unimplented device to emulate guest unused memory space. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/loongarch/Kconfig | 8

[RFC PATCH v2 26/30] hw/loongarch: Add -kernel and -initrd options support

2021-11-10 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/loongarch/ls3a5000_virt.c | 81 include/hw/loongarch/loongarch.h | 5 ++ 2 files changed, 86 insertions(+) diff --git a/hw/loongarch/ls3a5000_virt.c b/hw/loongarch/ls3a5000_virt.c index 85c8466d75.

[RFC PATCH v2 27/30] hw/loongarch: Add LoongArch smbios support

2021-11-10 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/loongarch/Kconfig | 1 + hw/loongarch/ls3a5000_virt.c | 41 include/hw/loongarch/loongarch.h | 2 ++ 3 files changed, 44 insertions(+) diff --git a/hw/loongarch/Kconfig b/hw/loongarch/

[RFC PATCH v2 28/30] hw/loongarch: Add LoongArch acpi support

2021-11-10 Thread Xiaojuan Yang
Add a simple acpi model for LoongArch cpu More complex functions will be added later Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/acpi/Kconfig | 4 + hw/acpi/ls7a.c | 349 + hw/acpi/meson.build | 1 + hw/loongarc

[PATCH v2] Fixed a QEMU hang when guest poweroff in COLO mode

2021-11-10 Thread Rao, Lei
From: "Rao, Lei" When the PVM guest poweroff, the COLO thread may wait a semaphore in colo_process_checkpoint().So, we should wake up the COLO thread before migration shutdown. Signed-off-by: Lei Rao --- include/migration/colo.h | 1 + migration/colo.c | 20 migra

RE: [PATCH 2/2] migration/ram.c: Remove the qemu_mutex_lock in colo_flush_ram_cache.

2021-11-10 Thread Zhang, Chen
> -Original Message- > From: Rao, Lei > Sent: Wednesday, November 10, 2021 4:38 PM > To: Zhang, Chen ; > zhang.zhanghaili...@huawei.com; quint...@redhat.com; > dgilb...@redhat.com > Cc: qemu-devel@nongnu.org; Rao, Lei > Subject: [PATCH 2/2] migration/ram.c: Remove the qemu_mutex_lock i

RE: [PATCH v2] Fixed a QEMU hang when guest poweroff in COLO mode

2021-11-10 Thread Zhang, Chen
> -Original Message- > From: Rao, Lei > Sent: Thursday, November 11, 2021 10:12 AM > To: Zhang, Chen ; > zhang.zhanghaili...@huawei.com; quint...@redhat.com; > dgilb...@redhat.com > Cc: qemu-devel@nongnu.org; Rao, Lei > Subject: [PATCH v2] Fixed a QEMU hang when guest poweroff in COLO

[PATCH v2 0/2] tests/unit/test-smp-parse: Two fixes for test-smp-parse

2021-11-10 Thread Yanan Wang
Hi, There are two fixes for tests/unit/test-smp-parse.c (v2). The first one makes an unified name for the tested machine, which will make the test more stable and resolve the CI failures in [1]. The second one fixes a check-patch complain for commit 9e8e393bb7. [1] https://cirrus-ci.com/task/5823

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

2021-11-10 Thread Yanan Wang
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 failure in some CI platforms. So let's rename the tested machine with

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

2021-11-10 Thread Yanan Wang
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: Add an unit test for smp parsing") Signed-off-by: Yanan Wang --- tests

Re: [PATCH] net/filter: Enable the vnet_hdr_support by default

2021-11-10 Thread Jason Wang
On Wed, Nov 10, 2021 at 4:36 PM Markus Armbruster wrote: > > "Zhang, Chen" writes: > > >> -Original Message- > >> From: Markus Armbruster > >> Sent: Wednesday, November 10, 2021 2:21 PM > >> To: Zhang, Chen > >> Cc: Jason Wang ; qemu-dev >> de...@nongnu.org>; Li Zhijian > >> Subject:

RE: [PATCH] net/filter: Enable the vnet_hdr_support by default

2021-11-10 Thread Zhang, Chen
> -Original Message- > From: Jason Wang > Sent: Thursday, November 11, 2021 10:50 AM > To: Markus Armbruster > Cc: Zhang, Chen ; qemu-dev de...@nongnu.org>; Li Zhijian > Subject: Re: [PATCH] net/filter: Enable the vnet_hdr_support by default > > On Wed, Nov 10, 2021 at 4:36 PM Markus

[PATCH V2] net/filter: Enable the vnet_hdr_support by default

2021-11-10 Thread Zhang Chen
This patch make filters and colo-compare module support vnet_hdr by default. And also support -device non-virtio-net(like e1000.). Because when enabled the support will make the vnet_hdr_len field become must-delivery part of filter transfer protocol(even 0 in use -device e1000). It fully guarantee

Re: [PATCH for 6.2 v2 1/5] pcie: rename 'native-hotplug' to 'x-native-hotplug'

2021-11-10 Thread Ani Sinha
On Wed, 10 Nov 2021, Igor Mammedov wrote: > Mark property as experimental/internal adding 'x-' prefix. > > Property was introduced in 6.1 and it should have provided > ability to turn on native PCIE hotplug on port even when > ACPI PCI hotplug is in use is user explicitly sets property > on CLI

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

2021-11-10 Thread Jason Wang
在 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 interrupt) vdpa_sim (not support configure interrupt), virtio tap device test in vi

Re: [PATCH v2 05/14] target/riscv: Calculate address according to XLEN

2021-11-10 Thread LIU Zhiwei
On 2021/11/10 下午10:40, Richard Henderson wrote: On 11/10/21 2:44 PM, LIU Zhiwei wrote: I suspect the extend should come before the pointer mask and not after, but this is is a weakness in the current RVJ spec that it does not specify how the extension interacts with UXL.  (The reverse ordering

Re: [PATCH for 6.2 v2 4/5] hw/i386/acpi-build: Deny control on PCIe Native Hot-plug in _OSC

2021-11-10 Thread Ani Sinha
On Wed, 10 Nov 2021, Igor Mammedov wrote: > From: Julia Suvorova > > There are two ways to enable ACPI PCI Hot-plug: > > * Disable the Hot-plug Capable bit on PCIe slots. > > This was the first approach which led to regression [1-2], as > I/O space for a port is allocated only when it

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

2021-11-10 Thread Ani Sinha
On Wed, 10 Nov 2021, 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 for 6.2 v2 3/5] bios-tables-test: Allow changes in DSDT ACPI tables

2021-11-10 Thread Ani Sinha
On Wed, 10 Nov 2021, Igor Mammedov wrote: > From: Julia Suvorova > > Prepare for changing the _OSC method in q35 DSDT. > > Signed-off-by: Julia Suvorova > Signed-off-by: Igor Mammedov Acked-by: Ani Sinha > --- > tests/qtest/bios-tables-test-allowed-diff.h | 16 > 1 file

[PATCH v3 00/20] Support UXL filed in xstatus

2021-11-10 Thread LIU Zhiwei
In this patch set, we process the pc reigsters writes, gdb reads and writes, and address calculation under different UXLEN settings. The patch set v3 mainly address Richard comments on v2. Patch 1,2,3,5,6,16,17 have been reviewed. v3: Merge gen_pm_adjust_address into a canonical address functio

[PATCH v3 01/20] target/riscv: Don't save pc when exception return

2021-11-10 Thread LIU Zhiwei
As pc will be written by the xepc in exception return, just ignore pc in translation. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- target/riscv/helper.h | 4 ++-- target/riscv/insn_trans/trans_privileged.c.inc | 7 ++- target/riscv/op_helper.c

[PATCH v3 02/20] target/riscv: Sign extend pc for different XLEN

2021-11-10 Thread LIU Zhiwei
When pc is written, it is sign-extended to fill the widest supported XLEN. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- target/riscv/translate.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translat

[PATCH v3 03/20] target/riscv: Ignore the pc bits above XLEN

2021-11-10 Thread LIU Zhiwei
The read from PC for translation is in cpu_get_tb_cpu_state, before translation. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- target/riscv/cpu_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c

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

2021-11-10 Thread LIU Zhiwei
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(-) diff --git a/target/riscv/translate.c b/targe

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

2021-11-10 Thread LIU Zhiwei
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| 22 +++--- target/riscv/cp

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

2021-11-10 Thread LIU Zhiwei
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(-) diff --git a/target/riscv/insn_trans/trans_rvi.c.inc b/target/ris

[PATCH v3 06/20] target/riscv: Relax debug check for pm write

2021-11-10 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- target/riscv/csr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 9f41954894..74c0b788fd 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -1445,6 +1445,9 @@ static bool c

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

2021-11-10 Thread LIU Zhiwei
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 +++-- target/riscv/t

[PATCH v3 05/20] target/riscv: Use gdb xml according to max mxlen

2021-11-10 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- target/riscv/gdbstub.c | 71 +++--- 1 file changed, 52 insertions(+), 19 deletions(-) diff --git a/target/riscv/gdbstub.c b/target/riscv/gdbstub.c index 23429179e2..8d0f9139d7 100644 --- a/target/ri

[PATCH v3 08/20] target/riscv: Create current pm fields in env

2021-11-10 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei --- target/riscv/cpu.c| 1 + target/riscv/cpu.h| 4 target/riscv/cpu_helper.c | 43 +++ target/riscv/csr.c| 19 + target/riscv/machine.c| 10 + 5 files changed, 77 insertions(+

[PATCH v3 18/20] target/riscv: Adjust vector address with mask

2021-11-10 Thread LIU Zhiwei
The mask comes from the pointer masking extension, or the max value corresponding to XLEN bits. Signed-off-by: LIU Zhiwei --- target/riscv/vector_helper.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/target/riscv/vector_helper.c b/target/riscv/vect

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

2021-11-10 Thread LIU Zhiwei
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 +105,7 @@ typedef struct CPURISCVState CPURI

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

2021-11-10 Thread LIU Zhiwei
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.c.inc | 19 ++--- target/risc

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

2021-11-10 Thread LIU Zhiwei
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 + target/riscv/vector_helper.c | 3 ++- 5 files ch

Re: [PATCH] qmp: Stabilize preconfig

2021-11-10 Thread Markus Armbruster
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 ---> run > > Device

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

2021-11-10 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei --- target/riscv/helper.h | 2 +- target/riscv/insn_trans/trans_rvv.c.inc | 4 ++-- target/riscv/vector_helper.c| 8 +--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/target/riscv/helper.h b/target/riscv/helper.h index

[PATCH v3 16/20] target/riscv: Ajdust vector atomic check with XLEN

2021-11-10 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- target/riscv/insn_trans/trans_rvv.c.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_trans/trans_rvv.c.inc index f5aabd5263..41c7c88904 100644 --- a/

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

2021-11-10 Thread LIU Zhiwei
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(VTYPE, VLMUL, 0, 2) FIELD(VTYPE, VSEW, 2, 3)

[PATCH v3 17/20] target/riscv: Fix check range for first fault only

2021-11-10 Thread LIU Zhiwei
Only check the range that has passed the address translation. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- target/riscv/vector_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index 1a7ee

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

2021-11-10 Thread LIU Zhiwei
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 @@ -553,15 +553,14 @@ static RISCVException write

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

2021-11-10 Thread LIU Zhiwei
When sew <= 32bits, not need to extend scalar reg. When sew > 32bits, if xlen is less that sew, we should sign extend the scalar register, except explicitly specified by the spec. Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rvv.c.inc | 44 ++--- 1 file changed

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

2021-11-10 Thread Yang Zhong
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 multiple > > SGX EPC sections detailed info, not the total size like before. > > This patch can enable numa support for '

Re: [PATCH v3 0/5] SGX NUMA support plus vepc reset

2021-11-10 Thread Yang Zhong
On Wed, Nov 10, 2021 at 05:07:40PM +0100, Paolo Bonzini wrote: > On 11/10/21 13:56, Yang Zhong wrote: > > Paolo, thanks! > > > > No other maintainers to review numa patches, so i will send the numa > > patches again? thanks! > > The patch look good, but they were sent too close to the 6.2 re

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

2021-11-10 Thread Jason Wang
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. So this patch switches to use virito_{stw|lduw}_phys_cached() to make sure the aceess is atomic

[PATCH 2/2] virtio: use virtio accessor to access packed event

2021-11-10 Thread Jason Wang
We used to access packed descriptor event and off_wrap via address_space_{write|read}_cached(). When we hit the cache, memcpy() is used which is not atomic which may lead a wrong value to be read or wrote. This patch fixes this by switching to use virito_{stw|lduw}_phys_cached() to make sure the a

Re: [PATCH v3] s390: kvm: adjust diag318 resets to retain data

2021-11-10 Thread Collin Walling
On 11/10/21 07:42, Janosch Frank wrote: > On 11/9/21 21:56, Collin Walling wrote: >> The CPNC portion of the diag 318 data is erroneously reset during an >> initial CPU reset caused by SIGP. Let's go ahead and relocate the >> diag318_info field within the CPUS390XState struct such that it is >> onl

[PULL 1/5] target/i386: sgx: mark device not user creatable

2021-11-10 Thread Paolo Bonzini
The device is created by the machine based on the sgx-epc property. It should not be created by users. Reported-by: Thomas Huth Signed-off-by: Paolo Bonzini --- hw/i386/sgx-epc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/sgx-epc.c b/hw/i386/sgx-epc.c index 55e2217eae..e508827e

[PULL 5/5] sgx: Reset the vEPC regions during VM reboot

2021-11-10 Thread Paolo Bonzini
From: Yang Zhong For bare-metal SGX on real hardware, the hardware provides guarantees SGX state at reboot. For instance, all pages start out uninitialized. The vepc driver provides a similar guarantee today for freshly-opened vepc instances, but guests such as Windows expect all pages to be in

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

2021-11-10 Thread Paolo Bonzini
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/bonzini/qemu.git tags/for-upstream for you to

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

2021-11-10 Thread Paolo Bonzini
On 11/10/21 17:55, Eric Blake wrote: The QMP interface show: (QEMU) query-sgx {"return": {"sgx": true, "sgx2": true, "sgx1": true, "sections": \ [{"node": 0, "size": 67108864}, {"node": 1, "size": 29360128}], "flc": true}} (QEMU) query-sgx-capabilities {"return": {"sgx": true, "sgx2": true, "sgx

[PULL 4/5] numa: avoid crash with SGX and "info numa"

2021-11-10 Thread Paolo Bonzini
Add the MEMORY_DEVICE_INFO_KIND_SGX_EPC case, so that enclave memory is included in the output of "info numa" instead of crashing the monitor. Fixes: a7c565a941 ("sgx-epc: Add the fill_device_info() callback support", 2021-09-30) Signed-off-by: Paolo Bonzini --- hw/core/numa.c | 7 +++ 1 fi

[PULL 3/5] accel/tcg: Register a force_rcu notifier

2021-11-10 Thread Paolo Bonzini
From: Greg Kurz A TCG vCPU doing a busy loop systematicaly hangs the QEMU monitor if the user passes 'device_add' without argument. This is because drain_cpu_all() which is called from qmp_device_add() cannot return if readers don't exit read-side critical sections. That is typically what busy-lo

[PULL 2/5] rcu: Introduce force_rcu notifier

2021-11-10 Thread Paolo Bonzini
From: Greg Kurz The drain_rcu_call() function can be blocked as long as an RCU reader stays in a read-side critical section. This is typically what happens when a TCG vCPU is executing a busy loop. It can deadlock the QEMU monitor as reported in https://gitlab.com/qemu-project/qemu/-/issues/650 .

Re: [PATCH 2/2] virtio: use virtio accessor to access packed event

2021-11-10 Thread Philippe Mathieu-Daudé
On 11/11/21 07:38, Jason Wang wrote: > We used to access packed descriptor event and off_wrap via > address_space_{write|read}_cached(). When we hit the cache, memcpy() > is used which is not atomic which may lead a wrong value to be read or > wrote. > > This patch fixes this by switching to use >

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

2021-11-10 Thread Philippe Mathieu-Daudé
On 11/11/21 07:38, 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. > > So this patch switches to use virito_{stw|lduw

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

2021-11-10 Thread Gerd Hoffmann
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 this conflicts with Julia's patches as users can still > disable ACPI hotplug int

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

2021-11-10 Thread Philippe Mathieu-Daudé
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 multiple >>> SGX EPC sections detailed info, not the total size like before. >>>

Re: [PATCH] target/ppc: Fix register update on lf[sd]u[x]/stf[sd]u[x]

2021-11-10 Thread Cédric Le Goater
On 11/9/21 20:29, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst These instructions should update the GPR indicated by the field RA instead of RT. This error caused a regression on Mac OS 9 boot and some graphical glitches in OS X. I could reproduce the issue and the fix on Mac OS 9

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

2021-11-10 Thread Thomas Huth
On 09/11/2021 13.18, wangyanan (Y) wrote: Hi, On 2021/11/9 17:36, Philippe Mathieu-Daudé wrote: Hi, 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 configurat

Fwd: New Defects reported by Coverity Scan for QEMU

2021-11-10 Thread Cédric Le Goater
Hello Luis, Coverity found a couple of issues which seem related to the DFP patchset. Could you please take a look ? Thanks, C. Forwarded Message Subject: New Defects reported by Coverity Scan for QEMU Date: Tue, 9 Nov 2021 22:09:40 + From: scan-ad...@coverity.com To: c.

Re: [PATCH 1/2] target/ppc: Fixed call to deferred exception

2021-11-10 Thread Mark Cave-Ayland
On 20/10/2021 13:57, Lucas Mateus Castro (alqotel) wrote: From: "Lucas Mateus Castro (alqotel)" mtfsf, mtfsfi and mtfsb1 instructions call helper_float_check_status after updating the value of FPSCR, but helper_float_check_status checks fp_status and fp_status isn't updated based on FPSCR and

Re: [PATCH] net/filter: Enable the vnet_hdr_support by default

2021-11-10 Thread Markus Armbruster
"Zhang, Chen" writes: >> -Original Message- >> From: Markus Armbruster >> Sent: Wednesday, November 10, 2021 2:21 PM >> To: Zhang, Chen >> Cc: Jason Wang ; qemu-dev > de...@nongnu.org>; Li Zhijian >> Subject: Re: [PATCH] net/filter: Enable the vnet_hdr_support by default >> >> "Zhang,

[PATCH 2/2] migration/ram.c: Remove the qemu_mutex_lock in colo_flush_ram_cache.

2021-11-10 Thread Rao, Lei
From: "Rao, Lei" The code to acquire bitmap_mutex is added in the commit of "63268c4970a5f126cc9af75f3ccb8057abef5ec0". There is no need to acquire bitmap_mutex in colo_flush_ram_cache(). This is because the colo_flush_ram_cache only be called on the COLO secondary VM, which is the destination si

[PATCH 1/2] Fixed a QEMU hang when guest poweroff in COLO mode

2021-11-10 Thread Rao, Lei
From: "Rao, Lei" When the PVM guest poweroff, the COLO thread may wait a semaphore in colo_process_checkpoint().So, we should wake up the COLO thread before migration shutdown. Signed-off-by: Lei Rao --- include/migration/colo.h | 1 + migration/colo.c | 14 ++ migration/m

Re: [PULL 0/3] jobs: deprecate drive-backup qmp command

2021-11-10 Thread Richard Henderson
On 11/9/21 6:52 PM, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit 2b22e7540d6ab4efe82d442363e3fc900cea6584: Merge tag 'm68k-for-6.2-pull-request' of git://github.com/vivier/qemu-m68k into staging (2021-11-09 13:16:56 +0100) are available in the Git repository at:

Re: [PATCH 1/5] hw/pci/pcie_port: Rename 'native-hotplug' to 'native-hpc-bit'

2021-11-10 Thread Daniel P . Berrangé
On Wed, Nov 10, 2021 at 01:04:54AM -0500, Michael S. Tsirkin wrote: > On Wed, Nov 10, 2021 at 06:30:10AM +0100, Julia Suvorova wrote: > > Rename the option to better represent its function - toggle Hot-Plug > > Capable bit in the PCIe Slot Capability. > > > > Signed-off-by: Julia Suvorova > > ---

Re: [PATCH] acpi: tpm: Add missing device identification objects

2021-11-10 Thread Eric Auger
Hi Stefan, On 11/9/21 1:46 AM, Stefan Berger wrote: > From: Stefan Berger > > Add missing device identification objects _STR and _UID. They will appear > as files 'description' and 'uid' under Linux sysfs. > > Cc: Shannon Zhao > Cc: Michael S. Tsirkin > Cc: Igor Mammedov > Cc: Ani Sinha > F

[PATCH] meson: remove useless libdl test

2021-11-10 Thread Paolo Bonzini
dlopen is never used after it is sought via cc.find_library, because plugins use gmodule instead; remove the test. Signed-off-by: Paolo Bonzini --- accel/tcg/meson.build | 2 +- meson.build | 8 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/accel/tcg/meson.bui

Re: [PATCH] linux-user: Replace __u64 with uint64_t

2021-11-10 Thread Richard Henderson
On 11/8/21 8:42 PM, Khem Raj wrote: uint64_t is available in all userspaces via compiler include stdint.h therefore use it instead of __u64 which is linux internal type, it fixes build on some platforms eg. aarch64 systems using musl C library Signed-off-by: Khem Raj --- linux-user/host/aarch

Re: [PATCH 0/4] linux-user: Fix getdents alignment issues (#704)

2021-11-10 Thread Richard Henderson
On 11/9/21 5:46 PM, Warner Losh wrote: On Nov 7, 2021, at 5:48 AM, Richard Henderson wrote: There are a number of alignement issues flagged up by clang, this attempts to fix only one of them: getdents. Does it make sense to have size asserts for these types? That would catch the alignmen

Re: [PATCH v2 04/14] target/riscv: Use gdb xml according to max mxlen

2021-11-10 Thread LIU Zhiwei
On 2021/11/10 下午3:04, LIU Zhiwei wrote: Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- target/riscv/gdbstub.c | 73 +++--- 1 file changed, 54 insertions(+), 19 deletions(-) diff --git a/target/riscv/gdbstub.c b/target/riscv/gdbstub.c index

Re: [PATCH v4 1/2] rcu: Introduce force_rcu notifier

2021-11-10 Thread Richard Henderson
On 11/9/21 7:35 PM, Greg Kurz wrote: The drain_rcu_call() function can be blocked as long as an RCU reader stays in a read-side critical section. This is typically what happens when a TCG vCPU is executing a busy loop. It can deadlock the QEMU monitor as reported inhttps://gitlab.com/qemu-project

Re: [PATCH v4 2/2] accel/tcg: Register a force_rcu notifier

2021-11-10 Thread Richard Henderson
On 11/9/21 7:35 PM, Greg Kurz wrote: A TCG vCPU doing a busy loop systematicaly hangs the QEMU monitor if the user passes 'device_add' without argument. This is because drain_cpu_all() which is called from qmp_device_add() cannot return if readers don't exit read-side critical sections. That is t

Re: [PATCH] meson: remove useless libdl test

2021-11-10 Thread Thomas Huth
On 10/11/2021 10.24, Paolo Bonzini wrote: dlopen is never used after it is sought via cc.find_library, because plugins use gmodule instead; remove the test. Signed-off-by: Paolo Bonzini --- accel/tcg/meson.build | 2 +- meson.build | 8 +--- 2 files changed, 2 insertions(+), 8

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

2021-11-10 Thread Yanan Wang
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 failure in some CI platforms. So let's rename the tested machine with

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

2021-11-10 Thread Yanan Wang
Checkpatch.pl reports errors like below for commit 9e8e393bb7. Fix it. ERROR: space required after that close brace '}' +SMPTestData *data = &(SMPTestData){{ }}; Fixes: 9e8e393bb7 ("tests/unit: Add an unit test for smp parsing") Signed-off-by: Yanan Wang --- tests/unit/test-smp-parse.c | 4 +

[PATCH 0/2] tests/unit/test-smp-parse: Two fixes for test-smp-parse

2021-11-10 Thread Yanan Wang
Hi, There are two fixes for tests/unit/test-smp-parse.c. The first one makes an unified name for the tested machine, which will make the test more stable and resolve the CI failures in [1]. The second one fixes an checkpatch complain for commit 9e8e393bb7. [1] https://cirrus-ci.com/task/582385535

Re: [PATCH 1/2] Fixed a QEMU hang when guest poweroff in COLO mode

2021-11-10 Thread Juan Quintela
"Rao, Lei" wrote: > From: "Rao, Lei" > > When the PVM guest poweroff, the COLO thread may wait a semaphore > in colo_process_checkpoint().So, we should wake up the COLO thread > before migration shutdown. > > Signed-off-by: Lei Rao A couple of notes. > --- > include/migration/colo.h | 1 + >

Re: [PATCH 2/2] migration/ram.c: Remove the qemu_mutex_lock in colo_flush_ram_cache.

2021-11-10 Thread Juan Quintela
"Rao, Lei" wrote: > From: "Rao, Lei" > > The code to acquire bitmap_mutex is added in the commit of > "63268c4970a5f126cc9af75f3ccb8057abef5ec0". There is no > need to acquire bitmap_mutex in colo_flush_ram_cache(). This > is because the colo_flush_ram_cache only be called on the COLO > secondary

Re: [PATCH] spapr_numa.c: fix FORM1 distance-less nodes

2021-11-10 Thread Richard Henderson
On 11/9/21 7:35 PM, Daniel Henrique Barboza wrote: Commit 71e6fae3a99 fixed an issue with FORM2 affinity guests with NUMA nodes in which the distance info is absent in machine_state->numa_state->nodes. This happens when QEMU adds a default NUMA node and when the user adds NUMA nodes without speci

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-11-10 Thread Stefan Hajnoczi
On Tue, Nov 09, 2021 at 02:09:59PM +0100, Christian Schoenebeck wrote: > On Dienstag, 9. November 2021 11:56:35 CET Stefan Hajnoczi wrote: > > On Thu, Nov 04, 2021 at 03:41:23PM +0100, Christian Schoenebeck wrote: > > > On Mittwoch, 3. November 2021 12:33:33 CET Stefan Hajnoczi wrote: > > > > On Mo

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

2021-11-10 Thread Markus Armbruster
Yanan Wang writes: > Checkpatch.pl reports errors like below for commit 9e8e393bb7. Fix it. > ERROR: space required after that close brace '}' > +SMPTestData *data = &(SMPTestData){{ }}; > > Fixes: 9e8e393bb7 ("tests/unit: Add an unit test for smp parsing") > Signed-off-by: Yanan Wang > ---

Re: [PATCH v2 01/14] target/riscv: Sign extend pc for different XLEN

2021-11-10 Thread Richard Henderson
On 11/10/21 8:04 AM, LIU Zhiwei wrote: When pc is written, it is sign-extended to fill the widest supported XLEN. Signed-off-by: LIU Zhiwei --- target/riscv/translate.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) Reviewed-by: Richard Henderson r~

[PATCH v9 1/8] virtio: drop name parameter for virtio_init()

2021-11-10 Thread Jonah Palmer
This patch drops the name parameter for the virtio_init function. The pair between the numeric device ID and the string device ID (name) of a virtio device already exists, but not in a way that lets us map between them. This patch will let us do this and removes the need for the name parameter in

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

2021-11-10 Thread Jonah Palmer
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 --- hw/virtio/meson.build | 2 ++ hw/virtio/virtio-stub.c| 14 hw/virtio/virtio.c | 27 +++ in

[PATCH v9 0/8] hmp,qmp: Add commands to introspect virtio devices

2021-11-10 Thread Jonah Palmer
This series introduces new QMP/HMP commands to dump the status of a virtio device at different levels. [Jonah: Rebasing previous patchset from Oct. 27 (v8). Original patches are from Laurent Vivier from May 2020. Rebase from v8 to v9 includes renaming of 'x-' prefixed QMP commands, adding the

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

2021-11-10 Thread Jonah Palmer
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-cmds.c| 358 ++ 3 f

[PATCH v9 2/8] virtio: add vhost support for virtio devices

2021-11-10 Thread Jonah Palmer
This patch adds a get_vhost() callback function for VirtIODevices that returns the device's corresponding vhost_dev structure if the vhost device is running. This patch also adds a vhost_started flag for VirtIODevices. Previously, a VirtIODevice wouldn't be able to tell if its corresponding vhost

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

2021-11-10 Thread Jonah Palmer
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 bits (backend, protocol, acked, and features). Also will decode status

Re: [PATCH 0/4] linux-user: Fix getdents alignment issues (#704)

2021-11-10 Thread Laurent Vivier
Le 07/11/2021 à 13:48, Richard Henderson a écrit : There are a number of alignement issues flagged up by clang, this attempts to fix only one of them: getdents. r~ Richard Henderson (4): linux-user: Split out do_getdents, do_getdents64 linux-user: Always use flexible arrays for dirent d_n

[PATCH v9 6/8] qmp: add QMP commands for virtio/vhost queue-status

2021-11-10 Thread Jonah Palmer
From: Laurent Vivier These new commands show the internal status of a VirtIODevice's VirtQueue and a vhost device's vhost_virtqueue (if active). Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 14 +++ hw/virtio/virtio.c | 103 qapi/virtio.json| 250

Re: [PATCH] meson: remove useless libdl test

2021-11-10 Thread Alex Bennée
Paolo Bonzini writes: > dlopen is never used after it is sought via cc.find_library, because > plugins use gmodule instead; remove the test. > > Signed-off-by: Paolo Bonzini Queued to for-6.2/misc-fixes, thanks. -- Alex Bennée

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

2021-11-10 Thread Jonah Palmer
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, protocol, acked, and features (hdev->features) for vhost devices. Decode

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

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

Re: [PULL 0/1] Monitor patches patches for 2021-11-10

2021-11-10 Thread Richard Henderson
On 11/10/21 6:45 AM, Markus Armbruster wrote: The following changes since commit 0a70bcf18caf7a61d480f8448723c15209d128ef: Update version for v6.2.0-rc0 release (2021-11-09 18:22:57 +0100) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-monitor-2021-11-

Re: [PATCH v2] hw/arm/virt: Expose empty NUMA nodes through ACPI

2021-11-10 Thread Igor Mammedov
On Fri, 5 Nov 2021 23:47:37 +1100 Gavin Shan wrote: > Hi Drew and Igor, > > On 11/2/21 6:39 PM, Andrew Jones wrote: > > On Tue, Nov 02, 2021 at 10:44:08AM +1100, Gavin Shan wrote: > >> > >> Yeah, I agree. I don't have strong sense to expose these empty nodes > >> for now. Please ignore the pat

[PATCH] ui/vnc-clipboard: fix adding notifier twice

2021-11-10 Thread Vladimir Sementsov-Ogievskiy
vnc_server_cut_text_caps() is not guaranteed to be called only once. If it called twice, we finally call notifier_list_add() twice with same element. Which leads to loopback QLIST. So, on next notifier_list_notify() we'll loop forever and QEMU stuck. So, let's only register new notifier if it's n

  1   2   3   >