Re: [PATCH v7 03/11] target/riscv: Add cycle & instret privilege mode filtering properties

2024-07-10 Thread Atish Kumar Patra
On Tue, Jul 2, 2024 at 7:03 PM Alistair Francis wrote: > > On Thu, Jun 27, 2024 at 9:59 AM Atish Patra wrote: > > > > From: Kaiwen Xue > > > > This adds the properties for ISA extension smcntrpmf. Patches > > implementing it will follow. > > > > Signed-off-by: Atish Patra > > Signed-off-by: Kai

Re: [PATCH 5/8] aspeed: Set eMMC 'boot-config' property to reflect HW strapping

2024-07-10 Thread Philippe Mathieu-Daudé
On 10/7/24 07:14, Cédric Le Goater wrote: On 7/9/24 11:32 PM, Philippe Mathieu-Daudé wrote: On 5/7/24 17:52, Philippe Mathieu-Daudé wrote: On 5/7/24 15:28, Philippe Mathieu-Daudé wrote: On 5/7/24 07:38, Cédric Le Goater wrote: On 7/5/24 5:41 AM, Andrew Jeffery wrote: On Thu, 2024-07-04 at 07

Re: [PATCH v2] i386/sev: Don't allow automatic fallback to legacy KVM_SEV*_INIT

2024-07-10 Thread Daniel P . Berrangé
On Tue, Jul 09, 2024 at 11:10:05PM -0500, Michael Roth wrote: > Currently if the 'legacy-vm-type' property of the sev-guest object is > 'on', QEMU will attempt to use the newer KVM_SEV_INIT2 kernel > interface in conjunction with the newer KVM_X86_SEV_VM and > KVM_X86_SEV_ES_VM KVM VM types. > > T

Re: [PATCH] i386/sev: Don't allow automatic fallback to legacy KVM_SEV*_INIT

2024-07-10 Thread Daniel P . Berrangé
On Tue, Jul 09, 2024 at 11:03:19PM -0500, Michael Roth wrote: > On Thu, Jul 04, 2024 at 11:53:33AM +0200, Paolo Bonzini wrote: > > On Thu, Jul 4, 2024 at 11:39 AM Daniel P. Berrangé > > wrote: > > > > The debug_swap parameter simply could not be enabled in the old API > > > > without breaking mea

Re: [PATCH v2] i386/sev: Don't allow automatic fallback to legacy KVM_SEV*_INIT

2024-07-10 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] e1000: Fix the unexpected assumption that the receive buffer is full

2024-07-10 Thread Jason Wang
On Wed, Jul 10, 2024 at 2:26 PM Yong Huang wrote: > > > > On Wed, Jul 10, 2024 at 11:44 AM Jason Wang wrote: >> >> On Tue, Jul 9, 2024 at 10:56 AM Yong Huang wrote: >> > >> > >> > >> > On Tue, Jul 9, 2024 at 10:41 AM Jason Wang wrote: >> >> >> >> On Mon, Jul 8, 2024 at 1:17 PM Yong Huang wrote

Re: [PATCH] hw/nvme: Fix memory leak in nvme_dsm

2024-07-10 Thread Klaus Jensen
On Jul 3 01:13, Zheyu Ma wrote: > The allocated memory to hold LBA ranges leaks in the nvme_dsm function. This > happens because the allocated memory for iocb->range is not freed in all > error handling paths. > > Fix this by adding a free to ensure that the allocated memory is properly > freed.

Re: [PATCH v7 05/11] target/riscv: Add cycle & instret privilege mode filtering support

2024-07-10 Thread Atish Kumar Patra
On Tue, Jul 2, 2024 at 6:19 PM Alistair Francis wrote: > > On Thu, Jun 27, 2024 at 10:00 AM Atish Patra wrote: > > > > From: Kaiwen Xue > > > > QEMU only calculates dummy cycles and instructions, so there is no > > actual means to stop the icount in QEMU. Hence this patch merely adds > > the fun

[PATCH] vhsot-user: Remove redundant judgment

2024-07-10 Thread BillXiang
From: BillXiang Send only once has been supported in vhost_user_write by vhost_user_per_device_request Signed-off-by: BillXiang --- hw/virtio/vhost-user.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 00561daa06..04e3568b7e 10064

Re: [PATCH 5/8] aspeed: Set eMMC 'boot-config' property to reflect HW strapping

2024-07-10 Thread Cédric Le Goater
On 7/10/24 9:07 AM, Philippe Mathieu-Daudé wrote: On 10/7/24 07:14, Cédric Le Goater wrote: On 7/9/24 11:32 PM, Philippe Mathieu-Daudé wrote: On 5/7/24 17:52, Philippe Mathieu-Daudé wrote: On 5/7/24 15:28, Philippe Mathieu-Daudé wrote: On 5/7/24 07:38, Cédric Le Goater wrote: On 7/5/24 5:41

Re: [PATCH] contrib/elf2dmp: a workaround for the buggy msvcrt.dll!fwrite

2024-07-10 Thread hellord
> On Tue, Jul 9, 2024 at 10:39 PM Peter Maydell > wrote: > > +#define MAX_CHUNK_SIZE (128 * 1024 * 1024) > > I think we could add a comment here, something like: > > /* > * Maximum size to fwrite() to the output file at once; > * the MSVCRT runtime will not correctly handle fwrite() > * of m

Re: [PATCH v47 00/19] hw/sd/sdcard: Add eMMC support

