Re: [PATCH v10 9/9] KVM: Enable and expose KVM_MEM_PRIVATE

2023-03-23 Thread Chao Peng
On Wed, Mar 22, 2023 at 05:41:31PM -0700, Isaku Yamahata wrote: > On Wed, Mar 08, 2023 at 03:40:26PM +0800, > Chao Peng wrote: > > > On Wed, Mar 08, 2023 at 12:13:24AM +, Ackerley Tng wrote: > > > Chao Peng writes: > > > > > > > On Sat, Jan 14, 2023 at 12:01:01AM +, Sean Christopherson

Re: [PATCH v15 4/4] vhost-vdpa: Add support for vIOMMU.

2023-03-23 Thread Cindy Lu
On Fri, Mar 24, 2023 at 10:49 AM Jason Wang wrote: > > On Thu, Mar 23, 2023 at 4:41 PM Cindy Lu wrote: > > > > On Thu, Mar 23, 2023 at 11:47 AM Jason Wang wrote: > > > > > > On Tue, Mar 21, 2023 at 10:24 PM Cindy Lu wrote: > > > > > > > > 1. The vIOMMU support will make vDPA can work in IOMMU

Re: [PATCH 1/3] docs: Add support for TPM devices over I2C bus

2023-03-23 Thread Ninad Palsule
Hello Cedric, I tried to use ast2600-evb machine but it is not getting any message on I2C bus. Any suggestions? # Start the software TPM emulator.     $ swtpm socket --tpmstate dir=/tmp/mytpm1   --ctrl type=unixio,path=/tmp/mytpm1/swtpm-sock   --tpm2   --log level=100 # Start a qemu and

[PATCH v3 0/3] Add support for TPM devices over I2C bus

2023-03-23 Thread Ninad Palsule
Hello, I have incorporated review comments from Stefan and Cedric. Please review. This drop adds support for the TPM devices attached to the I2C bus. It only supports the TPM2 protocol. You need to run it with the external TPM emulator like swtpm. I have tested it with swtpm. I have refered to

Re: [PATCH v4 1/2] target/riscv: separate priv from mmu_idx

2023-03-23 Thread Wu, Fei
On 3/24/2023 9:02 AM, Wu, Fei wrote: > On 3/23/2023 11:53 PM, Richard Henderson wrote: >> On 3/22/23 19:44, Fei Wu wrote: >>> Currently it's assumed the 2 low bits of mmu_idx map to privilege mode, >>> this assumption won't last as we are about to add more mmu_idx. >>> >>> Signed-off-by: Fei Wu

Re: [PATCH v4 1/2] target/riscv: separate priv from mmu_idx

2023-03-23 Thread Wu, Fei
On 3/24/2023 12:07 AM, Richard Henderson wrote: > On 3/22/23 23:00, Wu, Fei wrote: +    ctx->priv = env->priv; >>> >>> This is not right. You should put env->priv into tb flags before you use >>> it in translation. >>> >> I see some other env usages in this function, when will env->priv and

Re: [PATCH v4 1/2] target/riscv: separate priv from mmu_idx

2023-03-23 Thread Wu, Fei
On 3/23/2023 11:53 PM, Richard Henderson wrote: > On 3/22/23 19:44, Fei Wu wrote: >> Currently it's assumed the 2 low bits of mmu_idx map to privilege mode, >> this assumption won't last as we are about to add more mmu_idx. >> >> Signed-off-by: Fei Wu >> --- >>   target/riscv/cpu.h

Re: [PATCH for-8.1 v4 11/25] target/riscv/cpu.c: set cpu config in set_misa()

2023-03-23 Thread Daniel Henrique Barboza
On 3/22/23 23:14, LIU Zhiwei wrote: On 2023/3/23 6:19, Daniel Henrique Barboza wrote: 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

Re: [PATCH 1/3] docs: Add support for TPM devices over I2C bus

2023-03-23 Thread Ninad Palsule
On 3/23/23 2:49 AM, Cédric Le Goater wrote: On 3/23/23 04:01, Ninad Palsule wrote: This is a documentation change for I2C TPM device support. Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. Signed-off-by: Ninad Palsule

Re: [PATCH 3/3] New I2C: Add support for TPM devices over I2C bus

2023-03-23 Thread Ninad Palsule
On 3/23/23 3:37 AM, Cédric Le Goater wrote: On 3/23/23 04:01, Ninad Palsule wrote: Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. I2C model only supports TPM2 protocol. This commit includes changes for the common code. -

Cxl devel!

2023-03-23 Thread Maverickk 78
Hello Jonathan Raghu here, I'm going over your cxl patches for past few days, it's very impressive. I want to get involved and contribute in your endeavor, may be bits & pieces to start. If you're specific trivial task(cvl/pcie/fm) about cxl, please let me know. Regards Raghu

Re: [PATCH 0/3] Add support for TPM devices over I2C bus

2023-03-23 Thread Ninad Palsule
On 3/23/23 2:23 AM, Cédric Le Goater wrote: Hello Ninad, On 3/23/23 04:01, Ninad Palsule wrote: This drop adds support for the TPM devices attached to the I2C bus. It only supports the TPM2 protocol. You need to run it with the external TPM emulator like swtpm. I have tested it with swtpm.

[PATCH v2 1/1] hw/arm: do not free machine->fdt in arm_load_dtb()

