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

2024-07-10 Thread Clément Chigot
On Wed, Jul 10, 2024 at 5:25 PM Alex Bennée wrote: > > 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 old

Re: [PATCH 09/10] target/i386/tcg: use X86Access for TSS access

2024-07-10 Thread Paolo Bonzini
On 7/10/24 20:40, Paolo Bonzini wrote: Il mer 10 lug 2024, 18:47 Richard Henderson mailto:richard.hender...@linaro.org>> ha scritto: On 7/9/24 23:29, Paolo Bonzini wrote: > This takes care of probing the vaddr range in advance, and is also faster > because it avoids repeat

Re: [PATCH 2/2] block/graph-lock: Make WITH_GRAPH_RDLOCK_GUARD() fully checked

2024-07-10 Thread Manos Pitsidianakis
On Thu, 27 Jun 2024 at 21:13, Kevin Wolf wrote: > > Upstream clang 18 (and backports to clang 17 in Fedora and RHEL) > implemented support for __attribute__((cleanup())) in its Thread Safety > Analysis, so we can now actually have a proper implementation of > WITH_GRAPH_RDLOCK_GUARD() that underst

Re: [PATCH 0/2] block/graph-lock: Make WITH_GRAPH_RDLOCK_GUARD() fully checked

2024-07-10 Thread Stefan Hajnoczi
On Thu, Jun 27, 2024 at 08:12:43PM +0200, Kevin Wolf wrote: > Newer clang versions allow us to check scoped guards more thoroughly. > Surprisingly, we only seem to have missed one instance with the old > incomplete checks. > > Kevin Wolf (2): > block-copy: Fix missing graph lock > block/graph-

Re: [RFC PATCH v2 3/5] rust: add PL011 device model

2024-07-10 Thread Manos Pitsidianakis
Hey Zhao, On Thu, 11 Jul 2024 at 07:05, Zhao Liu wrote: > > Hi Manos and all, > > On Tue, Jun 11, 2024 at 01:33:32PM +0300, Manos Pitsidianakis wrote: > > diff --git a/rust/rustfmt.toml b/rust/rustfmt.toml > > new file mode 100644 > > index 00..ebecb99fe0 > > --- /dev/null > > +++ b/rust/

Re: [RFC PATCH v2 3/5] rust: add PL011 device model

2024-07-10 Thread Zhao Liu
Hi Manos and all, On Tue, Jun 11, 2024 at 01:33:32PM +0300, Manos Pitsidianakis wrote: > diff --git a/rust/rustfmt.toml b/rust/rustfmt.toml > new file mode 100644 > index 00..ebecb99fe0 > --- /dev/null > +++ b/rust/rustfmt.toml > @@ -0,0 +1,7 @@ > +edition = "2021" > +format_generated_file

Re: [PATCH 2/2] MAINTAINERS: Add myself as a reviewer of LoongArch virt machine

2024-07-10 Thread gaosong
在 2024/6/27 下午12:13, Jiaxun Yang 写道: I would like to be informed on changes made to the LoongArch virt machine. I'm fairly familiar with Loongson-3 series platform hardware and doing firmwre (U-Boot) development as hobbyist on LoongArch virt platform, so I believe I can give positive review inpu

Re: [PATCH V13 4/8] hw/acpi: Update GED _EVT method AML with CPU scan

2024-07-10 Thread Salil Mehta
Hi Igor, On 06/07/2024 14:28, Igor Mammedov wrote: On Fri, 7 Jun 2024 12:56:45 +0100 Salil Mehta wrote: OSPM evaluates _EVT method to map the event. The CPU hotplug event eventually results in start of the CPU scan. Scan figures out the CPU and the kind of event(plug/unplug) and notifies it

Re: [PATCH] hw/loongarch: Modify flash block size to 256K

2024-07-10 Thread gaosong
在 2024/6/24 上午11:33, Xianglai Li 写道: loongarch added a common library for edk2 to parse flash base addresses through fdt. For compatibility with other architectures, the flash block size in qemu is now changed to 256k. Signed-off-by: Xianglai Li --- Cc: Bibo Mao Cc: Song Gao Reviewed-by: Son

Re: [PATCH] hw/loongarch: Change the tpm support by default

2024-07-10 Thread gaosong
在 2024/6/24 上午11:23, Xianglai Li 写道: Add devices that support tpm by default, Fixed incomplete tpm acpi table information. Signed-off-by: Xianglai Li --- Cc: Bibo Mao Cc: Paolo Bonzini Cc: Song Gao Reviewed-by: Song Gao Thanks. Song Gao hw/loongarch/Kconfig | 1 + hw/loongarch/ac

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