2024-07-10 Thread Cédric Le Goater
On 7/10/24 6:58 AM, Cédric Le Goater wrote: On 7/9/24 11:39 PM, Philippe Mathieu-Daudé wrote: On 9/7/24 17:58, Cédric Le Goater wrote: On 7/9/24 5:25 PM, Philippe Mathieu-Daudé wrote: Since v42: - Stick to spec v4.3 (re-simplified EXT_CSD register & migrate) - Fill CID register - Few changes t

Re: [PATCH] target/loongarch/gdbstub: Add vector registers support

2024-07-10 Thread gaosong
Ping ! 在 2024/6/21 下午2:54, Song Gao 写道: GDB already support LoongArch vector extension[1], QEMU gdb adds LoongArch vector registers support, so that users can use 'info all-registers' to get all vector registers values. [1]: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=1e9569f

Re: [PATCH v4 09/19] hw/arm/smmu-common: Rework TLB lookup for nesting

2024-07-10 Thread Mostafa Saleh
Hi Jean, On Tue, Jul 09, 2024 at 06:13:45PM +0100, Jean-Philippe Brucker wrote: > On Tue, Jul 09, 2024 at 07:14:19AM +, Mostafa Saleh wrote: > > Hi Jean, > > > > On Thu, Jul 04, 2024 at 07:12:35PM +0100, Jean-Philippe Brucker wrote: > > > On Mon, Jul 01, 2024 at 11:02:31AM +, Mostafa Sale

Re: [RFC PATCH v4 5/7] .gitattributes: add Rust diff and merge attributes

2024-07-10 Thread Alex Bennée
Manos Pitsidianakis writes: > Set rust source code to diff=rust (built-in with new git versions) > and merge=binary for Cargo.lock files (they should not be merged but > auto-generated by cargo) > > Signed-off-by: Manos Pitsidianakis Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tec

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-10 Thread Alex Bennée
Manos Pitsidianakis writes: > Add mechanism to generate rust hw targets that depend on a custom > bindgen target for rust bindings to C. > > + # We need one bindings_rs build target per arch target, so give them > + # arch-specific names. > + copy = fs.copyfile('rust/wrapper.h', >

Re: [PATCH] plugins/stoptrigger: TCG plugin to stop execution under conditions

2024-07-10 Thread Alex Bennée
Simon Hamelin writes: > This new plugin allows to stop emulation using conditions on the > emulation state. By setting this plugin arguments, it is possible > to set an instruction count limit and/or trigger address(es) to stop at. > The code returned at emulation exit can be customized. > > This

Re: [PATCH] e1000: Fix the unexpected assumption that the receive buffer is full

2024-07-10 Thread Yong Huang
On Wed, Jul 10, 2024 at 3:36 PM Jason Wang wrote: > On Wed, Jul 10, 2024 at 2:26 PM Yong Huang wrote: > > > > > > > > On Wed, Jul 10, 2024 at 11:44 AM Jason Wang wrote: > >> > >> On Tue, Jul 9, 2024 at 10:56 AM Yong Huang > wrote: > >> > > >> > > >> > > >> > On Tue, Jul 9, 2024 at 10:41 AM Jas

Re: [PATCH] hw/nvme: actually implement abort

2024-07-10 Thread Klaus Jensen
On Jul 2 20:55, Klaus Jensen wrote: > On Jul 2 09:24, Keith Busch wrote: > > On Tue, Jul 02, 2024 at 01:32:32PM +0530, Ayush Mishra wrote: > > > Abort was not implemented previously, but we can implement it for AERs > > > and asynchrnously for I/O. > > > > Not implemented for a reason. The targ

Re: [PATCH v3 01/10] vfio/iommufd: Don't fail to realize on IOMMU_GET_HW_INFO failure

2024-07-10 Thread Joao Martins
On 10/07/2024 03:53, Duan, Zhenzhong wrote: > > >> -Original Message- >> From: Joao Martins >> Subject: Re: [PATCH v3 01/10] vfio/iommufd: Don't fail to realize on >> IOMMU_GET_HW_INFO failure >> >> On 09/07/2024 12:45, Joao Martins wrote: >>> On 09/07/2024 09:56, Joao Martins wrote: >>>

Re: [PATCH] target/loongarch/gdbstub: Add vector registers support

2024-07-10 Thread maobibo
On 2024/6/21 下午2:54, Song Gao wrote: GDB already support LoongArch vector extension[1], QEMU gdb adds LoongArch vector registers support, so that users can use 'info all-registers' to get all vector registers values. [1]: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=1e9569f3

Re: [PULL 13/42] target/i386: use gen_writeback() within gen_POP()

2024-07-10 Thread Clément Chigot
Hi Mark, This patch introduces regressions in our x86_64 VxWorks kernels running over qemu. Some page faults are triggered randomly. Earlier to this patch, the MemOp `ot` passed to `gen_op_st_v` was the `gen_pop_T0` created a few lines above. Now, this is `op->ot` which comes from elsewhere. Add

RE: [PATCH v3 01/10] vfio/iommufd: Don't fail to realize on IOMMU_GET_HW_INFO failure

2024-07-10 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v3 01/10] vfio/iommufd: Don't fail to realize on >IOMMU_GET_HW_INFO failure > >On 10/07/2024 03:53, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Joao Martins >>> Subject: Re: [PATCH v3 01/10] vfio/iomm

Re: [PATCH v3 01/10] vfio/iommufd: Don't fail to realize on IOMMU_GET_HW_INFO failure

