[RFC PATCH v2 01/20] migration/vmstate: Restrict vmstate_dummy to user-mode

2021-01-17 Thread Philippe Mathieu-Daudé
'vmstate_dummy' is special and only used for user-mode. Rename it to something more specific. It was introduced restricted to user-mode in commit c71c3e99b8 ("Add a vmstate_dummy struct for CONFIG_USER_ONLY") but this restriction was later removed in commit 6afc14e92ac ("migration: Fix warning

[RFC PATCH v2 16/20] hw/sparc64/sun4u: Mark devices with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
These devices don't have fields to migrate. Be explicit by using vmstate_qdev_no_state_to_migrate. Add a more descriptive comment to keep a clear separation between static property vs runtime changeable. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc64/sun4u.c | 6 +- 1 file changed, 5

[RFC PATCH v2 14/20] hw/misc/unimp: Mark the device with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
This device doesn't have fields to migrate. Be explicit by using vmstate_qdev_no_state_to_migrate. Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/unimp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/unimp.c b/hw/misc/unimp.c index 6cfc5727f0b..e5ede95c124 100644 ---

[PATCH 2/3] docs/fuzz: add some information about OSS-Fuzz

2021-01-17 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov --- docs/devel/fuzzing.rst | 26 ++ 1 file changed, 26 insertions(+) diff --git a/docs/devel/fuzzing.rst b/docs/devel/fuzzing.rst index 6096242d99..8792358854 100644 --- a/docs/devel/fuzzing.rst +++ b/docs/devel/fuzzing.rst @@ -181,6

[PATCH 3/3] fuzz: add virtio-9p configurations for fuzzing

2021-01-17 Thread Alexander Bulekov
virtio-9p devices are often used to expose a virtual-filesystem to the guest. There have been some bugs reported in this device, such as CVE-2018-19364, and CVE-2021-20181. We should fuzz this device This patch adds two virtio-9p configurations: * One with the widely used -fsdev local driver.

[PULL 01/12] hw/block: m25p80: Don't write to flash if write is disabled

2021-01-17 Thread Alistair Francis
From: Bin Meng When write is disabled, the write to flash should be avoided in flash_write8(). Fixes: 82a2499011a7 ("m25p80: Initial implementation of SPI flash device") Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Francisco Iglesias Message-id:

Re: [PATCH v2 2/2] hw/mips/loongson3_virt: Add TCG SMP support

2021-01-17 Thread Philippe Mathieu-Daudé
Hi Jiaxun, On 1/14/21 2:31 AM, Jiaxun Yang wrote: > loongson3_virt has KVM SMP support in kenrel. > This patch adds TCG SMP support by enable IPI controller > for machine. > > Note that TCG SMP can only support up to 4 CPUs as we > didn't implement multi-node support. > > Signed-off-by: Jiaxun

[RFC PATCH v2 02/20] hw/core/qdev: Add vmstate_qdev_no_state_to_migrate

2021-01-17 Thread Philippe Mathieu-Daudé
Add vmstate_qdev_no_state_to_migrate, which is simply a pointer to vmstate_no_state_to_migrate. This way all qdev devices (including "hw/qdev-core.h") don't have to include "migration/vmstate.h". Signed-off-by: Philippe Mathieu-Daudé --- Unresolved issues:

[RFC PATCH v2 00/20] hw: Mark the device with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
Since v1: - Tried to address Dave and Daniel comments - Added Peter R-b - Handle GPEX device This is a proof-of-concept after chatting with Peter Maydell on IRC last year. Introduce the vmstate_no_state_to_migrate structure, and a reference to it: vmstate_qdev_no_state_to_migrate. Use this

[RFC PATCH v2 15/20] hw/nubus/mac-nubus-bridge: Mark the device with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
This device doesn't have fields to migrate. Be explicit by using vmstate_qdev_no_state_to_migrate. Signed-off-by: Philippe Mathieu-Daudé --- hw/nubus/mac-nubus-bridge.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/nubus/mac-nubus-bridge.c b/hw/nubus/mac-nubus-bridge.c index

[RFC PATCH v2 20/20] migration/vmstate: Simplify vmstate for user-mode CPU

2021-01-17 Thread Philippe Mathieu-Daudé
User-mode wants an empty vmstate for the CPUs. We can use the generic vmstate_no_state_to_migrate object which is the same. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 2 +- include/migration/vmstate.h | 3 --- stubs/vmstate.c | 9 - 3 files

[RFC PATCH v2 18/20] hw/core/qdev: Display warning for devices missing migration state

2021-01-17 Thread Philippe Mathieu-Daudé
When built with --enable-qdev-debug, QEMU displays warnings listing devices missing migration state: $ qemu-system-arm -S -M spitz qemu-system-arm: warning: missing migration state for type: 'pxa270-c0-arm-cpu' qemu-system-arm: warning: missing migration state for type: 'serial'

[PATCH 1/2] docs/fuzz: fix pre-meson path

2021-01-17 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov --- docs/devel/fuzzing.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/devel/fuzzing.rst b/docs/devel/fuzzing.rst index 8792358854..b9bb07988b 100644 --- a/docs/devel/fuzzing.rst +++ b/docs/devel/fuzzing.rst @@ -119,7 +119,7 @@

[PATCH 2/2] fuzz: log the arguments used to initialize QEMU

2021-01-17 Thread Alexander Bulekov
This is useful for building reproducers. Instead checking the code or the QEMU_FUZZ_ARGS, the arguments are at the top of the crash log. Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/fuzz.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git

[PATCH 0/2] Small fuzzer-related changes

2021-01-17 Thread Alexander Bulekov
Fix outdated paths in documentation and log some useful information. Alexander Bulekov (2): docs/fuzz: fix pre-meson path fuzz: log the arguments used to initialize QEMU docs/devel/fuzzing.rst | 5 ++--- tests/qtest/fuzz/fuzz.c | 11 ++- 2 files changed, 12 insertions(+), 4

[Bug 1912065] Re: Segfaults in tcg/optimize.c:212 after commit 7c79721606be11b5bc556449e5bcbc331ef6867d

2021-01-17 Thread Richard Henderson
** Changed in: qemu Status: New => In Progress ** Changed in: qemu Assignee: (unassigned) => Richard Henderson (rth) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1912065 Title:

[PULL 09/12] target/riscv: Add CSR name in the CSR function table

2021-01-17 Thread Alistair Francis
From: Bin Meng In preparation to generate the CSR register list for GDB stub dynamically, let's add the CSR name in the CSR function table. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Message-id: 1610427124-49887-3-git-send-email-bmeng...@gmail.com Signed-off-by: Alistair Francis

[PULL 07/12] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2021-01-17 Thread Alistair Francis
From: Green Wan Fix code coverage issues by checking return value and handling fail case of blk_pread() and blk_pwrite(). Return default value 0xff if read fails. Fixes: Coverity CID 1435959 Fixes: Coverity CID 1435960 Fixes: Coverity CID 1435961 Signed-off-by: Green Wan Reviewed-by: Alistair

[PULL 12/12] riscv: Pass RISCVHartArrayState by pointer

2021-01-17 Thread Alistair Francis
We were accidently passing RISCVHartArrayState by value instead of pointer. The type is 824 bytes long so let's correct that and pass it by pointer instead. Fixes: Coverity CID 1438099 Fixes: Coverity CID 1438100 Fixes: Coverity CID 1438101 Signed-off-by: Alistair Francis Reviewed-by: Palmer

Re: [PATCH v2 2/2] hw/mips/loongson3_virt: Add TCG SMP support

2021-01-17 Thread Philippe Mathieu-Daudé
On 1/17/21 11:46 PM, Philippe Mathieu-Daudé wrote: > Hi Jiaxun, > > On 1/14/21 2:31 AM, Jiaxun Yang wrote: >> loongson3_virt has KVM SMP support in kenrel. >> This patch adds TCG SMP support by enable IPI controller >> for machine. >> >> Note that TCG SMP can only support up to 4 CPUs as we >>

[PATCH v2 3/3] fuzz: add virtio-9p configurations for fuzzing

2021-01-17 Thread Alexander Bulekov
virtio-9p devices are often used to expose a virtual-filesystem to the guest. There have been some bugs reported in this device, such as CVE-2018-19364, and CVE-2021-20181. We should fuzz this device This patch adds two virtio-9p configurations: * One with the widely used -fsdev local driver.

Re: [RFC PATCH v2 16/20] hw/sparc64/sun4u: Mark devices with no migratable fields

2021-01-17 Thread Artyom Tarasenko
вс, 17 янв. 2021 г., 20:26 Philippe Mathieu-Daudé : > These devices don't have fields to migrate. Be explicit > by using vmstate_qdev_no_state_to_migrate. > > Add a more descriptive comment to keep a clear separation > between static property vs runtime changeable. > Nice, thanks for this! >

[RFC PATCH v2 11/20] hw/intc/arm_gicv2m: Mark the device with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
This device doesn't have fields to migrate. Be explicit by using vmstate_qdev_no_state_to_migrate. Add a more descriptive comment to keep a clear separation between static property vs runtime changeable. Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/arm_gicv2m.c | 2 ++ 1 file changed, 2

[RFC PATCH v2 04/20] hw/arm/aspeed_soc: Mark the device with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
This device doesn't have fields to migrate. Be explicit by using vmstate_qdev_no_state_to_migrate. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/aspeed_soc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c index 7eefd54ac07..b503d32fef6 100644

[RFC PATCH v2 10/20] hw/usb/hcd-ohci: Mark the device with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
This device doesn't have fields to migrate. Be explicit by using vmstate_qdev_no_state_to_migrate. Add a more descriptive comment to keep a clear separation between static property vs runtime changeable. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-ohci.h | 2 ++ hw/usb/hcd-ohci.c | 1

[PULL 00/12] riscv-to-apply queue

2021-01-17 Thread Alistair Francis
-to-apply-20210117-3 for you to fetch changes up to a8259b53230782f5e0a0d66013655c4ed5d71b7e: riscv: Pass RISCVHartArrayState by pointer (2021-01-16 14:34:46 -0800) First RISC-V PR for 6.0 This PR: - Fixes some issues

[PULL 04/12] RISC-V: Place DTB at 3GB boundary instead of 4GB

2021-01-17 Thread Alistair Francis
From: Atish Patra Currently, we place the DTB at 2MB from 4GB or end of DRAM which ever is lesser. However, Linux kernel can address only 1GB of memory for RV32. Thus, it can not map anything beyond 3GB (assuming 2GB is the starting address). As a result, it can not process DT and panic if

[PULL 06/12] hw/riscv: sifive_u: Use SIFIVE_U_CPU for mc->default_cpu_type

2021-01-17 Thread Alistair Francis
From: Bin Meng SIFIVE_U_CPU is conditionally set to SIFIVE_U34 or SIFIVE_U54, hence there is no need to use #idef to set the mc->default_cpu_type. Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Message-id: 20210109143637.29645-1-bmeng...@gmail.com

[PATCH v2 0/3] fuzz: Add 9p generic-fuzz configs

2021-01-17 Thread Alexander Bulekov
Patch 1 enables generic-fuzzer configs to setup resources (such as temp directories) at runtime. Patch 2 adds some documentation about OSS-Fuzz (including the feature added in Patch 1) Patch 3 adds two virtio-9p generic-fuzz configs. Once of these configs leverages the capability added in Patch

[PATCH v2 2/3] docs/fuzz: add some information about OSS-Fuzz

2021-01-17 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov --- docs/devel/fuzzing.rst | 26 ++ 1 file changed, 26 insertions(+) diff --git a/docs/devel/fuzzing.rst b/docs/devel/fuzzing.rst index 6096242d99..8792358854 100644 --- a/docs/devel/fuzzing.rst +++ b/docs/devel/fuzzing.rst @@ -181,6

[PATCH v2 1/3] fuzz: enable dynamic args for generic-fuzz configs

2021-01-17 Thread Alexander Bulekov
For some device configurations, it is useful to configure some resources, and adjust QEMU arguments at runtime, prior to fuzzing. This patch adds an "argfunc" to generic the generic_fuzz_config. When specified, it is responsible for configuring the resources and returning a string containing the

Re: [PATCH] target/mips: fetch code with translator_ld

2021-01-17 Thread Jiaxun Yang
在 2021/1/17 上午2:13, Philippe Mathieu-Daudé 写道: Similarly to commits ae82adc8e29..7f93879e444, use the translator_ld*() API introduced in commit 409c1a0bf0f to fetch the code on the MIPS target. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Jiaxun Yang  --- target/mips/tlb_helper.c

[RFC PATCH v2 03/20] hw/arm/armv7m: Mark the device with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
The TYPE_BITBAND device doesn't have fields to migrate. Be explicit by using vmstate_qdev_no_state_to_migrate. Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- v2: Reworded (Peter) --- hw/arm/armv7m.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/armv7m.c

[RFC PATCH v2 13/20] hw/misc/iotkit-sysinfo: Mark the device with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
This device doesn't have fields to migrate. Be explicit by using vmstate_qdev_no_state_to_migrate. Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/iotkit-sysinfo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/iotkit-sysinfo.c b/hw/misc/iotkit-sysinfo.c index

[RFC PATCH v2 06/20] hw/arm/msf2-soc: Mark the device with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
This device doesn't have fields to migrate. Be explicit by using vmstate_qdev_no_state_to_migrate. Add a more descriptive comment to keep a clear separation between static property vs runtime changeable. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/msf2-soc.h | 11 ++-

[PATCH 0/3] fuzz: Add 9p generic-fuzz configs

2021-01-17 Thread Alexander Bulekov
Patch 1 enables generic-fuzzer configs to setup resources (such as temp directories) at runtime. Patch 2 adds some documentation about OSS-Fuzz (including the feature added in Patch 1) Patch 3 adds two virtio-9p generic-fuzz configs. Once of these configs leverages the capability added in Patch

[PATCH 1/3] fuzz: enable dynamic args for generic-fuzz configs

2021-01-17 Thread Alexander Bulekov
For some device configurations, it is useful to configure some resources, and adjust QEMU arguments at runtime, prior to fuzzing. This patch adds an "argfunc" to generic the generic_fuzz_config. When specified, it is responsible for configuring the resources and returning a string containing the

[PULL 02/12] hw/block: m25p80: Implement AAI-WP command support for SST flashes

2021-01-17 Thread Alistair Francis
From: Xuzhou Cheng Auto Address Increment (AAI) Word-Program is a special command of SST flashes. AAI-WP allows multiple bytes of data to be programmed without re-issuing the next sequential address location. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Reviewed-by: Francisco Iglesias

[PULL 03/12] gdb: riscv: Add target description

2021-01-17 Thread Alistair Francis
From: Sylvain Pelissier Target description is not currently implemented in RISC-V architecture. Thus GDB won't set it properly when attached. The patch implements the target description response. Signed-off-by: Sylvain Pelissier Reviewed-by: Bin Meng Reviewed-by: Alistair Francis

[PULL 05/12] target/riscv/pmp: Raise exception if no PMP entry is configured

2021-01-17 Thread Alistair Francis
From: Atish Patra As per the privilege specification, any access from S/U mode should fail if no pmp region is configured. Signed-off-by: Atish Patra Reviewed-by: Alistair Francis Message-id: 20201223192553.332508-1-atish.pa...@wdc.com Signed-off-by: Alistair Francis --- target/riscv/pmp.h

Re: [PATCH 1/4] tests/qtest: Remove TPM tests

2021-01-17 Thread Philippe Mathieu-Daudé
On 1/17/21 7:47 PM, Paolo Bonzini wrote: > On 15/01/21 16:09, Philippe Mathieu-Daudé wrote: >> |The TPM tests are failing, and no further tests are run, making the >> rest of the testsuite pointless:| > > Just use -k when running tests, it's a good idea in general. Yes, this used to be the

[RFC PATCH v2 12/20] hw/misc/armsse-cpuid: Mark the device with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
This device doesn't have fields to migrate. Be explicit by using vmstate_qdev_no_state_to_migrate. Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/armsse-cpuid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/armsse-cpuid.c b/hw/misc/armsse-cpuid.c index d58138dc28c..61251d538b9

[RFC PATCH v2 07/20] hw/core/split-irq: Mark the device with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
This device doesn't have fields to migrate. Be explicit by using vmstate_qdev_no_state_to_migrate. Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- hw/core/split-irq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/core/split-irq.c b/hw/core/split-irq.c index

[RFC PATCH v2 08/20] hw/cpu/a9mpcore: Mark the device with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
This device doesn't have fields to migrate. Be explicit by using vmstate_qdev_no_state_to_migrate. Add a more descriptive comment to keep a clear separation between static property vs runtime changeable. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/cpu/a9mpcore.h | 3 ++-

[RFC PATCH v2 05/20] hw/arm/bcm283x: Mark devices with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
These devices don't have fields to migrate. Be explicit by using vmstate_qdev_no_state_to_migrate. Add a more descriptive comment to keep a clear separation between static property vs runtime changeable. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/bcm2836.h | 5 +++--

[RFC PATCH v2 17/20] hw/pci-host/gpex: Mark device with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
TYPE_GPEX_HOST does not have internal state to migrate. Its only interesting state is in the GPEXRootState, which is a TYPE_GPEX_ROOT_DEVICE which migrates itself. Explicit there is nothing to migrate by using the special vmstate_qdev_no_state_to_migrate. Signed-off-by: Philippe Mathieu-Daudé

[RFC PATCH v2 09/20] hw/cpu/cluster: Mark the device with no migratable fields

2021-01-17 Thread Philippe Mathieu-Daudé
This device doesn't have fields to migrate. Be explicit by using vmstate_qdev_no_state_to_migrate. Signed-off-by: Philippe Mathieu-Daudé --- hw/cpu/cluster.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/cpu/cluster.c b/hw/cpu/cluster.c index e444b7c29d1..95653a643ad 100644 ---

[RFC PATCH v2 19/20] stubs/vmstate: Add VMSTATE_END_OF_LIST to vmstate_user_mode_cpu_dummy

2021-01-17 Thread Philippe Mathieu-Daudé
Add a name and end marker to the vmstate_user_mode_cpu_dummy variable. Reported-by: Dr. David Alan Gilbert Signed-off-by: Philippe Mathieu-Daudé --- stubs/vmstate.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stubs/vmstate.c b/stubs/vmstate.c index

[PULL 10/12] target/riscv: Generate the GDB XML file for CSR registers dynamically

2021-01-17 Thread Alistair Francis
From: Bin Meng At present QEMU RISC-V uses a hardcoded XML to report the feature "org.gnu.gdb.riscv.csr" [1]. There are two major issues with the approach being used currently: - The XML does not specify the "regnum" field of a CSR entry, hence consecutive numbers are used by the remote GDB

[PULL 11/12] target/riscv: Remove built-in GDB XML files for CSRs

2021-01-17 Thread Alistair Francis
From: Bin Meng Now that we have switched to generate the RISC-V CSR XML dynamically, remove the built-in hardcoded XML files. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Message-id: 20210116054123.5457-3-bmeng...@gmail.com Signed-off-by: Alistair Francis ---

[PULL 08/12] target/riscv: Make csr_ops[CSR_TABLE_SIZE] external

2021-01-17 Thread Alistair Francis
From: Bin Meng In preparation to generate the CSR register list for GDB stub dynamically, change csr_ops[] to non-static so that it can be referenced externally. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Message-id: 1610427124-49887-2-git-send-email-bmeng...@gmail.com

[PATCH V4 0/4] bsd-user: Fix some code style problems

2021-01-17 Thread shiliyang
This patch series fixes error style problems found by checkpatch.pl. V3->V4: Fix code style problems with branch bsd-user-rebase-3.1. V2->V3: Make the patch into a series. V1->V2: Add cover letter message. Fix some style error in patch file before. Liyang Shi (4): bsd-user: "foo * bar"

Re: [PATCH v1 7/7] spapr.c: consider CPU core online state before allowing unplug

2021-01-17 Thread David Gibson
On Fri, Jan 15, 2021 at 06:22:16PM +0100, Greg Kurz wrote: > On Thu, 14 Jan 2021 15:06:28 -0300 > Daniel Henrique Barboza wrote: > > > The only restriction we have when unplugging CPUs is to forbid unplug of > > the boot cpu core. spapr_core_unplug_possible() does not contemplate the > > I

Re: [PATCH V4 3/4] bsd-user: do not use C99 // comments

2021-01-17 Thread Warner Losh
Same: please submit this via http://github.com/qemu-bsd-user... Warner On Sun, Jan 17, 2021, 7:20 PM shiliyang wrote: > This patch fixes error messages found by checkpatch.pl: > ERROR: do not use C99 // comments > > Signed-off-by: Liyang Shi > --- > bsd-user/elfload.c | 4 ++-- > 1 file

Re: [RFC PATCH v3 5/6] virtio-net: Added eBPF RSS to virtio-net.

2021-01-17 Thread Jason Wang
On 2021/1/17 下午5:04, Yuri Benditovich wrote: On Fri, Jan 15, 2021 at 9:20 AM Jason Wang wrote: On 2021/1/15 上午5:16, Andrew Melnychenko wrote: From: Andrew When RSS is enabled the device tries to load the eBPF program to select RX virtqueue in the TUN. If eBPF can be loaded the RSS will

Re: [PATCH 4/6] hw/block/nvme: zero out zones on reset

2021-01-17 Thread Dmitry Fomichev
On Mon, 2021-01-11 at 13:32 +0100, Klaus Jensen wrote: > From: Klaus Jensen > > The zoned command set specification states that "All logical blocks in a > zone *shall* be marked as deallocated when [the zone is reset]". Since > the device guarantees 0x00 to be read from deallocated blocks we

[Bug 1565395] Re: qemu-2.4.1 fails when compiled against pulseaudio

2021-01-17 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1565395 Title: qemu-2.4.1

[Bug 1608802] Re: READ_DMA (0xC8) command does not work correctly

2021-01-17 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1608802 Title: READ_DMA

[Bug 1243968] Re: VMware ESXi on QEmu Kernel Panic

2021-01-17 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1243968 Title: VMware

Re: [PATCH V4 4/4] bsd-user: space required after semicolon

2021-01-17 Thread Warner Losh
Can you submit this to our current fork at http://github.com/qemu-bsd-user on the rebase-3.1 branch? Having churn like this upstream just slows us down since we have extensive changes and these will conflict. Warner On Sun, Jan 17, 2021, 7:21 PM shiliyang wrote: > This patch fixes error style

[PATCH v3 3/5] contrib: Add spaces around operator

2021-01-17 Thread zhouyang
I am reading contrib related code and found some style problems while check the code using checkpatch.pl. This commit fixs the issue below: ERROR: spaces required around that '*' Signed-off-by: zhouyang --- contrib/ivshmem-server/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v3 0/5] Fix some style problems in contrib

