Re: [PATCH] KVM: Add system call KVM_VERIFY_MSI to verify MSI vector

2022-11-14 Thread chenxiang (M)
Hi Marc, 在 2022/11/10 18:28, Marc Zyngier 写道: On Wed, 09 Nov 2022 06:21:18 +, "chenxiang (M)" wrote: Hi Marc, 在 2022/11/8 20:47, Marc Zyngier 写道: On Tue, 08 Nov 2022 08:08:57 +, chenxiang wrote: From: Xiang Chen Currently the numbers of MSI vectors come from register PCI_MSI_FL

Re: [PATCH v2] util/qemu-config: Fix "query-command-line-options" to provide the right values

2022-11-14 Thread Markus Armbruster
Thomas Huth writes: > On 11/11/2022 15.53, Markus Armbruster wrote: >> Thomas Huth writes: >> >>> The "query-command-line-options" command uses a hand-crafted list >>> of options that should be returned for the "machine" parameter. >>> This is pretty much out of sync with reality, for example s

Re: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-14 Thread Christian Borntraeger
Am 14.11.22 um 18:20 schrieb Michael S. Tsirkin: [...] This does not seem to fix the regression that I have reported. This was applied on top of 9f6bcfd99f which IIUC does, right? Just dobble checked, 9f6bcfd99f was the patch that created the original problem, no?

Re: [qemu-devel]

2022-11-14 Thread Thomas Huth
On 14/11/2022 23.58, Pawel Polawski wrote: Hi Everyone, I am trying to check qemu virtual cpu boundaries when running a custom edk2 based firmware build. For that purpose I want to run qemu with more than 1024 vCPU: $QEMU -accel kvm -m 4G -M q35,kernel-irqchip=on,smm=on -smp cpus=1025,maxcpus=

Re: [PATCH for-7.2 v2 3/4] libvhost-user: Fix two more format strings

2022-11-14 Thread Stefan Weil via
Am 05.11.22 um 11:24 schrieb Stefan Weil: This fix is required for 32 bit host. The bug was detected by CI for arm-linux, but is also relevant for i386-linux. Reported-by: Stefan Hajnoczi Signed-off-by: Stefan Weil --- subprojects/libvhost-user/libvhost-user.c | 3 ++- 1 file changed, 2 in

[PATCH for-7.2] Add G_GNUC_PRINTF to function qemu_set_info_str and fix related issues

2022-11-14 Thread Stefan Weil via
With the G_GNUC_PRINTF function attribute the compiler detects two potential insecure format strings: ../../../net/stream.c:248:31: warning: format string is not a string literal (potentially insecure) [-Wformat-security] qemu_set_info_str(&s->nc, uri); ^~~ ../..

Re: [PATCH] migration: check magic value for deciding the mapping of channels

2022-11-14 Thread manish.mishra
Thanks Peter On 14/11/22 10:21 pm, Peter Xu wrote: Manish, On Thu, Nov 03, 2022 at 11:47:51PM +0530, manish.mishra wrote: Yes, but if we try to read early on main channel with tls enabled case it is an issue. Sorry i may not have put above comment cleary. I will try to put scenario step wise

Re: [PATCH] hw/intc: sifive_plic: Renumber the S irqs for numa support

2022-11-14 Thread Alistair Francis
On Tue, Nov 15, 2022 at 9:56 AM Philippe Mathieu-Daudé wrote: > > On 14/11/22 11:34, Frédéric Pétrot wrote: > > Le 14/11/2022 à 09:40, Philippe Mathieu-Daudé a écrit : > >> On 11/11/22 13:19, Frédéric Pétrot wrote: > > > >> Eventually we could unify the style: > >> > >> -- >8 -- > >> @@ -476,11 +4

Re: biosbits test failing on origin/master

2022-11-14 Thread Ani Sinha
On Tue, Nov 15, 2022 at 5:13 AM John Snow wrote: > > On Thu, Nov 10, 2022 at 11:22 PM Ani Sinha wrote: > > > > On Thu, Nov 10, 2022 at 11:37 PM John Snow wrote: > > > > > > Hiya, on today's origin/master > > > (2ccad61746ca7de5dd3e25146062264387e43bd4) I'm finding that "make > > > check-avocado"

Re: [PATCH v6 09/10] vdpa: Add listener_shadow_vq to vhost_vdpa

2022-11-14 Thread Jason Wang
On Tue, Nov 15, 2022 at 12:31 AM Eugenio Perez Martin wrote: > > On Mon, Nov 14, 2022 at 5:30 AM Jason Wang wrote: > > > > > > 在 2022/11/11 21:12, Eugenio Perez Martin 写道: > > > On Fri, Nov 11, 2022 at 8:49 AM Jason Wang wrote: > > >> > > >> 在 2022/11/10 21:47, Eugenio Perez Martin 写道: > > >>> O

Re: [PATCH v1 1/1] migration: Fix yank on postcopy multifd crashing guest after migration

2022-11-14 Thread Leonardo Bras Soares Passos
On Thu, Nov 10, 2022 at 10:48 AM Juan Quintela wrote: > > Leonardo Bras wrote: > D> When multifd and postcopy-ram capabilities are enabled, if a > > migrate-start-postcopy is attempted, the migration will finish sending the > > memory pages and then crash with the following error: > > > > qemu-sy

Re: Re: [PATCH for 8.0 8/8] hmp: add cryptodev info command

