Re: [PATCH v2] net: add initial support for AF_XDP network backend

2023-07-24 Thread Jason Wang
On Thu, Jul 20, 2023 at 9:26 PM Ilya Maximets wrote: > > On 7/20/23 09:37, Jason Wang wrote: > > On Thu, Jul 6, 2023 at 4:58 AM Ilya Maximets wrote: > >> > >> AF_XDP is a network socket family that allows communication directly > >> with the network device driver in the kernel, bypassing most or

Re: [PATCH v2 4/4] vdpa: Allow VIRTIO_NET_F_CTRL_VLAN in SVQ

2023-07-24 Thread Jason Wang
On Sun, Jul 23, 2023 at 5:27 PM Hawkins Jiawei wrote: > > Enable SVQ with VIRTIO_NET_F_CTRL_VLAN feature. > > Co-developed-by: Eugenio Pérez > Signed-off-by: Eugenio Pérez > Signed-off-by: Hawkins Jiawei Acked-by: Jason Wang Thanks > --- > net/vhost-vdpa.c | 1 + > 1 file changed, 1 insert

Re: [PATCH v2 2/4] virtio-net: Expose MAX_VLAN

2023-07-24 Thread Jason Wang
On Sun, Jul 23, 2023 at 5:27 PM Hawkins Jiawei wrote: > > vhost-vdpa shadowed CVQ needs to know the maximum number of > vlans supported by the virtio-net device, so QEMU can restore > the VLAN state in a migration. > > Co-developed-by: Eugenio Pérez > Signed-off-by: Eugenio Pérez > Signed-off-by

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

2023-07-24 Thread Jason Wang
On Sun, Jul 23, 2023 at 5:28 PM 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 0/3] hw/arm/virt: Use generic CPU invalidation

2023-07-24 Thread Igor Mammedov
On Mon, 24 Jul 2023 16:14:22 +0100 Peter Maydell wrote: > On Mon, 24 Jul 2023 at 16:06, Igor Mammedov wrote: > > I've seen others asking why you print type name instead of shorter cpu-model > > used on CLI. To do that would make you write a patch to implement reverse > > mapping. > > In some ca

Re: [PATCH v2 1/4] virtio-net: do not reset vlan filtering at set_features

2023-07-24 Thread Jason Wang
On Sun, Jul 23, 2023 at 5:27 PM Hawkins Jiawei wrote: > > From: Eugenio Pérez > > This function is called after virtio_load, so all vlan configuration is > lost in migration case. > > Just allow all the vlan-tagged packets if vlan is not configured, and > trust device reset to clear all filtered

Re: [Question - ARM CCA] vCPU Hotplug Support in ARM Realm world might require ARM spec change?

2023-07-24 Thread bibo mao
在 2023/7/25 13:45, Salil Mehta 写道: > Hello, > >> From: bibo mao >> Sent: Tuesday, July 25, 2023 2:14 AM >> To: Salil Mehta > > > [...] > > >> 在 2023/7/25 08:56, Salil Mehta 写道: >>> Hi Bibo, >>> From: bibo mao Sent: Tuesday, July 25, 2023 1:29 AM To: Salil Mehta Cc: C

RE: [Question - ARM CCA] vCPU Hotplug Support in ARM Realm world might require ARM spec change?

2023-07-24 Thread Salil Mehta via
Hello, > From: bibo mao > Sent: Tuesday, July 25, 2023 2:14 AM > To: Salil Mehta [...] > 在 2023/7/25 08:56, Salil Mehta 写道: > > Hi Bibo, > > > >> From: bibo mao > >> Sent: Tuesday, July 25, 2023 1:29 AM > >> To: Salil Mehta > >> Cc: Catalin Marinas ; Jonathan Cameron > >> ; Marc Zyngier ;

[PATCH] target/riscv: don't read write-only CSR

2023-07-24 Thread Nikita Shubin
From: Nikita Shubin In case of write-only CSR don't return illegal inst error when CSR is written and lacks read op. Signed-off-by: Nikita Shubin --- Anyway it not might be a good idea to read CSR when we are not asked for, during CSRRW or CSRRWI: "For CSRRWI, if rd=x0, then the instruction sh

Re: [PATCH 5/6] qtest: irq_intercept_[out/in]: return FAIL if no intercepts are installed

2023-07-24 Thread Chris Laplante
> Makes sense. Did you do a 'make check' on an > all-targets-enabled build just to confirm we haven't > accidentally let any bogus uses of the command in while > it was returning OK for these cases? > > Reviewed-by: Peter Maydell peter.mayd...@linaro.org Yes, I just did a 'make check' and got:

Re: [RFC PATCH 11/12] vdpa: use SVQ to stall dataplane while NIC state is being restored

2023-07-24 Thread Jason Wang
On Tue, Jul 25, 2023 at 3:59 AM Eugenio Perez Martin wrote: > > On Sat, Jul 22, 2023 at 12:59 AM Si-Wei Liu wrote: > > > > > > > > On 7/20/2023 11:14 AM, Eugenio Pérez wrote: > > > Some dynamic state of a virtio-net vDPA devices is restored from CVQ in > > > the event of a live migration. Howeve

Re: [PATCH 0/6] Add nRF51 DETECT signal with test

