Re: 8.1-rc0 testfloat fails to compile

2023-07-21 Thread Olaf Hering
Fri, 21 Jul 2023 08:54:21 +0200 Thomas Huth : > Which compiler version is causing trouble for you? Right now it is gcc 13, hopefully every compiler will error out with -Werror=return-type. I think it makes sense to replace Leap with Tumbleweed. We already know it compiles fine with Leap, becau

Re: 8.1-rc0 testfloat fails to compile

2023-07-21 Thread Thomas Huth
On 21/07/2023 09.03, Olaf Hering wrote: Fri, 21 Jul 2023 08:54:21 +0200 Thomas Huth : Which compiler version is causing trouble for you? Right now it is gcc 13, hopefully every compiler will error out with -Werror=return-type. I don't think this will happen - otherwise we would have seen t

Re: [PATCH] target/loongarch: Fix the CSRRD CPUID instruction on big endian hosts

2023-07-21 Thread Song Gao
在 2023/7/21 上午1:53, Thomas Huth 写道: The test in tests/avocado/machine_loongarch.py is currently failing on big endian hosts like s390x. By comparing the traces between running the QEMU_EFI.fd bios on a s390x and on a x86 host, it's quickly obvious that the CSRRD instruction for the CPUID is be

[PATCH] target/ppc: Fix pending HDEC when entering PM state

2023-07-21 Thread Nicholas Piggin
HDEC is defined to not wake from PM state. There is a check in the HDEC timer to avoid setting the interrupt if we are in a PM state, but no check on PM entry to lower HDEC if it already fired. This can cause a HDECR wake up and QEMU abort with unsupported exception in Power Save mode. Signed-off

Re: [PATCH 0/2] target/ppc: Fixes for hash MMU for ISA v3.0

2023-07-21 Thread Cédric Le Goater
Hello Nick, On 7/21/23 07:02, Nicholas Piggin wrote: This fixes a couple of deficiencies in the v3.0 and later (POWER9, 10) HPT MMU implementation. With these fixes, KVM is unable to boot hash guests on powernv9/10 machines. Bare metal hash or pseries machine with hash works, because VRMA is onl

Re: [PATCH v2] accel/kvm: Specify default IPA size for arm64

2023-07-21 Thread Philippe Mathieu-Daudé
Hi Akihiko, On 21/7/23 08:24, Akihiko Odaki wrote: libvirt uses "none" machine type to test KVM availability. Before this change, QEMU used to pass 0 as machine type when calling KVM_CREATE_VM. The kernel documentation says: On arm64, the physical address size for a VM (IPA Size limit) is limi

Re: [PATCH] target/tricore: Rename tricore_feature

2023-07-21 Thread Philippe Mathieu-Daudé
On 21/7/23 08:06, Bastian Koppelmann wrote: this name is used by capstone and will lead to a build failure of QEMU, when capstone is enabled. So we rename it to tricore_has_feature(), to match has_feature() in translate.c. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1774 Signed-off-b

Re: 8.1-rc0 testfloat fails to compile

2023-07-21 Thread Olaf Hering
Fri, 21 Jul 2023 09:18:08 +0200 Thomas Huth : > Or are you compiling with -O0 or something similar? Does the master branch compile for you with 'export CFLAGS="-O2 -Wall -Werror=return-type"'? I prepared a patch to deal with it, and indeed it looks like the compiler might be able to spot the f

Re: 8.1-rc0 testfloat fails to compile

2023-07-21 Thread Thomas Huth
On 21/07/2023 09.35, Olaf Hering wrote: Fri, 21 Jul 2023 09:18:08 +0200 Thomas Huth : Or are you compiling with -O0 or something similar? Does the master branch compile for you with 'export CFLAGS="-O2 -Wall -Werror=return-type"'? Oh, this fails for me, too! I thought that -Wreturn-type wo

Re: [PATCH] hw: Add compat machines for 8.2

2023-07-21 Thread Laurent Vivier
Le 18/07/2023 à 16:22, Cornelia Huck a écrit : Add 8.2 machine types for arm/i440fx/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck --- hw/arm/virt.c | 9 - hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 16 ++

Re: 8.1-rc0 testfloat fails to compile

