[PATCH v3] virtio-balloon: optimize the virtio-balloon on the ARM platform

2023-03-08 Thread Yangming via
Optimize the virtio-balloon feature on the ARM platform by adding a variable to keep track of the current hot-plugged pc-dimm size, instead of traversing the virtual machine's memory modules to count the current RAM size during the balloon inflation or deflation process. This variable can be

Re: [PATCH] target/riscv/csr.c: fix H extension TVM trap

2023-03-08 Thread liweiwei
On 2023/3/8 20:34, chenyi2...@zju.edu.cn wrote: From: Yi Chen Trap accesses to hgatp if MSTATUS_TVM is enabled. Don't trap accesses to vsatp even if MSTATUS_TVM is enabled. Signed-off-by: Yi Chen --- target/riscv/csr.c | 18 ++ 1 file changed, 14 insertions(+), 4

Re: [PATCH for-8.1 17/17] target/riscv: rework write_misa()

2023-03-08 Thread LIU Zhiwei
On 2023/3/9 15:27, LIU Zhiwei wrote: On 2023/3/9 4:19, Daniel Henrique Barboza wrote: write_misa() must use as much common logic as possible, only specifying the bits that are exclusive to the CSR write operation and TCG internals. Rewrite write_misa() to work as follows: - supress RVC

Re: [PATCH] use qatzip to acclerate the live migration

2023-03-08 Thread Philippe Mathieu-Daudé
Hi Dennis, Thank for this patch. On 8/3/23 01:59, dennis.wu wrote: qatzip https://github.com/intel/QATzip is a project that supply the zlib like api with the Intel QAT hardware. compress and decompress performance with small data block (4kb page) is low with qatzip API. so we compose multiple

Re: [PATCH for-8.1 04/17] target/riscv: add PRIV_VERSION_LATEST macro

2023-03-08 Thread LIU Zhiwei
On 2023/3/9 4:19, Daniel Henrique Barboza wrote: PRIV_VERSION_LATEST, at this moment assigned to PRIV_VERSION_1_12_0, is used in all generic CPUs: - riscv_any_cpu_init() - rv32_base_cpu_init() - rv64_base_cpu_init() - rv128_base_cpu_init() When a new PRIV version is made available we can

Re: [PATCH for-8.1 03/17] target/riscv/cpu.c: remove set_priv_version()

2023-03-08 Thread LIU Zhiwei
On 2023/3/9 4:19, Daniel Henrique Barboza wrote: The setter is doing nothing special. Just set env->priv_ver directly. IMHO, No better than the older implementation. Zhiwei Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 30 +- 1 file

Re: [PATCH for-8.1 02/17] target/riscv/cpu.c: remove set_vext_version()

2023-03-08 Thread LIU Zhiwei
On 2023/3/9 4:19, Daniel Henrique Barboza wrote: This setter is doing nothing else but setting env->vext_ver. Assign the value directly. IMHO, No better than the older implementation. Zhiwei Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 7 +-- 1 file changed, 1

Re: [PATCH for-8.1 17/17] target/riscv: rework write_misa()

2023-03-08 Thread LIU Zhiwei
On 2023/3/9 4:19, Daniel Henrique Barboza wrote: write_misa() must use as much common logic as possible, only specifying the bits that are exclusive to the CSR write operation and TCG internals. Rewrite write_misa() to work as follows: - supress RVC right after verifying that we're not

[PATCH 0/4] target/riscv: Some CPURISCVState related cleanup and simplification

2023-03-08 Thread Weiwei Li
The patchset tries to: - Use riscv_cpu_cfg(env) instead of env_archcpu().cfg. - Use env_archcpu() to get RISCVCPU pointer from env directly - Use CPURISCVState as argument directly in riscv_cpu_update_mip and riscv_timer_write_timecmp to simplify type conversion - Remove RISCVCPU argument of

[PATCH 4/4] target/riscv: Simplify arguments for riscv_csrrw_check

2023-03-08 Thread Weiwei Li
Remove RISCVCPU argument, and get cfg infomation from CPURISCVState directly. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/csr.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index

[PATCH 1/4] target/riscv: Avoid env_archcpu() when reading RISCVCPUConfig

2023-03-08 Thread Weiwei Li
Use riscv_cpu_cfg(env) instead of env_archcpu().cfg. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_helper.c | 9 - target/riscv/csr.c| 40 --- target/riscv/gdbstub.c| 4 ++-- 3 files changed, 18

[PATCH 2/4] target/riscv: Simplify getting RISCVCPU pointer from env

2023-03-08 Thread Weiwei Li
Use env_archcpu() to get RISCVCPU pointer from env directly. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/pmu.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/riscv/pmu.c b/target/riscv/pmu.c index b8e56d2b7b..a200741083 100644 ---

[PATCH 3/4] target/riscv: Simplify type conversion for CPURISCVState

2023-03-08 Thread Weiwei Li
Use CPURISCVState as argument directly in riscv_cpu_update_mip and riscv_timer_write_timecmp, since type converts from CPURISCVState to RISCVCPU in many caller of them and then back to CPURISCVState in them. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu.c |

Re: [PATCH for-8.1 14/17] target/riscv/cpu.c: do not allow RVE to be set