2024-07-10 Thread Joao Martins
On 10/07/2024 10:54, Duan, Zhenzhong wrote: > > >> -Original Message- >> From: Joao Martins >> Subject: Re: [PATCH v3 01/10] vfio/iommufd: Don't fail to realize on >> IOMMU_GET_HW_INFO failure >> >> On 10/07/2024 03:53, Duan, Zhenzhong wrote: >>> >>> -Original Message-

[PATCH v2 2/2] target/riscv: Add textra matching condition for the triggers

2024-07-10 Thread Alvin Chang via
According to RISC-V Debug specification, the optional textra32 and textra64 trigger CSRs can be used to configure additional matching conditions for the triggers. For example, if the textra.MHSELECT field is set to 4 (mcontext), this trigger will only match or fire if the low bits of mcontext/hcont

[PATCH v2 1/2] target/riscv: Preliminary textra trigger CSR writting support

2024-07-10 Thread Alvin Chang via
This commit allows program to write textra trigger CSR for type 2, 3, 6 triggers. In this preliminary patch, the textra.MHVALUE and the textra.MHSELECT fields are allowed to be configured. Other fields, such as textra.SBYTEMASK, textra.SVALUE, and textra.SSELECT, are hardwired to zero for now. For

[PATCH v2 0/2] RISC-V: Add preliminary textra trigger CSR functions

2024-07-10 Thread Alvin Chang via
According to RISC-V Debug specification, the optional textra32 and textra64 trigger CSRs can be used to configure additional matching conditions for the triggers. This series support to write MHVALUE and MHSELECT fields into textra32 and textra64 trigger CSRs. Besides, the additional matching cond

Re: [PATCH] hw/timer/hpet: Fix wrong HPET interrupts

2024-07-10 Thread Paolo Bonzini
Hello! Thanks for looking after the HPET, which is not a very well maintained device. I am not sure your patch needs to mask the comparator with timer->cmp &= 0xULL; I think that's a bug in the "case HPET_TN_CMP + 4" part of hpet_ram_write. The logic was changed in "hpet: Fix

[RFC] Per-request private data in virtio-block

2024-07-10 Thread Dmitry Fleytman
Hello QEMU-DEVEL! It's been a while… I work on a solution for "smart" IO caching on the host side. The configuration is virtio-block device backed by SPDK with OCF/OpenCAS on top of remote storage. To improve decision making for caching, I would like to have an additional per-request contextual i

RE: [PATCH v3 09/10] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-10 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v3 09/10] vfio/migration: Don't block migration device dirty >tracking is unsupported > >By default VFIO migration is set to auto, which will support live >migration if the migration capability is set *and* also dirty page >tracki

RE: [PATCH v3 10/10] vfio/common: Allow disabling device dirty page tracking

2024-07-10 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v3 10/10] vfio/common: Allow disabling device dirty page >tracking > >The property 'x-pre-copy-dirty-page-tracking' allows disabling the whole >tracking of VF pre-copy phase of dirty page tracking, though it means >that it will on

Re: [PULL 13/42] target/i386: use gen_writeback() within gen_POP()

2024-07-10 Thread Paolo Bonzini
On 7/10/24 11:42, Clément Chigot wrote: Hi Mark, This patch introduces regressions in our x86_64 VxWorks kernels running over qemu. Some page faults are triggered randomly. Earlier to this patch, the MemOp `ot` passed to `gen_op_st_v` was the `gen_pop_T0` created a few lines above. Now, this is

Re: [PATCH v3 10/10] vfio/common: Allow disabling device dirty page tracking

2024-07-10 Thread Joao Martins
On 10/07/2024 11:42, Duan, Zhenzhong wrote: > > >> -Original Message- >> From: Joao Martins >> Subject: [PATCH v3 10/10] vfio/common: Allow disabling device dirty page >> tracking >> >> The property 'x-pre-copy-dirty-page-tracking' allows disabling the whole >> tracking of VF pre-copy ph

Re: [PATCH v10 06/12] pcie_sriov: Reuse SR-IOV VF device instances

2024-07-10 Thread Michael S. Tsirkin
On Wed, Jul 10, 2024 at 08:37:27AM +0200, Cédric Le Goater wrote: > Hello, > > This change introduced a regression on s390x. I could have spotted it > earlier. Sorry about that. Here is the scenario, > > QEMU now creates automatically the PCI device objects representing the > VFs when the PF devi

Re: [PATCH v3 09/10] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-10 Thread Joao Martins
On 10/07/2024 11:38, Duan, Zhenzhong wrote: > > >> -Original Message- >> From: Joao Martins >> Subject: [PATCH v3 09/10] vfio/migration: Don't block migration device dirty >> tracking is unsupported >> >> By default VFIO migration is set to auto, which will support live >> migration if t

[PATCH] tests/avocado: Remove non-working sparc leon3 test

2024-07-10 Thread Thomas Huth
The test has been marked as broken more than 4 years ago, and so far nobody ever cared to fix it. Thus let's simply remove it now ... if somebody ever needs it again, they can restore the file from an older version of QEMU. Signed-off-by: Thomas Huth --- tests/avocado/machine_sparc_leon3.py | 37

[PATCH] virtio: Always reset vhost devices