2021-01-17 Thread zhouyang
v3 -> v2 add Cc zhouyang (5): contrib: Don't use '#' flag of printf format contrib: Fix some code style problems, ERROR: "foo * bar" should be "foo *bar" contrib: Add spaces around operator contrib: space required after that ',' contrib: Open brace '{' following struct go on the

[PATCH v3 4/5] contrib: space required after that ','

2021-01-17 Thread zhouyang
I am reading contrib related code and found some style problems while check the code using checkpatch.pl. This commit fixs the issue below: ERROR: space required after that ',' Signed-off-by: zhouyang --- contrib/plugins/howvec.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH V4 4/4] bsd-user: space required after semicolon

2021-01-17 Thread shiliyang
This patch fixes error style problems found by checkpatch.pl: ERROR: space required after that ',' Signed-off-by: Liyang Shi --- bsd-user/elfload.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index 2842dfe56b..c89c998c22

Re: [PATCH v1 7/7] spapr.c: consider CPU core online state before allowing unplug

2021-01-17 Thread David Gibson
On Fri, Jan 15, 2021 at 03:52:56PM -0300, Daniel Henrique Barboza wrote: > > > On 1/15/21 2:22 PM, Greg Kurz wrote: > > On Thu, 14 Jan 2021 15:06:28 -0300 > > Daniel Henrique Barboza wrote: > > > > > The only restriction we have when unplugging CPUs is to forbid unplug of > > > the boot cpu