2023-03-23 Thread Daniel Henrique Barboza
At this moment, arm_load_dtb() can free machine->fdt when binfo->dtb_filename is NULL. If there's no 'dtb_filename', 'fdt' will be retrieved by binfo->get_dtb(). If get_dtb() returns machine->fdt, as is the case of machvirt_dtb() from hw/arm/virt.c, fdt now has a pointer to machine->fdt. And, in

[PATCH v2 0/1] fix dumpdtb crash with ARM machines

2023-03-23 Thread Daniel Henrique Barboza
Hi, In this version I fixed a mem leak that was happening if the user inputs a fdt via '-dtb'. In that case we would assign the updated FDT on top of the existing board FDT that was already assigned to ms->fdt. Tested as follows: $ ./qemu-system-aarch64 -S -M virt -display none -qmp stdio

Re: [PATCH 1/1] hw/arm: do not free machine->fdt in arm_load_dtb()

2023-03-23 Thread Daniel Henrique Barboza
On 3/23/23 14:59, Peter Maydell wrote: On Thu, 23 Mar 2023 at 17:54, Daniel Henrique Barboza wrote: On 3/23/23 14:38, Peter Maydell wrote: On Thu, 23 Mar 2023 at 16:11, Daniel Henrique Barboza wrote: -g_free(fdt); +/* Set ms->fdt for 'dumpdtb' QMP/HMP command */ +ms->fdt =

Re: [PATCH 3/3] New I2C: Add support for TPM devices over I2C bus

2023-03-23 Thread Ninad Palsule
On 3/23/23 7:18 AM, Stefan Berger wrote: On 3/22/23 23:01, Ninad Palsule wrote: Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. I2C model only supports TPM2 protocol. This commit includes changes for the common code. -

[PATCH for 8.1 v2 6/6] vdpa: Cache cvq group in VhostVDPAState

2023-03-23 Thread Eugenio Pérez
Continue the move of code that interacts with the device from control virtqueue start to control virtqueue init. As with previous patches, it reduces the number of ioctls in the migration, reducing failure possibilities. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 40

[PATCH for 8.1 v2 1/6] vdpa: Remove status in reset tracing

2023-03-23 Thread Eugenio Pérez
It is always 0 and it is not useful to route call through file descriptor. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 2 +- hw/virtio/trace-events | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index

[PATCH for 8.1 v2 5/6] vdpa: move CVQ isolation check to net_init_vhost_vdpa

2023-03-23 Thread Eugenio Pérez
Evaluating it at start time instead of initialization time may make the guest capable of dynamically adding or removing migration blockers. Also, moving to initialization reduces the number of ioctls in the migration, reducing failure possibilities. As a drawback we need to check for CVQ

[PATCH for 8.1 v2 4/6] vdpa: return errno in vhost_vdpa_get_vring_group error

2023-03-23 Thread Eugenio Pérez
We need to tell in the caller, as some errors are expected in a normal workflow. In particular, parent drivers in recent kernels with VHOST_BACKEND_F_IOTLB_ASID may not support vring groups. In that case, -ENOTSUP is returned. This is the case of vp_vdpa in Linux 6.2. Next patches in this

[PATCH for 8.1 v2 3/6] vdpa: add vhost_vdpa_set_dev_features_fd

2023-03-23 Thread Eugenio Pérez
This allows to set the features of a vhost-vdpa device from external subsystems like vhost-net. It is used in subsequent patches to negotiate features and probe for CVQ ASID isolation. Reviewed-by: Stefano Garzarella Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost-vdpa.h | 1 +

[PATCH for 8.1 v2 0/6] Move ASID test to vhost-vdpa net initialization

2023-03-23 Thread Eugenio Pérez
QEMU v8.0.0-rc0 is able to switch dynamically between vhost-vdpa passthrough and SVQ mode as long as the net device does not have CVQ. The net device state followed (and migrated) by CVQ requires special care. A pre-requisite to add CVQ to that framework is to determine if devices with CVQ are

[PATCH for 8.1 v2 2/6] vdpa: add vhost_vdpa_reset_status_fd

2023-03-23 Thread Eugenio Pérez
This allows to reset a vhost-vdpa device from external subsystems like vhost-net, since it does not have any struct vhost_dev by the time we need to use it. It is used in subsequent patches to negotiate features and probe for CVQ ASID isolation. Signed-off-by: Eugenio Pérez ---

Re: [PATCH v17 6/8] qemu-iotests: test new zone operations

2023-03-23 Thread Stefan Hajnoczi
On Thu, Mar 23, 2023 at 01:08:32PM +0800, Sam Li wrote: > The new block layer APIs of zoned block devices can be tested by: > $ tests/qemu-iotests/check zoned > Run each zone operation on a newly created null_blk device > and see whether it outputs the same zone information. > > Signed-off-by:

Re: [PATCH v8 0/4] Add zoned storage emulation to virtio-blk driver

2023-03-23 Thread Stefan Hajnoczi
On Thu, Mar 23, 2023 at 01:28:24PM +0800, Sam Li wrote: > This patch adds zoned storage emulation to the virtio-blk driver. > > The patch implements the virtio-blk ZBD support standardization that is > recently accepted by virtio-spec. The link to related commit is at > >

Re: [PATCH v8 0/4] Add zoned storage emulation to virtio-blk driver