2024-07-10 Thread Hanna Czenczek
Requiring `vhost_started` to be true for resetting vhost devices in `virtio_reset()` seems like the wrong condition: Most importantly, the preceding `virtio_set_status(vdev, 0)` call will (for vhost devices) end up in `vhost_dev_stop()` (through vhost devices' `.set_status` implementations), settin

[PATCH] tests/avocado: Remove the non-working virtio_check_params test

2024-07-10 Thread Thomas Huth
The test has been marked as broken more than 4 years ago, and so far nobody ever cared to fix it. Thus let's simply remove it now ... if somebody ever needs it again, they can restore the file from an older version of QEMU. Signed-off-by: Thomas Huth --- tests/avocado/virtio_check_params.py | 14

Re: [PATCH v2 06/13] target/ppc: Hoist dcbz_size out of dcbz_common

2024-07-10 Thread BALATON Zoltan
On Tue, 9 Jul 2024, Richard Henderson wrote: The 970 logic does not apply to dcbzep, which is an e500 insn. Signed-off-by: Richard Henderson Reviewed-by: BALATON Zoltan As all callers pass GETPC() to retaddr maybe that could be moved into dcbz_common() as i had in my patch. Regards, BALA

[PATCH v2] plugins/stoptrigger: TCG plugin to stop execution under conditions

2024-07-10 Thread Simon Hamelin
This new plugin allows to stop emulation using conditions on the emulation state. By setting this plugin arguments, it is possible to set an instruction count limit and/or trigger address(es) to stop at. The code returned at emulation exit can be customized. This plugin demonstrates how someone co

Re: [PATCH v2 07/13] target/ppc: Split out helper_dbczl for 970

2024-07-10 Thread BALATON Zoltan
On Tue, 9 Jul 2024, Richard Henderson wrote: We can determine at translation time whether the insn is or is not dbczl. We must retain a runtime check against the HID5 register, but we can move that to a separate function that never affects other ppc models. Signed-off-by: Richard Henderson R

Re: [PATCH v2 08/13] target/ppc: Merge helper_{dcbz,dcbzep}

2024-07-10 Thread BALATON Zoltan
On Tue, 9 Jul 2024, Richard Henderson wrote: Merge the two and pass the mmu_idx directly from translation. Swap the argument order in dcbz_common to avoid extra swaps. Signed-off-by: Richard Henderson --- target/ppc/helper.h | 3 +-- target/ppc/mem_helper.c | 14 -- target/ppc/tr

Re: [PATCH v2 09/13] target/ppc: Improve helper_dcbz for user-only

2024-07-10 Thread BALATON Zoltan
On Tue, 9 Jul 2024, Richard Henderson wrote: Mark the reserve_addr check unlikely. Use tlb_vaddr_to_host instead of probe_write, relying on the memset itself to test for page writability. Use set/clear_helper_retaddr so that we can properly unwind on segfault. With this, a trivial loop around

Re: [PULL 13/42] target/i386: use gen_writeback() within gen_POP()

2024-07-10 Thread Clément Chigot
On Wed, Jul 10, 2024 at 12:43 PM Paolo Bonzini wrote: > > On 7/10/24 11:42, Clément Chigot wrote: > > Hi Mark, > > > > This patch introduces regressions in our x86_64 VxWorks kernels > > running over qemu. Some page faults are triggered randomly. > > > > Earlier to this patch, the MemOp `ot` passe

[PATCH v4 3/6] virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER support

2024-07-10 Thread Jonah Palmer
Add VIRTIO_F_IN_ORDER feature support for the virtqueue_fill operation. The goal of the virtqueue_ordered_fill operation when the VIRTIO_F_IN_ORDER feature has been negotiated is to search for this now-used element, set its length, and mark the element as filled in the VirtQueue's used_elems array

[PATCH v4 0/6] virtio,vhost: Add VIRTIO_F_IN_ORDER support

2024-07-10 Thread Jonah Palmer
The goal of these patches is to add support to a variety of virtio and vhost devices for the VIRTIO_F_IN_ORDER transport feature. This feature indicates that all buffers are used by the device in the same order in which they were made available by the driver. These patches attempt to implement a g

[PATCH v4 5/6] vhost, vhost-user: Add VIRTIO_F_IN_ORDER to vhost feature bits

2024-07-10 Thread Jonah Palmer via
Add support for the VIRTIO_F_IN_ORDER feature across a variety of vhost devices. The inclusion of VIRTIO_F_IN_ORDER in the feature bits arrays for these devices ensures that the backend is capable of offering and providing support for this feature, and that it can be disabled if the backend does n

[PATCH v4 2/6] virtio: virtqueue_pop - VIRTIO_F_IN_ORDER support

2024-07-10 Thread Jonah Palmer
Add VIRTIO_F_IN_ORDER feature support in virtqueue_split_pop and virtqueue_packed_pop. VirtQueueElements popped from the available/descritpor ring are added to the VirtQueue's used_elems array in-order and in the same fashion as they would be added the used and descriptor rings, respectively. Thi

[PATCH v4 6/6] virtio: Add VIRTIO_F_IN_ORDER property definition

2024-07-10 Thread Jonah Palmer
Extend the virtio device property definitions to include the VIRTIO_F_IN_ORDER feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Acked-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.h | 4 +++- 1 file

[PATCH v4 1/6] virtio: Add bool to VirtQueueElement

2024-07-10 Thread Jonah Palmer
Add the boolean 'in_order_filled' member to the VirtQueueElement structure. The use of this boolean will signify whether the element has been processed and is ready to be flushed (so long as the element is in-order). This boolean is used to support the VIRTIO_F_IN_ORDER feature. Reviewed-by: Eugen

[PATCH v4 4/6] virtio: virtqueue_ordered_flush - VIRTIO_F_IN_ORDER support

2024-07-10 Thread Jonah Palmer
Add VIRTIO_F_IN_ORDER feature support for the virtqueue_flush operation. The goal of the virtqueue_ordered_flush operation when the VIRTIO_F_IN_ORDER feature has been negotiated is to write elements to the used/descriptor ring in-order and then update used_idx. The function iterates through the V

Re: [PATCH v2 1/2] qcow2: handle discard-no-unref in measure

2024-07-10 Thread Hanna Czenczek
On 05.06.24 15:25, Jean-Louis Dupond wrote: When doing a measure on an image with a backing file and discard-no-unref is enabled, the code should take this into account. That doesn’t make sense to me.  As far as I understand, 'measure' is supposed to report how much space you need for a given

Re: [PATCH v2 2/2] qcow2: don't allow discard-no-unref when discard is not enabled

2024-07-10 Thread Hanna Czenczek
On 05.06.24 15:25, Jean-Louis Dupond wrote: When discard is not set to unmap/on, we should not allow setting discard-no-unref. Is this important?  Technically, it’s an incompatible change, and would require a deprecation warning first. (I can imagine people setting this option indiscriminate

Re: [PATCH] virtio: Always reset vhost devices

2024-07-10 Thread Matias Ezequiel Vara Larsen
Hello Hanna, On Wed, Jul 10, 2024 at 01:23:10PM +0200, Hanna Czenczek wrote: > Requiring `vhost_started` to be true for resetting vhost devices in > `virtio_reset()` seems like the wrong condition: Most importantly, the > preceding `virtio_set_status(vdev, 0)` call will (for vhost devices) end > u

RE: [PATCH v4 0/4] Implement using Intel QAT to offload ZLIB

2024-07-10 Thread Liu, Yuan1
> -Original Message- > From: Peter Xu > Sent: Wednesday, July 10, 2024 2:43 AM > To: Liu, Yuan1 > Cc: Wang, Yichen ; Paolo Bonzini > ; Daniel P. Berrangé ; Eduardo > Habkost ; Marc-André Lureau > ; Thomas Huth ; Philippe > Mathieu-Daudé ; Fabiano Rosas ; Eric > Blake ; Markus Armbruster ;

Re: [PATCH] tests/avocado: Remove the non-working virtio_check_params test

2024-07-10 Thread Philippe Mathieu-Daudé
On 10/7/24 14:03, Thomas Huth wrote: The test has been marked as broken more than 4 years ago [*] , and so far nobody ever cared to fix it. Thus let's simply remove it now ... if somebody ever needs it again, they can restore the file from an older version of QEMU. You might refer to: [*]

Re: [PATCH v2 1/4] qdev-properties: Add DEFINE_PROP_ON_OFF_AUTO_BIT64()

2024-07-10 Thread Daniel P . Berrangé
On Mon, Jul 08, 2024 at 06:43:02AM -0400, Michael S. Tsirkin wrote: > On Mon, Jul 08, 2024 at 04:38:06PM +0900, Akihiko Odaki wrote: > > DEFINE_PROP_ON_OFF_AUTO_BIT64() corresponds to DEFINE_PROP_ON_OFF_AUTO() > > as DEFINE_PROP_BIT64() corresponds to DEFINE_PROP_BOOL(). The difference > > is that

Re: [PATCH v3 06/17] hw/sd/sdcard: Do not store vendor data on block drive (CMD56)

2024-07-10 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Jul 09, 2024 at 05:38:54PM -0300, Fabiano Rosas wrote: >> Philippe Mathieu-Daudé writes: >> >> > "General command" (GEN_CMD, CMD56) is described as: >> > >> > GEN_CMD is the same as the single block read or write >> > commands (CMD24 or CMD17). The difference is t

[PATCH] target/i386/tcg: fix POP to memory in long mode

2024-07-10 Thread Paolo Bonzini
In long mode, POP to memory will write a full 64-bit value. However, the call to gen_writeback() in gen_POP will use MO_32 because the decoding table is incorrect. The bug was latent until commit aea49fbb01a ("target/i386: use gen_writeback() within gen_POP()", 2024-06-08), and then became visibl

[PATCH v48 02/12] hw/sd/sdcard: Register generic command handlers

2024-07-10 Thread Philippe Mathieu-Daudé
Tested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Tested-by: Andrew Jeffery Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index a4b6c7baba..fc78d4e561 100644 --- a/hw/sd/sd.c +++

[PATCH v48 03/12] hw/sd/sdcard: Register unimplemented command handlers

2024-07-10 Thread Philippe Mathieu-Daudé
Per the spec v4.3 these commands are mandatory, but we don't implement them. Reviewed-by: Cédric Le Goater Tested-by: Cédric Le Goater Tested-by: Andrew Jeffery Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd

[PATCH v48 01/12] hw/sd/sdcard: Basis for eMMC support

2024-07-10 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Since eMMC are soldered on boards, it is not user-creatable. RCA register is initialized to 0x0001, per spec v4.3, chapter 8.5 "RCA register": The default value of the RCA register is 0x0001. The value 0x is reserved to set all cards into the Stand-by Stat

[PATCH v48 04/12] hw/sd/sdcard: Add emmc_cmd_SET_RELATIVE_ADDR handler (CMD3)

2024-07-10 Thread Philippe Mathieu-Daudé
From: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Cédric Le Goater Tested-by: Andrew Jeffery Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 0e36b0cc2e..7e17bd0736

[PATCH v48 11/12] hw/sd/sdcard: Add mmc SWITCH function support (CMD6)

2024-07-10 Thread Philippe Mathieu-Daudé
From: Sai Pavan Boddu switch operation in mmc cards, updated the ext_csd register to request changes in card operations. Here we implement similar sequence but requests are mostly dummy and make no change. Implement SWITCH_ERROR if the write operation offset goes beyond length of ext_csd. Signe

[PATCH v48 05/12] hw/sd/sdcard: Fix SET_BLOCK_COUNT command argument on eMMC (CMD23)

2024-07-10 Thread Philippe Mathieu-Daudé
From: Cédric Le Goater The number of blocks is defined in the lower bits [15:0]. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Cédric Le Goater Tested-by: Andrew Jeffery Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/sd/sd

[PATCH v48 10/12] hw/sd/sdcard: Implement eMMC 'boot-mode'

2024-07-10 Thread Philippe Mathieu-Daudé
Spec v4.3 chapter 7.2.2 "Boot operation": If the CMD line is held LOW for 74 clock cycles and more after power-up before the first command is issued, the slave recognizes that boot mode is being initiated and starts preparing boot data internally. Track uptime since last reset, add the sd

[PATCH v48 07/12] hw/sd/sdcard: Implement eMMC sleep state (CMD5)

2024-07-10 Thread Philippe Mathieu-Daudé
From: Luc Michel The JEDEC standards specifies a sleep state where the eMMC won't answer any command appart from RESET and WAKEUP and go to low power state. Implement this state and the corresponding command number 5. Signed-off-by: Luc Michel Signed-off-by: Francisco Iglesias Signed-off-by:

[PATCH v48 00/12] hw/sd/sdcard: Add eMMC support

2024-07-10 Thread Philippe Mathieu-Daudé
Tag to test Aspeed tree: https://gitlab.com/philmd/qemu/-/tags/aspeed_emmc-v8 Since v43: - Reordered and squashed commits (Cédric) Since v42: - Stick to spec v4.3 (re-simplified EXT_CSD register & migrate) - Fill CID register - Few changes to CSD register - Implement 'boot-mode' reset timing -

[PATCH v48 12/12] hw/sd/sdcard: Support boot area in emmc image

2024-07-10 Thread Philippe Mathieu-Daudé
From: Joel Stanley This assumes a specially constructed image: dd if=/dev/zero of=mmc-bootarea.img count=2 bs=1M dd if=u-boot-spl.bin of=mmc-bootarea.img conv=notrunc dd if=u-boot.bin of=mmc-bootarea.img conv=notrunc count=64 bs=1K cat mmc-bootarea.img obmc-phosphor-image.wic > mmc.img

[PATCH v48 06/12] hw/sd/sdcard: Add mmc_cmd_PROGRAM_CID handler (CMD26)

2024-07-10 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Tested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Tested-by: Andrew Jeffery --- hw/sd/sd.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 550f63418e..3628686832 100644 --- a/hw/sd/sd.c +

Re: [PATCH v2 4/4] virtio-net: Remove fallback from ebpf-rss-fds

2024-07-10 Thread Daniel P . Berrangé
On Mon, Jul 08, 2024 at 04:38:09PM +0900, Akihiko Odaki wrote: > If ebpf-rss-fds is specified but we fail to use, we should not fall > back to loading eBPF programs by ourselves as such makes the situation > complicated. > > Suggested-by: Daniel P. Berrangé > Signed-off-by: Akihiko Odaki > --- >

[PATCH v48 08/12] hw/sd/sdcard: Add emmc_cmd_SEND_EXT_CSD handler (CMD8)

2024-07-10 Thread Philippe Mathieu-Daudé
From: Vincent Palatin The parameters mimick a real 4GB eMMC, but it can be set to various sizes. Signed-off-by: Vincent Palatin Signed-off-by: Cédric Le Goater Signed-off-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias Signed-off-by: Cédric Le Goater EXT_CSD values from Vincent's patc

[PATCH v48 09/12] hw/sd/sdcard: Add eMMC 'boot-size' property

2024-07-10 Thread Philippe Mathieu-Daudé
Avoid hardcoding 1MiB boot size in EXT_CSD_BOOT_MULT, expose it as QOM property. By default, do not use any size. The board is responsible to set the boot size property. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/

Re: [PATCH v2 06/13] target/ppc: Hoist dcbz_size out of dcbz_common

2024-07-10 Thread Richard Henderson
On 7/10/24 05:11, BALATON Zoltan wrote: On Tue, 9 Jul 2024, Richard Henderson wrote: The 970 logic does not apply to dcbzep, which is an e500 insn. Signed-off-by: Richard Henderson Reviewed-by: BALATON Zoltan As all callers pass GETPC() to retaddr maybe that could be moved into dcbz_common

Re: [PATCH v2 09/13] target/ppc: Improve helper_dcbz for user-only

2024-07-10 Thread Richard Henderson
On 7/10/24 05:25, BALATON Zoltan wrote: On Tue, 9 Jul 2024, Richard Henderson wrote: Mark the reserve_addr check unlikely.  Use tlb_vaddr_to_host instead of probe_write, relying on the memset itself to test for page writability.  Use set/clear_helper_retaddr so that we can properly unwind on seg

Re: [PATCH v2 08/13] target/ppc: Merge helper_{dcbz,dcbzep}

2024-07-10 Thread Richard Henderson
On 7/10/24 05:20, BALATON Zoltan wrote: On Tue, 9 Jul 2024, Richard Henderson wrote: Merge the two and pass the mmu_idx directly from translation. Swap the argument order in dcbz_common to avoid extra swaps. Signed-off-by: Richard Henderson --- target/ppc/helper.h |  3 +-- target/ppc/mem_h

Re: [PATCH 8/8] qapi: remove "Example" doc section

2024-07-10 Thread John Snow
On Wed, Jul 10, 2024 at 1:45 AM Markus Armbruster wrote: > John Snow writes: > > > On Tue, Jul 9, 2024 at 6:52 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > Fully eliminate the "Example" sections in QAPI doc blocks now that > they > >> > have all been converted to arbitr

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-10 Thread Zhao Liu
On Tue, Jul 09, 2024 at 02:28:38PM +0200, Paolo Bonzini wrote: > > Here are the stopping points that I found over the last couple weeks: > > 1.56.0: 2021 edition > 1.59.0: const CStr::from_bytes_with_nul_unchecked (needed by cstr > crate, see below) > 1.64.0: std::ffi::c_char > 1.65.0: Generic As

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-10 Thread Paolo Bonzini
On Wed, Jul 10, 2024 at 4:48 PM Zhao Liu wrote: > > On Tue, Jul 09, 2024 at 02:28:38PM +0200, Paolo Bonzini wrote: > > > > Here are the stopping points that I found over the last couple weeks: > > > > 1.56.0: 2021 edition > > 1.59.0: const CStr::from_bytes_with_nul_unchecked (needed by cstr > > cr

Re: [PATCH v3 06/17] hw/sd/sdcard: Do not store vendor data on block drive (CMD56)

2024-07-10 Thread Peter Xu
On Wed, Jul 10, 2024 at 11:08:20AM -0300, Fabiano Rosas wrote: > >> I think it's ok: > >> > >> { > >> "field": "unused", > >> "version_id": 1, > >> "field_exists": false, > >> "size": 512 > >> }, > >> > >> vs. > >> > >> { > >> "field": "vendor_data", > >> "version_id": 0, > >> "fie

Re: [PATCH] target/i386/tcg: fix POP to memory in long mode

2024-07-10 Thread Richard Henderson
On 7/10/24 07:13, Paolo Bonzini wrote: In long mode, POP to memory will write a full 64-bit value. However, the call to gen_writeback() in gen_POP will use MO_32 because the decoding table is incorrect. The bug was latent until commit aea49fbb01a ("target/i386: use gen_writeback() within gen_PO

Re: [PATCH v4 0/4] Implement using Intel QAT to offload ZLIB

2024-07-10 Thread Peter Xu
On Wed, Jul 10, 2024 at 01:55:23PM +, Liu, Yuan1 wrote: [...] > migrate_set_parameter max-bandwidth 1250M > |---||-|--|--|--|--| > |8 Channels |Total |down |throughput|pages per | send | recv | > | |time(ms)|time(ms) |(mbps)|

RE: [PATCH v4 3/4] migration: Introduce 'qatzip' compression method

2024-07-10 Thread Liu, Yuan1
> -Original Message- > From: Yichen Wang > Sent: Saturday, July 6, 2024 2:29 AM > To: Paolo Bonzini ; Daniel P. Berrangé > ; Eduardo Habkost ; Marc-André > Lureau ; Thomas Huth ; > Philippe Mathieu-Daudé ; Peter Xu ; > Fabiano Rosas ; Eric Blake ; Markus > Armbruster ; Laurent Vivier ; qem

Re: [PATCH 02/10] target/i386/tcg: Allow IRET from user mode to user mode with SMAP

2024-07-10 Thread Richard Henderson
On 7/9/24 23:29, Paolo Bonzini wrote: This fixes a bug wherein i386/tcg assumed an interrupt return using the IRET instruction was always returning from kernel mode to either kernel mode or user mode. This assumption is violated when IRET is used as a clever way to restore thread state, as for ex

Re: [PATCH] tests/avocado: Remove non-working sparc leon3 test

2024-07-10 Thread Alex Bennée
Thomas Huth writes: > The test has been marked as broken more than 4 years ago, and > so far nobody ever cared to fix it. Thus let's simply remove it > now ... if somebody ever needs it again, they can restore the > file from an older version of QEMU. > > Signed-off-by: Thomas Huth Acked-by: Al

Re: [PATCH 03/10] target/i386/tcg: use PUSHL/PUSHW for error code

2024-07-10 Thread Richard Henderson
On 7/9/24 23:29, Paolo Bonzini wrote: Do not pre-decrement esp, let the macros subtract the appropriate operand size. Signed-off-by: Paolo Bonzini --- target/i386/tcg/seg_helper.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) Reviewed-by: Richard Henderson r~

[PATCH] scsi: fix regression and honor bootindex again for legacy drives

2024-07-10 Thread Fiona Ebner
Commit 3089637461 ("scsi: Don't ignore most usb-storage properties") removed the call to object_property_set_int() and thus the 'set' method for the bootindex property was also not called anymore. Here that method is device_set_bootindex() (as configured by scsi_dev_instance_init() -> device_add_bo

Re: [RFC PATCH v4] ptp: Add vDSO-style vmclock support

2024-07-10 Thread Peter Hilber via
On 08.07.24 11:27, David Woodhouse wrote: > From: David Woodhouse > > The vmclock "device" provides a shared memory region with precision clock > information. By using shared memory, it is safe across Live Migration. > > Like the KVM PTP clock, this can convert TSC-based cross timestamps into >

Re: [PATCH v48 00/12] hw/sd/sdcard: Add eMMC support

2024-07-10 Thread Cédric Le Goater
On 7/10/24 4:13 PM, Philippe Mathieu-Daudé wrote: Tag to test Aspeed tree: https://gitlab.com/philmd/qemu/-/tags/aspeed_emmc-v8 Since v43: - Reordered and squashed commits (Cédric) Since v42: - Stick to spec v4.3 (re-simplified EXT_CSD register & migrate) - Fill CID register - Few changes to

[RFC PATCH] build deps: update lcitool to include rust bits

2024-07-10 Thread Alex Bennée
For rust development we need cargo, rustc and bindgen in our various development environments. Update the libvirt-ci project to (!495) and regenerate the containers and other dependency lists. Signed-off-by: Alex Bennée --- NB: - this is currently waiting on the upstream MR, but if you manuall

Re: [PATCH] arm/kvm: add support for MTE

2024-07-10 Thread Cornelia Huck
On Mon, Jul 08 2024, Ganapatrao Kulkarni wrote: > Extend the 'mte' property for the virt machine to cover KVM as > well. For KVM, we don't allocate tag memory, but instead enable > the capability. > > If MTE has been enabled, we need to disable migration, as we do not > yet have a way to migrate

RE: [PATCH v4 0/4] Implement using Intel QAT to offload ZLIB

2024-07-10 Thread Liu, Yuan1
> -Original Message- > From: Peter Xu > Sent: Wednesday, July 10, 2024 11:19 PM > To: Liu, Yuan1 > Cc: Wang, Yichen ; Paolo Bonzini > ; Daniel P. Berrangé ; Eduardo > Habkost ; Marc-André Lureau > ; Thomas Huth ; Philippe > Mathieu-Daudé ; Fabiano Rosas ; Eric > Blake ; Markus Armbruster

Re: [PATCH 06/10] target/i386/tcg: Compute MMU index once

2024-07-10 Thread Richard Henderson
On 7/9/24 23:29, Paolo Bonzini wrote: Add the MMU index to the StackAccess struct, so that it can be cached or (in the next patch) computed from information that is not in CPUX86State. Co-developed-by: Richard Henderson Signed-off-by: Richard Henderson Signed-off-by: Paolo Bonzini Reviewed-

Re: [PATCH 07/10] target/i386/tcg: Use DPL-level accesses for interrupts and call gates

2024-07-10 Thread Richard Henderson
On 7/9/24 23:29, Paolo Bonzini wrote: This fixes a bug wherein i386/tcg assumed an interrupt return using the CALL or JMP instructions were always going from kernel or user mode to kernel mode, when using a call gate. This assumption is violated if the call gate has a DPL that is greater than 0.

Re: [PATCH 08/10] target/i386/tcg: check for correct busy state before switching to a new task

2024-07-10 Thread Richard Henderson
On 7/9/24 23:29, Paolo Bonzini wrote: This step is listed in the Intel manual: "Checks that the new task is available (call, jump, exception, or interrupt) or busy (IRET return)". The AMD manual lists the same operation under the "Preventing recursion" paragraph of "12.3.4 Nesting Tasks", though

Re: [RFC PATCH v4] ptp: Add vDSO-style vmclock support

2024-07-10 Thread David Woodhouse
On Wed, 2024-07-10 at 15:07 +0200, Peter Hilber wrote: > On 08.07.24 11:27, David Woodhouse wrote: > > From: David Woodhouse > > > > The vmclock "device" provides a shared memory region with precision clock > > information. By using shared memory, it is safe across Live Migration. > > > > Like t

Re: [RFC PATCH 6/7] migration/multifd: Move payload storage out of the channel parameters

2024-07-10 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Jun 27, 2024 at 11:27:08AM +0800, Wang, Lei wrote: >> > Or graphically: >> > >> > 1) client fills the active slot with data. Channels point to nothing >> >at this point: >> > [a] <-- active slot >> > [][][][] <-- free slots, one per-channel >> > >> > []

Re: [PATCH v4 4/6] virtio: virtqueue_ordered_flush - VIRTIO_F_IN_ORDER support

2024-07-10 Thread Eugenio Perez Martin
On Wed, Jul 10, 2024 at 2:56 PM Jonah Palmer wrote: > > Add VIRTIO_F_IN_ORDER feature support for the virtqueue_flush operation. > > The goal of the virtqueue_ordered_flush operation when the > VIRTIO_F_IN_ORDER feature has been negotiated is to write elements to > the used/descriptor ring in-orde

Re: [PATCH v3 06/17] hw/sd/sdcard: Do not store vendor data on block drive (CMD56)

2024-07-10 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Jul 10, 2024 at 11:08:20AM -0300, Fabiano Rosas wrote: >> >> I think it's ok: >> >> >> >> { >> >> "field": "unused", >> >> "version_id": 1, >> >> "field_exists": false, >> >> "size": 512 >> >> }, >> >> >> >> vs. >> >> >> >> { >> >> "field": "vendor_data", >

Re: [PATCH] contrib/elf2dmp: a workaround for the buggy msvcrt.dll!fwrite

2024-07-10 Thread Peter Maydell
On Wed, 10 Jul 2024 at 09:02, hellord wrote: > > >> >> >> On Tue, Jul 9, 2024 at 10:39 PM Peter Maydell >> wrote: >> Is there a particular reason to use 128MB here? If the >> runtime only fails on 4GB or more, maybe we should use >> a larger MAX_CHUNK_SIZE, like 2GB ? > > > According to current

  1   2   >