Re: [PATCH V4 0/4] bsd-user: Fix some code style problems

2021-01-17 Thread Warner Losh
Please submit these via http://github.com/qemu-bsd-user/ On Sun, Jan 17, 2021, 7:17 PM shiliyang wrote: > This patch series fixes error style problems found by checkpatch.pl. > > V3->V4: > Fix code style problems with branch bsd-user-rebase-3.1. > > V2->V3: > Make the patch into a series. > >

Re: [PATCH v7 03/13] sev: Remove false abstraction of flash encryption

2021-01-17 Thread David Gibson
On Fri, Jan 15, 2021 at 01:54:25PM +0100, Cornelia Huck wrote: > On Thu, 14 Jan 2021 10:58:01 +1100 > David Gibson wrote: > > > When AMD's SEV memory encryption is in use, flash memory banks (which are > > initialed by pc_system_flash_map()) need to be encrypted with the guest's > > key, so that

Re: [RFC PATCH v0 1/1] target/ppc: Support for H_RPT_INVALIDATE hcall

2021-01-17 Thread David Gibson
On Fri, Jan 15, 2021 at 02:01:28PM +0530, Bharata B Rao wrote: > On Wed, Jan 13, 2021 at 05:22:56PM +0100, Greg Kurz wrote: > > Hi Bharata, > > > > On Wed, 6 Jan 2021 14:29:10 +0530 > > Bharata B Rao wrote: > > > > > If KVM_CAP_RPT_INVALIDATE KVM capability is enabled, then > > > > > > -