2023-07-24 Thread Chris Laplante
Hi Peter, > Thanks for this patchset and especially for the work > improving the qtest infrastructure. I've given my > comments on the different patches, and in some cases > reviewed-by tags. (Where I've given one of those, you should > add it to your commit message for the relevant patch under >

[PATCH QEMU v10 6/9] migration: Put the detection logic before auto-converge checking

2023-07-24 Thread ~hyman
From: Hyman Huang(黄勇) This commit is prepared for the implementation of dirty-limit convergence algo. The detection logic of throttling condition can apply to both auto-converge and dirty-limit algo, putting it's position before the checking logic for auto-converge feature. Signed-off-by: Hyman

[PATCH QEMU v10 7/9] migration: Implement dirty-limit convergence algorithm

2023-07-24 Thread ~hyman
From: Hyman Huang(黄勇) Implement dirty-limit convergence algorithm for live migration, which is kind of like auto-converge algo but using dirty-limit instead of cpu throttle to make migration convergent. Enable dirty page limit if dirty_rate_high_cnt greater than 2 when dirty-limit capability ena

[PATCH QEMU v10 3/9] qapi/migration: Introduce vcpu-dirty-limit parameters

2023-07-24 Thread ~hyman
From: Hyman Huang(黄勇) Introduce "vcpu-dirty-limit" migration parameter used to limit dirty page rate during live migration. "vcpu-dirty-limit" and "x-vcpu-dirty-limit-period" are two dirty-limit-related migration parameters, which can be set before and during live migration by qmp migrate-set-pa

[PATCH QEMU v10 2/9] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter

2023-07-24 Thread ~hyman
From: Hyman Huang(黄勇) Introduce "x-vcpu-dirty-limit-period" migration experimental parameter, which is in the range of 1 to 1000ms and used to make dirty page rate calculation period configurable. Currently, as the "x-vcpu-dirty-limit-period" varies, the total time of live migration changes. Tes

[PATCH QEMU v10 0/9] migration: introduce dirtylimit capability

2023-07-24 Thread ~hyman
Hi, Juan, Markus and i has crafted docs for the series, please use the latest version to make a pull request if it is convenient to you. No functional changes since v6. Thanks. Yong v7~v10: Rebase on master, update "Since" tags to 8.2, fix conflicts and craft the docs suggested by Markus v6: 1.

[PATCH QEMU v10 1/9] softmmu/dirtylimit: Add parameter check for hmp "set_vcpu_dirty_limit"

2023-07-24 Thread ~hyman
From: Hyman Huang(黄勇) dirty_rate paraemter of hmp command "set_vcpu_dirty_limit" is invalid if less than 0, so add parameter check for it. Note that this patch also delete the unsolicited help message and clean up the code. Signed-off-by: Hyman Huang(黄勇) Reviewed-by: Markus Armbruster Reviewe

[PATCH QEMU v10 8/9] migration: Extend query-migrate to provide dirty-limit info

2023-07-24 Thread ~hyman
From: Hyman Huang(黄勇) Extend query-migrate to provide throttle time and estimated ring full time with dirty-limit capability enabled, through which we can observe if dirty limit take effect during live migration. Signed-off-by: Hyman Huang(黄勇) Reviewed-by: Markus Armbruster Reviewed-by: Juan Q

[PATCH QEMU v10 9/9] tests: Add migration dirty-limit capability test

2023-07-24 Thread ~hyman
From: Hyman Huang(黄勇) Add migration dirty-limit capability test if kernel support dirty ring. Migration dirty-limit capability introduce dirty limit capability, two parameters: x-vcpu-dirty-limit-period and vcpu-dirty-limit are introduced to implement the live migration with dirty limit. The te

[PATCH QEMU v10 4/9] migration: Introduce dirty-limit capability

2023-07-24 Thread ~hyman
From: Hyman Huang(黄勇) Introduce migration dirty-limit capability, which can be turned on before live migration and limit dirty page rate durty live migration. Introduce migrate_dirty_limit function to help check if dirty-limit capability enabled during live migration. Meanwhile, refactor vcpu_d

[PATCH QEMU v10 5/9] migration: Refactor auto-converge capability logic

2023-07-24 Thread ~hyman
From: Hyman Huang(黄勇) Check if block migration is running before throttling guest down in auto-converge way. Note that this modification is kind of like code clean, because block migration does not depend on auto-converge capability, so the order of checks can be adjusted. Signed-off-by: Hyman

Re: [Question - ARM CCA] vCPU Hotplug Support in ARM Realm world might require ARM spec change?

2023-07-24 Thread bibo mao
在 2023/7/25 08:56, Salil Mehta 写道: > Hi Bibo, > >> From: bibo mao >> Sent: Tuesday, July 25, 2023 1:29 AM >> To: Salil Mehta >> Cc: Catalin Marinas ; Jonathan Cameron >> ; Marc Zyngier ; Will Deacon >> ; christoffer.d...@arm.com; oliver.up...@linux.dev; >> mark.rutl...@arm.com; pbonz...@redha

RE: [Question - ARM CCA] vCPU Hotplug Support in ARM Realm world might require ARM spec change?

2023-07-24 Thread Salil Mehta via
Hi Bibo, > From: bibo mao > Sent: Tuesday, July 25, 2023 1:29 AM > To: Salil Mehta > Cc: Catalin Marinas ; Jonathan Cameron > ; Marc Zyngier ; Will Deacon > ; christoffer.d...@arm.com; oliver.up...@linux.dev; > mark.rutl...@arm.com; pbonz...@redhat.com; Salil Mehta > ; andrew.jo...@linux.dev; yu