2023-03-08 Thread LIU Zhiwei
On 2023/3/9 4:19, Daniel Henrique Barboza wrote: This restriction is found at the current implementation of write_misa() in csr.c. Add it in riscv_cpu_validate_set_extensions() as well, while also removing the checks we're doing considering that I or E can be enabled. Signed-off-by: Daniel

Re: [PATCH] block: add missing coroutine_fn to bdrv_sum_allocated_file_size()

2023-03-08 Thread Philippe Mathieu-Daudé
On 8/3/23 22:14, Stefan Hajnoczi wrote: Not a coroutine_fn, you say? static int64_t bdrv_sum_allocated_file_size(BlockDriverState *bs) { BdrvChild *child; int64_t child_size, sum = 0; QLIST_FOREACH(child, >children, next) { if (child->role &

Re: [qemu-web PATCH] Add a blog post about the upcoming KVM Forum 2023

2023-03-08 Thread Cédric Le Goater
Hello Thomas, one typo below, On 3/8/23 15:12, Thomas Huth wrote: Based on the announcement e-mail that Paolo sent to the qemu-devel mailing list two days ago - let's spread the word via the blog, too! Signed-off-by: Thomas Huth --- _posts/2023-03-08-kvm-forum-cfp.md | 62

Re: [qemu-web PATCH] Add a blog post about the upcoming KVM Forum 2023

2023-03-08 Thread Paolo Bonzini
Reviewed-by: Paolo Bonzini Il mer 8 mar 2023, 15:12 Thomas Huth ha scritto: > Based on the announcement e-mail that Paolo sent to the qemu-devel > mailing list two days ago - let's spread the word via the blog, too! > > Signed-off-by: Thomas Huth > --- > _posts/2023-03-08-kvm-forum-cfp.md |

Reply: [PATCH v2] virtio-balloon: optimize the virtio-balloon on the ARM platform

2023-03-08 Thread Yangming via
> On 08.03.23 01:42, Michael S. Tsirkin wrote: > > On Wed, Mar 01, 2023 at 06:38:13AM +, Yangming wrote: > >> Optimize the virtio-balloon feature on the ARM platform by adding a > >> variable to keep track of the current hot-plugged pc-dimm size, > >> instead of traversing the virtual

Re: [PATCH v7 03/10] target/riscv: allow MISA writes as experimental

2023-03-08 Thread LIU Zhiwei
On 2023/2/23 2:51, Daniel Henrique Barboza wrote: At this moment, and apparently since ever, we have no way of enabling RISCV_FEATURE_MISA. This means that all the code from write_misa(), all the nuts and bolts that handles how to properly write this CSR, has always been a no-op as well

Re: [PATCH 2/2] target/riscv: Make the "virt" register writable by GDB

2023-03-08 Thread LIU Zhiwei
On 2023/3/9 11:05, Jim Shu wrote: On Mon, Mar 6, 2023 at 7:26 PM LIU Zhiwei wrote: On 2023/3/5 17:42, Jim Shu wrote: This patch also enables debugger to set current privilege mode to VU/VS-mode. Extend previous commit 81d2929c41d32af138f3562f5a7b309f6eac7ca7 to support H-extension.

Re: [PATCH 2/2] target/riscv: Make the "virt" register writable by GDB

2023-03-08 Thread Jim Shu
On Mon, Mar 6, 2023 at 7:26 PM LIU Zhiwei wrote: > > > On 2023/3/5 17:42, Jim Shu wrote: > > This patch also enables debugger to set current privilege mode to > > VU/VS-mode. > > > > Extend previous commit 81d2929c41d32af138f3562f5a7b309f6eac7ca7 to > > support H-extension. > > > > Signed-off-by:

Re: [PULL 00/51] Net patches

2023-03-08 Thread Jason Wang
On Wed, Mar 8, 2023 at 8:25 PM Michael S. Tsirkin wrote: > > On Wed, Mar 08, 2023 at 01:21:52PM +0100, Philippe Mathieu-Daudé wrote: > > On 8/3/23 13:17, Michael S. Tsirkin wrote: > > > On Wed, Mar 08, 2023 at 08:40:42AM +0100, Philippe Mathieu-Daudé wrote: > > > > On 8/3/23 07:56, Jason Wang

Re: [PATCH] hw/intc/ioapic: Update KVM routes before redelivering IRQ, on RTE update

2023-03-08 Thread Peter Xu
On Mon, Mar 06, 2023 at 05:28:24PM +, David Woodhouse wrote: > Indeed, I don't think we care about the in-kernel I/OAPIC. I don't > think we care about the kernel knowing about e.g. "GSI #11" at all. We > can just deliver it as MSI (for the I/OAPIC) or using KVM_INTERRUPT and > the interrupt

Re: [PATCH for-8.1 05/17] target/riscv/cpu.c: add riscv_cpu_validate_priv_spec()

2023-03-08 Thread Richard Henderson
On 3/8/23 12:19, Daniel Henrique Barboza wrote: +static void riscv_cpu_validate_priv_spec(RISCVCPU *cpu, Error **errp) +{ +CPURISCVState *env = >env; +int i, priv_version = -1; + +if (cpu->cfg.priv_spec) { +if (!g_strcmp0(cpu->cfg.priv_spec, "v1.12.0")) { +

Re: [PATCH for-8.1 04/17] target/riscv: add PRIV_VERSION_LATEST macro

2023-03-08 Thread Richard Henderson
On 3/8/23 12:19, Daniel Henrique Barboza wrote: PRIV_VERSION_1_11_0, PRIV_VERSION_1_12_0, }; +#define PRIV_VERSION_LATEST PRIV_VERSION_1_12_0 Any reason not to make this a enumeration value: PRIV_VERSION_LATEST = PRIV_VERSION_1_12_0 ? r~

[PATCH v4 3/3] qga: test: Add tests for `all-merge` flag

2023-03-08 Thread Daniel Xu
This commit adds a test to ensure `all-merge` functions as expected. We also add a negative test to ensure we haven't regressed previous functionality. Signed-off-by: Daniel Xu --- tests/unit/test-qga.c | 158 +- 1 file changed, 141 insertions(+), 17

[PATCH v4 1/3] qga: Refactor guest-exec capture-output to take enum

2023-03-08 Thread Daniel Xu
Previously capture-output was an optional boolean flag that either captured all output or captured none. While this is OK in most cases, it lacks flexibility for more advanced capture cases, such as wanting to only capture stdout. This commits refactors guest-exec qapi to take an enum for capture

[PATCH v4 2/3] qga: Add `all-merge` variant to GuestExecCaptureOutputMode

2023-03-08 Thread Daniel Xu
Currently, any captured output (via `capture-output`) is segregated into separate GuestExecStatus fields (`out-data` and `err-data`). This means that downstream consumers have no way to reassemble the captured data back into the original stream. This is relevant for chatty and semi-interactive

[PATCH v4 0/3] qga: Support merging output streams in guest-exec

2023-03-08 Thread Daniel Xu
Currently, the captured output (via `capture-output`) is segregated into separate GuestExecStatus fields (`out-data` and `err-data`). This means that downstream consumers have no way to reassemble the captured data back into the original stream. This is relevant for chatty and semi-interactive

Re: [PATCH v2 2/2] tests/tcg/s390x: Add C(G)HRL test

2023-03-08 Thread Richard Henderson
On 3/8/23 13:02, Nina Schoetterl-Glausch wrote: Test COMPARE HALFWORD RELATIVE LONG instructions. Test that the bytes following the second operand do not affect the instruction. Test the sign extension performed on the second operand. Signed-off-by: Nina Schoetterl-Glausch --- Reviewed-by:

Re: [PATCH v2 1/2] target/s390x: Fix emulation of C(G)HRL

2023-03-08 Thread Richard Henderson
On 3/8/23 13:02, Nina Schoetterl-Glausch wrote: The second operand of COMPARE HALFWORD RELATIVE LONG is a signed halfword, it does not have the same size as the first operand. Fixes: a7e836d5eb ("target-s390: Convert COMPARE, COMPARE LOGICAL") Signed-off-by: Nina Schoetterl-Glausch ---

Re: [PATCH v2] block: add missing coroutine_fn to bdrv_sum_allocated_file_size()

2023-03-08 Thread Stefan Hajnoczi
v2 is the same as v1. I sent it by accident, sorry :). Stefan On Wed, 8 Mar 2023 at 17:18, Stefan Hajnoczi wrote: > > Not a coroutine_fn, you say? > > static int64_t bdrv_sum_allocated_file_size(BlockDriverState *bs) > { > BdrvChild *child; > int64_t child_size, sum = 0; > >

[PATCH v2] block: add missing coroutine_fn to bdrv_sum_allocated_file_size()

2023-03-08 Thread Stefan Hajnoczi
Not a coroutine_fn, you say? static int64_t bdrv_sum_allocated_file_size(BlockDriverState *bs) { BdrvChild *child; int64_t child_size, sum = 0; QLIST_FOREACH(child, >children, next) { if (child->role & (BDRV_CHILD_DATA | BDRV_CHILD_METADATA |

Emulating a SH2 board?

2023-03-08 Thread Diki Dera
I am looking to emulate a SH2 board, specifically SH7055. I see that there is already an implementation for SH4, although in places, incomplete from the comment I saw. Especially interrupts. Compared to SH4, SH2 is simpler in that it has no MMU, so address 0x1000 is exactly that. And since SH4 is

Re: [PATCH v7] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-03-08 Thread Volker Rümelin
Am 08.03.23 um 11:39 schrieb Marc-André Lureau: Volker, Wim, it would be nice if you could review/comment too! thanks Hi, last weekend I replaced pulseaudio with pipewire on my host computer and tested the QEMU pipewire backend. It doesn't work well on my computer, but with a few changes

[PATCH] block: add missing coroutine_fn to bdrv_sum_allocated_file_size()

2023-03-08 Thread Stefan Hajnoczi
Not a coroutine_fn, you say? static int64_t bdrv_sum_allocated_file_size(BlockDriverState *bs) { BdrvChild *child; int64_t child_size, sum = 0; QLIST_FOREACH(child, >children, next) { if (child->role & (BDRV_CHILD_DATA | BDRV_CHILD_METADATA |

[PATCH v2 1/2] target/s390x: Fix emulation of C(G)HRL

2023-03-08 Thread Nina Schoetterl-Glausch
The second operand of COMPARE HALFWORD RELATIVE LONG is a signed halfword, it does not have the same size as the first operand. Fixes: a7e836d5eb ("target-s390: Convert COMPARE, COMPARE LOGICAL") Signed-off-by: Nina Schoetterl-Glausch --- target/s390x/tcg/insn-data.h.inc | 4 ++--

[PATCH v2 2/2] tests/tcg/s390x: Add C(G)HRL test

2023-03-08 Thread Nina Schoetterl-Glausch
Test COMPARE HALFWORD RELATIVE LONG instructions. Test that the bytes following the second operand do not affect the instruction. Test the sign extension performed on the second operand. Signed-off-by: Nina Schoetterl-Glausch --- I don't know what the coding style is for inline asm.

[PATCH v2 0/2] target/s390x: Fix emulation of C(G)HRL

2023-03-08 Thread Nina Schoetterl-Glausch
The second operand of COMPARE HALFWORD RELATIVE LONG is a signed halfword, it does not have the same size as the first operand. Fix this and add a tcg test for c(g)hrl. Nina Schoetterl-Glausch (2): target/s390x: Fix emulation of C(G)HRL tests/tcg/s390x: Add C(G)HRL test

Re: [RFC PATCH v1 00/12] *** Add allwinner R40 device support ***

2023-03-08 Thread Niek Linnenbank
Hello Qianfan Zhao, Thanks for contributing this work to Qemu! With your contribution, we would get yet another Allwinner SoC supported, making it three in total (A10/H3/R40). That's great. My thoughts are that maybe we should try to re-use commonality between these SoCs where we can. Ofcourse,

[PATCH for-8.1 13/17] target/riscv/cpu.c: split riscv_cpu_validate_priv_spec()

2023-03-08 Thread Daniel Henrique Barboza
This function will validate and change/disable extensions that aren't compatible with a certain spec version. Since the function is called at the start of riscv_cpu_validate_set_extensions(), we're disabling extensions without guaranteeing that they aren't being turned on again after the

[PATCH for-8.1 08/17] target/riscv/cpu.c: avoid set_misa() in validate_set_extensions()

2023-03-08 Thread Daniel Henrique Barboza
set_misa() will be tuned up to do more than it's already doing and it will be redundant to what riscv_cpu_validate_set_extensions() does. Note that we don't ever change env->misa_mlx in this function, so set_misa() can be replaced by just assigning env->misa_ext and env->misa_ext_mask to 'ext'.

[PATCH for-8.1 05/17] target/riscv/cpu.c: add riscv_cpu_validate_priv_spec()

2023-03-08 Thread Daniel Henrique Barboza
Put all the env->priv_spec related validation into a helper to unclog riscv_cpu_realize a bit. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 81 ++ 1 file changed, 46 insertions(+), 35 deletions(-) diff --git a/target/riscv/cpu.c

[PATCH for-8.1 04/17] target/riscv: add PRIV_VERSION_LATEST macro

2023-03-08 Thread Daniel Henrique Barboza
PRIV_VERSION_LATEST, at this moment assigned to PRIV_VERSION_1_12_0, is used in all generic CPUs: - riscv_any_cpu_init() - rv32_base_cpu_init() - rv64_base_cpu_init() - rv128_base_cpu_init() When a new PRIV version is made available we can just update the LATEST macro. Signed-off-by: Daniel

[PATCH for-8.1 09/17] target/riscv/cpu.c: set cpu config in set_misa()

2023-03-08 Thread Daniel Henrique Barboza
set_misa() is setting all 'misa' related env states and nothing else. But other functions, namely riscv_cpu_validate_set_extensions(), uses the config object to do its job. This creates a need to set the single letter extensions in the cfg object to keep both in sync. At this moment this is being

[PATCH for-8.1 17/17] target/riscv: rework write_misa()

2023-03-08 Thread Daniel Henrique Barboza
write_misa() must use as much common logic as possible, only specifying the bits that are exclusive to the CSR write operation and TCG internals. Rewrite write_misa() to work as follows: - supress RVC right after verifying that we're not updating RVG; - mask the write using misa_ext_mask to

[PATCH for-8.1 07/17] target/riscv/cpu.c: remove cfg setup from riscv_cpu_init()

2023-03-08 Thread Daniel Henrique Barboza
We have 4 config settings being done in riscv_cpu_init(): ext_ifencei, ext_icsr, mmu and pmp. This is also the constructor of the "riscv-cpu" device, which happens to be the parent device of every RISC-V cpu. The result is that these 4 configs are being set every time, and every other CPU should

[PATCH for-8.1 15/17] target/riscv: add RVG

2023-03-08 Thread Daniel Henrique Barboza
The 'G' bit in misa_ext is a virtual extension that enables a set of extensions (i, m, a, f, d, icsr and ifencei). We'll want to avoid setting it for write_misa(). Add it so we can gate write_misa() properly against it. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 4

[PATCH for-8.1 06/17] target/riscv: move realize() validations to riscv_cpu_validate_set_extensions()

2023-03-08 Thread Daniel Henrique Barboza
Center all validations that are scattered in riscv_cpu_realize() in the same function. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 74 ++ 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/target/riscv/cpu.c

[PATCH for-8.1 11/17] target/riscv/cpu.c: move riscv_cpu_validate_v() up

2023-03-08 Thread Daniel Henrique Barboza
riscv_cpu_validate_set_extensions() will play a future role in write_misa(). First we need to ensure that this function is validating first and setting cfg values later. At this moment this is not the case of the RVV validation. Move RVV validation up. Leave the 'ext |= RVV' where it is - next

[PATCH for-8.1 03/17] target/riscv/cpu.c: remove set_priv_version()

2023-03-08 Thread Daniel Henrique Barboza
The setter is doing nothing special. Just set env->priv_ver directly. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index

[PATCH for-8.1 02/17] target/riscv/cpu.c: remove set_vext_version()

2023-03-08 Thread Daniel Henrique Barboza
This setter is doing nothing else but setting env->vext_ver. Assign the value directly. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 5060a98b6d..0baed79ec2

[PATCH for-8.1 16/17] target/riscv: do not allow RVG in write_misa()

2023-03-08 Thread Daniel Henrique Barboza
We're getting ready to use riscv_cpu_validate_set_extensions() to unify the handling of write_misa() with the rest of the code base. But first we need to deal with RVG. The 'G' virtual extension enables a set of extensions in the CPU. At this moment, this is done at the start of our validation

[PATCH for-8.1 12/17] target/riscv: put env->misa_ext <-> cpu->cfg code into helpers

2023-03-08 Thread Daniel Henrique Barboza
The extremely tedious code that sets cpu->cfg based on misa_ext, and vice-versa, is scattered around riscv_cpu_validate_set_extensions() and set_misa(). Introduce helpers to do this work, cleaning up the logic of both functions a bit. While we're at it, add a note in cpu.h informing that any

[PATCH for-8.1 14/17] target/riscv/cpu.c: do not allow RVE to be set

2023-03-08 Thread Daniel Henrique Barboza
This restriction is found at the current implementation of write_misa() in csr.c. Add it in riscv_cpu_validate_set_extensions() as well, while also removing the checks we're doing considering that I or E can be enabled. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 12

[PATCH for-8.1 00/17] centralize CPU extensions logic

2023-03-08 Thread Daniel Henrique Barboza
Hi, During the review of a series that did some work in the RISCV_FEATURES* enum, Liu Zhiwei commented on how we could centralize the all the extension validation code and integrate it with write_misa() [1]. This does at least part of what was suggested. The idea is that, ATM, we have too many

[PATCH for-8.1 01/17] target/riscv/cpu.c: add riscv_cpu_validate_v()

2023-03-08 Thread Daniel Henrique Barboza
The code that validates ext_v in riscv_cpu_validate_set_extensions() is not properly indented - we're missing an extra indent level right after the first check that uses cfg->elen. In the end the 'v' verification is a bit too large in comparison with the others, and can be put in a separated

[PATCH for-8.1 10/17] target/riscv/cpu.c: redesign register_cpu_props()

2023-03-08 Thread Daniel Henrique Barboza
Now that the function is a no-op if 'env.misa_ext != 0', and no one that are setting misa_ext != 0 is calling it because set_misa() is setting the cpu cfg accordingly, remove the now deprecated code and rename the function to register_generic_cpu_props(). This function is now doing exactly what

[PULL 5/5] qga/win/vss: requester_freeze changes

2023-03-08 Thread Konstantin Kostiuk
From: Kfir Manor Change requester_freeze so that the VSS backup type queried from the registry Signed-off-by: Kfir Manor Reviewed-by: Konstantin Kostiuk Signed-off-by: Konstantin Kostiuk --- qga/vss-win32/requester.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PULL 2/5] qga/win32: Use rundll for VSS installation

2023-03-08 Thread Konstantin Kostiuk
The custom action uses cmd.exe to run VSS Service installation and removal which causes an interactive command shell to spawn. This shell can be used to execute any commands as a SYSTEM user. Even if call qemu-ga.exe directly the interactive command shell will be spawned as qemu-ga.exe is a

[PULL 3/5] qga/win/installer: add VssOption to installer

2023-03-08 Thread Konstantin Kostiuk
From: Kfir Manor Adds registry value VssOption with value 1 to QEMU Guest Agent VSS Provider service registry key Signed-off-by: Kfir Manor Reviewed-by: Konstantin Kostiuk Signed-off-by: Konstantin Kostiuk --- qga/installer/qemu-ga.wxs | 4 1 file changed, 4 insertions(+) diff --git

[PULL 4/5] qga/win/vss: query VSS backup type

2023-03-08 Thread Konstantin Kostiuk
From: Kfir Manor Query VSS backup type number (DWORD) from QEMU Guest Agent VSS Provider registry key registry value VssOption Translate the VSS backup type number (DWORD) into its VSS backup type (VSS_BACKUP_TYPE) Returns the queried VSS backup type if the program encounters unexpected

[PULL 1/5] qga/win32: Remove change action from MSI installer

2023-03-08 Thread Konstantin Kostiuk
Remove the 'change' button from "Programs and Features" because it does not checks if a user is an admin or not. The installer has no components to choose from and always installs everything. So the 'change' button is not obviously needed but can create a security issue. resolves:

[PULL 0/5] QGA Misc patches

2023-03-08 Thread Konstantin Kostiuk
The following changes since commit 9832009d9dd2386664c15cc70f6e6bfe062be8bd: Merge tag 'pull-riscv-to-apply-20230306' of https://gitlab.com/palmer-dabbelt/qemu into staging (2023-03-07 12:53:00 +) are available in the Git repository at: g...@github.com:kostyanf14/qemu.git

Re: [PATCH] target/riscv/csr.c: fix H extension TVM trap

2023-03-08 Thread Daniel Henrique Barboza
On 3/8/23 09:34, chenyi2...@zju.edu.cn wrote: From: Yi Chen Trap accesses to hgatp if MSTATUS_TVM is enabled. Don't trap accesses to vsatp even if MSTATUS_TVM is enabled. Signed-off-by: Yi Chen --- target/riscv/csr.c | 18 ++ 1 file changed, 14 insertions(+), 4

RE: [PULL 00/17] Hexagon (target/hexagon) updates

2023-03-08 Thread Taylor Simpson
Just checking if this is on the radar to be merged ... > -Original Message- > From: Taylor Simpson > Sent: Monday, March 6, 2023 10:34 PM > To: qemu-devel@nongnu.org > Cc: Taylor Simpson ; richard.hender...@linaro.org; > phi...@linaro.org; peter.mayd...@linaro.org; Brian Cain > ;

[PATCH 36/47] virtio-rng-pci: fix migration compat for vectors

2023-03-08 Thread Michael Tokarev
From: "Dr. David Alan Gilbert" Fixup the migration compatibility for existing machine types so that they do not enable msi-x. Symptom: (qemu) qemu: get_pci_config_device: Bad config data: i=0x34 read: 84 device: 98 cmask: ff wmask: 0 w1cmask:0 qemu: Failed to load PCIDevice:config qemu:

Re: [PATCH v2 2/3] tests/avocado: Add Fedora 34 distro, including kernel/initrd checksums

2023-03-08 Thread David Woodhouse
On Wed, 2023-03-08 at 17:42 +, Alex Bennée wrote: > > David Woodhouse writes: > > > From: David Woodhouse > > > > The kernel in Fedora 31 doesn't support 'xen_no_vector_callback' on > > its command line, so add a slightly newer version as a prelude to > > enabling avocado tests for Xen

Re: [PATCH v2 3/3] tests/avocado: Test Xen guest support under KVM

2023-03-08 Thread David Woodhouse
On Wed, 2023-03-08 at 17:45 +, Alex Bennée wrote: > > David Woodhouse writes: > > > From: David Woodhouse > > > > Exercise guests with a few different modes for interrupt delivery. In > > particular we want to cover: > > > >  • Xen event channel delivery via GSI to the I/O APIC > >  •

Re: [PULL 14/20] hw/ppc/pegasos2: Fix PCI interrupt routing

2023-03-08 Thread BALATON Zoltan
On Wed, 8 Mar 2023, BALATON Zoltan wrote: On Wed, 8 Mar 2023, Philippe Mathieu-Daudé wrote: Hi Zoltan, On 8/3/23 00:47, Philippe Mathieu-Daudé wrote: From: BALATON Zoltan According to the PegasosII schematics the PCI interrupt lines are connected to both the gpp pins of the Mv64361 north

Re: [PATCH v2 8/9] async: update documentation of the memory barriers

2023-03-08 Thread Richard Henderson
On 3/8/23 10:08, Paolo Bonzini wrote: On 3/8/23 17:47, Richard Henderson wrote: The case that I was imagining for smp_mb__before_rmw() is something like this:  wake_me = true;  smp_mb__before_rmw();  if (qatomic_xchg(_sleep, true)) { ... } where you really need a full barrier.

Re: [PATCH] Fix build without CONFIG_XEN_EMU

2023-03-08 Thread Woodhouse, David
On Wed, 2023-03-08 at 08:05 -0500, mreza...@redhat.com wrote: > From: Miroslav Rezanina > > Upstream commit ddf0fd9ae1 "hw/xen: Support HVM_PARAM_CALLBACK_TYPE_GSI > callback" > added kvm_xen_maybe_deassert_callback usage to target/i386/kvm/kvm.c file > without > conditional preprocessing

Re: [PATCH v2 8/9] async: update documentation of the memory barriers

2023-03-08 Thread Paolo Bonzini
On 3/8/23 17:47, Richard Henderson wrote: The case that I was imagining for smp_mb__before_rmw() is something like this:  wake_me = true;  smp_mb__before_rmw();  if (qatomic_xchg(_sleep, true)) { ... } where you really need a full barrier. What is different about this that

Re: Deadlock with ide_issue_trim and draining

2023-03-08 Thread Hanna Czenczek
On 07.03.23 14:44, Hanna Czenczek wrote: On 07.03.23 13:22, Fiona Ebner wrote: Hi, I am suspecting that commit 7e5cdb345f ("ide: Increment BB in-flight counter for TRIM BH") introduced an issue in combination with draining.  From a debug session on a costumer's machine I gathered the following

Re: [PATCH v2 3/3] tests/avocado: Test Xen guest support under KVM

2023-03-08 Thread Alex Bennée
David Woodhouse writes: > From: David Woodhouse > > Exercise guests with a few different modes for interrupt delivery. In > particular we want to cover: > > • Xen event channel delivery via GSI to the I/O APIC > • Xen event channel delivery via GSI to the i8259 PIC > • MSIs routed to PIRQ

Re: [PATCH v2 2/3] tests/avocado: Add Fedora 34 distro, including kernel/initrd checksums

2023-03-08 Thread Alex Bennée
David Woodhouse writes: > From: David Woodhouse > > The kernel in Fedora 31 doesn't support 'xen_no_vector_callback' on > its command line, so add a slightly newer version as a prelude to > enabling avocado tests for Xen guests. Why slightly newer rather than current release? Our existing

Re: [PATCH 1/6] block: don't acquire AioContext lock in bdrv_drain_all()

2023-03-08 Thread Kevin Wolf
Am 08.03.2023 um 15:26 hat Stefan Hajnoczi geschrieben: > On Wed, Mar 08, 2023 at 09:48:17AM +0100, Kevin Wolf wrote: > > Am 07.03.2023 um 20:20 hat Stefan Hajnoczi geschrieben: > > > On Tue, Mar 07, 2023 at 06:17:22PM +0100, Kevin Wolf wrote: > > > > Am 01.03.2023 um 21:57 hat Stefan Hajnoczi

Re: [PATCH v2 02/25] target/arm: Handle FPROUNDING_ODD in arm_rmode_to_sf

2023-03-08 Thread Philippe Mathieu-Daudé
On 7/3/23 19:34, Richard Henderson wrote: While this enumerator has been present since the first commit, it isn't ever used. The first actual use of round-to-odd came with SVE, which currently uses float_round_to_odd instead of the arm-specific enumerator. Amusingly, the comment about

Re: [PATCH v5 1/4] linux-aio: use LinuxAioState from the running thread

2023-03-08 Thread Stefan Hajnoczi
On Wed, Mar 08, 2023 at 12:42:11PM +0100, Kevin Wolf wrote: > Am 07.03.2023 um 15:18 hat Stefan Hajnoczi geschrieben: > > On Tue, Mar 07, 2023 at 09:48:51AM +0100, Kevin Wolf wrote: > > > Am 01.03.2023 um 17:16 hat Stefan Hajnoczi geschrieben: > > > > On Fri, Feb 03, 2023 at 08:17:28AM -0500,

[PATCH 30/47] Revert "x86: use typedef for SetupData struct"

2023-03-08 Thread Michael Tokarev
From: "Michael S. Tsirkin" This reverts commit eebb38a5633a77f5fa79d6486d5b2fcf8fbe3c07. Fixes: eebb38a563 ("x86: use typedef for SetupData struct") Signed-off-by: Michael S. Tsirkin Tested-by: Nathan Chancellor Tested-by: Dov Murik Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[PATCH 22/47] target/i386: Fix C flag for BLSI, BLSMSK, BLSR

2023-03-08 Thread Michael Tokarev
From: Richard Henderson We forgot to set cc_src, which is used for computing C. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1370 Signed-off-by: Richard Henderson Message-Id: <20230114180601.2993644-1-richard.hender...@linaro.org> Cc: qemu-sta...@nongnu.org Fixes: 1d0b926150e5

[RFC PATCH 00/47] Patch Round-up for stable 7.2.1

2023-03-08 Thread Michael Tokarev
Hello! This is my first attempt to perform a stable qemu release. Doing it in a way similar to how Michael Roth did it before :) But since this is my first attempt, this is an RFC for now. The following new patches are queued for QEMU stable v7.2.1:

[PATCH 01/47] target/sh4: Mask restore of env->flags from tb->flags

2023-03-08 Thread Michael Tokarev
From: Guenter Roeck The values in env->flags are a subset of tb->flags. Restore only the bits that belong. Cc: qemu-sta...@nongnu.org Fixes: ab419fd8a035 ("target/sh4: Fix TB_FLAG_UNALIGN") Signed-off-by: Guenter Roeck Message-ID: <20221212011345.ga2235...@roeck-us.net> [rth: Reduce to only

[PATCH 08/47] acpi: cpuhp: fix guest-visible maximum access size to the legacy reg block

2023-03-08 Thread Michael Tokarev
From: Laszlo Ersek The modern ACPI CPU hotplug interface was introduced in the following series (aa1dd39ca307..679dd1a957df), released in v2.7.0: 1 abd49bc2ed2f docs: update ACPI CPU hotplug spec with new protocol 2 16bcab97eb9f pc: piix4/ich9: add 'cpu-hotplug-legacy' property 3

[PATCH 46/47] tests/tcg: fix unused variable in linux-test

2023-03-08 Thread Michael Tokarev
From: Alex Bennée The latest hexagon compiler picks up that we never consume wcount. Given the name of the #define that rcount checks against is WCOUNT_MAX I figured the check just got missed. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PATCH 31/47] Revert "x86: return modified setup_data only if read as memory, not as file"

2023-03-08 Thread Michael Tokarev
From: "Michael S. Tsirkin" This reverts commit e935b735085dfa61d8e6d276b6f9e7687796a3c7. Fixes: e935b73508 ("x86: return modified setup_data only if read as memory, not as file") Signed-off-by: Michael S. Tsirkin Tested-by: Nathan Chancellor Tested-by: Dov Murik Reviewed-by: Michael S.

[PATCH 18/47] qcow2: Fix theoretical corruption in store_bitmap() error path

2023-03-08 Thread Michael Tokarev
From: Kevin Wolf In order to write the bitmap table to the image file, it is converted to big endian. If the write fails, it is passed to clear_bitmap_table() to free all of the clusters it had allocated before. However, if we don't convert it back to native endianness first, we'll free things

[PATCH 07/47] target/riscv: Set pc_succ_insn for !rvc illegal insn

2023-03-08 Thread Michael Tokarev
From: Richard Henderson Failure to set pc_succ_insn may result in a TB covering zero bytes, which triggers an assert within the code generator. Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1224 Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis

[PATCH 09/47] hw/nvme: fix missing endian conversions for doorbell buffers

2023-03-08 Thread Michael Tokarev
From: Klaus Jensen The eventidx and doorbell value are not handling endianness correctly. Fix this. Fixes: 3f7fe8de3d49 ("hw/nvme: Implement shadow doorbell buffer support") Cc: qemu-sta...@nongnu.org Reported-by: Guenter Roeck Reviewed-by: Keith Busch Signed-off-by: Klaus Jensen (cherry

[PATCH 37/47] virtio-rng-pci: fix transitional migration compat for vectors

2023-03-08 Thread Michael Tokarev
From: "Dr. David Alan Gilbert" In bad9c5a516 ("virtio-rng-pci: fix migration compat for vectors") I fixed the virtio-rng-pci migration compatibility, but it was discovered that we also need to fix the other aliases of the device for the transitional cases. Fixes: 9ea02e8f1 ('virtio-rng-pci:

[PATCH 43/47] intel-iommu: fail MAP notifier without caching mode

2023-03-08 Thread Michael Tokarev
From: Jason Wang Without caching mode, MAP notifier won't work correctly since guest won't send IOTLB update event when it establishes new mappings in the I/O page tables. Let's fail the IOMMU notifiers early instead of misbehaving silently. Reviewed-by: Eric Auger Tested-by: Viktor Prutyanov

[PATCH 23/47] target/i386: fix ADOX followed by ADCX

2023-03-08 Thread Michael Tokarev
From: Paolo Bonzini When ADCX is followed by ADOX or vice versa, the second instruction's carry comes from EFLAGS and the condition codes use the CC_OP_ADCOX operation. Retrieving the carry from EFLAGS is handled by this bit of gen_ADCOX: tcg_gen_extract_tl(carry_in, cpu_cc_src,

[PATCH 42/47] chardev/char-socket: set s->listener = NULL in char_socket_finalize

2023-03-08 Thread Michael Tokarev
From: Yajun Wu After live migration with virtio block device, qemu crash at: #0 0x55914f46f795 in object_dynamic_cast_assert (obj=0x559151b7b090, typename=0x55914f80fbc4 "qio-channel", file=0x55914f80fb90 "/images/testvfe/sw/qemu.gerrit/include/io/channel.h", line=30,

[PATCH 15/47] target/arm: Fix physical address resolution for Stage2

2023-03-08 Thread Michael Tokarev
From: Richard Henderson Conversion to probe_access_full missed applying the page offset. Cc: qemu-sta...@nongnu.org Reported-by: Sid Manning Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20230126233134.103193-1-richard.hender...@linaro.org Fixes:

[PATCH 03/47] virtio-mem: Fix the bitmap index of the section offset

2023-03-08 Thread Michael Tokarev
From: Chenyi Qiang vmem->bitmap indexes the memory region of the virtio-mem backend at a granularity of block_size. To calculate the index of target section offset, the block_size should be divided instead of the bitmap_size. Fixes: 2044969f0b ("virtio-mem: Implement RamDiscardManager

[PATCH 10/47] hw/nvme: fix missing cq eventidx update

2023-03-08 Thread Michael Tokarev
From: Klaus Jensen Prior to reading the shadow doorbell cq head, we have to update the eventidx. Otherwise, we risk that the driver will skip an mmio doorbell write. This happens on riscv64, as reported by Guenter. Adding the missing update to the cq eventidx fixes the issue. Fixes:

[PATCH 44/47] intel-iommu: fail DEVIOTLB_UNMAP without dt mode

2023-03-08 Thread Michael Tokarev
From: Jason Wang Without dt mode, device IOTLB notifier won't work since guest won't send device IOTLB invalidation descriptor in this case. Let's fail early instead of misbehaving silently. Reviewed-by: Laurent Vivier Tested-by: Laurent Vivier Tested-by: Viktor Prutyanov Buglink:

[PATCH 06/47] meson: accept relative symlinks in "meson introspect --installed" data

2023-03-08 Thread Michael Tokarev
From: Paolo Bonzini When installing shared libraries, as is the case for libvfio-user.so, Meson will include relative symbolic links in the output of "meson introspect --installed": { "libvfio-user.so": "/usr/local/lib64/libvfio-user.so", ... } In the case of

[PATCH 17/47] migration/ram: Fix populate_read_range()

2023-03-08 Thread Michael Tokarev
From: David Hildenbrand Unfortunately, commit f7b9dcfbcf44 broke populate_read_range(): the loop end condition is very wrong, resulting in that function not populating the full range. Lets' fix that. Fixes: f7b9dcfbcf44 ("migration/ram: Factor out populating pages readable in

[PATCH 04/47] virtio-mem: Fix the iterator variable in a vmem->rdl_list loop

2023-03-08 Thread Michael Tokarev
From: Chenyi Qiang It should be the variable rdl2 to revert the already-notified listeners. Fixes: 2044969f0b ("virtio-mem: Implement RamDiscardManager interface") Signed-off-by: Chenyi Qiang Message-Id: <20221228090312.17276-1-chenyi.qi...@intel.com> Cc: qemu-sta...@nongnu.org Reviewed-by:

  1   2   3   >