2023-07-21 Thread Olaf Hering
Fri, 21 Jul 2023 09:53:51 +0200 Thomas Huth : > I thought that -Wreturn-type would be part of > -Wall, but apparently it is only enabled by default for C++ in my version of > GCC :-( Hopefully gcc14 will fix that, and others. Only two decades late ... Olaf pgpx3QdBimJAf.pgp Description: Di

Re: [Virtio-fs] [PATCH v2 2/4] vhost-user: Interface for migration state transfer

2023-07-21 Thread Hanna Czenczek
On 20.07.23 17:05, Hao Xu wrote: On 7/20/23 21:20, Hanna Czenczek wrote: On 20.07.23 14:13, Hao Xu wrote: On 7/12/23 19:17, Hanna Czenczek wrote: Add the interface for transferring the back-end's state during migration as defined previously in vhost-user.rst. Signed-off-by: Hanna Czenczek

[PATCH v3 2/2] target/i386: add control bits support for LAM

2023-07-21 Thread Binbin Wu
LAM uses CR3[61] and CR3[62] to configure/enable LAM on user pointers. LAM uses CR4[28] to configure/enable LAM on supervisor pointers. For CR3 LAM bits, no additional handling needed: - TCG LAM is not supported for TCG of target-i386. helper_write_crN() and helper_vmrun() check max physical

[PATCH v3 0/2] target/i386: add support for LAM

2023-07-21 Thread Binbin Wu
Linear-address masking (LAM) [1], modifies the checking that is applied to *64-bit* linear addresses, allowing software to use of the untranslated address bits for metadata and masks the metadata bits before using them as linear addresses to access memory. When the feature is virtualized and expo

[PATCH v3 1/2] target/i386: add support for LAM in CPUID enumeration

2023-07-21 Thread Binbin Wu
From: Robert Hoo Linear Address Masking (LAM) is a new Intel CPU feature, which allows software to use of the untranslated address bits for metadata. The bit definition: CPUID.(EAX=7,ECX=1):EAX[26] Add CPUID definition for LAM. Note LAM feature is not supported for TCG of target-386, LAM CPIUD

[PATCH] hw/virtio: qmp: add RING_RESET to 'info virtio-status'

2023-07-21 Thread David Edmondson
Signed-off-by: David Edmondson --- hw/virtio/virtio-qmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/virtio/virtio-qmp.c b/hw/virtio/virtio-qmp.c index 3d32dbec8d..7515b0947b 100644 --- a/hw/virtio/virtio-qmp.c +++ b/hw/virtio/virtio-qmp.c @@ -79,6 +79,8 @@ static const qmp_virtio_f

Re: [PATCH] hw: Add compat machines for 8.2

2023-07-21 Thread Michael S. Tsirkin
On Tue, Jul 18, 2023 at 04:22:35PM +0200, Cornelia Huck wrote: > Add 8.2 machine types for arm/i440fx/m68k/q35/s390x/spapr. > > Signed-off-by: Cornelia Huck Acked-by: Michael S. Tsirkin > --- > hw/arm/virt.c | 9 - > hw/core/machine.c | 3 +++ > hw/i386/pc.c

Re: [Virtio-fs] [PATCH v2 2/4] vhost-user: Interface for migration state transfer

2023-07-21 Thread Hao Xu
On 7/21/23 16:07, Hanna Czenczek wrote: On 20.07.23 17:05, Hao Xu wrote: On 7/20/23 21:20, Hanna Czenczek wrote: On 20.07.23 14:13, Hao Xu wrote: On 7/12/23 19:17, Hanna Czenczek wrote: Add the interface for transferring the back-end's state during migration as defined previously in vhos

Re: [PATCH-for-8.1?] hw/virtio: qmp: add RING_RESET to 'info virtio-status'

2023-07-21 Thread Philippe Mathieu-Daudé
On 21/7/23 09:28, David Edmondson wrote: Signed-off-by: David Edmondson --- hw/virtio/virtio-qmp.c | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH-for-8.1] target/tricore: Rename tricore_feature

2023-07-21 Thread Philippe Mathieu-Daudé
On 21/7/23 09:31, Philippe Mathieu-Daudé wrote: On 21/7/23 08:06, Bastian Koppelmann wrote: this name is used by capstone and will lead to a build failure of QEMU, when capstone is enabled. So we rename it to tricore_has_feature(), to match has_feature() in translate.c. Resolves: https://gitlab

Re: [PATCH] roms/opensbi: Upgrade from v1.3 to v1.3.1

2023-07-21 Thread Conor Dooley
On Fri, Jul 21, 2023 at 10:04:02AM +1000, Alistair Francis wrote: > On Thu, Jul 20, 2023 at 3:00 AM Bin Meng wrote: > > > > Upgrade OpenSBI from v1.3 to v1.3.1 and the pre-built bios images > > which fixes the boot failure seen when using QEMU to do a direct > > kernel boot with Microchip Icicle K

Re: [PATCH for-8.2 0/4] rtc devices: Avoid putting time_t in 32-bit variables

2023-07-21 Thread Philippe Mathieu-Daudé
+Markus On 20/7/23 17:58, Peter Maydell wrote: This patchset was prompted by a couple of Coverity warnings (CID 1507157, 1517772) which note that in the m48t59 RTC device model we keep an offset in a time_t variable but then truncate it by passing it to qemu_get_timedate(), which currently uses

Re: [PATCH for-8.2 1/4] hw/rtc/m48t59: Use 64-bit arithmetic in set_alarm()

2023-07-21 Thread Philippe Mathieu-Daudé
On 20/7/23 17:58, Peter Maydell wrote: In the m48t59 device we almost always use 64-bit arithmetic when dealing with time_t deltas. The one exception is in set_alarm(), which currently uses a plain 'int' to hold the difference between two time_t values. Switch to int64_t instead to avoid any po

Re: [PATCH 2/5] target/arm/helper: Fix vae2_tlbmask()

2023-07-21 Thread Jean-Philippe Brucker
On Thu, Jul 20, 2023 at 05:35:49PM +0100, Peter Maydell wrote: > On Wed, 19 Jul 2023 at 16:56, Jean-Philippe Brucker > wrote: > > > > When HCR_EL2.E2H is enabled, TLB entries are formed using the EL2&0 > > translation regime, instead of the EL2 translation regime. The TLB VAE2* > > instructions in

assert fails in s390x TCG

2023-07-21 Thread Claudio Fontana
Hello Cornelia, Richard, I had some strange behavior in an s390x TCG VM that I am debugging, and configured latest upstream QEMU with --enable-debug --enable-debug-tcg and I am running the qemu binary with -d unimp,guest_errors . I get: /usr/bin/qemu-system-s390x -nodefaults -no-reboot -nogr

Re: [PATCH 3/5] target/arm: Skip granule protection checks for AT instructions