2023-03-23 Thread Stefan Hajnoczi
On Thu, Mar 23, 2023 at 09:38:03PM +0800, Sam Li wrote: > Matias Bjørling 于2023年3月23日周四 21:26写道: > > On 23/03/2023 06.28, Sam Li wrote: > For the question, this patch is exposing the zoned interface through > virtio-blk only. It's a good suggestion to put a use case inside > documentation. I will

Re: [PATCH] Change the default for Mixed declarations.

2023-03-23 Thread Daniel P . Berrangé
On Tue, Feb 14, 2023 at 05:07:38PM +0100, Juan Quintela wrote: > Hi > > I want to enter a discussion about changing the default of the style > guide. > > There are several reasons for that: > - they exist since C99 (i.e. all supported compilers support them) > - they eliminate the posibility of

[PATCH 2/2] virtio-scsi: stop using aio_disable_external() during unplug

2023-03-23 Thread Stefan Hajnoczi
This patch is part of an effort to remove the aio_disable_external() API because it does not fit in a multi-queue block layer world where many AioContexts may be submitting requests to the same disk. The SCSI emulation code is already in good shape to stop using aio_disable_external(). The API is

[PATCH 0/2] virtio-scsi: stop using aio_disable_external() during unplug

2023-03-23 Thread Stefan Hajnoczi
The aio_disable_external() API is a solution for stopping I/O during critical sections. The newer BlockDevOps->drained_begin/end/poll() callbacks offer a cleaner solution that supports the upcoming multi-queue block layer. This series removes aio_disable_external() from the virtio-scsi emulation

[PATCH 1/2] virtio-scsi: avoid race between unplug and transport event

2023-03-23 Thread Stefan Hajnoczi
Only report a transport reset event to the guest after the SCSIDevice has been unrealized by qdev_simple_device_unplug_cb(). qdev_simple_device_unplug_cb() sets the SCSIDevice's qdev.realized field to false so that scsi_device_find/get() no longer see it. scsi_target_emulate_report_luns() also

RE: [PATCH] Hexagon (translate.c): avoid redundant PC updates on COF

2023-03-23 Thread Taylor Simpson
> -Original Message- > From: Matheus Tavares Bernardino > Sent: Wednesday, March 22, 2023 3:17 PM > To: qemu-devel@nongnu.org > Cc: Taylor Simpson ; richard.hender...@linaro.org; > a...@rev.ng > Subject: [PATCH] Hexagon (translate.c): avoid redundant PC updates on COF > > When there

Re: [PATCH] vfio/pci: add support for VF token

2023-03-23 Thread Alex Williamson
On Thu, 23 Mar 2023 06:19:45 +0900 Minwoo Im wrote: > > On Mon, 20 Mar 2023 11:03:40 +0100 > > Cédric Le Goater wrote: > > > > > On 3/20/23 08:35, Minwoo Im wrote: > > > > VF token was introduced [1] to kernel vfio-pci along with SR-IOV > > > > support [2]. This patch adds support VF

Re: QMP command dumpdtb crash bug

2023-03-23 Thread Bernhard Beschow
Am 23. März 2023 15:13:28 UTC schrieb Daniel Henrique Barboza : > > >On 3/23/23 10:38, Peter Maydell wrote: >> On Thu, 23 Mar 2023 at 13:29, Markus Armbruster wrote: >>> >>> Peter, Daniel offers two ways to fix this bug (see below). Got a >>> preference? >> >> Not freeing seems the correct

Re: [PATCH] qtests: avoid printing comments before g_test_init()

2023-03-23 Thread Juan Quintela
Daniel P. Berrangé wrote: > The TAP protocol version line must be the first thing printed on > stdout. The migration test failed that requirement in certain > scenarios: > > # Skipping test: Userfault not available (builtdtime) > TAP version 13 > # random seed:

[PATCH] hw/ssi: Fix Linux driver init issue with xilinx_spi

2023-03-23 Thread Chris Rauer
The problem is that the Linux driver expects the master transaction inhibit bit(R_SPICR_MTI) to be set during driver initialization so that it can detect the fifo size but QEMU defaults it to zero out of reset. The datasheet indicates this bit is active on reset. See page 25, SPI Control

Re: [PATCH 1/1] hw/arm: do not free machine->fdt in arm_load_dtb()

2023-03-23 Thread Peter Maydell
On Thu, 23 Mar 2023 at 17:54, Daniel Henrique Barboza wrote: > > > > On 3/23/23 14:38, Peter Maydell wrote: > > On Thu, 23 Mar 2023 at 16:11, Daniel Henrique Barboza > > wrote: > >> -g_free(fdt); > >> +/* Set ms->fdt for 'dumpdtb' QMP/HMP command */ > >> +ms->fdt = fdt; > > > > With

Re: [PATCH 1/1] hw/arm: do not free machine->fdt in arm_load_dtb()

2023-03-23 Thread Daniel Henrique Barboza
On 3/23/23 14:38, Peter Maydell wrote: On Thu, 23 Mar 2023 at 16:11, Daniel Henrique Barboza wrote: At this moment, arm_load_dtb() can free machine->fdt when binfo->dtb_filename is NULL. If there's no 'dtb_filename', 'fdt' will be retrieved by binfo->get_dtb(). If get_dtb() returns

QEMU fortnightly developers call for agenda for 2023-04-04