2024-07-10 Thread 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=1e9569f383a3d5a88ee07d0c2401bd95613c222e Signed-o

[PATCH v5 5/5] tests/migration: Add integration test for 'qatzip' compression method

2024-07-10 Thread Yichen Wang
From: Bryan Zhang Adds an integration test for 'qatzip'. Signed-off-by: Bryan Zhang Signed-off-by: Hao Xiang Signed-off-by: Yichen Wang Reviewed-by: Fabiano Rosas Signed-off-by: Yichen Wang --- tests/qtest/migration-test.c | 35 +++ 1 file changed, 35 insert

[PATCH v5 2/5] meson: Introduce 'qatzip' feature to the build system

2024-07-10 Thread Yichen Wang
From: Bryan Zhang Add a 'qatzip' feature, which is automatically disabled, and which depends on the QATzip library if enabled. Signed-off-by: Bryan Zhang Signed-off-by: Hao Xiang Signed-off-by: Yichen Wang --- meson.build | 10 ++ meson_options.txt | 2

[PATCH v5 3/5] migration: Add migration parameters for QATzip

2024-07-10 Thread Yichen Wang
From: Bryan Zhang Adds support for migration parameters to control QATzip compression level and to enable/disable software fallback when QAT hardware is unavailable. This is a preparatory commit for a subsequent commit that will actually use QATzip compression. Signed-off-by: Bryan Zhang Signed

[PATCH v5 4/5] migration: Introduce 'qatzip' compression method

2024-07-10 Thread Yichen Wang
From: Bryan Zhang Adds support for 'qatzip' as an option for the multifd compression method parameter, and implements using QAT for 'qatzip' compression and decompression. Signed-off-by: Bryan Zhang Signed-off-by: Hao Xiang Signed-off-by: Yichen Wang --- hw/core/qdev-properties-system.c |

[PATCH v5 0/5] Implement QATzip compression method

2024-07-10 Thread Yichen Wang
v5: - Rebase changes on top of 59084feb256c617063e0dbe7e64821ae8852d7cf - Add documentations about migration with qatzip accerlation - Remove multifd-qatzip-sw-fallback option v4: - Rebase changes on top of 1a2d52c7fcaeaaf4f2fe8d4d5183dccaeab67768 - Move the IOV initialization to qatzip implementa

[PATCH v5 1/5] docs/migration: add qatzip compression feature

2024-07-10 Thread Yichen Wang
From: Yuan Liu add Intel QATzip compression method introduction Signed-off-by: Yuan Liu Reviewed-by: Nanhai Zou Reviewed-by: Peter Xu Reviewed-by: Yichen Wang --- docs/devel/migration/features.rst | 1 + docs/devel/migration/qatzip-compression.rst | 251 2 f

Re: [PATCH] hw/loongarch/virt: Remove unused assignment

2024-07-10 Thread gaosong
在 2024/6/12 上午11:36, Bibo Mao 写道: There is abuse usage about local variable gap. Remove duplicated assignment and solve Coverity reported error. Resolves: Coverity CID 1546441 Fixes: 3cc451cbce ("hw/loongarch: Refine fwcfg memory map") Signed-off-by: Bibo Mao --- Reviewed-by: Song Gao Thanks

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

2024-07-10 Thread gaosong
在 2024/7/10 下午5:37, 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=binuti

[Bug 2072564] Re: qemu-aarch64-static segfaults running ldconfig.real (amd64 host)

2024-07-10 Thread Sergio Durigan Junior
** Also affects: qemu via https://gitlab.com/qemu-project/qemu/-/issues/1913 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/2072564 Title: qemu-aarch

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 06:38:26PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Wed, Jul 10, 2024 at 04:48:23PM -0300, Fabiano Rosas wrote: > >> Peter Xu writes: > >> > >> > On Wed, Jul 10, 2024 at 01:21:51PM -0300, Fabiano Rosas wrote: > >> >> It's not about trust, we simply don't s

Re: Disassembler location

2024-07-10 Thread Richard Henderson
On 7/10/24 14:55, Paolo Bonzini wrote: The others are not hosts, only targets.  By putting the file in target//, they do not need to add it to the "disassemblers" variable in meson.build---but they add it anyway. :) We should clean that up. :-) r~

Re: Disassembler location

2024-07-10 Thread Richard Henderson
On 7/10/24 11:02, Michael Morrell wrote: I'm working on a port to a new architecture and was noticing a discrepancy in where the disassembler code lives. There is a file "target//disas.c" for 4 architectures (avr, loongarch, openrisc, and rx), but a file "disas/.c" for 14 architectures (if I c

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