[PATCH] ui/gtk: set scanout mode in gd_egl/gd_gl_area_scanout_texture

2023-07-24 Thread Dongwon Kim
Fixing a regression (black screen) caused by a commit 92b58156e7 ("ui/gtk: set scanout-mode right before scheduling draw"). The commit 92b58156e7 was made with an assumption that the scanout mode needs to be set only if the guest scanout is a dmabuf but there are cases (e.g. virtio-gpu-virgl) wher

Re: [Question - ARM CCA] vCPU Hotplug Support in ARM Realm world might require ARM spec change?

2023-07-24 Thread bibo mao
Is vcpu hotplug supported in arm virt-machine now? There is arm64 vcpu hotplug patch in qemu mailing list, however it is not merged. I do not know why it is not merged. I ask this question because we propose similar patch about LoongArch system in qemu mailing list, and kernel need not be modifi

Re: [PATCH for-8.2 2/2] arm/kvm: convert to kvm_get_one_reg

2023-07-24 Thread Gavin Shan
On 7/24/23 18:48, Cornelia Huck wrote: On Mon, Jul 24 2023, Gavin Shan wrote: On 7/18/23 21:14, Cornelia Huck wrote: We can neaten the code by switching the callers that work on a CPUstate to the kvm_get_one_reg function. Signed-off-by: Cornelia Huck --- target/arm/kvm.c | 15 +++

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

2023-07-24 Thread Michael S. Tsirkin
On Mon, Jul 24, 2023 at 05:21:37PM +, Raphael Norwitz wrote: > Very excited to see this. High level looks good modulo a few small things. > > My major concern is around existing vhost-user-scsi backends which don’t > support VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD. IMO we should hide the > reco

Re: [PATCH v21 02/20] s390x/cpu topology: add topology entries on CPU hotplug

2023-07-24 Thread Nina Schoetterl-Glausch
On Fri, 2023-06-30 at 11:17 +0200, Pierre Morel wrote: > The topology information are attributes of the CPU and are > specified during the CPU device creation. > > On hot plug we: > - calculate the default values for the topology for drawers, >   books and sockets in the case they are not specifie

Re: [RFC PATCH 11/12] vdpa: use SVQ to stall dataplane while NIC state is being restored

2023-07-24 Thread Eugenio Perez Martin
On Sat, Jul 22, 2023 at 12:59 AM Si-Wei Liu wrote: > > > > On 7/20/2023 11:14 AM, Eugenio Pérez wrote: > > Some dynamic state of a virtio-net vDPA devices is restored from CVQ in > > the event of a live migration. However, dataplane needs to be disabled > > so the NIC does not receive buffers in

Re: [PATCH] migration: Allow user to specify migration available bandwidth

2023-07-24 Thread Peter Xu
On Mon, Jul 24, 2023 at 07:04:29PM +0100, Daniel P. Berrangé wrote: > On Mon, Jul 24, 2023 at 01:07:55PM -0400, Peter Xu wrote: > > Migration bandwidth is a very important value to live migration. It's > > because it's one of the major factors that we'll make decision on when to > > switchover to

Re: [PATCH for-8.2 2/3] hw/arm/armv7m: Add mpu-ns-regions and mpu-s-regions properties

2023-07-24 Thread Philippe Mathieu-Daudé
On 24/7/23 19:43, Peter Maydell wrote: M-profile CPUs generally allow configuration of the number of MPU regions that they have. We don't currently model this, so our implementations of some of the board models provide CPUs with the wrong number of regions. RTOSes like Zephyr that hardcode the

Re: [PATCH v3] linux-user: Fix qemu-arm to run static armhf binaries

2023-07-24 Thread Michael Tokarev
24.07.2023 20:48, Helge Deller wrote: The last attempt to fix linux-user to be able to run static armhf binaries fixed armhf, but broke arm64, ppc64el and s390x. Hello Delge! I haven't looked at this version yet (was busy today). Have you seen https://bugs.debian.org/1041859 ? It is.. telling.

Re: [Qemu PATCH RESEND 7/9] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2023-07-24 Thread Nathan Fontenot
On 7/24/23 11:23, Fan Ni wrote: > From: Fan Ni > > Per CXL spec 3.0, two mailbox commands are implemented: > Add Dynamic Capacity Response (Opcode 4802h) 8.2.9.8.9.3, and > Release Dynamic Capacity (Opcode 4803h) 8.2.9.8.9.4. > > Signed-off-by: Fan Ni > --- > hw/cxl/cxl-mailbox-utils.c | 253

Re: [PATCH v3] linux-user: Fix qemu-arm to run static armhf binaries

2023-07-24 Thread Helge Deller
On 7/24/23 19:48, Helge Deller wrote: The last attempt to fix linux-user to be able to run static armhf binaries fixed armhf, but broke arm64, ppc64el and s390x. This patch takes another approach to fix the issue. Instead of pre-allocatig a 16/32 MiB memory region for heap, the loader tracks the

Re: [PATCH] migration: Allow user to specify migration available bandwidth