[PATCH v3 2/5] contrib: Fix some code style problems, ERROR: "foo * bar" should be "foo *bar"

2021-01-17 Thread zhouyang
I am reading contrib related code and found some style problems while check the code using checkpatch.pl. This commit fixs the issue below: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: zhouyang --- contrib/plugins/howvec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v3 5/5] contrib: Open brace '{' following struct go on the same line

2021-01-17 Thread zhouyang
I found some style problems whil check the code using checkpatch.pl. This commit fixs the issue below: ERROR: that open brace { should be on the previous line Signed-off-by: zhouyang --- contrib/plugins/howvec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH] hw/block/nvme: Correct error status for unaligned ZA

2021-01-17 Thread Dmitry Fomichev
TP 4053 says (in section 2.3.1.1) - ... if a Zone Append command specifies a ZSLBA that is not the lowest logical block address in that zone, then the controller shall abort that command with a status code of Invalid Field In Command. In the code, Zone Invalid Write is returned instead, fix this.

[PATCH v3 2/2] hw/mips/loongson3_virt: Add TCG SMP support

2021-01-17 Thread Jiaxun Yang
loongson3_virt has KVM SMP support in kenrel. This patch adds TCG SMP support by enable IPI controller for machine. Also add definition about IRQs to enhance readability. Note that TCG SMP can only support up to 4 CPUs as we didn't implement multi-node support. Signed-off-by: Jiaxun Yang ---