2024-07-10 Thread Peter Xu
On Wed, Jul 10, 2024 at 05:16:36PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Wed, Jul 10, 2024 at 01:10:37PM -0300, Fabiano Rosas wrote: > >> Peter Xu writes: > >> > >> > On Thu, Jun 27, 2024 at 11:27:08AM +0800, Wang, Lei wrote: > >> >> > Or graphically: > >> >> > > >> >> > 1) c

Re: Disassembler location

2024-07-10 Thread Paolo Bonzini
On 7/10/24 20:02, Michael Morrell wrote: I'm working on a port to a new architecture and was noticing a discrepancy in where the disassembler code lives. There is a file "target//disas.c" for 4 architectures (avr, loongarch, openrisc, and rx), but a file "disas/.c" for 14 architectures (if I cou

Re: [PATCH] iov: don't use void* in pointer arithmetic in headers

2024-07-10 Thread Roman Kiryanov
Hi Peter, thank you for looking into this. On Tue, Jul 9, 2024 at 2:39 AM Peter Maydell wrote: > We had the question on a previous "make this C++ > compatible" patch of "how much of this stuff is there?". Unfortunately, we don't know yet (we are still upgrading to QEMU8). If this is a burden fo

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 04:48:23PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Wed, Jul 10, 2024 at 01:21:51PM -0300, Fabiano Rosas wrote: >> >> It's not about trust, we simply don't support migrations other than >> >> n->n+1 and (maybe) n->n-1. So QEMU from 20

Re: [PATCH 00/10] target/i386/tcg: fixes for seg_helper.c

2024-07-10 Thread Paolo Bonzini
Il mer 10 lug 2024, 23:01 Robert Henry ha scritto: > I have only skimmed the diffs. Your knowledge of the deep semantics, > gained by close differential reading of intel and amd docs, is truly > amazing. Many thanks for pushing this through! > Thanks for bringing this to our attention too, apa

Re: [PATCH 00/10] target/i386/tcg: fixes for seg_helper.c

2024-07-10 Thread Robert Henry
I have only skimmed the diffs. Your knowledge of the deep semantics, gained by close differential reading of intel and amd docs, is truly amazing. Many thanks for pushing this through! I have 2 nits, perhaps stylistic only. For code like "sp -= 2" or "sp += 2" followed or preceded by a write to

Re: [PATCH V1 4/8] vfio-pci: cpr part 1 (fd and dma)

2024-07-10 Thread Steven Sistare
On 7/10/2024 4:03 PM, Alex Williamson wrote: On Tue, 9 Jul 2024 13:58:53 -0700 Steve Sistare wrote: Enable vfio-pci devices to be saved and restored across a cpr-exec of qemu. At vfio creation time, save the value of vfio container, group, and device descriptors in CPR state. In the contain

[PATCH] MAINTAINERS: add Edgar as Xen maintainer

2024-07-10 Thread Stefano Stabellini
Add Edgar as Xen subsystem maintainer in QEMU. Edgar has been a QEMU maintainer for years, and has already made key changes to one of the most difficult areas of the Xen subsystem (the mapcache). Edgar volunteered helping us maintain the Xen subsystem in QEMU and we are very happy to welcome him 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 Wed, Jul 10, 2024 at 01:10:37PM -0300, Fabiano Rosas wrote: >> 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 th

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 04:48:23PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Wed, Jul 10, 2024 at 01:21:51PM -0300, Fabiano Rosas wrote: > >> It's not about trust, we simply don't support migrations other than > >> n->n+1 and (maybe) n->n-1. So QEMU from 2016 is certainly not includ

Re: [PATCH V1 4/8] vfio-pci: cpr part 1 (fd and dma)

2024-07-10 Thread Alex Williamson
On Tue, 9 Jul 2024 13:58:53 -0700 Steve Sistare wrote: > Enable vfio-pci devices to be saved and restored across a cpr-exec of qemu. > > At vfio creation time, save the value of vfio container, group, and device > descriptors in CPR state. > > In the container pre_save handler, suspend the use

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 01:21:51PM -0300, Fabiano Rosas wrote: >> It's not about trust, we simply don't support migrations other than >> n->n+1 and (maybe) n->n-1. So QEMU from 2016 is certainly not included. > > Where does it come from? I thought we suppport that.. I'm takin

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

2024-07-10 Thread Cédric Le Goater
On 7/10/24 6:57 PM, Philippe Mathieu-Daudé wrote: On 10/7/24 17:35, Cédric Le Goater wrote: 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) Cédric Le Goat

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 01:21:51PM -0300, Fabiano Rosas wrote: > It's not about trust, we simply don't support migrations other than > n->n+1 and (maybe) n->n-1. So QEMU from 2016 is certainly not included. Where does it come from? I thought we suppport that.. The same question would be: are we

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