2023-03-23 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. Topics on the backburner: - qemu single binary On this week call, phillipe said that he wanted to discuss pci irqs and default devices? - The future of icount My understanding is that Alex wanted to wait until the openning

Re: [PATCH v3 8/8] target/arm: Add CPU property for QARMA3, enable FPACCombined by default

2023-03-23 Thread Richard Henderson
On 3/22/23 13:25, Aaron Lindsay wrote: Signed-off-by: Aaron Lindsay --- target/arm/cpu.h | 1 + target/arm/cpu64.c | 48 +++--- 2 files changed, 34 insertions(+), 15 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v3 7/8] target/arm: Implement v8.3 FPAC and FPACCOMBINE

2023-03-23 Thread Richard Henderson
On 3/22/23 13:25, Aaron Lindsay wrote: Signed-off-by: Aaron Lindsay --- target/arm/syndrome.h | 7 +++ target/arm/tcg/pauth_helper.c | 16 2 files changed, 23 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH v3 2/8] target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection

2023-03-23 Thread Richard Henderson
On 3/22/23 13:25, Aaron Lindsay wrote: +static inline int isar_feature_pauth_get_features(const ARMISARegisters *id) +{ +if (isar_feature_aa64_pauth_arch_qarma5(id)) { +return FIELD_EX64(id->id_aa64isar1, ID_AA64ISAR1, APA); +} else if (isar_feature_aa64_pauth_arch_qarma3(id)) {

Re: [PATCH 1/1] hw/arm: do not free machine->fdt in arm_load_dtb()

2023-03-23 Thread Peter Maydell
On Thu, 23 Mar 2023 at 16:11, Daniel Henrique Barboza wrote: > > At this moment, arm_load_dtb() can free machine->fdt when > binfo->dtb_filename is NULL. If there's no 'dtb_filename', 'fdt' will be > retrieved by binfo->get_dtb(). If get_dtb() returns machine->fdt, as is > the case of

Re: [PATCH v3 1/8] target/arm: Add ID_AA64ISAR2_EL1

2023-03-23 Thread Richard Henderson
On 3/22/23 13:25, Aaron Lindsay wrote: --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -507,6 +507,7 @@ static bool hvf_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) { HV_SYS_REG_ID_AA64DFR1_EL1, _isar.id_aa64dfr1 }, { HV_SYS_REG_ID_AA64ISAR0_EL1,

Re: [PATCH v3] target/riscv: reduce overhead of MSTATUS_SUM change

2023-03-23 Thread Richard Henderson
On 3/23/23 06:24, Wu, Fei wrote: There is MSTATUS_MPRV and MSTATUS_MPP kind of thing, priv+sum is not able to represent all of the status, probably we can just add an extra 'priv' at the back of TB_FLAGS? MPRV+MPP looks not necessary be in TB_FLAGS, it's just used to calculate the mmu_idx. Is

Re: qapi: [RFC] Doc comment convention for @arg: sections

2023-03-23 Thread Peter Maydell
On Thu, 23 Mar 2023 at 14:48, Markus Armbruster wrote: > > The QAPI schema doc comment language provides special syntax for command > and event arguments, struct and union members, alternate branches, > enumeration values, and features: "sections" starting with @arg:. > > By convention, we format

[PATCH 1/1] hw/arm: do not free machine->fdt in arm_load_dtb()

2023-03-23 Thread Daniel Henrique Barboza
At this moment, arm_load_dtb() can free machine->fdt when binfo->dtb_filename is NULL. If there's no 'dtb_filename', 'fdt' will be retrieved by binfo->get_dtb(). If get_dtb() returns machine->fdt, as is the case of machvirt_dtb() from hw/arm/virt.c, fdt now has a pointer to machine->fdt. And, in

Re: [PATCH v3] target/riscv: reduce overhead of MSTATUS_SUM change

2023-03-23 Thread Richard Henderson
On 3/22/23 17:38, Wu, Fei wrote: There is MSTATUS_MPRV and MSTATUS_MPP kind of thing, priv+sum is not able to represent all of the status, probably we can just add an extra 'priv' at the back of TB_FLAGS? Yes, I think that's required. r~

[PATCH 0/1] fix dumpdtb crash with ARM machines

2023-03-23 Thread Daniel Henrique Barboza
Hi, This is a re-post of "[PATCH v8 03/16] hw/arm: do not free machine->fdt in arm_load_dtb()": https://lists.gnu.org/archive/html/qemu-devel/2022-09/msg04201.html Turns out that I drop the ball and left this patch behind. Aside from some patches of that series that were optional, the way ARM

Re: [PATCH v4 1/2] target/riscv: separate priv from mmu_idx

2023-03-23 Thread Richard Henderson
On 3/22/23 23:00, Wu, Fei wrote: +    ctx->priv = env->priv; This is not right. You should put env->priv into tb flags before you use it in translation. I see some other env usages in this function, when will env->priv and tb_flags.priv mismatch (assume we have recorded priv in tb_flags)?

Re: [RFC PATCH v1] hw/misc: add i2c slave device that passes i2c ops outside

2023-03-23 Thread Corey Minyard
On Thu, Mar 23, 2023 at 10:09:02AM +, Karol Nowak wrote: > Hi, > > There is a feature I prepared which may be practical for some QEMU users. > > The feature provides a new I2C slave device > that prepares a message depending what i2c-slave callback was called > and sends it outside of QEMU

Re: [PATCH v4 1/2] target/riscv: separate priv from mmu_idx

2023-03-23 Thread Richard Henderson
On 3/22/23 19:44, Fei Wu wrote: Currently it's assumed the 2 low bits of mmu_idx map to privilege mode, this assumption won't last as we are about to add more mmu_idx. Signed-off-by: Fei Wu --- target/riscv/cpu.h | 1 - target/riscv/cpu_helper.c

Re: [PATCH 2/3] TPM TIS: Add support for TPM devices over I2C bus

2023-03-23 Thread Ninad Palsule
On 3/23/23 2:44 AM, Cédric Le Goater wrote: On 3/23/23 04:01, Ninad Palsule wrote: Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. This commit includes changes for the common code. - Added support for the new checksum

Re: QMP command dumpdtb crash bug

2023-03-23 Thread Daniel Henrique Barboza
On 3/23/23 10:38, Peter Maydell wrote: On Thu, 23 Mar 2023 at 13:29, Markus Armbruster wrote: Peter, Daniel offers two ways to fix this bug (see below). Got a preference? Not freeing seems the correct thing. As Daniel says, this should have been a prerequisite for implementing the

Re: [PATCH 0/9] (mostly) block: add more coroutine_fn annotations, use bdrv/blk_co_*

2023-03-23 Thread Kevin Wolf
Am 09.03.2023 um 09:44 hat Paolo Bonzini geschrieben: > "Mostly" because there is a 9pfs patch in here too. > > The series was developed with the help of vrc and the clang TSA annotations. Thanks, fixed up some style issues and applied to block-next. Kevin

[PATCH] block/export: only acquire AioContext once for vhost_user_server_stop()

2023-03-23 Thread Stefan Hajnoczi
vhost_user_server_stop() uses AIO_WAIT_WHILE(). AIO_WAIT_WHILE() requires that AioContext is only acquired once. Since blk_exp_request_shutdown() already acquires the AioContext it shouldn't be acquired again in vhost_user_server_stop(). Signed-off-by: Stefan Hajnoczi ---

[PATCH for-8.0 v2] aio-posix: fix race between epoll upgrade and aio_set_fd_handler()

2023-03-23 Thread Stefan Hajnoczi
If another thread calls aio_set_fd_handler() while the IOThread event loop is upgrading from ppoll(2) to epoll(7) then we might miss new AioHandlers. The epollfd will not monitor the new AioHandler's fd, resulting in hangs. Take the AioHandler list lock while upgrading to epoll. This prevents

qapi: [RFC] Doc comment convention for @arg: sections

2023-03-23 Thread Markus Armbruster
The QAPI schema doc comment language provides special syntax for command and event arguments, struct and union members, alternate branches, enumeration values, and features: "sections" starting with @arg:. By convention, we format them like this: # @arg: Lorem ipsum dolor sit amet,

Re: [PATCH 1/2] ui/gtk: use widget size for cursor motion event

2023-03-23 Thread Marc-André Lureau
Hi Erico On Thu, Mar 23, 2023 at 9:02 AM Kasireddy, Vivek wrote: > > Hi Erico, > > > > > > >> > > >> The gd_motion_event size has some calculations for the cursor position, > > >> which also take into account things like different size of the > > >> framebuffer compared to the window size. > >

Re: [PATCH v8 0/4] Add zoned storage emulation to virtio-blk driver

2023-03-23 Thread Matias Bjørling
On 23/03/2023 06.28, Sam Li wrote: This patch adds zoned storage emulation to the virtio-blk driver. The patch implements the virtio-blk ZBD support standardization that is recently accepted by virtio-spec. The link to related commit is at

Re: [PATCH v8 2/4] virtio-blk: add zoned storage emulation for zoned devices

2023-03-23 Thread Matias Bjørling
On 23/03/2023 06.28, Sam Li wrote: This patch extends virtio-blk emulation to handle zoned device commands by calling the new block layer APIs to perform zoned device I/O on behalf of the guest. It supports Report Zone, four zone oparations (open, close, finish, reset), and Append Zone. The

[PATCH for-8.0 v2 1/1] modules: load modules from /var/run/qemu/ directory firstly

2023-03-23 Thread Siddhi Katage
From: Siddhi Katage An old running QEMU will try to load modules with new build-id first, this will fail as expected, then QEMU will fallback to load the old modules that matches its build-id from /var/run/qemu/ directory. Make /var/run/qemu/ directory as first search path to load modules.

Re: [PATCH] Hexagon (translate.c): avoid redundant PC updates on COF

2023-03-23 Thread Anton Johansson via
On 3/22/23 22:17, Matheus Tavares Bernardino wrote: When there is a conditional change of flow or an endloop instruction, we preload HEX_REG_PC with ctx->next_PC at gen_start_packet(). Nonetheless, we still generate TCG code to do this update again at gen_goto_tb() when the condition for the

Re: [PATCH for-8.0] aio-posix: fix race between epoll upgrade and aio_set_fd_handler()

2023-03-23 Thread Stefan Hajnoczi
On Thu, Mar 23, 2023 at 06:02:36AM +0100, Paolo Bonzini wrote: > Il mer 22 mar 2023, 15:55 Stefan Hajnoczi ha scritto: > > > +/* The list must not change while we add fds to epoll */ > > +if (!qemu_lockcnt_dec_if_lock(>list_lock)) { > > +return false; > > +} > > + > > +ok

Re: [PATCH v3] target/riscv: reduce overhead of MSTATUS_SUM change

2023-03-23 Thread Wu, Fei
On 3/23/2023 8:38 AM, Wu, Fei wrote: > On 3/22/2023 9:19 PM, Richard Henderson wrote: >> On 3/22/23 05:12, Fei Wu wrote: >>> Kernel needs to access user mode memory e.g. during syscalls, the window >>> is usually opened up for a very limited time through MSTATUS.SUM, the >>> overhead is too much

Re: [PATCH v8 2/4] virtio-blk: add zoned storage emulation for zoned devices

2023-03-23 Thread Sam Li
Matias Bjørling 于2023年3月23日周四 21:39写道: > > On 23/03/2023 06.28, Sam Li wrote: > > This patch extends virtio-blk emulation to handle zoned device commands > > by calling the new block layer APIs to perform zoned device I/O on > > behalf of the guest. It supports Report Zone, four zone oparations

Re: [PATCH 1/1] accel/kvm/kvm-all: fix vm crash when set dirty ring and memorybacking

2023-03-23 Thread Peter Xu
On Thu, Mar 23, 2023 at 09:19:15PM +0800, Jiajing Zhou wrote: > From: "zhoujiajing.vergil" > > It is possible enter this function when the cpu not finished creating but > is already in the cpu list. The value of dirty_gfns is null, causing vm > crash here. > > When both dirty-ring and

Re: [PATCH v4 1/2] target/riscv: separate priv from mmu_idx

2023-03-23 Thread Wu, Fei
On 3/23/2023 2:59 PM, LIU Zhiwei wrote: > > On 2023/3/23 14:00, Wu, Fei wrote: >> On 3/23/2023 1:37 PM, LIU Zhiwei wrote: >>> On 2023/3/23 10:44, Fei Wu wrote: Currently it's assumed the 2 low bits of mmu_idx map to privilege mode, this assumption won't last as we are about to add more

Re: QMP command dumpdtb crash bug

2023-03-23 Thread Peter Maydell
On Thu, 23 Mar 2023 at 13:29, Markus Armbruster wrote: > > Peter, Daniel offers two ways to fix this bug (see below). Got a > preference? Not freeing seems the correct thing. As Daniel says, this should have been a prerequisite for implementing the command in the first place (you need to change

Re: [PATCH v8 0/4] Add zoned storage emulation to virtio-blk driver

2023-03-23 Thread Sam Li
Matias Bjørling 于2023年3月23日周四 21:26写道: > > On 23/03/2023 06.28, Sam Li wrote: > > This patch adds zoned storage emulation to the virtio-blk driver. > > > > The patch implements the virtio-blk ZBD support standardization that is > > recently accepted by virtio-spec. The link to related commit is

Re: QMP command dumpdtb crash bug

2023-03-23 Thread Markus Armbruster
Peter, Daniel offers two ways to fix this bug (see below). Got a preference? Daniel Henrique Barboza writes: > On 3/23/23 03:29, Markus Armbruster wrote: >> Watch this: >> >> $ gdb --args ../qemu/bld/qemu-system-aarch64 -S -M virt -display none >> -qmp stdio >> [...] >> (gdb)

Re: [PATCH] hw/xenpv: Initialize Xen backend operations

2023-03-23 Thread Paul Durrant
On 23/03/2023 10:57, David Woodhouse wrote: From: David Woodhouse As the Xen backend operations were abstracted out into a function table to allow for internally emulated Xen support, we missed the xen_init_pv() code path which also needs to install the operations for the true Xen libraries.

[PATCH 1/1] accel/kvm/kvm-all: fix vm crash when set dirty ring and memorybacking

2023-03-23 Thread Jiajing Zhou
From: "zhoujiajing.vergil" It is possible enter this function when the cpu not finished creating but is already in the cpu list. The value of dirty_gfns is null, causing vm crash here. When both dirty-ring and memorybacking are set, creating a vm will assert on kvm_dirty_ring_reap_one. Part of

vhost-user's disk can support physical_block_size=4096, logical_block_size=512?

2023-03-23 Thread 顾泽兵 via
Hello community, I have a disk with both logical and physical sector size being 4096. I have a qcow2 image which is built from a virtual machine has legacy 512 bytes sector size. I use spdk-vhost as the backend storage. The commandline of qemu is like this: /usr/bin/qemu-system-x86_64 \

[RFC] accel/kvm/kvm-all: fix vm crash when set dirty ring and memorybacking

2023-03-23 Thread Jiajing Zhou
From: "zhoujiajing.vergil" It is possible enter this function when the cpu not finished creating but is already in the cpu list. The value of dirty_gfns is null, causing vm crash here. The call stack is as follows: kvm_dirty_ring_reaper_thread -> kvm_dirty_ring_reap

Re: [PATCH 00/45] Add RISC-V vector cryptographic instruction set support

2023-03-23 Thread Daniel Henrique Barboza
Hi, On 3/10/23 13:03, Lawrence Hunter wrote: NB: this is an update over the patch series submitted today (2023/03/10) at 09:11. It fixes some accidental mangling of commits 02, 04 and 08/45. This patchset provides an implementation for Zvkb, Zvkned, Zvknh, Zvksh, Zvkg, and Zvksed of the

Re: [PATCH 3/3] New I2C: Add support for TPM devices over I2C bus

2023-03-23 Thread Stefan Berger
On 3/22/23 23:01, Ninad Palsule wrote: Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. I2C model only supports TPM2 protocol. This commit includes changes for the common code. - Added I2C emulation model. Logic was added

Re: QMP command dumpdtb crash bug

2023-03-23 Thread Daniel Henrique Barboza
On 3/23/23 03:29, Markus Armbruster wrote: Watch this: $ gdb --args ../qemu/bld/qemu-system-aarch64 -S -M virt -display none -qmp stdio [...] (gdb) r [...] {"QMP": {"version": {"qemu": {"micro": 50, "minor": 2, "major": 7}, "package": "v7.2.0-2331-gda89f78a7d"},

Re: [PATCH 00/45] Add RISC-V vector cryptographic instruction set support

2023-03-23 Thread Christoph Müllner
On Thu, Mar 23, 2023 at 12:34 PM Lawrence Hunter wrote: > > On 21/03/2023 12:02, Christoph Müllner wrote: > > On Fri, Mar 10, 2023 at 10:16 AM Lawrence Hunter > > wrote: > >> > >> This patchset provides an implementation for Zvkb, Zvkned, Zvknh, > >> Zvksh, Zvkg, and Zvksed of the draft RISC-V

Re: [PATCH 00/45] Add RISC-V vector cryptographic instruction set support

2023-03-23 Thread Lawrence Hunter
On 21/03/2023 12:02, Christoph Müllner wrote: On Fri, Mar 10, 2023 at 10:16 AM Lawrence Hunter wrote: This patchset provides an implementation for Zvkb, Zvkned, Zvknh, Zvksh, Zvkg, and Zvksed of the draft RISC-V vector cryptography extensions as per the 20230303 version of the

Re: [PATCH 02/45] target/riscv: Refactor some of the generic vector functionality

2023-03-23 Thread Lawrence Hunter
On 21/03/2023 12:02, Christoph Müllner wrote: On Fri, Mar 10, 2023 at 5:06 PM Lawrence Hunter wrote: From: Kiran Ostrolenk Summary of refactoring: * take some functions/macros out of `vector_helper` and put them in a new module called `vector_internals` * factor the non SEW-specific stuff

Re: [PATCH] hw/arm/virt: support both pl011 and 16550 uart

2023-03-23 Thread Peter Maydell
On Wed, 22 Mar 2023 at 23:27, Patrick Venture wrote: > > From: Shu-Chun Weng > > Select uart for virt machine from pl011 and ns16550a with > -M virt,uart={pl011|ns16550a}. Firm "no". The PL011 is a perfectly good UART widely supported by guest OSes, and there is no reason why we should want to

Re: [PATCH] hw/nvme: Change alignment in dma functions for nvme_blk_*

2023-03-23 Thread Klaus Jensen
On Mar 20 13:40, Mateusz Kozlowski wrote: > Since the nvme_blk_read/write are used by both the data and metadata > portions of the IO, it can't have the 512B alignment requirement. > Without this change any metadata transfer, which length isn't a multiple > of 512B and which is bigger than 512B,

[PATCH] hw/xenpv: Initialize Xen backend operations

2023-03-23 Thread David Woodhouse
From: David Woodhouse As the Xen backend operations were abstracted out into a function table to allow for internally emulated Xen support, we missed the xen_init_pv() code path which also needs to install the operations for the true Xen libraries. Add the missing call to

Re: [PATCH v2 09/27] hw/xen: Add evtchn operations to allow redirection to internal emulation

2023-03-23 Thread David Woodhouse
On Thu, 2023-03-23 at 10:29 +, Anthony PERARD wrote: > On Tue, Mar 07, 2023 at 05:17:32PM +, David Woodhouse wrote: > > From: David Woodhouse > > > > The existing implementation calling into the real libxenevtchn moves to > > a new file hw/xen/xen-operations.c, and is called via a

Example output for query-vcpu-dirty-limit

2023-03-23 Thread Markus Armbruster
query-vcpu-dirty-limit's doc comment has an example, but it shows only input, no output: ## # @query-vcpu-dirty-limit: # # Returns information about virtual CPU dirty page rate limits, if any. # # Since: 7.1 # # Example: # {"execute":

Re: QMP command set-vcpu-dirty-limit hangs

2023-03-23 Thread Markus Armbruster
Hyman Huang writes: > 在 2023/3/23 14:54, Markus Armbruster 写道: >> Watch this: >> $ qemu-system-x86_64 -S -display none -qmp stdio -accel >> kvm,dirty-ring-size=1024 >> {"QMP": {"version": {"qemu": {"micro": 90, "minor": 2, "major": 7}, >> "package":

Re: [PATCH v2 09/27] hw/xen: Add evtchn operations to allow redirection to internal emulation

2023-03-23 Thread Anthony PERARD via
On Tue, Mar 07, 2023 at 05:17:32PM +, David Woodhouse wrote: > From: David Woodhouse > > The existing implementation calling into the real libxenevtchn moves to > a new file hw/xen/xen-operations.c, and is called via a function table > which in a subsequent commit will also be able to invoke

Re: [PATCH v4 0/2] pci: slot_reserved_mask improvements

2023-03-23 Thread Mark Cave-Ayland
On 15/03/2023 14:26, Chuck Zmudzinski wrote: This patch series consists of two patches. The first provides accessor functions in pci.h to avoid direct access of slot_reserved_mask according to the comment at the top of include/hw/pci/pci_bus.h. No functional change is intended with this patch.

[RFC PATCH v1] hw/misc: add i2c slave device that passes i2c ops outside

2023-03-23 Thread Karol Nowak
Hi, There is a feature I prepared which may be practical for some QEMU users. The feature provides a new I2C slave device that prepares a message depending what i2c-slave callback was called and sends it outside of QEMU through the character device to a client that receives that message,

Re: [PULL 22/30] gdbstub: only compile gdbstub twice for whole build

2023-03-23 Thread Philippe Mathieu-Daudé
Hi Alex, Paolo, On 7/3/23 22:21, Alex Bennée wrote: Now we have removed any target specific bits from the core gdbstub code we only need to build it twice. We have to jump a few meson hoops to manually define the CONFIG_USER_ONLY symbol but it seems to work. Reviewed-by: Richard Henderson

Re: QMP command set-vcpu-dirty-limit hangs

2023-03-23 Thread Hyman Huang
在 2023/3/23 14:54, Markus Armbruster 写道: Watch this: $ qemu-system-x86_64 -S -display none -qmp stdio -accel kvm,dirty-ring-size=1024 {"QMP": {"version": {"qemu": {"micro": 90, "minor": 2, "major": 7}, "package": "v8.0.0-rc0-15-g918ee397b6-dirty"}, "capabilities": ["oob"]}}

[PULL 1/1] accel/xen: Fix DM state change notification in dm_restrict mode

2023-03-23 Thread Anthony PERARD via
From: David Woodhouse When dm_restrict is set, QEMU isn't permitted to update the XenStore node to indicate its running status. Previously, the xs_write() call would fail but the failure was ignored. However, in refactoring to allow for emulated XenStore operations, a new call to xs_open() was

[PULL 0/1] xen queue

2023-03-23 Thread Anthony PERARD via
tags/pull-xen-20230323 for you to fetch changes up to f75e4f2234e7339c16c1dba048bf131a2a948f84: accel/xen: Fix DM state change notification in dm_restrict mode (2023-03-23 09:56:54 +) Xen queue - fix guest creation when -xen

Re: [PATCH v6 2/3] qga: Add `merged` variant to GuestExecCaptureOutputMode

2023-03-23 Thread Daniel P . Berrangé
On Wed, Mar 22, 2023 at 06:19:27PM -0600, Daniel Xu wrote: > 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

Re: [PATCH v2 2/2] cirrus-ci: Remove MSYS2 jobs duplicated with gitlab-ci

2023-03-23 Thread Daniel P . Berrangé
On Thu, Mar 23, 2023 at 09:37:40AM +0100, Thomas Huth wrote: > On 22/03/2023 19.37, Daniel P. Berrangé wrote: > > On Wed, Mar 22, 2023 at 02:57:21PM +0100, Philippe Mathieu-Daudé wrote: > ... > > > diff --git a/.cirrus.yml b/.cirrus.yml > > > deleted file mode 100644 > > > index

Re: out of CI pipeline minutes again

2023-03-23 Thread Paolo Bonzini
On 3/21/23 17:40, Daniel P. Berrangé wrote: On Mon, Feb 27, 2023 at 12:43:55PM -0500, Stefan Hajnoczi wrote: Here are IRC logs from a discussion that has taken place about this topic. Summary: - QEMU has ~$500/month Azure credits available that could be used for CI - Burstable VMs like Azure

Re: [PATCH v2] tests/avocado: re-factor igb test to avoid timeouts

2023-03-23 Thread Alex Bennée
Akihiko Odaki writes: > On 2023/03/22 23:55, Alex Bennée wrote: >> The core of the test was utilising "ethtool -t eth1 offline" to run >> through a test sequence. For reasons unknown the test hangs under some >> configurations of the build on centos8-stream. Fundamentally running >> the old

Re: out of CI pipeline minutes again

2023-03-23 Thread Alex Bennée
Eldon Stegall writes: > On Tue, Mar 21, 2023 at 04:40:03PM +, Daniel P. Berrangé wrote: >> 3 weeks later... Any progress on getting Red Hat to assign someone to >> setup Azure for our CI ? > > I have the physical machine that we have offered to host for CI set up > with a recent version of

Re: [BUG][KVM_SET_USER_MEMORY_REGION] KVM_SET_USER_MEMORY_REGION failed

2023-03-23 Thread Simon Jones
This is full ERROR log 2023-03-23 08:00:52.362+: starting up libvirt version: 8.0.0, package: 1ubuntu7.4 (Christian Ehrhardt Tue, 22 Nov 2022 15:59:28 +0100), qemu version: 6.2.0Debian 1:6.2+dfsg-2ubuntu6.6, kernel: 5.19.0-35-generic, hostname: c1c2 LC_ALL=C \

Re: [PULL 034/126] softmmu: Extract watchpoint API from physmem.c

2023-03-23 Thread David Hildenbrand
On 23.03.23 09:54, Philippe Mathieu-Daudé wrote: On 27/2/23 15:00, Philippe Mathieu-Daudé wrote: The watchpoint API is specific to TCG system emulation. I'm seeing CPUWatchpoint being used by KVM: $ git grep CPUWatchpoint|fgrep kvm target/arm/kvm64.c:1558:CPUWatchpoint *wp =

  1   2   >