[PATCH v3 0/2] loongson3_virt TCG SMP support

2021-01-17 Thread Jiaxun Yang
v2: - Use enum instead of define (f4bug) - Comment about num mbox (f4bug) - Use trace instead of log (f4bug) - Correct register size (f4bug) v3: - Add more definitions (f4bug) Jiaxun Yang (2): hw/intc: Add Loongson Inter Processor Interrupt controller hw/mips/loongson3_virt: Add TCG SMP

Re: [PATCH v3 1/2] hw/intc: Add Loongson Inter Processor Interrupt controller

2021-01-17 Thread Huacai Chen
Hi, Jiaxun, On Mon, Jan 18, 2021 at 9:17 AM Jiaxun Yang wrote: > > Loongson IPI controller is a MMIO based simple level triggered > interrupt controller. It will trigger IRQ to it's upstream > processor when set register is written. > > It also has 4 64bit mailboxes to pass boot information to >

[PATCH V4 1/4] bsd-user: "foo * bar" should be "foo *bar"

2021-01-17 Thread shiliyang
This patch fixes error style problems found by checkpatch.pl: ERROR: "foo ** bar" should be "foo **bar". ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Liyang Shi --- bsd-user/bsdload.c | 4 ++-- bsd-user/elfload.c | 16 2 files changed, 10 insertions(+), 10