2023-07-24 Thread Peter Maydell
On Mon, 24 Jul 2023 at 19:05, Daniel P. Berrangé wrote: > > I feel like rather than "available-bandwidth", we should call > it "max-convergance-bandwidth". "convergence" (I mention only since it's a proposed user-visible bit of API :-) -- PMM

Re: [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user

2023-07-24 Thread Stefan Hajnoczi
On Thu, Jul 20, 2023 at 06:22:08PM -0400, Michael S. Tsirkin wrote: > On Thu, Jul 20, 2023 at 05:31:03PM -0400, Stefan Hajnoczi wrote: > > On Thu, 20 Jul 2023 at 17:15, Michael S. Tsirkin wrote: > > > > > > On Thu, Jul 20, 2023 at 03:58:37PM -0400, Stefan Hajnoczi wrote: > > > > On Thu, Jul 06, 20

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

2023-07-24 Thread Stefan Hajnoczi
On Fri, Jul 21, 2023 at 04:16:07PM +0200, Hanna Czenczek wrote: > 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,

Re: [PATCH] migration: Allow user to specify migration available bandwidth

2023-07-24 Thread Daniel P . Berrangé
On Mon, Jul 24, 2023 at 01:07:55PM -0400, Peter Xu wrote: > Migration bandwidth is a very important value to live migration. It's > because it's one of the major factors that we'll make decision on when to > switchover to destination in a precopy process. To elaborate on this for those reading al

Re: [PATCH 1/6] vhost-user.rst: Add suspend/resume

2023-07-24 Thread Stefan Hajnoczi
On Wed, Jul 19, 2023 at 03:59:32PM +0200, Hanna Czenczek wrote: > On 18.07.23 16:25, Stefan Hajnoczi wrote: > > On Tue, Jul 11, 2023 at 05:52:23PM +0200, Hanna Czenczek wrote: > > > When stopping the VM, qemu wants all devices to fully cease any > > > operation, too. Currently, we can only have vh

[PATCH v3] linux-user: Fix qemu-arm to run static armhf binaries

2023-07-24 Thread Helge Deller
The last attempt to fix linux-user to be able to run static armhf binaries fixed armhf, but broke arm64, ppc64el and s390x. This patch takes another approach to fix the issue. Instead of pre-allocatig a 16/32 MiB memory region for heap, the loader tracks the highest address of both executable and

[PATCH for-8.2 1/3] target/arm: Do all "ARM_FEATURE_X implies Y" checks in post_init

2023-07-24 Thread Peter Maydell
Where architecturally one ARM_FEATURE_X flag implies another ARM_FEATURE_Y, we allow the CPU init function to only set X, and then set Y for it. Currently we do this in two places -- we set a few flags in arm_cpu_post_init() because we need them to decide which properties to create on the CPU obje

[PATCH for-8.2 2/3] hw/arm/armv7m: Add mpu-ns-regions and mpu-s-regions properties

2023-07-24 Thread Peter Maydell
M-profile CPUs generally allow configuration of the number of MPU regions that they have. We don't currently model this, so our implementations of some of the board models provide CPUs with the wrong number of regions. RTOSes like Zephyr that hardcode the expected number of regions may therefore

[PATCH for-8.2 3/3] hw/arm: Set number of MPU regions correctly for an505, an521, an524

2023-07-24 Thread Peter Maydell
The IoTKit, SSE200 and SSE300 all default to 8 MPU regions. The MPS2/MPS3 FPGA images don't override these except in the case of AN547, which uses 16 MPU regions. Define properties on the ARMSSE object for the MPU regions (using the same names as the documented RTL configuration settings, and fol

[PATCH for-8.2 0/3] arm: Use correct number of MPU regions on mps2-tz boards

2023-07-24 Thread Peter Maydell
This patchseries resolves issue https://gitlab.com/qemu-project/qemu/-/issues/1772 which is a report that we don't implement the correct number of MPU regions on our MPS2/MPS3 boards. Ideally guest software ought not to care since (a) it can find out the number of regions by looking at the MPU_TYP

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

2023-07-24 Thread Raphael Norwitz
Very excited to see this. High level looks good modulo a few small things. My major concern is around existing vhost-user-scsi backends which don’t support VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD. IMO we should hide the reconnect behavior behind a VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD check. We may

Re: [PULL 06/19] ui/gtk: set scanout-mode right before scheduling draw

2023-07-24 Thread Volker Rümelin
Am 24.07.23 um 06:47 schrieb Kim, Dongwon: Hi there, I guess removing this line would have been causing the problem. Can you add this line back and test it? diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index eee821d73a..98b3a116bf 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -242,7 +242,6 @@ v

Re: [Qemu RFC 0/7] Early enabling of DCD emulation in Qemu

2023-07-24 Thread Fan Ni
On Thu, May 11, 2023 at 05:56:40PM +, Fan Ni wrote: FYI. I have updated the patch series and sent out again. I suggested anyone who are interested in DCD and using this patch series to use the new series. Quite a few things has been fixed. https://lore.kernel.org/linux-cxl/20230724162313.34

[PATCH] migration: Allow user to specify migration available bandwidth

2023-07-24 Thread Peter Xu
Migration bandwidth is a very important value to live migration. It's because it's one of the major factors that we'll make decision on when to switchover to destination in a precopy process. This value is currently estimated by QEMU during the whole live migration process by monitoring how fast

[PULL 07/16] tests/tcg/s390x: Test CKSM

2023-07-24 Thread Thomas Huth
From: Ilya Leoshkevich Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich Message-Id: <20230724082032.66864-9-...@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/cksm.S | 29 ++

[PULL 11/16] tests/tcg/s390x: Test MC

2023-07-24 Thread Thomas Huth
From: Ilya Leoshkevich Add a small test to prevent regressions. Tested-by: Thomas Huth Signed-off-by: Ilya Leoshkevich Message-Id: <20230724082032.66864-13-...@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/mc.S

[PULL 05/16] target/s390x: Make MC raise specification exception when class >= 16

2023-07-24 Thread Thomas Huth
From: Ilya Leoshkevich MC requires bit positions 8-11 (upper 4 bits of class) to be zeros, otherwise it must raise a specification exception. Cc: qemu-sta...@nongnu.org Fixes: 20d143e2cab8 ("s390x/tcg: Implement MONITOR CALL") Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson Signe

[PULL 03/16] target/s390x: Fix CONVERT TO LOGICAL/FIXED with out-of-range inputs

2023-07-24 Thread Thomas Huth
From: Ilya Leoshkevich CONVERT TO LOGICAL/FIXED deviate from IEEE 754 in that they raise an inexact exception on out-of-range inputs. float_flag_invalid_cvti aligns nicely with that behavior, so convert it to S390_IEEE_MASK_INEXACT. Cc: qemu-sta...@nongnu.org Fixes: defb0e3157af ("s390x: Impleme

[PULL 00/16] s390x fixes

2023-07-24 Thread Thomas Huth
The following changes since commit 885fc169f09f5915ce037263d20a59eb226d473d: Merge tag 'pull-riscv-to-apply-20230723-3' of https://github.com/alistair23/qemu into staging (2023-07-24 11:34:35 +0100) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-

[PULL 04/16] target/s390x: Fix ICM with M3=0

2023-07-24 Thread Thomas Huth
From: Ilya Leoshkevich When the mask is zero, access exceptions should still be recognized for 1 byte at the second-operand address. CC should be set to 0. Cc: qemu-sta...@nongnu.org Fixes: e023e832d0ac ("s390x: translate engine for s390x CPU") Reviewed-by: David Hildenbrand Reviewed-by: Richar

[PULL 06/16] target/s390x: Fix assertion failure in VFMIN/VFMAX with type 13

2023-07-24 Thread Thomas Huth
From: Ilya Leoshkevich Type 13 is reserved, so using it should result in specification exception. Due to an off-by-1 error the code triggers an assertion at a later point in time instead. Cc: qemu-sta...@nongnu.org Fixes: da4807527f3b ("s390x/tcg: Implement VECTOR FP (MAXIMUM|MINIMUM)") Reviewed

[PULL 13/16] tests/tcg/s390x: Test VCKSM

2023-07-24 Thread Thomas Huth
From: Ilya Leoshkevich Add a small test to prevent regressions. Tested-by: Thomas Huth Signed-off-by: Ilya Leoshkevich Message-Id: <20230724082032.66864-15-...@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/vx.h| 2 ++ tests/tcg/s390x/vcksm.c | 31

[PULL 08/16] tests/tcg/s390x: Test CLGEBR and CGEBRA

2023-07-24 Thread Thomas Huth
From: Ilya Leoshkevich Add a small test to prevent regressions. Tested-by: Thomas Huth Signed-off-by: Ilya Leoshkevich Message-Id: <20230724082032.66864-10-...@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/cgebra.c| 32 tests/tcg/s390x

[PULL 12/16] tests/tcg/s390x: Test STPQ

2023-07-24 Thread Thomas Huth
From: Ilya Leoshkevich Add a small test to prevent regressions. Tested-by: Thomas Huth Signed-off-by: Ilya Leoshkevich Message-Id: <20230724082032.66864-14-...@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/stpq.S

[PULL 09/16] tests/tcg/s390x: Test CLM

2023-07-24 Thread Thomas Huth
From: Ilya Leoshkevich Add a small test to prevent regressions. Tested-by: Thomas Huth Signed-off-by: Ilya Leoshkevich Message-Id: <20230724082032.66864-11-...@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/clm.S

[PULL 15/16] target/loongarch: Fix the CSRRD CPUID instruction on big endian hosts

2023-07-24 Thread 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 behaving differently. And indeed: The code

[PULL 10/16] tests/tcg/s390x: Test ICM

2023-07-24 Thread Thomas Huth
From: Ilya Leoshkevich Add a small test to prevent regressions. Tested-by: Thomas Huth Signed-off-by: Ilya Leoshkevich Message-Id: <20230724082032.66864-12-...@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/icm.S

[PULL 16/16] tests/avocado/machine_s390_ccw_virtio: Skip the flaky virtio-gpu test by default

2023-07-24 Thread Thomas Huth
The virtio-gpu test is known to be flaky - that's why we also did not enable the test_s390x_fedora in the gitlab CI. However, a flaky test can also be annoying when testing locally, so let's rather skip this subtest by default and start running the test_s390x_fedora test in the gitlab CI again (sin

[PULL 01/16] target/s390x: Make CKSM raise an exception if R2 is odd

2023-07-24 Thread Thomas Huth
From: Ilya Leoshkevich R2 designates an even-odd register pair; the instruction should raise a specification exception when R2 is not even. Cc: qemu-sta...@nongnu.org Fixes: e023e832d0ac ("s390x: translate engine for s390x CPU") Signed-off-by: Ilya Leoshkevich Message-Id: <20230724082032.66864-

[PULL 14/16] tests/avocado/migration: Remove the malfunctioning s390x tests

2023-07-24 Thread Thomas Huth
The tests from tests/avocado/migration.py do not work at all on s390x - the bios shuts down immediately when it cannot find a boot disk, so there is nothing left to migrate here. For doing a proper migration test, we would need a proper payload, but we already do such tests in the migration *qtest*

[PULL 02/16] target/s390x: Fix CLM with M3=0

2023-07-24 Thread Thomas Huth
From: Ilya Leoshkevich When the mask is zero, access exceptions should still be recognized for 1 byte at the second-operand address. CC should be set to 0. Cc: qemu-sta...@nongnu.org Fixes: defb0e3157af ("s390x: Implement opcode helpers") Reviewed-by: David Hildenbrand Reviewed-by: Richard Hend

Re: [Qemu PATCH 0/9] Enabling DCD emulation support in Qemu

2023-07-24 Thread Fan Ni
On Mon, Jul 24, 2023 at 09:57:48AM +0100, Jonathan Cameron wrote: Hi Ira & Jonathan, Thanks for helping check. I resend the patch series and now they look normal now. Although I am still not sure what happened to my previous sending. The resend is here: https://lore.kernel.org/linux-cxl/20230724

Re: [RFC PATCH 07/12] vdpa: add vhost_vdpa_reset_queue

2023-07-24 Thread Eugenio Perez Martin
On Fri, Jul 21, 2023 at 11:57 PM Si-Wei Liu wrote: > > > > On 7/20/2023 11:14 AM, Eugenio Pérez wrote: > > Split out vq reset operation in its own function, as it may be called > > with ring reset. > > > > Signed-off-by: Eugenio Pérez > > --- > > hw/virtio/vhost-vdpa.c | 16 > >

Re: [PATCH 5/9] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2023-07-24 Thread Nathan Fontenot
On 7/20/23 15:37, ni...@outlook.com wrote: > From: Fan Ni > > Add (file/memory backed) host backend, all the dynamic capacity regions > will share a single, large enough host backend. Set up address space for > DC regions to support read/write operations to dynamic capacity for DCD. > > With the

[Qemu PATCH RESEND 1/9] hw/cxl/cxl-mailbox-utils: Add dc_event_log_size field to output payload of identify memory device command

2023-07-24 Thread Fan Ni
From: Fan Ni Based on CXL spec 3.0 Table 8-94 (Identify Memory Device Output Payload), dynamic capacity event log size should be part of output of the Identify command. Add dc_event_log_size to the output payload for the host to get the info. Signed-off-by: Fan Ni --- hw/cxl/cxl-mailbox-utils.

Re: [PATCH 0/6] Add nRF51 DETECT signal with test

2023-07-24 Thread Peter Maydell
On Sat, 15 Jul 2023 at 00:27, Chris Laplante wrote: > > This patch series implements the nRF51 DETECT signal > in the GPIO peripheral. A qtest is added exercising the signal. > > To implement the test, named out-GPIO IRQ interception had to be added > to the qtest framework. I also took the opport

Re: [PATCH 6/6] qtest: microbit-test: add tests for nRF51 DETECT

2023-07-24 Thread Peter Maydell
On Sat, 15 Jul 2023 at 00:28, Chris Laplante wrote: > > Exercise the DETECT mechanism of the GPIO peripheral. > > Signed-off-by: Chris Laplante I think you want to intercept the DETECT line on the GPIO device itself, not on the SoC (see comments on patch 1), but otherwise Reviewed-by: Peter May

[Qemu PATCH RESEND 8/9] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2023-07-24 Thread Fan Ni
From: Fan Ni Since fabric manager emulation is not supported yet, the change implements the functions to add/release dynamic capacity extents as QMP interfaces. 1. Add dynamic capacity extents: For example, the command to add two continuous extents (each is 128MB long) to region 0 (starting at

[Qemu PATCH RESEND 4/9] hw/mem/cxl_type3: Add support to create DC regions to type3 memory devices

2023-07-24 Thread Fan Ni
From: Fan Ni With the change, when setting up memory for type3 memory device, we can create DC regions A property 'num-dc-regions' is added to ct3_props to allow users to pass the number of DC regions to create. To make it easier, other region parameters like region base, length, and block size a

[Qemu PATCH RESEND 5/9] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2023-07-24 Thread Fan Ni
From: Fan Ni Add (file/memory backed) host backend, all the dynamic capacity regions will share a single, large enough host backend. Set up address space for DC regions to support read/write operations to dynamic capacity for DCD. With the change, following supports are added: 1. add a new prope

[Qemu PATCH RESEND 3/9] include/hw/cxl/cxl_device: Rename mem_size as static_mem_size for type3 memory devices

2023-07-24 Thread Fan Ni
From: Fan Ni Rename mem_size as static_mem_size for type3 memdev to cover static RAM and pmem capacity, preparing for the introduction of dynamic capacity to support dynamic capacity devices. Signed-off-by: Fan Ni --- hw/cxl/cxl-mailbox-utils.c | 5 +++-- hw/mem/cxl_type3.c | 8 -

[Qemu PATCH RESEND 6/9] hw/mem/cxl_type3: Add DC extent list representative and get DC extent list mailbox support

2023-07-24 Thread Fan Ni
From: Fan Ni Add dynamic capacity extent list representative to the definition of CXLType3Dev and add get DC extent list mailbox command per CXL.spec.3.0:.8.2.9.8.9.2. Signed-off-by: Fan Ni --- hw/cxl/cxl-mailbox-utils.c | 71 + hw/mem/cxl_type3.c

[Qemu PATCH RESEND 7/9] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2023-07-24 Thread Fan Ni
From: Fan Ni Per CXL spec 3.0, two mailbox commands are implemented: Add Dynamic Capacity Response (Opcode 4802h) 8.2.9.8.9.3, and Release Dynamic Capacity (Opcode 4803h) 8.2.9.8.9.4. Signed-off-by: Fan Ni --- hw/cxl/cxl-mailbox-utils.c | 253 include/hw/c

[Qemu PATCH RESEND 2/9] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support

2023-07-24 Thread Fan Ni
From: Fan Ni Per cxl spec 3.0, add dynamic capacity region representative based on Table 8-126 and extend the cxl type3 device definition to include dc region information. Also, based on info in 8.2.9.8.9.1, add 'Get Dynamic Capacity Configuration' mailbox support. Signed-off-by: Fan Ni --- hw

[Qemu PATCH RESEND 9/9] hw/mem/cxl_type3: Add dpa range validation for accesses to dc regions

2023-07-24 Thread Fan Ni
From: Fan Ni Not all dpa range in the dc regions is valid to access until an extent covering the range has been added. Add a bitmap for each region to record whether a dc block in the region has been backed by dc extent. For the bitmap, a bit in the bitmap represents a dc block. When a dc extent

[Qemu PATCH RESEND 0/9] Enabling DCD emulation support in Qemu

2023-07-24 Thread Fan Ni
The patch series provides dynamic capacity device (DCD) emulation in Qemu. More specifically, it provides the following functionalities: 1. Extended type3 memory device to support DC regions and extents. 2. Implemented DCD related mailbox command support in CXL r3.0: 8.2.9.8.9. 3. ADD QMP interface

Re: [PATCH 5/6] qtest: irq_intercept_[out/in]: return FAIL if no intercepts are installed

2023-07-24 Thread Peter Maydell
On Sat, 15 Jul 2023 at 00:27, Chris Laplante wrote: > > This is much better than just silently failing with OK. > > Signed-off-by: Chris Laplante Makes sense. Did you do a 'make check' on an all-targets-enabled build just to confirm we haven't accidentally let any bogus uses of the command in wh

Re: [PATCH 4/6] qtest: factor out qtest_install_gpio_out_intercepts

2023-07-24 Thread Peter Maydell
On Sat, 15 Jul 2023 at 00:27, Chris Laplante wrote: > > Simplify the code a bit. > > Signed-off-by: Chris Laplante > --- > softmmu/qtest.c | 23 +++ > 1 file changed, 11 insertions(+), 12 deletions(-) > > diff --git a/softmmu/qtest.c b/softmmu/qtest.c > index 74482ce3cd..051b

Re: [PATCH 3/6] qtest: bail from irq_intercept_in if name is specified

2023-07-24 Thread Peter Maydell
On Sat, 15 Jul 2023 at 00:27, Chris Laplante wrote: > > Named interception of in-GPIOs is not supported yet. > > Signed-off-by: Chris Laplante Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 1/6] hw/gpio/nrf51: implement DETECT signal

2023-07-24 Thread Peter Maydell
On Sat, 15 Jul 2023 at 00:27, Chris Laplante wrote: > > Implement nRF51 DETECT signal in the GPIO peripheral. > > The reference manual makes mention of a per-pin DETECT signal, but these > are not exposed to the user. See > https://devzone.nordicsemi.com/f/nordic-q-a/39858/gpio-per-pin-detect-sig

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

2023-07-24 Thread Eugenio Perez Martin
On Fri, Jul 21, 2023 at 6:07 PM Hanna Czenczek wrote: > > 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-

[PATCH 2/2] block/blkio: use blkio_set_int("fd") to check fd support

2023-07-24 Thread Stefano Garzarella
The way the virtio-blk driver is implemented in libblkio, it's much easier to use blkio_set_int() instead of blkio_get_int() and have it fail right away to see if `fd` is supported by the transport. See https://gitlab.com/libblkio/libblkio/-/merge_requests/208 Signed-off-by: Stefano Garzarella --

[PATCH 1/2] block/blkio: fix opening virtio-blk drivers

2023-07-24 Thread Stefano Garzarella
libblkio 1.3.0 added support of "fd" property for virtio-blk-vhost-vdpa driver. In QEMU, starting from commit cad2ccc395 ("block/blkio: use qemu_open() to support fd passing for virtio-blk") we are using `blkio_get_int(..., "fd")` to check if the "fd" property is supported for all the virtio-blk-*

[PATCH 0/2] block/blkio: fix opening virtio-blk drivers

2023-07-24 Thread Stefano Garzarella
There is a problem with virtio-blk-vhost-vdpa. The first patch fixes the issue, the second patch tries to prepare QEMU for a future version of libblkio where we can use blkio_set_fd() to check whether the property is supported or not. Stefano Garzarella (2): block/blkio: fix opening virtio-blk d

Re: [PATCH 04/10] hw/riscv: virt: Add PCIe HIGHMEM in memmap

2023-07-24 Thread Igor Mammedov
On Wed, 12 Jul 2023 22:09:37 +0530 Sunil V L wrote: > PCIe High MMIO base is actually dynamic and fixed at > run time based on the RAM configured. Currently, this is > not part of the memmap and kept in separate static variable > in virt.c. However, ACPI code also needs this information > to popu

Re: [RFC] risc-v vector (RVV) emulation performance issues

2023-07-24 Thread Philippe Mathieu-Daudé
On 24/7/23 15:40, Daniel Henrique Barboza wrote: Hi, As some of you are already aware the current RVV emulation could be faster. We have at least one commit (bc0ec52eb2, "target/riscv/vector_helper.c: skip set tail when vta is zero") that tried to address at least part of the problem. First t

Re: [PATCH 01/10] hw/arm/virt-acpi-build.c: Move fw_cfg and virtio to common location

2023-07-24 Thread Igor Mammedov
On Wed, 12 Jul 2023 22:09:34 +0530 Sunil V L wrote: > The functions which add fw_cfg and virtio to DSDT are same for ARM > and RISC-V. So, instead of duplicating in RISC-V, move them from > hw/arm/virt-acpi-build.c to common aml-build.c. > > Signed-off-by: Sunil V L > --- > hw/acpi/aml-build.c

Re: [PATCH] docs/devel: Document the tarball publishing/release process

2023-07-24 Thread Peter Maydell
On Thu, 15 Jun 2023 at 05:54, Michael Roth wrote: > > This hopefully contains most of the information one would need to > generate/publish QEMU tarballs and make the related announcements. The > main goal is to quickly get others up to speed on the process so we can > have multiple people able to

Re: [PATCH 0/3] hw/arm/virt: Use generic CPU invalidation

2023-07-24 Thread Peter Maydell
On Mon, 24 Jul 2023 at 16:06, Igor Mammedov wrote: > I've seen others asking why you print type name instead of shorter cpu-model > used on CLI. To do that would make you write a patch to implement reverse > mapping. > In some cases it's simple, in others plain impossible unless you can get > acc

Re: [PATCH 0/3] hw/arm/virt: Use generic CPU invalidation

2023-07-24 Thread Igor Mammedov
On Tue, 18 Jul 2023 20:31:39 +1000 Gavin Shan wrote: > Hi Igor, > > On 7/17/23 22:44, Igor Mammedov wrote: > > On Fri, 14 Jul 2023 13:56:00 +0100 > > Peter Maydell wrote: > > > >> On Fri, 14 Jul 2023 at 12:50, Igor Mammedov wrote: > >>> > >>> On Thu, 13 Jul 2023 12:59:55 +0100 > >>> Peter

Re: [PATCH v2 17/19] hw/timer/arm_timer: QDev'ify ARM_TIMER

2023-07-24 Thread Peter Maydell
On Tue, 4 Jul 2023 at 15:51, Philippe Mathieu-Daudé wrote: > > Introduce the ARM_TIMER sysbus device, exposing one output IRQ > and a single MMIO region. > > arm_timer_new() is converted as QOM instance init()/finalize() > handlers. Note in arm_timer_finalize() we release a ptimer handle > which w

Re: [PATCH v6 0/6] Hyper-V Dynamic Memory Protocol driver (hv-balloon 🎈️)

2023-07-24 Thread David Hildenbrand
On 20.07.23 12:12, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This is a continuation of the v5 of the patch series located here: https://lore.kernel.org/qemu-devel/cover.1686577753.git.maciej.szmigi...@oracle.com/ We're now in QEMU soft-freeze, which means the memslot series migh

Re: [PATCH 1/3] machine: Factor CPU type invalidation out into helper

2023-07-24 Thread Igor Mammedov
On Tue, 18 Jul 2023 16:11:42 +1000 Gavin Shan wrote: > Hi Igor, > > On 7/14/23 22:07, Igor Mammedov wrote: > > On Thu, 13 Jul 2023 15:45:00 +1000 > > Gavin Shan wrote: > > > >> The CPU type invalidation logic in machine_run_board_init() is > >> independent enough. Lets factor it out into hel

Re: [PATCH 06/14] target/arm/ptw: Pass an ARMSecuritySpace to arm_hcr_el2_eff_secstate()

2023-07-24 Thread Peter Maydell
On Mon, 24 Jul 2023 at 14:42, Peter Maydell wrote: > > On Sun, 23 Jul 2023 at 16:24, Richard Henderson > wrote: > > > > On 7/14/23 16:46, Peter Maydell wrote: > > > arm_hcr_el2_eff_secstate() takes a bool secure, which it uses to > > > determine whether EL2 is enabled in the current security stat

Re: [PATCH v2 0/7] migration: Better error handling in return path thread

2023-07-24 Thread Fabiano Rosas
Peter Xu writes: > v2: > - Patch "migration: Provide explicit error message for file shutdowns" > - Touched up qapi doc [Fabiano] > - Added Bugzilla link to commit which I didn't even notice that I was > fixing a bug.. but rightfully pointed out by Laszlo. > - Moved it to the 1st patch

  1   2   3   >