2022-11-14 Thread zhenwei pi
On 11/15/22 02:16, Dr. David Alan Gilbert wrote: * zhenwei pi (pizhen...@bytedance.com) wrote: Example of this command: # virsh qemu-monitor-command vm --hmp info cryptodev cryptodev1: service=[akcipher|mac|hash|cipher] queue 0: type=builtin cryptodev0: service=[akcipher] queue 0:

Re: aarch64 GitLab CI runner down

2022-11-14 Thread Stefan Hajnoczi
On Mon, 14 Nov 2022 at 19:39, Philippe Mathieu-Daudé wrote: > On 14/11/22 22:56, Stefan Hajnoczi wrote: > > Hi Alex and Richard, > > The aarch64 GitLab CI runner is down again. Are you able to restart it? > > Alex wrote to your RH account :/ This is a scheduled shutdown. > Equinix is relocating th

Re: [PATCH 2/4] hw/cxl: Add CXL_CAPACITY_MULTIPLIER definition

2022-11-14 Thread Jonathan Cameron via
On Tue, 25 Oct 2022 20:47:35 -0400 Gregory Price wrote: > Remove usage of magic numbers when accessing capacity fields and replace > with CXL_CAPACITY_MULTIPLIER, matching the kernel definition. > > Signed-off-by: Gregory Price > Reviewed-by: Davidlohr Bueso Makes sense. I'll add it to my loca

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-14 Thread Michael Roth
On Mon, Nov 14, 2022 at 06:28:43PM +0300, Kirill A. Shutemov wrote: > On Mon, Nov 14, 2022 at 03:02:37PM +0100, Vlastimil Babka wrote: > > On 11/1/22 16:19, Michael Roth wrote: > > > On Tue, Nov 01, 2022 at 07:37:29PM +0800, Chao Peng wrote: > > >> > > > >> > 1) restoring kernel directmap: > > >

Re: [PATCH v4 2/7] target/arm: Make RVBAR available for all ARMv8 CPUs

2022-11-14 Thread Peter Maydell
On Sun, 23 Oct 2022 at 16:37, wrote: > > From: Tobias Röhmel > > RVBAR shadows RVBAR_ELx where x is the highest exception > level if the highest EL is not EL3. This patch also allows > ARMv8 CPUs to change the reset address with > the rvbar property. > > Signed-off-by: Tobias Röhmel > diff --gi

Re: [PATCH 2/2] Do not access /dev/mem in MSI-X PCI passthrough on Xen

2022-11-14 Thread Marek Marczykowski-Górecki
On Mon, Nov 14, 2022 at 07:39:48PM +, Andrew Cooper wrote: > On 14/11/2022 19:20, Marek Marczykowski-Górecki wrote: > > The /dev/mem is used for two purposes: > > - reading PCI_MSIX_ENTRY_CTRL_MASKBIT > > - reading Pending Bit Array (PBA) > > > > The first one was originally done because when

Re: [PATCH v7 11/12] multifd: Zero pages transmission

2022-11-14 Thread Juan Quintela
Leonardo Brás wrote: > On Tue, 2022-08-02 at 08:39 +0200, Juan Quintela wrote: >> This implements the zero page dection and handling. >> >> Signed-off-by: Juan Quintela Hi on further investigation, I see why it can't be a problem. >> static int multifd_recv_unfill_packet(MultiFDRecvParams *

[PATCH v2 1/1] tcg: add perfmap and jitdump

2022-11-14 Thread Ilya Leoshkevich
Add ability to dump /tmp/perf-.map and jit-.dump. The first one allows the perf tool to map samples to each individual translation block. The second one adds the ability to resolve symbol names, line numbers and inspect JITed code. Example of use: perf record qemu-x86_64 -perfmap ./a.out

Re: [PULL 00/11] Block layer patches

2022-11-14 Thread Kevin Wolf
Am 11.11.2022 um 20:20 hat Stefan Hajnoczi geschrieben: > > Hanna Reitz (9): > > block/mirror: Do not wait for active writes > > block/mirror: Drop mirror_wait_for_any_operation() > > block/mirror: Fix NULL s->job in active writes > > iotests/151: Test that active mirror pro

Re: aarch64 GitLab CI runner down

2022-11-14 Thread Philippe Mathieu-Daudé
Hi Stefan, On 14/11/22 22:56, Stefan Hajnoczi wrote: Hi Alex and Richard, The aarch64 GitLab CI runner is down again. Are you able to restart it? Alex wrote to your RH account :/ This is a scheduled shutdown. Equinix is relocating the hardware and this runner will be down for (at least) 4 days

[PULL 0/2] target/i386: fix cmpxchgl, lahf, sahf

2022-11-14 Thread Richard Henderson
The following changes since commit 98f10f0e2613ba1ac2ad3f57a5174014f6dcb03d: Merge tag 'pull-target-arm-20221114' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2022-11-14 13:31:17 -0500) are available in the Git repository at: https://gitlab.com/rth7680/qem

Re: [PATCH v7 10/12] multifd: Support for zero pages transmission