[PATCH V4 3/4] bsd-user: do not use C99 // comments

2021-01-17 Thread shiliyang
This patch fixes error messages found by checkpatch.pl: ERROR: do not use C99 // comments Signed-off-by: Liyang Shi --- bsd-user/elfload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index d5cab25607..2842dfe56b 100644 ---

Re: [PATCH 0/1] net: Fix handling of id in netdev_add and netdev_del

2021-01-17 Thread Jason Wang
On 2021/1/15 下午9:56, Markus Armbruster wrote: Jason Wang writes: On 2020/11/25 下午6:02, Markus Armbruster wrote: This is a regression fix, but the regression is already in 5.0. I think it's too late for 5.2. If I'm right, then the issue should be documented in the release notes (I can do

Re: [PATCH v7 08/13] confidential guest support: Move SEV initialization into arch specific code

2021-01-17 Thread David Gibson
On Fri, Jan 15, 2021 at 02:24:25PM +0100, Cornelia Huck wrote: > On Thu, 14 Jan 2021 10:58:06 +1100 > David Gibson wrote: > > > While we've abstracted some (potential) differences between mechanisms for > > securing guest memory, the initialization is still specific to SEV. Given > > that, move

Re: [PATCH 0/6] hw/block/nvme: zoned misc fixes

2021-01-17 Thread Klaus Jensen
On Jan 18 03:35, Dmitry Fomichev wrote: > On Mon, 2021-01-11 at 13:32 +0100, Klaus Jensen wrote: > > From: Klaus Jensen > > Klaus, > > This series looks good to me. I've made a comment in "zero out zones on reset" > patch, but it is only cosmetic in nature. I am going to send a patch > with

[PATCH v3 1/2] hw/intc: Add Loongson Inter Processor Interrupt controller

2021-01-17 Thread Jiaxun Yang
Loongson IPI controller is a MMIO based simple level triggered interrupt controller. It will trigger IRQ to it's upstream processor when set register is written. It also has 4 64bit mailboxes to pass boot information to secondary processor. Signed-off-by: Jiaxun Yang ---

[PATCH] docs: fix the annotations error of struct X86CPUClass

2021-01-17 Thread huangy81
From: Hyman change the 'cpu_def' to 'model' in struct X86CPUClass Signed-off-by: Hyman --- target/i386/cpu-qom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu-qom.h b/target/i386/cpu-qom.h index f9923ce..ab33370 100644 --- a/target/i386/cpu-qom.h +++

Re: [PATCH v3 2/2] hw/mips/loongson3_virt: Add TCG SMP support

2021-01-17 Thread Huacai Chen
Hi, Jiaxun, On Mon, Jan 18, 2021 at 9:17 AM Jiaxun Yang wrote: > > loongson3_virt has KVM SMP support in kenrel. s/kenrel/kernel/g Huacai > This patch adds TCG SMP support by enable IPI controller > for machine. > > Also add definition about IRQs to enhance readability. > > Note that TCG SMP

[PATCH V4 2/4] bsd-user: suspect code indent for conditional statements

2021-01-17 Thread shiliyang
This patch fixes error style problems found by checkpatch.pl: ERROR: suspect code indent for conditional statements Signed-off-by: Liyang Shi --- bsd-user/elfload.c | 2 +- bsd-user/mmap.c| 25 + 2 files changed, 14 insertions(+), 13 deletions(-) diff --git

[PATCH v3 1/5] contrib: Don't use '#' flag of printf format

2021-01-17 Thread zhouyang
I am reading contrib related code and found some style problems while check the code using checkpatch.pl. This commit fixs the misuse of '#' flag of printf format Signed-off-by: zhouyang --- contrib/plugins/hotblocks.c | 2 +- contrib/plugins/hotpages.c | 2 +- contrib/plugins/howvec.c| 2

Re: [PATCH 0/6] hw/block/nvme: zoned misc fixes

2021-01-17 Thread Dmitry Fomichev
On Mon, 2021-01-11 at 13:32 +0100, Klaus Jensen wrote: > From: Klaus Jensen Klaus, This series looks good to me. I've made a comment in "zero out zones on reset" patch, but it is only cosmetic in nature. I am going to send a patch with another small fix in ZNS code. Best regards, Dmitry

[Bug 1903470] Re: qemu 5.1.0: Add UNIX socket support for netdev socket

2021-01-17 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1903470 Title: qemu

[Bug 1837651] Re: -netdev socket uses 100% cpu on Windows host

2021-01-17 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1837651 Title: -netdev

Re: [PATCH] hw/block/nvme: Correct error status for unaligned ZA

2021-01-17 Thread Klaus Jensen
On Jan 18 12:39, Dmitry Fomichev wrote: > TP 4053 says (in section 2.3.1.1) - > ... if a Zone Append command specifies a ZSLBA that is not the lowest > logical block address in that zone, then the controller shall abort > that command with a status code of Invalid Field In Command. > > In the

[PATCH v2 2/9] libvhost-user: Include poll.h instead of sys/poll.h

2021-01-17 Thread Jiaxun Yang
Musl libc complains about it's wrong usage. In file included from ../subprojects/libvhost-user/libvhost-user.h:20, from ../subprojects/libvhost-user/libvhost-user-glib.h:19, from ../subprojects/libvhost-user/libvhost-user-glib.c:15: /usr/include/sys/poll.h:1:2:

[PATCH v2 6/9] tests: Rename PAGE_SIZE definitions

2021-01-17 Thread Jiaxun Yang
As per POSIX specification of limits.h [1], OS libc may define PAGE_SIZE in limits.h. Self defined PAGE_SIZE is frequently used in tests, to prevent collosion of definition, we give PAGE_SIZE definitons reasonable prefixs. [1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html

[PATCH v2 5/9] elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE

2021-01-17 Thread Jiaxun Yang
As per POSIX specification of limits.h [1], OS libc may define PAGE_SIZE in limits.h. To prevent collosion of definition, we rename PAGE_SIZE here. [1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html Signed-off-by: Jiaxun Yang Reviewed-by: Thomas Huth ---

[PATCH v2 1/9] configure: Add sys/timex.h to probe clock_adjtime

2021-01-17 Thread Jiaxun Yang
It is not a part of standard time.h. Glibc put it under time.h however musl treat it as a sys timex extension. Signed-off-by: Jiaxun Yang Reviewed-by: Thomas Huth --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 155dda124c..1a9e1afa39 100755 ---

[PATCH v2 4/9] hw/block/nand: Rename PAGE_SIZE to NAND_PAGE_SIZE

2021-01-17 Thread Jiaxun Yang
As per POSIX specification of limits.h [1], OS libc may define PAGE_SIZE in limits.h. To prevent collosion of definition, we rename PAGE_SIZE here. [1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html Signed-off-by: Jiaxun Yang Reviewed-by: Thomas Huth --- hw/block/nand.c |

[PATCH] npcm7xx_adc-test: Fix memleak in adc_qom_set

2021-01-17 Thread Gan Qixin
The adc_qom_set function didn't free "response", which caused an indirect memory leak. So use qobject_unref() to fix it. ASAN shows memory leak stack: Indirect leak of 593280 byte(s) in 144 object(s) allocated from: #0 0x7f9a5e7e8d4e in __interceptor_calloc (/lib64/libasan.so.5+0x112d4e)

Re: [PATCH 00/18] hw: Mark the device with no migratable fields

2021-01-17 Thread Laurent Vivier
Le 14/01/2021 à 16:49, Philippe Mathieu-Daudé a écrit : > On 7/9/20 9:19 PM, Peter Maydell wrote: >> On Fri, 3 Jul 2020 at 21:19, Philippe Mathieu-Daudé wrote: >>> >>> This is a proof-of-concept after chatting with Peter Maydell >>> on IRC earlier. >>> >>> Introduce the

[PATCH v2 0/9] Alpine Linux build fix and CI pipeline

2021-01-17 Thread Jiaxun Yang
Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox. It it popular among Docker guests and embedded applications. Adding it to test against different libc. Patches pending review at v2 are: 7, 8, 9 Tree avilable at:

[PATCH v2 3/9] osdep.h: Remove include

2021-01-17 Thread Jiaxun Yang
From: Michael Forney Prior to 2a4b472c3c, sys/signal.h was only included on OpenBSD (apart from two .c files). The POSIX standard location for this header is just and in fact, OpenBSD's signal.h includes sys/signal.h itself. Unconditionally including on musl causes warnings for just about

[PATCH v2 9/9] gitlab-ci: Add alpine to pipeline

2021-01-17 Thread Jiaxun Yang
We only run build test and check-acceptance as their are too many failures in checks due to minor string mismatch. Signed-off-by: Jiaxun Yang --- .gitlab-ci.d/containers.yml | 5 + .gitlab-ci.yml | 23 +++ 2 files changed, 28 insertions(+) diff --git

[PATCH v2 8/9] tests/docker: Add dockerfile for Alpine Linux

2021-01-17 Thread Jiaxun Yang
Alpine Linux[1] is a security-oriented, lightweight Linux distribution based on musl libc and busybox. It it popular among Docker guests and embedded applications. Adding it to test against different libc. [1]: https://alpinelinux.org/ Signed-off-by: Jiaxun Yang ---

Re: [PATCH v2 0/9] Alpine Linux build fix and CI pipeline

2021-01-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210118063808.12471-1-jiaxun.y...@flygoat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210118063808.12471-1-jiaxun.y...@flygoat.com Subject: [PATCH v2 0/9] Alpine Linux

  1   2   >