2023-07-21 Thread Jean-Philippe Brucker
On Thu, Jul 20, 2023 at 05:39:56PM +0100, Peter Maydell wrote: > On Wed, 19 Jul 2023 at 16:56, Jean-Philippe Brucker > wrote: > > > > GPC checks are not performed on the output address for AT instructions, > > as stated by ARM DDI 0487J in D8.12.2: > > > > When populating PAR_EL1 with the result

Re: [PATCH for-8.2 1/4] hw/rtc/m48t59: Use 64-bit arithmetic in set_alarm()

2023-07-21 Thread Philippe Mathieu-Daudé
On 20/7/23 17:58, Peter Maydell wrote: In the m48t59 device we almost always use 64-bit arithmetic when dealing with time_t deltas. The one exception is in set_alarm(), which currently uses a plain 'int' to hold the difference between two time_t values. Switch to int64_t instead to avoid any po

Re: [PATCH for-8.2 2/4] hw/rtc/twl92230: Use int64_t for sec_offset and alm_sec

2023-07-21 Thread Philippe Mathieu-Daudé
On 20/7/23 17:59, Peter Maydell wrote: In the twl92230 device, use int64_t for the two state fields sec_offset and alm_sec, because we set these to values that are either time_t or differences between two time_t values. These fields aren't saved in vmstate anywhere, so we can safely widen them.

Re: [PATCH for-8.1] scripts/git-submodule.sh: Don't rely on non-POSIX 'read' behaviour

2023-07-21 Thread Philippe Mathieu-Daudé
On 20/7/23 17:30, Peter Maydell wrote: The POSIX definition of the 'read' utility requires that you specify the variable name to set; omitting the name and having it default to 'REPLY' is a bashism. If your system sh is dash, then it will print an error message during build: qemu/pc-bios/s390-cc

Re: [PATCH for-8.2 0/4] rtc devices: Avoid putting time_t in 32-bit variables

2023-07-21 Thread Philippe Mathieu-Daudé
Hi Peter, On 20/7/23 17:58, Peter Maydell wrote: This patchset was prompted by a couple of Coverity warnings (CID 1507157, 1517772) which note that in the m48t59 RTC device model we keep an offset in a time_t variable but then truncate it by passing it to qemu_get_timedate(), which currently use

Re: [PATCH for-8.2 4/4] rtc: Use time_t for passing and returning time offsets