2022-11-14 Thread Juan Quintela
chuang xu wrote: > On 2022/8/2 下午2:39, Juan Quintela wrote: >> This patch adds counters and similar. Logic will be added on the >> following patch. >> >> Signed-off-by: Juan Quintela >> >> sync_needed = p->flags & MULTIFD_FLAG_SYNC; >> /* recv methods don't know how to handl

Re: [PATCH] s390x: Fix spelling errors

2022-11-14 Thread Ilya Leoshkevich
On Fri, Nov 11, 2022 at 07:28:28PM +0100, Thomas Huth wrote: > Fix typos (discovered with the 'codespell' utility). > > Signed-off-by: Thomas Huth > --- > hw/s390x/ipl.h | 2 +- > pc-bios/s390-ccw/cio.h | 2 +- > pc-bios/s390-ccw/iplb.h | 2 +- > tar

Re: [PATCH v2] capstone: use instead of

2022-11-14 Thread Daniel P . Berrangé
On Mon, Nov 14, 2022 at 12:13:48PM +0300, Michael Tokarev wrote: > 14.11.2022 11:58, Daniel P. Berrangé wrote: > .. > > > On current systems, using works > > > now (despite the pkg-config-supplied -I/usr/include/capstone) - > > > since on all systems capstone headers are put into capstone/ > > > s

Re: [PATCH v2 06/19] hw/9pfs: Add missing definitions for Windows

2022-11-14 Thread Christian Schoenebeck
On Friday, November 11, 2022 5:22:12 AM CET Bin Meng wrote: > From: Guohuai Shi > > Some definitions currently used by the 9pfs codes are only available > on POSIX platforms. Let's add our own ones in preparation to adding > 9pfs support for Windows. > > Signed-off-by: Guohuai Shi > Signed-off-

Re: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-14 Thread Michael S. Tsirkin
On Mon, Nov 14, 2022 at 05:55:09PM +0100, Christian Borntraeger wrote: > > > Am 14.11.22 um 17:37 schrieb Michael S. Tsirkin: > > On Mon, Nov 14, 2022 at 05:18:53PM +0100, Christian Borntraeger wrote: > > > Am 08.11.22 um 10:23 schrieb Alex Bennée: > > > > The previous fix to virtio_device_starte

[PATCH v4] qapi/qom: Memory backend property prealloc-threads doc fix

2022-11-14 Thread Zhenyu Zhang
Commit ffac16fab3 "hostmem: introduce "prealloc-threads" property" (v5.0.0) changed the default number of threads from number of CPUs to 1. This was deemed a regression, and fixed in commit f8d426a685 "hostmem: default the amount of prealloc-threads to smp-cpus". Except the documentation remained

[PATCH 0/1] hw/arm/aspeed: Automatically zero-extend flash images

2022-11-14 Thread Peter Delevoryas
I've been using this patch for a long time so that I don't have to use dd to zero-extend stuff all the time. It's just doing what people are doing already, right? I hope it's not controversial. One note: I couldn't figure out how to make it work without changing the permissions on the block device

Re: [PATCH] hw/intc: sifive_plic: Renumber the S irqs for numa support

2022-11-14 Thread Alistair Francis
On Fri, Nov 11, 2022 at 10:20 PM Frédéric Pétrot wrote: > > Commit 40244040 changed the way the S irqs are numbered. This breaks when > using numa configuration, e.g.: > ./qemu-system-riscv64 -nographic -machine virt,dumpdtb=numa-tree.dtb \ > -m 2G -smp cpus=16 \ >

[PATCH] docs/system/s390x: Document the "loadparm" machine property

2022-11-14 Thread Thomas Huth
The "loadparm" machine property is useful for selecting alternative kernels on the disk of the guest, but so far we do not tell the users yet how to use it. Add some documentation to fill this gap. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2128235 Signed-off-by: Thomas Huth --- docs/s

Re: [PATCH v2 02/12] tests/avocado: improve behaviour waiting for login prompts

2022-11-14 Thread Peter Maydell
On Fri, 11 Nov 2022 at 14:58, Alex Bennée wrote: > > This attempts to deal with the problem of login prompts not being > guaranteed to be terminated with a newline. The solution to this is to > peek at the incoming data looking to see if we see an up-coming match > before we fall back to the old r

Re: [PATCH v2 14/15] migration: Remove old preempt code around state maintainance

2022-11-14 Thread Juan Quintela
Peter Xu wrote: > With the new code to send pages in rp-return thread, there's little help to > keep lots of the old code on maintaining the preempt state in migration > thread, because the new way should always be faster.. > > Then if we'll always send pages in the rp-return thread anyway, we don

[PULL 2/2] hw/intc/arm_gicv3: fix prio masking on pmr write

2022-11-14 Thread Peter Maydell
From: Jens Wiklander With commit 39f29e599355 ("hw/intc/arm_gicv3: Use correct number of priority bits for the CPU") the number of priority bits was changed from the maximum value 8 to typically 5. As a consequence a few of the lowest bits in ICC_PMR_EL1 becomes RAZ/WI. However prior to this patc

Qemu virtual CPU limitation to 1024

2022-11-14 Thread Pawel Polawski
Hi Everyone, I am trying to check qemu virtual cpu boundaries when running a custom edk2 based firmware build. For that purpose I want to run qemu with more than 1024 vCPU: $QEMU -accel kvm -m 4G -M q35,kernel-irqchip=on,smm=on -smp cpus=1025,maxcpus=1025 -global mch.extended-tseg-mbytes=128 -driv

[PATCH 1/2] hw/xen/xen_pt: Call default handler only if no custom one is set

2022-11-14 Thread Marek Marczykowski-Górecki
Call pci_default_write_config() in xen_pt_pci_write_config() only for registers that do not have custom handler, and do that only after resolving them. This is important for two reasons: 1. XenPTRegInfo has ro_mask which needs to be enforced - Xen-specific hooks do that on their own (especially

Re: [PATCH 05/13] block: Inline bdrv_drain_invoke()

2022-11-14 Thread Hanna Reitz
On 08.11.22 13:37, Kevin Wolf wrote: bdrv_drain_invoke() has now two entirely separate cases that share no code any more and are selected depending on a bool parameter. Each case has only one caller. Just inline the function. Signed-off-by: Kevin Wolf --- block/io.c | 23 ++---

Re: [PATCH v6 05/10] vdpa: move SVQ vring features check to net/

2022-11-14 Thread Jason Wang
在 2022/11/11 20:58, Eugenio Perez Martin 写道: On Fri, Nov 11, 2022 at 9:07 AM Jason Wang wrote: On Fri, Nov 11, 2022 at 3:56 PM Eugenio Perez Martin wrote: On Fri, Nov 11, 2022 at 8:34 AM Jason Wang wrote: 在 2022/11/10 21:09, Eugenio Perez Martin 写道: On Thu, Nov 10, 2022 at 6:40 AM Jason

Re: [PATCH 10/13] block: Call drain callbacks only once

2022-11-14 Thread Kevin Wolf
Am 09.11.2022 um 19:05 hat Vladimir Sementsov-Ogievskiy geschrieben: > On 11/8/22 15:37, Kevin Wolf wrote: > > We only need to call both the BlockDriver's callback and the parent > > callbacks when going from undrained to drained or vice versa. A second > > drain section doesn't make a difference f

Re: [PATCH] hw/sd: Fix sun4i allwinner-sdhost for U-Boot

2022-11-14 Thread Peter Maydell
On Mon, 14 Nov 2022 at 17:29, Strahinja Jankovic wrote: > > Hi, > > Thank you for your reply. > > On Mon, Nov 14, 2022 at 4:42 PM Peter Maydell > wrote: > > > > On Sat, 12 Nov 2022 at 21:49, Strahinja Jankovic > > wrote: > > > > > > Trying to run U-Boot for Cubieboard (Allwinner A10) fails beca

Re: [PATCH] migration: check magic value for deciding the mapping of channels

2022-11-14 Thread Peter Xu
Manish, On Thu, Nov 03, 2022 at 11:47:51PM +0530, manish.mishra wrote: > Yes, but if we try to read early on main channel with tls enabled case it is > an issue. Sorry i may not have put above comment cleary. I will try to put > scenario step wise. > 1. main channel is created and tls handshake

[qemu-devel]

2022-11-14 Thread Pawel Polawski
Hi Everyone, I am trying to check qemu virtual cpu boundaries when running a custom edk2 based firmware build. For that purpose I want to run qemu with more than 1024 vCPU: $QEMU -accel kvm -m 4G -M q35,kernel-irqchip=on,smm=on -smp cpus=1025,maxcpus=1025 -global mch.extended-tseg-mbytes=128 -driv

[libnbd PATCH v2 16/23] examples: Update copy-libev to use 64-bit block status

2022-11-14 Thread Eric Blake
Although our use of "base:allocation" doesn't require the use of the 64-bit API for flags, we might perform slightly faster for a server that does give us 64-bit extent lengths and honors larger nbd_zero lengths. --- examples/copy-libev.c | 21 ++--- 1 file changed, 10 insertions(+

[PATCH v2 4/6] spec: Allow 64-bit block status results

2022-11-14 Thread Eric Blake
There are some potential extension metadata contexts that would benefit from a 64-bit status value. For example, Zoned Block Devices (see https://zonedstorage.io/docs/linux/zbd-api) may want to return the relative offset of where the next write will occur within the zone, where a zone may be large

[PATCH v2 04/15] nbd: Add types for extended headers

2022-11-14 Thread Eric Blake
Add the constants and structs necessary for later patches to start implementing the NBD_OPT_EXTENDED_HEADERS extension in both the client and server, matching recent commit XXX[*] in the upstream nbd project. This patch does not change any existing behavior, but merely sets the stage. This patch d

Re: [PATCH] hw/intc: sifive_plic: Renumber the S irqs for numa support

2022-11-14 Thread Philippe Mathieu-Daudé
On 11/11/22 13:19, Frédéric Pétrot wrote: Commit 40244040 changed the way the S irqs are numbered. This breaks when 40244040a7 in case? using numa configuration, e.g.: ./qemu-system-riscv64 -nographic -machine virt,dumpdtb=numa-tree.dtb \ -m 2G -smp cpus=16 \

Re: [PATCH v7 11/12] multifd: Zero pages transmission

2022-11-14 Thread Juan Quintela
Leonardo Brás wrote: > On Tue, 2022-08-02 at 08:39 +0200, Juan Quintela wrote: >> This implements the zero page dection and handling. >> >> Signed-off-by: Juan Quintela >> @@ -358,6 +365,18 @@ static int multifd_recv_unfill_packet(MultiFDRecvParams >> *p, Error **errp) >> p->normal[i]

Re: [PATCH v6 07/10] vdpa: Add asid parameter to vhost_vdpa_dma_map/unmap

2022-11-14 Thread Jason Wang
在 2022/11/11 21:02, Eugenio Perez Martin 写道: On Fri, Nov 11, 2022 at 8:41 AM Jason Wang wrote: 在 2022/11/10 21:22, Eugenio Perez Martin 写道: On Thu, Nov 10, 2022 at 6:51 AM Jason Wang wrote: On Wed, Nov 9, 2022 at 1:08 AM Eugenio Pérez wrote: So the caller can choose which ASID is destin

Re: [PATCH v6 10/10] vdpa: Always start CVQ in SVQ mode

2022-11-14 Thread Jason Wang
在 2022/11/11 22:38, Eugenio Perez Martin 写道: On Fri, Nov 11, 2022 at 9:03 AM Jason Wang wrote: 在 2022/11/11 00:07, Eugenio Perez Martin 写道: On Thu, Nov 10, 2022 at 7:25 AM Jason Wang wrote: 在 2022/11/9 01:07, Eugenio Pérez 写道: Isolate control virtqueue in its own group, allowing to inter

Re: [PATCH v7 10/12] multifd: Support for zero pages transmission

2022-11-14 Thread Juan Quintela
Leonardo Brás wrote: ... >> @@ -712,6 +726,7 @@ static void *multifd_send_thread(void *opaque) >> qemu_mutex_lock(&p->mutex); >> p->num_packets++; >> p->total_normal_pages += p->normal_num; >> +p->total_zero_pages += p->zero_num; > > I can see i

[PATCH v2 15/15] RFC: nbd/server: Send 64-bit hole chunk

2022-11-14 Thread Eric Blake
Since we cap NBD_CMD_READ requests to 32M, we never have a reason to send a 64-bit chunk type for a hole; but it is worth producing these for interoperability testing of clients that want extended headers. --- nbd/server.c | 20 1 file changed, 16 insertions(+), 4 deletions(-)

Re: [PATCH v2] capstone: use instead of

2022-11-14 Thread Daniel P . Berrangé
On Sun, Nov 13, 2022 at 11:09:42PM +0300, Michael Tokarev wrote: > The upcoming capstone 5.0 drops support for the old way > of including its header, due to this change: > https://github.com/capstone-engine/capstone/commit/6656bcb63ab4e87dc6079bd6b6b12cc8dd9b2ad8 > The official way is to use > >

Re: [PULL 00/11] Block layer patches

2022-11-14 Thread John Snow
On Mon, Nov 14, 2022 at 5:56 AM Kevin Wolf wrote: > > Am 11.11.2022 um 20:20 hat Stefan Hajnoczi geschrieben: > > > Hanna Reitz (9): > > > block/mirror: Do not wait for active writes > > > block/mirror: Drop mirror_wait_for_any_operation() > > > block/mirror: Fix NULL s->job in a

[PATCH v2 02/15] nbd/server: Prepare for alternate-size headers

2022-11-14 Thread Eric Blake
An upcoming NBD extension wants to add the ability to do 64-bit effect lengths in requests. As part of that extension, the size of the reply headers will change in order to permit a 64-bit length in the reply for symmetry [*]. Additionally, where the reply header is currently 16 bytes for simple

[libnbd PATCH v2 23/23] RFC: pread: Accept 64-bit holes

2022-11-14 Thread Eric Blake
Even though we don't currently allow the user to request NBD_CMD_READ with more than 64M (and even if we did, our API signature caps us at SIZE_MAX, which is 32 bits on a 32-bit machine), upstream NBD commit XXX[*] states that for symmetry with 64-bit requests, extended header clients must be prepa

Re: [PATCH v2 02/15] migration: Add postcopy_preempt_active()

2022-11-14 Thread Juan Quintela
Peter Xu wrote: > Add the helper to show that postcopy preempt enabled, meanwhile active. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela

[cross-project PATCH v2] NBD 64-bit extensions

2022-11-14 Thread Eric Blake
This is a cover letter for a set of multi-project patch series all designed to implement 64-bit operations in NBD, and demonstrate interoperability of the new extension between projects. v1 of the project was attempted nearly a year ago: https://lists.nongnu.org/archive/html/qemu-devel/2021-12/msg

Re: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-14 Thread Christian Borntraeger
Am 14.11.22 um 18:10 schrieb Michael S. Tsirkin: On Mon, Nov 14, 2022 at 05:55:09PM +0100, Christian Borntraeger wrote: Am 14.11.22 um 17:37 schrieb Michael S. Tsirkin: On Mon, Nov 14, 2022 at 05:18:53PM +0100, Christian Borntraeger wrote: Am 08.11.22 um 10:23 schrieb Alex Bennée: The pr

Re: [PATCH v3 1/7] memory: associate DMA accesses with the initiator Device

2022-11-14 Thread Stefan Hajnoczi
On Fri, 28 Oct 2022 at 15:19, Alexander Bulekov wrote: > > Add transitionary DMA APIs which associate accesses with the device > initiating them. The modified APIs maintain a "MemReentrancyGuard" in > the DeviceState, which is used to prevent DMA re-entrancy issues. > The MemReentrancyGuard is set

[PATCH v2 6/6] RFC: spec: Introduce NBD_REPLY_TYPE_OFFSET_HOLE_EXT

2022-11-14 Thread Eric Blake
Rather than requiring all servers and clients to have a 32-bit limit on maximum NBD_CMD_READ/WRITE sizes, we can choose to standardize support for a 64-bit single I/O transaction now. NBD_REPLY_TYPE_OFFSET_DATA can already handle a large reply, but NBD_REPLY_TYPE_OFFSET_HOLE needs a 64-bit counterp

[RFC PATCH] gitlab: add new dynamic check-gcov target for coverage

2022-11-14 Thread Alex Bennée
The aim of this was to expand the coverage checking to only target builds affected by the current branch. Unfortunately first time out the build falls over at the asset uploading stage exceeding some size limit. So for now I'm posting this as a proof-of-concept until I can figure out a better way

[PATCH v2 0/3] Add OCP extended log to nvme QEMU

2022-11-14 Thread Joel Granados
The motivation and description are contained in the last patch in this set. Will copy paste it here for convenience: In order to evaluate write amplification factor (WAF) within the storage stack it is important to know the number of bytes written to the controller. The existing SMART

Re: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-14 Thread Christian Borntraeger
Am 14.11.22 um 17:37 schrieb Michael S. Tsirkin: On Mon, Nov 14, 2022 at 05:18:53PM +0100, Christian Borntraeger wrote: Am 08.11.22 um 10:23 schrieb Alex Bennée: The previous fix to virtio_device_started revealed a problem in its use by both the core and the device code. The core code should

[PULL 1/2] MAINTAINERS: Update maintainer's email for Xilinx CAN

2022-11-14 Thread Peter Maydell
From: Vikram Garhwal Signed-off-by: Vikram Garhwal Reviewed-by: Francisco Iglesias Signed-off-by: Peter Maydell --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index caba73ec41b..be151f00246 100644 --- a/MAINTAINERS +++ b/MAINT

Re: [PATCH v2] capstone: use instead of

2022-11-14 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH 03/13] block: Revert .bdrv_drained_begin/end to non-coroutine_fn

2022-11-14 Thread Hanna Reitz
On 08.11.22 13:37, Kevin Wolf wrote: Polling during bdrv_drained_end() can be problematic (and in the future, we may get cases for bdrv_drained_begin() where polling is forbidden, and we don't care about already in-flight requests, but just want to prevent new requests from arriving). The .bdrv_

[PATCH v2] hw/intc: sifive_plic: Renumber the S irqs for numa support

2022-11-14 Thread Frédéric Pétrot
Commit 40244040a7a changed the way the S irqs are numbered. This breaks when using numa configuration, e.g.: ./qemu-system-riscv64 -nographic -machine virt,dumpdtb=numa-tree.dtb \ -m 2G -smp cpus=16 \ -object memory-backend-ram,id=mem0,size=512M \

[PULL 1/2] target/i386: fix cmpxchg with 32-bit register destination

2022-11-14 Thread Richard Henderson
From: Paolo Bonzini Unlike the memory case, where "the destination operand receives a write cycle without regard to the result of the comparison", rm must not be touched altogether if the write fails, including not zero-extending it on 64-bit processors. This is not how the movcond currently wor

Re: [PATCH 2/2] Do not access /dev/mem in MSI-X PCI passthrough on Xen

2022-11-14 Thread Andrew Cooper
On 14/11/2022 19:20, Marek Marczykowski-Górecki wrote: > The /dev/mem is used for two purposes: > - reading PCI_MSIX_ENTRY_CTRL_MASKBIT > - reading Pending Bit Array (PBA) > > The first one was originally done because when Xen did not send all > vector ctrl writes to the device model, so QEMU mig

Re: [PATCH 07/13] block: Don't use subtree drains in bdrv_drop_intermediate()

2022-11-14 Thread Hanna Reitz
On 08.11.22 13:37, Kevin Wolf wrote: Instead of using a subtree drain from the top node (which also drains child nodes of base that we're not even interested in), use a normal drain for base, which automatically drains all of the parents, too. Signed-off-by: Kevin Wolf --- block.c | 4 ++--

[PATCH v2 5/6] spec: Introduce NBD_FLAG_BLOCK_STATUS_PAYLOAD

2022-11-14 Thread Eric Blake
NBD_CMD_BLOCK_STATUS currently forces the server to reply to all metacontext ids that the client negotiated via NBD_OPT_SET_META_CONTEXT. But since extended headers make it easy for the client to pass command payloads, we can allow for a client to negotiate multiple metacontexts up front but expre

[PULL v2 00/11] Block layer patches

2022-11-14 Thread Kevin Wolf
The following changes since commit 2ccad61746ca7de5dd3e25146062264387e43bd4: Merge tag 'pull-tcg-20221109' of https://gitlab.com/rth7680/qemu into staging (2022-11-09 13:26:45 -0500) are available in the Git repository at: https://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetc

Re: [PATCH] hw/sd: Fix sun4i allwinner-sdhost for U-Boot

2022-11-14 Thread Strahinja Jankovic
On Mon, Nov 14, 2022 at 6:36 PM Peter Maydell wrote: > > On Mon, 14 Nov 2022 at 17:29, Strahinja Jankovic > wrote: > > > > Hi, > > > > Thank you for your reply. > > > > On Mon, Nov 14, 2022 at 4:42 PM Peter Maydell > > wrote: > > > > > > On Sat, 12 Nov 2022 at 21:49, Strahinja Jankovic > > > w

[PATCH v2 3/3] nvme: Add physical writes/reads from OCP log

2022-11-14 Thread Joel Granados
In order to evaluate write amplification factor (WAF) within the storage stack it is important to know the number of bytes written to the controller. The existing SMART log value of Data Units Written is too coarse (given in units of 500 Kb) and so we add the SMART health information extended from

Re: [PATCH 3/4] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2022-11-14 Thread Jonathan Cameron via
On Tue, 25 Oct 2022 20:47:36 -0400 Gregory Price wrote: > This commit enables each CXL Type-3 device to contain one volatile > memory region and one persistent region. > > Two new properties have been added to cxl-type3 device initialization: > [volatile-memdev] and [persistent-memdev] > >

Ugly QOM property names: paths within paths

2022-11-14 Thread Markus Armbruster
I noticed this the other day: (qemu) info qom-tree /machine (pc-i440fx-7.2-machine) /fw_cfg (fw_cfg_io) /\x2from@etc\x2facpi\x2frsdp[0] (memory-region)b /\x2from@etc\x2facpi\x2ftables[0] (memory-region) /\x2from@etc\x2ftable-loader[0] (memory-region)

Re: [PATCH v2] capstone: use instead of

2022-11-14 Thread Peter Maydell
On Sun, 13 Nov 2022 at 20:10, Michael Tokarev wrote: > > The upcoming capstone 5.0 drops support for the old way > of including its header, due to this change: > https://github.com/capstone-engine/capstone/commit/6656bcb63ab4e87dc6079bd6b6b12cc8dd9b2ad8 > The official way is to use > > This chang

Re: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-14 Thread Michael S. Tsirkin
On Mon, Nov 14, 2022 at 06:15:30PM +0100, Christian Borntraeger wrote: > > > Am 14.11.22 um 18:10 schrieb Michael S. Tsirkin: > > On Mon, Nov 14, 2022 at 05:55:09PM +0100, Christian Borntraeger wrote: > > > > > > > > > Am 14.11.22 um 17:37 schrieb Michael S. Tsirkin: > > > > On Mon, Nov 14, 202

[PATCH v2 1/3] nvme: Move adjustment of data_units{read,written}

2022-11-14 Thread Joel Granados
In order to return the units_{read/written} required by the SMART log we need to shift the number of bytes value by BDRV_SECTORS_BITS and multiply by 1000. This is a prep patch that moves this adjustment to where the SMART log is calculated in order to use the stats struct for calculating OCP exten

Re: [PATCH for 7.2-rc1 v2 00/12] testing, docs, plugins, arm pre-PR

2022-11-14 Thread Alex Bennée
Alex Bennée writes: > Hi, > > This is my pre-PR series for the pull request I'm going to send on > Monday in time for Tuesday tagging of rc1. Anything not reviewed will > get dropped from the PR (which probably includes the GICD_IIDR which > was just an annoyance I noticed while debugging Xen f

[PATCH 1/1] hw/arm/aspeed: Automatically zero-extend flash images

2022-11-14 Thread Peter Delevoryas
One thing that's really annoying about the Aspeed machines is that you have to provide a flash image that is the same size as the SPI-NOR flash device the board uses, or something larger. If you don't, you'll get this obscure error message: qemu-system-aarch64: failed to read the initial flash

Re: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-14 Thread Alex Bennée
Christian Borntraeger writes: > Am 08.11.22 um 10:23 schrieb Alex Bennée: >> The previous fix to virtio_device_started revealed a problem in its >> use by both the core and the device code. The core code should be able >> to handle the device "starting" while the VM isn't running to handle >> t

Re: [PATCH v2 12/15] migration: Move last_sent_block into PageSearchStatus

2022-11-14 Thread Juan Quintela
Peter Xu wrote: > Since we use PageSearchStatus to represent a channel, it makes perfect > sense to keep last_sent_block (aka, leverage RAM_SAVE_FLAG_CONTINUE) to be > per-channel rather than global because each channel can be sending > different pages on ramblocks. > > Hence move it from RAMState

Re: [PATCH v2 02/12] tests/avocado: improve behaviour waiting for login prompts

2022-11-14 Thread Philippe Mathieu-Daudé
On 14/11/22 17:28, Peter Maydell wrote: On Fri, 11 Nov 2022 at 14:58, Alex Bennée wrote: This attempts to deal with the problem of login prompts not being guaranteed to be terminated with a newline. The solution to this is to peek at the incoming data looking to see if we see an up-coming matc

Re: [PATCH v2 3/5] migration: Disallow postcopy preempt to be used with compress

2022-11-14 Thread Juan Quintela
Peter Xu wrote: > The preempt mode requires the capability to assign channel for each of the > page, while the compression logic will currently assign pages to different > compress thread/local-channel so potentially they're incompatible. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: P

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-14 Thread Vlastimil Babka
On 11/1/22 16:19, Michael Roth wrote: > On Tue, Nov 01, 2022 at 07:37:29PM +0800, Chao Peng wrote: >> > >> > 1) restoring kernel directmap: >> > >> > Currently SNP (and I believe TDX) need to either split or remove >> > kernel >> > direct mappings for restricted PFNs, since there is

[PATCH v2 2/3] nvme: Add ocp to the subsys

2022-11-14 Thread Joel Granados
The Open Compute Project defines a Datacenter NVMe SSD Spec that sits on top of the NVMe spec. Additional commands and NVMe behaviors specific for the Datacenter. This is a preparation patch that introduces an argument to activate OCP in nvme. Signed-off-by: Joel Granados --- hw/nvme/nvme.h |

[PATCH] hw/intc/arm_gicv3: fix prio masking on pmr write

2022-11-14 Thread Jens Wiklander
With commit 39f29e599355 ("hw/intc/arm_gicv3: Use correct number of priority bits for the CPU") the number of priority bits was changed from the maximum value 8 to typically 5. As a consequence a few of the lowest bits in ICC_PMR_EL1 becomes RAZ/WI. However prior to this patch one of these bits was

Re: [PULL 0/2] target-arm queue for rc1

2022-11-14 Thread Stefan Hajnoczi
Merge tag 'pull-la-20221112' of https://gitlab.com/rth7680/qemu into > staging (2022-11-12 09:17:06 -0500) > > are available in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20221114 > > for you to fetch

Re: biosbits test failing on origin/master

2022-11-14 Thread John Snow
On Thu, Nov 10, 2022 at 11:22 PM Ani Sinha wrote: > > On Thu, Nov 10, 2022 at 11:37 PM John Snow wrote: > > > > Hiya, on today's origin/master > > (2ccad61746ca7de5dd3e25146062264387e43bd4) I'm finding that "make > > check-avocado" is failing on the new biosbits test on my local > > development m

[PATCH] target/mips: Properly set C0_CMGCRBase after CPU reset

2022-11-14 Thread Jiaxun Yang
Value of C0_CMGCRBase will be reseted to default when cpu reset happens. In some cases software may move GCR base and then initiate a CPU reset, this will leave C0_CMGCRBase of reseted core incorrect. Implement a callback in CMGCR device to allow C0_CMGCRBase and other global states to be override

Re: [PATCH 04/13] block: Remove drained_end_counter

2022-11-14 Thread Hanna Reitz
On 08.11.22 13:37, Kevin Wolf wrote: drained_end_counter is unused now, nobody changes its value any more. It can be removed. In cases where we had two almost identical functions that only differed in whether the caller passes drained_end_counter, or whether they would poll for a local drained_e

Re: [PATCH v2 2/8] target/riscv: add support for Zca and Zcf extensions

2022-11-14 Thread weiwei
On 2022/11/14 05:40, Richard Henderson wrote: On 11/13/22 12:32, Weiwei Li wrote: +    } else if ((get_xl_max(ctx) == MXL_RV32) && +    !ctx->cfg_ptr->ext_zcf && +    (((opcode & 0xe003) == 0x6000) || + ((opcode & 0xe003) == 0x6002) || + ((opcode & 0

Re: [PATCH v2 07/15] migration: Use atomic ops properly for page accountings

2022-11-14 Thread Juan Quintela
Peter Xu wrote: > To prepare for thread-safety on page accountings, at least below counters > need to be accessed only atomically, they are: > > ram_counters.transferred > ram_counters.duplicate > ram_counters.normal > ram_counters.postcopy_bytes > > There are a lot

Re: [PATCH 12/13] block: Don't poll in bdrv_replace_child_noperm()

2022-11-14 Thread Hanna Reitz
On 08.11.22 13:37, Kevin Wolf wrote: In order to make sure that bdrv_replace_child_noperm() doesn't have to poll any more, get rid of the bdrv_parent_drained_begin_single() call. This is possible now because we can require that the child is already drained when the function is called (it better

Re: [PATCH v2] capstone: use instead of

2022-11-14 Thread Daniel P . Berrangé
On Mon, Nov 14, 2022 at 11:59:31AM +, Peter Maydell wrote: > On Sun, 13 Nov 2022 at 20:10, Michael Tokarev wrote: > > > > The upcoming capstone 5.0 drops support for the old way > > of including its header, due to this change: > > https://github.com/capstone-engine/capstone/commit/6656bcb63ab4

Re: [PATCH 01/13] qed: Don't yield in bdrv_qed_co_drain_begin()

2022-11-14 Thread Hanna Reitz
On 08.11.22 13:37, Kevin Wolf wrote: We want to change .bdrv_co_drained_begin() back to be a non-coroutine callback, so in preparation, avoid yielding in its implementation. Because we increase bs->in_flight and bdrv_drained_begin() polls, the behaviour is unchanged. Signed-off-by: Kevin Wolf

Re: [PATCH v2 01/15] migration: Take bitmap mutex when completing ram migration

2022-11-14 Thread Juan Quintela
Peter Xu wrote: > Any call to ram_find_and_save_block() needs to take the bitmap mutex. We > used to not take it for most of ram_save_complete() because we thought > we're the only one left using the bitmap, but it's not true after the > preempt full patchset applied, since the return path can be

[PATCH v2] tests/stream-under-throttle: New test

2022-11-14 Thread Hanna Reitz
Test streaming a base image into the top image underneath two throttle nodes. This was reported to make qemu 7.1 hang (https://gitlab.com/qemu-project/qemu/-/issues/1215), so this serves as a regression test. Signed-off-by: Hanna Reitz --- Based-on: <20221107151321.211175-1-hre...@redhat.com> v

Re: [PATCH v2 5/5] migration: Disable multifd explicitly with compression

2022-11-14 Thread Juan Quintela
Peter Xu wrote: > Multifd thread model does not work for compression, explicitly disable it. > > Note that previuosly even we can enable both of them, nothing will go > wrong, because the compression code has higher priority so multifd feature > will just be ignored. Now we'll fail even earlier a

  1   2   3   >