2024-07-10 Thread Peter Xu
On Wed, Jul 10, 2024 at 01:10:37PM -0300, Fabiano Rosas wrote: > 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]

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

2024-07-10 Thread Peter Xu
On Wed, Jul 10, 2024 at 03:39:43PM +, Liu, Yuan1 wrote: > > I don't think postcopy will trigger timeout failures - postcopy should use > > constant time to complete a migration, that is guest memsize / bw. > > Yes, the migration total time is predictable, failure due to timeout is > incorrect

Re: [PATCH 09/10] target/i386/tcg: use X86Access for TSS access

2024-07-10 Thread Paolo Bonzini
Il mer 10 lug 2024, 18:47 Richard Henderson ha scritto: > On 7/9/24 23:29, Paolo Bonzini wrote: > > This takes care of probing the vaddr range in advance, and is also faster > > because it avoids repeated TLB lookups. It also matches the Intel manual > > better, as it says "Checks that the curre

Disassembler location

2024-07-10 Thread Michael Morrell
I'm working on a port to a new architecture and was noticing a discrepancy in where the disassembler code lives. There is a file "target//disas.c" for 4 architectures (avr, loongarch, openrisc, and rx), but a file "disas/.c" for 14 architectures (if I counted right). It seems the 4 architectur

[PULL 0/1] Host Memory Backends and Memory devices queue 2024-07-10

2024-07-10 Thread David Hildenbrand
The following changes since commit 59084feb256c617063e0dbe7e64821ae8852d7cf: Merge tag 'pull-aspeed-20240709' of https://github.com/legoater/qemu into staging (2024-07-09 07:13:55 -0700) are available in the Git repository at: https://github.com/davidhildenbrand/qemu.git tags/mem-2024-07-10

[PULL 1/1] virtio-mem: improve error message when unplug of device fails due to plugged memory

2024-07-10 Thread David Hildenbrand
The error message is actually expressive, considering QEMU only. But when called from Libvirt, talking about "size" can be confusing, because in Libvirt "size" translates to the memory backend size in QEMU (maximum size) and "current" translates to the QEMU "size" property. Let's simply avoid talk

[PATCH 1/1] target/arm: calculate cache sizes properly

2024-07-10 Thread Marcin Juszkiewicz
Neoverse-V1 TRM says that NumSets are [27:13] not :32 like in code. With this fix all cores which use make_ccsidr64() function have proper size of cpu caches. Signed-off-by: Marcin Juszkiewicz --- target/arm/tcg/cpu64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/

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

2024-07-10 Thread Philippe Mathieu-Daudé
+ Clément & Frederic as Leon3 maintainers and SPARC team On 10/7/24 13:17, 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 o

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

2024-07-10 Thread Philippe Mathieu-Daudé
On 10/7/24 17:35, Cédric Le Goater wrote: 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) Cédric Le Goater (2):    hw/sd/sdcard: Add emmc_cmd_SET_RELATIVE_

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

2024-07-10 Thread Stefan Hajnoczi
On Wed, Jul 10, 2024 at 01:08:03PM +0300, Dmitry Fleytman wrote: > 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

Re: [PATCH 10/10] target/i386/tcg: save current task state before loading new one

2024-07-10 Thread Richard Henderson
On 7/9/24 23:29, Paolo Bonzini wrote: This is how the steps are ordered in the manual. EFLAGS.NT is overwritten after the fact in the saved image. Signed-off-by: Paolo Bonzini --- target/i386/tcg/seg_helper.c | 85 +++- 1 file changed, 45 insertions(+), 40 del

Re: [PATCH 09/10] target/i386/tcg: use X86Access for TSS access

2024-07-10 Thread Richard Henderson
On 7/9/24 23:29, Paolo Bonzini wrote: This takes care of probing the vaddr range in advance, and is also faster because it avoids repeated TLB lookups. It also matches the Intel manual better, as it says "Checks that the current (old) TSS, new TSS, and all segment descriptors used in the task sw

Re: [PATCH] virtio: Always reset vhost devices

2024-07-10 Thread Stefan Hajnoczi
On Wed, 10 Jul 2024 at 13:25, 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 > up in `vhost_dev_stop()`

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

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 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: [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: [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: [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: [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 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 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] 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

[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 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

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 >

[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: [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~

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 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 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] 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 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: [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: [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: [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: [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 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

[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/

[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

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 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 +

[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 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 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 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 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 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 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] 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

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

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] 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 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] 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 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 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

[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

  1   2   >