2023-07-21 Thread Philippe Mathieu-Daudé
On 20/7/23 17:59, Peter Maydell wrote: The functions qemu_get_timedate() and qemu_timedate_diff() take and return a time offset as an integer. Coverity points out that means that when an RTC device implementation holds an offset as a time_t, as the m48t59 does, the time_t will get truncated. (CID

[BUG][CPU hot-plug]CPU hot-plugs cause the qemu process to coredump

2023-07-21 Thread lixianglai
Hello,Recently, when I was developing CPU hot-plugs under the loongarch architecture, I found that there was a problem with qemu cpu hot-plugs under x86 architecture, which caused the qemu process coredump when repeatedly inserting and unplugging the CPU when the TCG was accelerated. The

Re: [PATCH for-8.2 1/4] hw/rtc/m48t59: Use 64-bit arithmetic in set_alarm()

2023-07-21 Thread Peter Maydell
On Fri, 21 Jul 2023 at 10:09, Philippe Mathieu-Daudé wrote: > > On 20/7/23 17:58, Peter Maydell wrote: > > In the m48t59 device we almost always use 64-bit arithmetic when > > dealing with time_t deltas. The one exception is in set_alarm(), > > which currently uses a plain 'int' to hold the diffe

Re: [PATCH for-8.2 0/4] rtc devices: Avoid putting time_t in 32-bit variables

2023-07-21 Thread Peter Maydell
On Fri, 21 Jul 2023 at 10:03, Philippe Mathieu-Daudé wrote: > > +Markus > > On 20/7/23 17:58, Peter Maydell wrote: > > This patchset was prompted by a couple of Coverity warnings > > (CID 1507157, 1517772) which note that in the m48t59 RTC device model > > we keep an offset in a time_t variable bu

Re: [PATCH for-8.2 0/4] rtc devices: Avoid putting time_t in 32-bit variables

2023-07-21 Thread Peter Maydell
On Fri, 21 Jul 2023 at 10:16, Philippe Mathieu-Daudé wrote: > > Hi Peter, > > On 20/7/23 17:58, Peter Maydell wrote: > > This patchset was prompted by a couple of Coverity warnings > > (CID 1507157, 1517772) which note that in the m48t59 RTC device model > > we keep an offset in a time_t variable

[PATCH 0/2] riscv: Fix the console of the Spike machine on big endian hosts

2023-07-21 Thread Thomas Huth
The tests/avocado/riscv_opensbi.py avocado test is currently failing on big endian hosts since the console of the Spike machine is not working there. With two small patches, this can be fixed: First patch fixes riscv64, and the second one fixes riscv32. Thomas Huth (2): hw/char/riscv_htif: Fix p

[PATCH 1/2] hw/char/riscv_htif: Fix printing of console characters on big endian hosts

2023-07-21 Thread Thomas Huth
The character that should be printed is stored in the 64 bit "payload" variable. The code currently tries to print it by taking the address of the variable and passing this pointer to qemu_chr_fe_write(). However, this only works on little endian hosts where the least significant bits are stored on

[PATCH 2/2] hw/char/riscv_htif: Fix the console syscall on big endian hosts

2023-07-21 Thread Thomas Huth
Values that have been read via cpu_physical_memory_read() from the guest's memory have to be swapped in case the host endianess differs from the guest. Fixes: a6e13e31d5 ("riscv_htif: Support console output via proxy syscall") Signed-off-by: Thomas Huth --- hw/char/riscv_htif.c | 9 + 1

Re: [PULL 0/5] Linux user brk fixes patches

2023-07-21 Thread Peter Maydell
On Wed, 19 Jul 2023 at 16:53, Helge Deller wrote: > > The following changes since commit 361d5397355276e3007825cc17217c1e4d4320f7: > > Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into > staging (2023-07-17 15:49:27 +0100) > > are available in the Git repository at: > >

Re: [PULL 00/14] NBD patches for 2023-07-19

2023-07-21 Thread Peter Maydell
On Wed, 19 Jul 2023 at 21:39, Eric Blake wrote: > > The following changes since commit 2c27fdc7a626408ee2cf30d791aa0b63027c7404: > > Update version for v8.1.0-rc0 release (2023-07-19 20:31:43 +0100) > > are available in the Git repository at: > > https://repo.or.cz/qemu/ericb.git tags/pull-nbd

Re: [PATCH-for-8.1] target/tricore: Rename tricore_feature

2023-07-21 Thread Bastian Koppelmann
On Fri, Jul 21, 2023 at 10:54:43AM +0200, Philippe Mathieu-Daudé wrote: > On 21/7/23 09:31, Philippe Mathieu-Daudé wrote: > > On 21/7/23 08:06, Bastian Koppelmann wrote: > > > this name is used by capstone and will lead to a build failure of QEMU, > > > when capstone is enabled. So we rename it to

Re: [PATCH 1/2] hw/char/riscv_htif: Fix printing of console characters on big endian hosts

2023-07-21 Thread Bin Meng
On Fri, Jul 21, 2023 at 5:48 PM Thomas Huth wrote: > > The character that should be printed is stored in the 64 bit "payload" > variable. The code currently tries to print it by taking the address > of the variable and passing this pointer to qemu_chr_fe_write(). However, > this only works on litt

Re: [PATCH 2/2] hw/char/riscv_htif: Fix the console syscall on big endian hosts

2023-07-21 Thread Bin Meng
On Fri, Jul 21, 2023 at 5:48 PM Thomas Huth wrote: > > Values that have been read via cpu_physical_memory_read() from the > guest's memory have to be swapped in case the host endianess differs typo: endianness > from the guest. > > Fixes: a6e13e31d5 ("riscv_htif: Support console output via proxy

Re: [PATCH 1/2] hw/char/riscv_htif: Fix printing of console characters on big endian hosts

2023-07-21 Thread Daniel Henrique Barboza
On 7/21/23 06:47, Thomas Huth wrote: The character that should be printed is stored in the 64 bit "payload" variable. The code currently tries to print it by taking the address of the variable and passing this pointer to qemu_chr_fe_write(). However, this only works on little endian hosts wher

Re: [PATCH 2/2] hw/char/riscv_htif: Fix the console syscall on big endian hosts

2023-07-21 Thread Daniel Henrique Barboza
On 7/21/23 06:47, Thomas Huth wrote: Values that have been read via cpu_physical_memory_read() from the guest's memory have to be swapped in case the host endianess differs from the guest. Fixes: a6e13e31d5 ("riscv_htif: Support console output via proxy syscall") Signed-off-by: Thomas Huth -

Re: [PATCH 1/2] Reduce vdpa initialization / startup overhead

2023-07-21 Thread Eugenio Perez Martin
On Tue, Jul 18, 2023 at 12:55 PM Michael S. Tsirkin wrote: > > On Thu, Apr 20, 2023 at 10:59:56AM +0200, Eugenio Perez Martin wrote: > > On Thu, Apr 20, 2023 at 7:25 AM Pei Li wrote: > > > > > > Hi all, > > > > > > My bad, I just submitted the kernel patch. If we are passing some generic > > > c

[PATCH] numa: Skip invalidation of cluster and NUMA node boundary for qtest

2023-07-21 Thread Gavin Shan
There are warning messages printed from tests/qtest/numa-test.c, to complain the CPU cluster and NUMA node boundary is broken. Since the broken boundary is expected, we don't want to see the warning messages. # cd /home/gavin/sandbox/qemu.main/build # MALLOC_PERTURB_=255 QTEST_QEMU_BINARY=./qe

Re: [PULL 03/18] numa: Validate cluster and NUMA node boundary if required

2023-07-21 Thread Gavin Shan
On 7/20/23 23:10, Peter Maydell wrote: On Mon, 26 Jun 2023 at 12:15, Paolo Bonzini wrote: From: Gavin Shan For some architectures like ARM64, multiple CPUs in one cluster can be associated with different NUMA nodes, which is irregular configuration because we shouldn't have this in baremet

[PATCH] vhost-user-scsi: support reconnect to backend

2023-07-21 Thread Li Feng
If the backend crashes and restarts, the device is broken. This patch adds reconnect for vhost-user-scsi. Tested with spdk backend. Signed-off-by: Li Feng --- hw/block/vhost-user-blk.c | 2 - hw/scsi/vhost-scsi-common.c | 27 ++--- hw/scsi/vhost-user-scsi.c | 163

Re: [PATCH v6 0/3] hw/ufs: Add Universal Flash Storage (UFS) support

2023-07-21 Thread Stefan Hajnoczi
Is there a test case along the lines of tests/qtest/ahci-test.c that exercises this new code? It's important to have at least a basic test that initializes the device and performs a write followed by a read to verify that I/O is working. This will allow the CI system and anyone who modifies the UF

RE: [PATCH v1] migration: refactor migration_completion

2023-07-21 Thread Wang, Wei W
On Friday, July 21, 2023 4:38 AM, Peter Xu wrote: > Looks good to me, after addressing Isaku's comments. > > The current_active_state is very unfortunate, along with most of the calls to > migrate_set_state() - I bet most of the code will definitely go wrong if that > cmpxchg didn't succeed inside

Re: [PATCH v21 01/20] s390x/cpu topology: add s390 specifics to CPU topology

2023-07-21 Thread Pierre Morel
On 7/18/23 18:31, Nina Schoetterl-Glausch wrote: Reviewed-by: Nina Schoetterl-Glausch Some notes below. The s390x/ prefix in the title might suggest that this patch is s390 specific, but it touches common files. Right. What do you suggest? I can cut it in two or squash it with patch num

Re: [PATCH] numa: Skip invalidation of cluster and NUMA node boundary for qtest

2023-07-21 Thread Peter Maydell
On Fri, 21 Jul 2023 at 11:44, Gavin Shan wrote: > > There are warning messages printed from tests/qtest/numa-test.c, > to complain the CPU cluster and NUMA node boundary is broken. Since > the broken boundary is expected, we don't want to see the warning > messages. > > # cd /home/gavin/sandbox/

Re: [PATCH for-8.2 4/6] vfio/migration: Refactor PRE_COPY and RUNNING state checks

2023-07-21 Thread Cédric Le Goater
On 7/16/23 10:15, Avihai Horon wrote: From: Joao Martins Move the PRE_COPY and RUNNING state checks to helper functions. This is in preparation for adding P2P VFIO migration support, where these helpers will also test for PRE_COPY_P2P and RUNNING_P2P states. Signed-off-by: Joao Martins Signe

Re: [PATCH for-8.2 5/6] vfio/migration: Add P2P support for VFIO migration

2023-07-21 Thread Cédric Le Goater
On 7/16/23 10:15, Avihai Horon wrote: VFIO migration uAPI defines an optional intermediate P2P quiescent state. While in the P2P quiescent state, P2P DMA transactions cannot be initiated by the device, but the device can respond to incoming ones. Additionally, all outstanding P2P transactions are

[PATCH] scripts/qemu-binfmt-conf.sh: refresh

2023-07-21 Thread Michael Tokarev
Currently qemu-binfmt-conf.sh does a number of strange things. 1. --systemd requires an argument - the CPU type to register, while --debian (which is actually --binfmt-support) does not accept such an argument, so it is not possible to specify which CPU(s) to register for debian. 2. Why

Re: [PATCH 3/4] vdpa: Restore vlan filtering state

2023-07-21 Thread Eugenio Perez Martin
On Wed, Jul 19, 2023 at 9:48 AM Hawkins Jiawei wrote: > > This patch introduces vhost_vdpa_net_load_single_vlan() > and vhost_vdpa_net_load_vlan() to restore the vlan > filtering state at device's startup. > > Co-developed-by: Eugenio Pérez > Signed-off-by: Eugenio Pérez > Signed-off-by: Hawkins

Re: [PATCH for-8.2 6/6] vfio/migration: Allow migration of multiple P2P supporting devices

2023-07-21 Thread Cédric Le Goater
On 7/16/23 10:15, Avihai Horon wrote: Now that P2P support has been added to VFIO migration, allow migration of multiple devices if all of them support P2P migration. Single device migration is allowed regardless of P2P migration support. Signed-off-by: Avihai Horon Signed-off-by: Joao Martins

Re: [PATCH v2] accel/kvm: Specify default IPA size for arm64

2023-07-21 Thread Peter Maydell
On Fri, 21 Jul 2023 at 08:30, Philippe Mathieu-Daudé wrote: > > Hi Akihiko, > > On 21/7/23 08:24, Akihiko Odaki wrote: > > libvirt uses "none" machine type to test KVM availability. Before this > > change, QEMU used to pass 0 as machine type when calling KVM_CREATE_VM. > > > > The kernel documenta

[PATCH] target/ppc: Fix the order of kvm_enable judgment about kvmppc_set_interrupt()

2023-07-21 Thread jianchunfu
It's unnecessary for non-KVM accelerators(TCG, for example), to call this function, so change the order of kvm_enable() judgment. The static inline function that returns -1 directly does not work in TCG's situation. Signed-off-by: jianchunfu --- hw/ppc/ppc.c | 8 ++-- target/ppc/kvm.c

Re: [PATCH 1/2] hw/char/riscv_htif: Fix printing of console characters on big endian hosts

2023-07-21 Thread Philippe Mathieu-Daudé
On 21/7/23 11:47, Thomas Huth wrote: The character that should be printed is stored in the 64 bit "payload" variable. The code currently tries to print it by taking the address of the variable and passing this pointer to qemu_chr_fe_write(). However, this only works on little endian hosts where t

[PATCH] target/riscv/cpu.c: do not run 'host' CPU with TCG

2023-07-21 Thread Daniel Henrique Barboza
The 'host' CPU is available in a CONFIG_KVM build and it's currently available for all accels, but is a KVM only CPU. This means that in a RISC-V KVM capable host we can do things like this: $ ./build/qemu-system-riscv64 -M virt,accel=tcg -cpu host --nographic qemu-system-riscv64: H extension requ

[PATCH] virtio: Fix packed virtqueue used_idx mask

2023-07-21 Thread Hanna Czenczek
virtio_queue_packed_set_last_avail_idx() is used by vhost devices to set the internal queue indices to what has been reported by the vhost back-end through GET_VRING_BASE. For packed virtqueues, this 32-bit value is expected to contain both the device's internal avail and used indices, as well as

Re: [PATCH 7/7] tests/avocado: ppc64 pseries reverse debugging test

2023-07-21 Thread Nicholas Piggin
On Mon Jun 26, 2023 at 7:34 PM AEST, Nicholas Piggin wrote: > On Mon Jun 26, 2023 at 5:49 PM AEST, Pavel Dovgalyuk wrote: > > On 23.06.2023 15:57, Nicholas Piggin wrote: > > > pseries can run reverse-debugging well enough to pass basic tests. > > > > > > There is strangeness with reverse-continue

Re: [PATCH 6/6] vhost-user: Have reset_status fall back to reset

2023-07-21 Thread Hanna Czenczek
On 20.07.23 18:03, Stefan Hajnoczi wrote: On Wed, Jul 19, 2023 at 04:27:58PM +0200, Hanna Czenczek wrote: On 19.07.23 16:11, Hanna Czenczek wrote: On 18.07.23 17:10, Stefan Hajnoczi wrote: On Tue, Jul 11, 2023 at 05:52:28PM +0200, Hanna Czenczek wrote: The only user of vhost_user_reset_status

[PATCH for-8.1] target/arm: Special case M-profile in debug_helper.c code

2023-07-21 Thread Peter Maydell
A lot of the code called from helper_exception_bkpt_insn() is written assuming A-profile, but we will also call this helper on M-profile CPUs when they execute a BKPT insn. This used to work by accident, but recent changes mean that we will hit an assert when some of this code calls down into lowe

Re: [PATCH] target/riscv/cpu.c: do not run 'host' CPU with TCG

2023-07-21 Thread Philippe Mathieu-Daudé
On 21/7/23 15:34, Daniel Henrique Barboza wrote: The 'host' CPU is available in a CONFIG_KVM build and it's currently available for all accels, but is a KVM only CPU. This means that in a RISC-V KVM capable host we can do things like this: $ ./build/qemu-system-riscv64 -M virt,accel=tcg -cpu hos

Re: [PATCH] target/riscv/cpu.c: do not run 'host' CPU with TCG

2023-07-21 Thread Daniel Henrique Barboza
On 7/21/23 11:37, Philippe Mathieu-Daudé wrote: On 21/7/23 15:34, Daniel Henrique Barboza wrote: The 'host' CPU is available in a CONFIG_KVM build and it's currently available for all accels, but is a KVM only CPU. This means that in a RISC-V KVM capable host we can do things like this: $ ./

Re: [PATCH 3/4] vdpa: Restore vlan filtering state

2023-07-21 Thread Hawkins Jiawei
On 2023/7/21 19:57, Eugenio Perez Martin wrote: > On Wed, Jul 19, 2023 at 9:48 AM Hawkins Jiawei wrote: >> >> This patch introduces vhost_vdpa_net_load_single_vlan() >> and vhost_vdpa_net_load_vlan() to restore the vlan >> filtering state at device's startup. >> >> Co-developed-by: Eugenio Pérez

[PATCH v9 01/10] migration: New QAPI type 'MigrateAddress'

2023-07-21 Thread Het Gala
This patch introduces well defined MigrateAddress struct and its related child objects. The existing argument of 'migrate' and 'migrate-incoming' QAPI - 'uri' is of type string. The current implementation follows double encoding scheme for fetching migration parameters like 'uri' and this is not a

[PATCH v9 09/10] migration: Implement MigrateChannelList to hmp migration flow.

2023-07-21 Thread Het Gala
Integrate MigrateChannelList with all transport backends (socket, exec and rdma) for both src and dest migration endpoints for hmp migration. Suggested-by: Aravind Retnakaran Signed-off-by: Het Gala --- migration/migration-hmp-cmds.c | 16 +--- migration/migration.c | 5 ++

[PATCH v9 00/10] migration: Modify 'migrate' and 'migrate-incoming' QAPI commands for migration

2023-07-21 Thread Het Gala
This is v9 patchset of modified 'migrate' and 'migrate-incoming' QAPI design for upstream review. Would like to thank all the maintainers that actively participated in the v8 patchset discussion and gave insightful suggestions to improve the patches. Link to previous upstream community patchset

[PATCH v9 08/10] migration: Implement MigrateChannelList to qmp migration flow.

2023-07-21 Thread Het Gala
Integrate MigrateChannelList with all transport backends (socket, exec and rdma) for both src and dest migration endpoints for qmp migration. For current series, limit the size of MigrateChannelList to single element (single interface) as runtime check. Suggested-by: Aravind Retnakaran Signed-of

[PATCH v9 05/10] migration: convert exec backend to accept MigrateAddress.

2023-07-21 Thread Het Gala
Exec transport backend for 'migrate'/'migrate-incoming' QAPIs accept new wire protocol of MigrateAddress struct. It is achived by parsing 'uri' string and storing migration parameters required for exec connection into strList struct. Suggested-by: Aravind Retnakaran Signed-off-by: Het Gala Revi

[PATCH v9 03/10] migration: convert socket backend to accept MigrateAddress

2023-07-21 Thread Het Gala
Socket transport backend for 'migrate'/'migrate-incoming' QAPIs accept new wire protocol of MigrateAddress struct. It is achived by parsing 'uri' string and storing migration parameters required for socket connection into well defined SocketAddress struct. Suggested-by: Aravind Retnakaran Signed

[PATCH v9 10/10] migration: modify test_multifd_tcp_none() to use new QAPI syntax.

2023-07-21 Thread Het Gala
modify multifd tcp common test to incorporate the new QAPI syntax defined. Suggested-by: Aravind Retnakaran Signed-off-by: Het Gala --- tests/qtest/migration-test.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-tes

[PATCH v9 02/10] migration: convert migration 'uri' into 'MigrateAddress'

2023-07-21 Thread Het Gala
This patch parses 'migrate' and 'migrate-incoming' QAPI's 'uri' string containing migration connection related information and stores them inside well defined 'MigrateAddress' struct. Suggested-by: Aravind Retnakaran Signed-off-by: Het Gala Reviewed-by: Daniel P. Berrangé --- migration/exec.c

[PATCH v9 06/10] migration: New migrate and migrate-incoming argument 'channels'

2023-07-21 Thread Het Gala
MigrateChannelList allows to connect accross multiple interfaces. Add MigrateChannelList struct as argument to migration QAPIs. We plan to include multiple channels in future, to connnect multiple interfaces. Hence, we choose 'MigrateChannelList' as the new argument over 'MigrateChannel' to make m

[PATCH v9 04/10] migration: convert rdma backend to accept MigrateAddress

2023-07-21 Thread Het Gala
RDMA based transport backend for 'migrate'/'migrate-incoming' QAPIs accept new wire protocol of MigrateAddress struct. It is achived by parsing 'uri' string and storing migration parameters required for RDMA connection into well defined InetSocketAddress struct. Suggested-by: Aravind Retnakaran

[PATCH v9 07/10] migration: modify migration_channels_and_uri_compatible() for new QAPI syntax

2023-07-21 Thread Het Gala
migration_channels_and_uri_compatible() check for transport mechanism suitable for multifd migration gets executed when the caller calls old uri syntax. It needs it to be run when using the modern MigrateChannel QAPI syntax too. After URI -> 'MigrateChannel' : migration_channels_and_uri_compatible

Re: [PULL 5/5] linux-user: Fix qemu-arm to run static armhf binaries

2023-07-21 Thread Michael Tokarev
19.07.2023 18:52, Helge Deller wrote: qemu-user crashes immediately when running static binaries on the armhf architecture. The problem is the memory layout where the executable is loaded before the interpreter library, in which case the reserved brk region clashes with the interpreter code and i

Re: [PATCH v2 3/4] vhost: Add high-level state save/load functions

2023-07-21 Thread Eugenio Perez Martin
On Wed, Jul 12, 2023 at 1:17 PM Hanna Czenczek wrote: > > vhost_save_backend_state() and vhost_load_backend_state() can be used by > vhost front-ends to easily save and load the back-end's state to/from > the migration stream. > > Because we do not know the full state size ahead of time, > vhost_s

Re: [PULL 5/5] linux-user: Fix qemu-arm to run static armhf binaries

2023-07-21 Thread Michael Tokarev
21.07.2023 18:14, Michael Tokarev пишет: 19.07.2023 18:52, Helge Deller wrote: qemu-user crashes immediately when running static binaries on the armhf architecture. The problem is the memory layout where the executable is loaded before the interpreter library, in which case the reserved brk regi

Re: [PATCH 3/6] vhost: Do not reset suspended devices on stop

2023-07-21 Thread Eugenio Perez Martin
On Tue, Jul 11, 2023 at 5:52 PM Hanna Czenczek wrote: > > Move the `suspended` field from vhost_vdpa into the global vhost_dev > struct, so vhost_dev_stop() can check whether the back-end has been > suspended by `vhost_ops->vhost_dev_start(hdev, false)`. If it has, > there is no need to reset it;

Re: [PATCH v6 4/5] intel_iommu: allow Extended Interrupt Mode when using userspace APIC

2023-07-21 Thread Bui Quang Minh
On 7/21/23 03:47, Peter Xu wrote: On Mon, Jul 17, 2023 at 11:29:56PM +0700, Bui Quang Minh wrote: On 7/17/23 17:47, Joao Martins wrote: +Peter, +Jason (intel-iommu maintainer/reviewer) Thanks for copying me, Joan. On 15/07/2023 16:22, Bui Quang Minh wrote: As userspace APIC now supports x

Re: [PATCH v3 1/6] throttle: introduce enum ThrottleType

2023-07-21 Thread Hanna Czenczek
On 13.07.23 08:41, zhenwei pi wrote: Use enum ThrottleType instead of number index. Reviewed-by: Alberto Garcia Signed-off-by: zhenwei pi --- include/qemu/throttle.h | 11 --- util/throttle.c | 16 +--- 2 files changed, 17 insertions(+), 10 deletions(-) [...]

Re: [PATCH v3 5/6] cryptodev: use NULL throttle timer cb for read direction

2023-07-21 Thread Hanna Czenczek
On 13.07.23 08:41, zhenwei pi wrote: Operations on a crytpodev are considered as *write* only, the callback s/crytpodev/cryptodev/ of read direction is never invoked. Use NULL instead of an unreachable path(cryptodev_backend_throttle_timer_cb on read direction). Reviewed-by: Alberto Garcia

Re: [PATCH v3 3/6] throttle: support read-only and write-only

2023-07-21 Thread Hanna Czenczek
On 13.07.23 08:41, zhenwei pi wrote: Only one direction is necessary in several scenarios: - a read-only disk - operations on a device are considered as *write* only. For example, encrypt/decrypt/sign/verify operations on a cryptodev use a single *write* timer(read timer callback is defined

Re: [PATCH v3 4/6] test-throttle: test read only and write only

2023-07-21 Thread Hanna Czenczek
On 13.07.23 08:41, zhenwei pi wrote: Reviewed-by: Alberto Garcia Signed-off-by: zhenwei pi --- tests/unit/test-throttle.c | 66 ++ 1 file changed, 66 insertions(+) Reviewed-by: Hanna Czenczek

Re: [PATCH v3 2/6] test-throttle: use enum ThrottleType

2023-07-21 Thread Hanna Czenczek
On 13.07.23 08:41, zhenwei pi wrote: Use enum ThrottleType instead in the throttle test codes. Reviewed-by: Alberto Garcia Signed-off-by: zhenwei pi --- tests/unit/test-throttle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Hanna Czenczek

Re: [PATCH 5/6] vhost-vdpa: Match vhost-user's status reset

2023-07-21 Thread Eugenio Perez Martin
On Wed, Jul 19, 2023 at 4:10 PM Hanna Czenczek wrote: > > On 18.07.23 16:50, Stefan Hajnoczi wrote: > > On Tue, Jul 11, 2023 at 05:52:27PM +0200, Hanna Czenczek wrote: > >> vhost-vdpa and vhost-user differ in how they reset the status in their > >> respective vhost_reset_status implementations: vh

Re: [PATCH v3 6/6] throttle: use enum ThrottleType instead of bool is_write

2023-07-21 Thread Hanna Czenczek
On 13.07.23 08:41, zhenwei pi wrote: enum ThrottleType is already there, use ThrottleType instead of 'bool is_write' for throttle API, also modify related codes from block, fsdev, cryptodev and tests. Signed-off-by: zhenwei pi --- backends/cryptodev.c| 9 + block/throttle-gr

Re: [PATCH 3/6] vhost: Do not reset suspended devices on stop

2023-07-21 Thread Hanna Czenczek
On 21.07.23 17:25, Eugenio Perez Martin wrote: On Tue, Jul 11, 2023 at 5:52 PM Hanna Czenczek wrote: Move the `suspended` field from vhost_vdpa into the global vhost_dev struct, so vhost_dev_stop() can check whether the back-end has been suspended by `vhost_ops->vhost_dev_start(hdev, false)`.

Re: [PATCH v2 3/4] vhost: Add high-level state save/load functions

2023-07-21 Thread Hanna Czenczek
On 21.07.23 17:18, Eugenio Perez Martin wrote: On Wed, Jul 12, 2023 at 1:17 PM Hanna Czenczek wrote: vhost_save_backend_state() and vhost_load_backend_state() can be used by vhost front-ends to easily save and load the back-end's state to/from the migration stream. Because we do not know the f

Re: [PATCH v2] target/ppc: Generate storage interrupts for radix RC changes

2023-07-21 Thread Daniel Henrique Barboza
On 7/20/23 23:38, Nicholas Piggin wrote: On Thu Jul 13, 2023 at 3:35 AM AEST, Shawn Anastasio wrote: On 7/12/23 11:56 AM, Cédric Le Goater wrote: Hello Shawn, On 7/12/23 18:13, Shawn Anastasio wrote: Change radix model to always generate a storage interrupt when the R/C bits are not set ap

Re: [PATCH v2] target/ppc: Generate storage interrupts for radix RC changes

2023-07-21 Thread Cédric Le Goater
On 7/21/23 18:08, Daniel Henrique Barboza wrote: On 7/20/23 23:38, Nicholas Piggin wrote: On Thu Jul 13, 2023 at 3:35 AM AEST, Shawn Anastasio wrote: On 7/12/23 11:56 AM, Cédric Le Goater wrote: Hello Shawn, On 7/12/23 18:13, Shawn Anastasio wrote: Change radix model to always generate a s

[PATCH 0/4] CXL: SK hynix Niagara MHSLD Device

2023-07-21 Thread Gregory Price
Base repo: https://gitlab.com/jic23/qemu Base branch: cxl-2023-07-17 This patch set includes an emulation of the SK hynix Niagara MHSLD platform with custom CCI commands that allow for isolation of memory blocks between attached hosts. There are 4 total patches in this set: 1 & 2: Modifications t

[PATCH 2/4] cxl/mailbox: interface to add CCI commands to an existing CCI

2023-07-21 Thread Gregory Price
This enables wrapper devices to customize the base device's CCI (for example, with custom commands outside the specification) without the need to change the base device. The also enabled the base device to dispatch those commands without requiring additional driver support. Signed-off-by: Gregory

[PATCH 1/4] cxl/mailbox: change CCI cmd set structure to be a member, not a refernce

2023-07-21 Thread Gregory Price
This allows devices to have fully customized CCIs, along with complex devices where wrapper devices can override or add additional CCI commands without having to replicate full command structures or pollute a base device with every command that might ever be used. Signed-off-by: Gregory Price ---

[PATCH 3/4] cxl/type3: minimum MHD cci support

2023-07-21 Thread Gregory Price
Implement the MHD GET_INFO cci command and add a shared memory region to the type3 device to host the information. Add a helper program to initialize this shared memory region. Add a function pointer to type3 devices for future work that will allow an mhd device to provide a hook to validate whet

  1   2   >