Re: [PATCH 15/15] hw/intc: sifive_plic: Fix the pending register range check

2022-12-05 Thread Bin Meng
On Fri, Dec 2, 2022 at 8:28 AM Wilfred Mallawa wrote: > > On Thu, 2022-12-01 at 22:08 +0800, Bin Meng wrote: > > The pending register upper limit is currently set to > > plic->num_sources >> 3, which is wrong, e.g.: considering > > plic->num_sources is 7, the upper limit becomes 0 which fails > >

Re: REG: TTC Timer

2022-12-05 Thread Philippe Mathieu-Daudé
On 22/11/22 12:27, Gowri Shankar wrote: Hi Team, Advance Thanks for Your support. Could you please clarify one point here? I am using a Xilinx ZCU102 machine with QEMU7.1.0. I have seen QEMU 7.1.0 release has TTC timers for the Xilinx-zynqmp SoC model. url: https://wiki.qemu.org/ChangeLog/7.1

RE: [PATCH] target/i386/hax: Add XCR0 support

2022-12-05 Thread Wang, Wenchao
Hi, Philippe, Do you agree with my opinion and is there any further process that I need to follow to get this patch merged? Thanks a lot. Best Regards, Wenchao -Original Message- From: Wang, Wenchao Sent: Monday, November 28, 2022 16:11 To: Philippe Mathieu-Daudé ; qemu-devel@nongnu.o

[PATCH v10 1/5] virtio: get class_id and pci device id by the virtio id

2022-12-05 Thread Longpeng(Mike)
From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the device specified by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/virtio-pci.c | 88 +++

[PATCH v10 0/5] add generic vDPA device support

2022-12-05 Thread Longpeng(Mike)
From: Longpeng Hi guys, With the generic vDPA device, QEMU won't need to touch the device types any more, such like vfio. We can use the generic vDPA device as follow: -device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X Or -M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \

[PATCH v10 5/5] docs: Add generic vhost-vdpa device documentation

2022-12-05 Thread Longpeng(Mike)
From: Longpeng Signed-off-by: Longpeng --- .../devices/vhost-vdpa-generic-device.rst | 66 +++ 1 file changed, 66 insertions(+) create mode 100644 docs/system/devices/vhost-vdpa-generic-device.rst diff --git a/docs/system/devices/vhost-vdpa-generic-device.rst b/docs/syste

[PATCH v10 2/5] vdpa: add vdpa-dev support

2022-12-05 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev, we can use the deivce directly: -M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \ vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/Kconfig| 5 + h

[PATCH v10 4/5] vdpa-dev: mark the device as unmigratable

2022-12-05 Thread Longpeng(Mike)
From: Longpeng The generic vDPA device doesn't support migration currently, so mark it as unmigratable temporarily. Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vdpa-dev.c b

[PATCH v10 3/5] vdpa: add vdpa-dev-pci support

2022-12-05 Thread Longpeng(Mike)
From: Longpeng Supports vdpa-dev-pci, we can use the device as follow: -device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng --- hw/virtio/meson.build| 1 + hw/virtio/vdpa-dev-pci.c | 102 +

Re: [RFC 0/5] Protection information pass-through for block devices

2022-12-05 Thread Dmitry Tihov
On Fri, Nov 25, 2022 at 08:44:18, Klaus Jensen wrote: > +CC: block layer maintainers (Kevin, Hanna) > > On Nov 24 18:58, Dmitry Tihov wrote: > > This patch set allows using End-to-End Data Protection in NVMe subsystem > > with integrity capable host devices as the NVMe namespaces backend. > > The

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-05 Thread Fuad Tabba
Hi Chao, On Fri, Dec 2, 2022 at 6:18 AM Chao Peng wrote: > > In memory encryption usage, guest memory may be encrypted with special > key and can be accessed only by the guest itself. We call such memory > private memory. It's valueless and sometimes can cause problem to allow > userspace to acce

Re: [PATCH] target/i386/hax: Add XCR0 support

2022-12-05 Thread Philippe Mathieu-Daudé
Hi Wenchao, On 5/12/22 09:35, Wang, Wenchao wrote: Hi, Philippe, Do you agree with my opinion and is there any further process that I need to follow to get this patch merged? Thanks a lot. I don't understand this part of HAXM enough, but per your explanation, your change looks correct. I'll

RE: [PATCH] target/i386/hax: Add XCR0 support

2022-12-05 Thread Wang, Wenchao
Thanks for Phillippe's reply. Hi, Paolo, Could you help to review the patch of HAX? If there is any concern about it, feel free to discuss with me. Thanks a lot. Best Regards, Wenchao -Original Message- From: Philippe Mathieu-Daudé Sent: Monday, December 5, 2022 17:05 To: Wang, Wenc

Re: [PULL for 7.2-rc4 0/1] loongarch for 7.2-rc4 patch

2022-12-05 Thread gaos...@loongson.cn
在 2022/12/5 15:24, Philippe Mathieu-Daudé 写道: On 2/12/22 11:25, Song Gao wrote: The following changes since commit c4ffd91aba1c3d878e99a3e7ba8aad4826728ece:    Update VERSION for v7.2.0-rc3 (2022-11-29 18:15:26 -0500) are available in the Git repository at:    https://gitlab.com/gaosong/qe

Re: [PATCH v10 5/9] KVM: Use gfn instead of hva for mmu_notifier_retry

2022-12-05 Thread Fuad Tabba
Hi Chao, On Fri, Dec 2, 2022 at 6:19 AM Chao Peng wrote: > > Currently in mmu_notifier invalidate path, hva range is recorded and > then checked against by mmu_notifier_retry_hva() in the page fault > handling path. However, for the to be introduced private memory, a page > fault may not have a h

Re: [PATCH for-7.2] vhost: enable vrings in vhost_dev_start() for vhost-user devices

2022-12-05 Thread Stefano Garzarella
On Thu, Dec 01, 2022 at 04:49:37PM -0500, Michael S. Tsirkin wrote: On Thu, Dec 01, 2022 at 12:21:21PM +, Alex Bennée wrote: "Michael S. Tsirkin" writes: > On Thu, Dec 01, 2022 at 10:14:39AM +, Alex Bennée wrote: >> Do you think rust-vmm's vhost crates have enough of the state >> mana

[PATCH v2 07/51] hw/display/qxl: Avoid buffer overrun in qxl_phys2virt (CVE-2022-4144)

2022-12-05 Thread Juan Quintela
From: Philippe Mathieu-Daudé Have qxl_get_check_slot_offset() return false if the requested buffer size does not fit within the slot memory region. Similarly qxl_phys2virt() now returns NULL in such case, and qxl_dirty_one_surface() aborts. This avoids buffer overrun in the host pointer returne

[PATCH v2 12/51] tests/qtests: override "force-legacy" for gpio virtio-mmio tests

2022-12-05 Thread Juan Quintela
From: Alex Bennée The GPIO device is a VIRTIO_F_VERSION_1 devices but running with a legacy MMIO interface we miss out that feature bit causing confusion. For the GPIO test force the mmio bus to support non-legacy so we can properly test it. Signed-off-by: Alex Bennée Reviewed-by: Michael S. Ts

[PATCH v2 16/51] include/hw: VM state takes precedence in virtio_device_should_start

2022-12-05 Thread Juan Quintela
From: Alex Bennée The VM status should always preempt the device status for these checks. This ensures the device is in the correct state when we suspend the VM prior to migrations. This restores the checks to the order they where in before the refactoring moved things around. While we are at it

[PATCH v2 18/51] hw/nvme: fix aio cancel in flush

2022-12-05 Thread Juan Quintela
From: Klaus Jensen Make sure that iocb->aiocb is NULL'ed when cancelling. Fix a potential use-after-free by removing the bottom half and enqueuing the completion directly. Fixes: 38f4ac65ac88 ("hw/nvme: reimplement flush to allow cancellation") Reviewed-by: Keith Busch Signed-off-by: Klaus Jen

[PATCH v2 13/51] vhost: enable vrings in vhost_dev_start() for vhost-user devices

2022-12-05 Thread Juan Quintela
From: Stefano Garzarella Commit 02b61f38d3 ("hw/virtio: incorporate backend features in features") properly negotiates VHOST_USER_F_PROTOCOL_FEATURES with the vhost-user backend, but we forgot to enable vrings as specified in docs/interop/vhost-user.rst: If ``VHOST_USER_F_PROTOCOL_FEATURES``

[PATCH v2 04/51] hw/display/qxl: Have qxl_log_command Return early if no log_cmd handler

2022-12-05 Thread Juan Quintela
From: Philippe Mathieu-Daudé Only 3 command types are logged: no need to call qxl_phys2virt() for the other types. Using different cases will help to pass different structure sizes to qxl_phys2virt() in a pair of commits. Reviewed-by: Marc-André Lureau Signed-off-by: Philippe Mathieu-Daudé Sig

[PATCH v2 06/51] hw/display/qxl: Pass requested buffer size to qxl_phys2virt()

2022-12-05 Thread Juan Quintela
From: Philippe Mathieu-Daudé Currently qxl_phys2virt() doesn't check for buffer overrun. In order to do so in the next commit, pass the buffer size as argument. For QXLCursor in qxl_render_cursor() -> qxl_cursor() we verify the size of the chunked data ahead, checking we can access 'sizeof(QXLCu

[PATCH v2 37/51] migration: Yield bitmap_mutex properly when sending/sleeping

2022-12-05 Thread Juan Quintela
From: Peter Xu Don't take the bitmap mutex when sending pages, or when being throttled by migration_rate_limit() (which is a bit tricky to call it here in ram code, but seems still helpful). It prepares for the possibility of concurrently sending pages in >1 threads using the function ram_save_h

[PATCH v2 15/51] hw/virtio: generalise CHR_EVENT_CLOSED handling

2022-12-05 Thread Juan Quintela
From: Alex Bennée ..and use for both virtio-user-blk and virtio-user-gpio. This avoids the circular close by deferring shutdown due to disconnection until a later point. virtio-user-blk already had this mechanism in place so generalise it as a vhost-user helper function and use for both blk and g

[PATCH v2 20/51] hw/nvme: fix aio cancel in dsm

2022-12-05 Thread Juan Quintela
From: Klaus Jensen When the DSM operation is cancelled asynchronously, we set iocb->ret to -ECANCELED. However, the callback function only checks the return value of the completed aio, which may have completed succesfully prior to the cancellation and thus the callback ends up continuing the dsm

[PATCH v2 33/51] migration: Add postcopy_preempt_active()

2022-12-05 Thread Juan Quintela
From: Peter Xu 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 Signed-off-by: Juan Quintela --- migration/ram.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff

[PATCH v2 36/51] migration: Remove RAMState.f references in compression code

2022-12-05 Thread Juan Quintela
From: Peter Xu Removing referencing to RAMState.f in compress_page_with_multi_thread() and flush_compressed_data(). Compression code by default isn't compatible with having >1 channels (or it won't currently know which channel to flush the compressed data), so to make it simple we always flush o

Re: [PATCH v2 00/51] migration patches for VFIO

2022-12-05 Thread Juan Quintela
Juan Quintela wrote: > Hi Nack myself This patch series should be sent against my next-8.0 branch, not master. Sorry for the noise. Will resend. > > On this v2: > > - Remove the stop of the guest to calculate the size > - Rebase on latest upstream. > > Please review. > > [v1/RFC] > VFIO migra

[PATCH v2 21/51] hw/nvme: remove copy bh scheduling

2022-12-05 Thread Juan Quintela
From: Klaus Jensen Fix a potential use-after-free by removing the bottom half and enqueuing the completion directly. Fixes: 796d20681d9b ("hw/nvme: reimplement the copy command to allow aio cancellation") Reviewed-by: Keith Busch Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 63 ++

[PATCH v2 14/51] hw/virtio: add started_vu status field to vhost-user-gpio

2022-12-05 Thread Juan Quintela
From: Alex Bennée As per the fix to vhost-user-blk in f5b22d06fb (vhost: recheck dev state in the vhost_migration_log routine) we really should track the connection and starting separately. Signed-off-by: Alex Bennée Reviewed-by: Michael S. Tsirkin Message-Id: <20221130112439.2527228-4-alex.be

[PATCH v2 09/51] block-backend: avoid bdrv_unregister_buf() NULL pointer deref

2022-12-05 Thread Juan Quintela
From: Stefan Hajnoczi bdrv_*() APIs expect a valid BlockDriverState. Calling them with bs=NULL leads to undefined behavior. Jonathan Cameron reported this following NULL pointer dereference when a VM with a virtio-blk device and a memory-backend-file object is terminated: 1. qemu_cleanup() close

[PATCH v2 40/51] migration: Introduce pss_channel

2022-12-05 Thread Juan Quintela
From: Peter Xu Introduce pss_channel for PageSearchStatus, define it as "the migration channel to be used to transfer this host page". We used to have rs->f, which is a mirror to MigrationState.to_dst_file. After postcopy preempt initial version, rs->f can be dynamically changed depending on wh

[PATCH v2 24/51] hw/loongarch/virt: Add cfi01 pflash device

2022-12-05 Thread Juan Quintela
From: Xiaojuan Yang Add cfi01 pflash device for LoongArch virt machine Signed-off-by: Xiaojuan Yang Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221130100647.398565-1-yangxiaoj...@loongson.cn> Signed-off-by: Song Gao --- include/hw/loongarch/virt.h | 5 +++ hw/loongarch/acpi-build.c

[PATCH v2 32/51] migration: Take bitmap mutex when completing ram migration

2022-12-05 Thread Juan Quintela
From: Peter Xu 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 taking

[PATCH v2 28/51] multifd: Create page_size fields into both MultiFD{Recv, Send}Params

2022-12-05 Thread Juan Quintela
We were calling qemu_target_page_size() left and right. Signed-off-by: Juan Quintela Reviewed-by: Leonardo Bras --- migration/multifd.h | 4 migration/multifd-zlib.c | 14 ++ migration/multifd-zstd.c | 12 +--- migration/multifd.c | 18 -- 4 f

[PATCH v2 17/51] hw/nvme: fix aio cancel in format

2022-12-05 Thread Juan Quintela
From: Klaus Jensen There are several bugs in the async cancel code for the Format command. Firstly, cancelling a format operation neglects to set iocb->ret as well as clearing the iocb->aiocb after cancelling the underlying aiocb which causes the aio callback to ignore the cancellation. Trivial

[PATCH v2 45/51] migration: Remove old preempt code around state maintainance

2022-12-05 Thread Juan Quintela
From: Peter Xu 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't need t

[PATCH v2 43/51] migration: Move last_sent_block into PageSearchStatus

2022-12-05 Thread Juan Quintela
From: Peter Xu 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 into PageS

[PATCH v2 46/51] migration: Drop rs->f

2022-12-05 Thread Juan Quintela
From: Peter Xu Now with rs->pss we can already cache channels in pss->pss_channels. That pss_channel contains more infromation than rs->f because it's per-channel. So rs->f could be replaced by rss->pss[RAM_CHANNEL_PRECOPY].pss_channel, while rs->f itself is a bit vague now. Note that vanilla p

[PATCH v2 47/51] migration: Remove res_compatible parameter

2022-12-05 Thread Juan Quintela
It was only used for RAM, and in that case, it means that this amount of data was sent for memory. Just delete the field in all callers. Signed-off-by: Juan Quintela --- include/migration/register.h | 20 ++-- migration/savevm.h | 4 +--- hw/s390x/s390-stattrib.c

[PATCH v2 31/51] migration: Export ram_release_page()

2022-12-05 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Leonardo Bras --- migration/ram.h | 1 + migration/ram.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/migration/ram.h b/migration/ram.h index e844966f69..038d52f49f 100644 --- a/migration/ram.h +++ b/migration/ram.h @@ -66,6 +66,

[PATCH v2 26/51] target/s390x/tcg: Fix and improve the SACF instruction

2022-12-05 Thread Juan Quintela
From: Thomas Huth The SET ADDRESS SPACE CONTROL FAST instruction is not privileged, it can be used from problem space, too. Just the switching to the home address space is privileged and should still generate a privilege exception. This bug is e.g. causing programs like Java that use the "getcpu"

[PATCH v2 30/51] migration: Export ram_transferred_ram()

2022-12-05 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson Reviewed-by: Leonardo Bras --- migration/ram.h | 2 ++ migration/ram.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/migration/ram.h b/migration/ram.h index c7af65ac74..e844966

[PATCH v2 25/51] tests/qtest/migration-test: Fix unlink error and memory leaks

2022-12-05 Thread Juan Quintela
From: Thomas Huth When running the migration test compiled with Clang from Fedora 37 and sanitizers enabled, there is an error complaining about unlink(): ../tests/qtest/migration-test.c:1072:12: runtime error: null pointer passed as argument 1, which is declared to never be null /usr/includ

[PATCH v2 44/51] migration: Send requested page directly in rp-return thread

2022-12-05 Thread Juan Quintela
From: Peter Xu With all the facilities ready, send the requested page directly in the rp-return thread rather than queuing it in the request queue, if and only if postcopy preempt is enabled. It can achieve so because it uses separate channel for sending urgent pages. The only shared data is bi

[PATCH v2 23/51] target/i386: Always completely initialize TranslateFault

2022-12-05 Thread Juan Quintela
From: Richard Henderson In get_physical_address, the canonical address check failed to set TranslateFault.stage2, which resulted in an uninitialized read from the struct when reporting the fault in x86_cpu_tlb_fill. Adjust all error paths to use structure assignment so that the entire struct is

[PATCH v2 11/51] Update VERSION for v7.2.0-rc3

2022-12-05 Thread Juan Quintela
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 02998662dd..1c24435536 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.1.92 +7.1.93 -- 2.38.1

[PATCH v2 41/51] migration: Add pss_init()

2022-12-05 Thread Juan Quintela
From: Peter Xu Helper to init PSS structures. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/migration/ram.c b/migration/

[PATCH v2 22/51] target/i386: allow MMX instructions with CR4.OSFXSR=0

2022-12-05 Thread Juan Quintela
From: Paolo Bonzini MMX state is saved/restored by FSAVE/FRSTOR so the instructions are not illegal opcodes even if CR4.OSFXSR=0. Make sure that validate_vex takes into account the prefix and only checks HF_OSFXSR_MASK in the presence of an SSE instruction. Fixes: 20581aadec5e ("target/i386: va

[PATCH v2 34/51] migration: Cleanup xbzrle zero page cache update logic

2022-12-05 Thread Juan Quintela
From: Peter Xu The major change is to replace "!save_page_use_compression()" with "xbzrle_enabled" to make it clear. Reasonings: (1) When compression enabled, "!save_page_use_compression()" is exactly the same as checking "xbzrle_enabled". (2) When compression disabled, "!save_page_use_com

[PATCH v2 10/51] target/arm: Set TCGCPUOps.restore_state_to_opc for v7m

2022-12-05 Thread Juan Quintela
From: Evgeny Ermakov This setting got missed, breaking v7m. Fixes: 56c6c98df85c ("target/arm: Convert to tcg_ops restore_state_to_opc") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1347 Signed-off-by: Richard Henderson Signed-off-by: Evgeny Ermakov Signed-off-by: Stefan Hajnoczi Me

[PATCH v2 27/51] hw/display/next-fb: Fix comment typo

2022-12-05 Thread Juan Quintela
From: Evgeny Ermakov Signed-off-by: Evgeny Ermakov Message-Id: <20221125160849.23711-1-evgeny.v.erma...@gmail.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Thomas Huth --- hw/display/next-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH v2 35/51] migration: Trivial cleanup save_page_header() on same block check

2022-12-05 Thread Juan Quintela
From: Peter Xu The 2nd check on RAM_SAVE_FLAG_CONTINUE is a bit redundant. Use a boolean to be clearer. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 5 +++-- 1 file changed, 3 insertions(+), 2 dele

[PATCH v2 49/51] migration: Split save_live_pending() into state_pending_*

2022-12-05 Thread Juan Quintela
We split the function into to: - state_pending_estimate: We estimate the remaining state size without stopping the machine. - state pending_exact: We calculate the exact amount of remaining state. The only "device" that implements different functions for _estimate() and _exact() is ram. Sig

[PATCH v2 42/51] migration: Make PageSearchStatus part of RAMState

2022-12-05 Thread Juan Quintela
From: Peter Xu We used to allocate PSS structure on the stack for precopy when sending pages. Make it static, so as to describe per-channel ram migration status. Here we declared RAM_CHANNEL_MAX instances, preparing for postcopy to use it, even though this patch has not yet to start using the 2

[PATCH v2 19/51] hw/nvme: fix aio cancel in zone reset

2022-12-05 Thread Juan Quintela
From: Klaus Jensen If the zone reset operation is cancelled but the block unmap operation completes normally, the callback will continue resetting the next zone since it neglects to check iocb->ret which will have been set to -ECANCELED. Make sure that this is checked and bail out if an error is

[PATCH v2 3/3] target/riscv: kvm: Support selecting VCPU extensions

2022-12-05 Thread Mayuresh Chitale
Set the state of each ISA extension on the vcpu depending on what is set in the CPU property and what is allowed by KVM for that extension. Signed-off-by: Mayuresh Chitale Reviewed-by: Andrew Jones Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 11 - target/riscv/kvm.c

[PATCH v2 01/51] update seabios source from 1.16.0 to 1.16.1

2022-12-05 Thread Juan Quintela
From: Gerd Hoffmann git shortlog rel-1.16.0..rel-1.16.1 === Gerd Hoffmann (3): malloc: use variable for ZoneHigh size malloc: use large ZoneHigh when there is enough memory virtio-blk: use larger default request size Igor Mammedov (1): acp

[PATCH v2 0/3] target/riscv: Apply KVM policy to ISA extensions

2022-12-05 Thread Mayuresh Chitale
Currently the single and multi letter ISA extensions exposed to the guest vcpu don't confirm to the KVM policies. This patchset updates the kvm headers and applies policies set in KVM to the extensions exposed to the guest. These patches can also be found on riscv_kvm_ext_v2 branch at: https://git

[PATCH v2 48/51] migration: No save_live_pending() method uses the QEMUFile parameter

2022-12-05 Thread Juan Quintela
So remove it everywhere. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- include/migration/register.h | 6 ++ migration/savevm.h | 2 +- hw/s390x/s390-stattrib.c | 2 +- hw/vfio/migration.c| 6 ++ migration/block-dirty-bitmap.c | 5 ++

[PATCH v2 51/51] migration: simplify migration_iteration_run()

2022-12-05 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index b54e4657ce..b2c974f166 100644 --- a/migration/migration.c

[PATCH v2 29/51] multifd: Create page_count fields into both MultiFD{Recv, Send}Params

2022-12-05 Thread Juan Quintela
We were recalculating it left and right. We plan to change that values on next patches. Signed-off-by: Juan Quintela Reviewed-by: Leonardo Bras --- migration/multifd.h | 4 migration/multifd.c | 7 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/migration/multifd.h

[PATCH v2 2/3] target/riscv: Extend isa_ext_data for single letter extensions

2022-12-05 Thread Mayuresh Chitale
Currently the ISA string for a CPU is generated from two different arrays, one for single letter extensions and another for multi letter extensions. Add all the single letter extensions to the isa_ext_data array and use it for generating the ISA string. Also drop 'P' and 'Q' extensions from the lis

[PATCH v2 00/51] migration patches for VFIO

2022-12-05 Thread Juan Quintela
Hi On this v2: - Remove the stop of the guest to calculate the size - Rebase on latest upstream. Please review. [v1/RFC] VFIO migration has several requirements: - the size of the state is only known when the guest is stopped - they need to send possible lots of data. this series only address

[PATCH v2 1/3] update-linux-headers: Version 6.1-rc8

2022-12-05 Thread Mayuresh Chitale
Sync headers with kernel commit 76dcd734eca2 Signed-off-by: Mayuresh Chitale Reviewed-by: Andrew Jones --- include/standard-headers/drm/drm_fourcc.h | 34 - include/standard-headers/linux/ethtool.h | 63 +++- include/standard-headers/linux/fuse.h | 6 +- .../linux/i

[PATCH v2 03/51] replay: Fix declaration of replay_read_next_clock

2022-12-05 Thread Juan Quintela
From: Richard Henderson Fixes the build with gcc 13: replay/replay-time.c:34:6: error: conflicting types for \ 'replay_read_next_clock' due to enum/integer mismatch; \ have 'void(ReplayClockKind)' [-Werror=enum-int-mismatch] 34 | void replay_read_next_clock(ReplayClockKind kind) |

[PATCH v2 39/51] migration: Teach PSS about host page

2022-12-05 Thread Juan Quintela
From: Peter Xu Migration code has a lot to do with host pages. Teaching PSS core about the idea of host page helps a lot and makes the code clean. Meanwhile, this prepares for the future changes that can leverage the new PSS helpers that this patch introduces to send host page in another thread

[PATCH v2 50/51] migration: Remove unused threshold_size parameter

2022-12-05 Thread Juan Quintela
Until previous commit, save_live_pending() was used for ram. Now with the split into state_pending_estimate() and state_pending_exact() it is not needed anymore, so remove them. Signed-off-by: Juan Quintela --- include/migration/register.h | 7 +++ migration/savevm.h | 6 ++-

[PATCH v2 38/51] migration: Use atomic ops properly for page accountings

2022-12-05 Thread Juan Quintela
From: Peter Xu 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 of other counte

[PATCH v2 08/51] hw/display/qxl: Assert memory slot fits in preallocated MemoryRegion

2022-12-05 Thread Juan Quintela
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Stefan Hajnoczi Message-Id: <20221128202741.4945-6-phi...@linaro.org> --- hw/display/qxl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 0b21626aad..6772849dec 1006

[PATCH v2 05/51] hw/display/qxl: Document qxl_phys2virt()

2022-12-05 Thread Juan Quintela
From: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Stefan Hajnoczi Message-Id: <20221128202741.4945-3-phi...@linaro.org> --- hw/display/qxl.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/display/qxl.h

RE: REG: TTC Timer

2022-12-05 Thread Konrad, Frederic
Hi Philippe, Hi Gowri, The zcu102 has a zynqmp soc object (hw/arm/xlnx-zcu102.c:125): static void xlnx_zcu102_init(MachineState *machine) { ... object_initialize_child(OBJECT(machine), "soc", &s->soc, TYPE_XLNX_ZYNQMP); So the TTCs should work in the ZCU102. Best Regards, Fred -Origina

Re: [PULL for 7.2-rc4 0/1] loongarch for 7.2-rc4 patch

2022-12-05 Thread Peter Maydell
On Mon, 5 Dec 2022 at 09:20, gaos...@loongson.cn wrote: > > > 在 2022/12/5 15:24, Philippe Mathieu-Daudé 写道: > > On 2/12/22 11:25, Song Gao wrote: > >> The following changes since commit > >> c4ffd91aba1c3d878e99a3e7ba8aad4826728ece: > >> > >>Update VERSION for v7.2.0-rc3 (2022-11-29 18:15:26 -

Re: [PULL 02/10] pci-bridge/cxl_downstream: Add a CXL switch downstream port

2022-12-05 Thread Jonathan Cameron via
On Sun, 4 Dec 2022 08:23:55 +0100 Thomas Huth wrote: > On 04/11/2022 07.47, Thomas Huth wrote: > > On 16/06/2022 18.57, Michael S. Tsirkin wrote: > >> From: Jonathan Cameron > >> > >> Emulation of a simple CXL Switch downstream port. > >> The Device ID has been allocated for this use. > >> > >

Re: [PATCH v2 03/14] ui/spice: Require spice-protocol >= 0.14.0

2022-12-05 Thread Daniel P . Berrangé
On Fri, Dec 02, 2022 at 11:05:01AM +0100, Markus Armbruster wrote: > Version 0.14.0 is now old enough to have made it into the major > distributions: > >Debian 11: 0.14.3 >RHEL-8: 0.14.2 >FreeBSD (ports): 0.14.4 >Fedora 35: 0.14.0 >Ubuntu 20.04: 0.14.0 >OpenSUSE Leap 15.3:

Re: [PATCH v2 04/14] Revert "hmp: info spice: take out webdav"

2022-12-05 Thread Daniel P . Berrangé
On Fri, Dec 02, 2022 at 11:05:02AM +0100, Markus Armbruster wrote: > This reverts commit 7c6044a94e52db8aef9a71d616c7a0914adb71ab. > > We had to take it out because SPICE_CHANNEL_WEBDAV requires > spice-protocol 0.12.7, but we had only 0.12.3. We have 0.14.0 now, so > put it back in. > > Signed-

Re: [PATCH v2 05/14] ui/spice: Require spice-server >= 0.14.0

2022-12-05 Thread Daniel P . Berrangé
On Fri, Dec 02, 2022 at 11:05:03AM +0100, Markus Armbruster wrote: > Version 0.14.0 is now old enough to have made it into the major > distributions: > > Debian 11: 0.14.3 > RHEL-8: 0.14.3 > FreeBSD (ports): 0.15.0 > Fedora 35: 0.15.0 > Ubuntu 20.04: 0.14.2 > OpenSUSE

Re: [PATCH v2 06/14] ui/spice: QXLInterface method set_mm_time() is now dead, drop

2022-12-05 Thread Daniel P . Berrangé
On Fri, Dec 02, 2022 at 11:05:04AM +0100, Markus Armbruster wrote: > SPICE_NEEDS_SET_MM_TIME is now always off. Bury the dead code. > > Signed-off-by: Markus Armbruster > --- > include/ui/qemu-spice.h | 2 -- > hw/display/qxl.c| 19 --- > ui/spice-display.c | 10 --

Re: [PATCH 1/2] util/bufferiszero: Use __attribute__((target)) for avx2/avx512

2022-12-05 Thread Daniel P . Berrangé
On Sat, Dec 03, 2022 at 07:51:22PM -0600, Richard Henderson wrote: > Use the attribute, which is supported by clang, instead of > the #pragma, which is not supported and, for some reason, > also not detected by the meson probe, so we fail by -Werror. > > Signed-off-by: Richard Henderson > --- >

[PATCH] Revert "hw/loongarch/virt: Add cfi01 pflash device"

2022-12-05 Thread Song Gao
This reverts commit 14dccc8ea6ece7ee63273144fb55e4770a05e0fd. Signed-off-by: Song Gao --- hw/loongarch/Kconfig| 1 - hw/loongarch/acpi-build.c | 18 --- hw/loongarch/virt.c | 62 - include/hw/loongarch/virt.h | 5 --- 4 files change

Re: [PULL for 7.2-rc4 0/1] loongarch for 7.2-rc4 patch

2022-12-05 Thread gaos...@loongson.cn
在 2022/12/5 18:48, Peter Maydell 写道: On Mon, 5 Dec 2022 at 09:20, gaos...@loongson.cn wrote: 在 2022/12/5 15:24, Philippe Mathieu-Daudé 写道: On 2/12/22 11:25, Song Gao wrote: The following changes since commit c4ffd91aba1c3d878e99a3e7ba8aad4826728ece: Update VERSION for v7.2.0-rc3 (2022

[PATCH] linux-user: Fix access to /proc/self/exe

2022-12-05 Thread Helge Deller
When accsssing /proc/self/exe from a userspace program, linux-user tries to resolve the name via realpath(), which may fail if the process changed the working directory in the meantime. An example: - a userspace program ist started with ./testprogram - the program runs chdir("/tmp") - then the pro

[PATCH 2/2] tests/unit/test-bdrv-drain.c: graph setup functions can't run in coroutines

2022-12-05 Thread Emanuele Giuseppe Esposito
Graph initialization functions like blk_new(), bdrv_new() and so on should not run in a coroutine. In fact, they might invoke a drain (for example blk_insert_bs eventually calls bdrv_replace_child_noperm) that in turn can invoke callbacks like bdrv_do_drained_begin_quiesce(), that asserts exactly t

[PATCH 0/2] Fixes to test-bdrv-drain unit test

2022-12-05 Thread Emanuele Giuseppe Esposito
This test performs graph modification while being in IO_CODE. This is not allowed anymore. This serie is taken from the forgotten (and partially invalid anymore) serie: "[PATCH v2 00/10] block: bug fixes in preparation of AioContext removal" (actually one could also use patch 9 and 10 from that se

[PATCH 1/2] test-bdrv-drain.c: remove test_detach_by_parent_cb()

2022-12-05 Thread Emanuele Giuseppe Esposito
This test uses a callback of an I/O function (blk_aio_preadv) to modify the graph, using bdrv_attach_child. This is simply not allowed anymore. I/O cannot change the graph. The problem in this test is in: acb = blk_aio_preadv(blk, 0, &qiov, 0, detach_by_parent_aio_cb, NULL); /* Drain and check th

Re: [PATCH] memory: dump HPA and access type of ramblocks

2022-12-05 Thread Philippe Mathieu-Daudé
On 5/12/22 13:07, Ted Chen wrote: It's convenient to dump HVA and RW/RO status of a ramblock in "info ramblock" for debug purpose. Before: Offset Used Total 0x 0x0004 0x0004 After: Offset

Re: [PATCH] memory: dump HPA and access type of ramblocks

2022-12-05 Thread David Hildenbrand
On 05.12.22 13:07, Ted Chen wrote: It's convenient to dump HVA and RW/RO status of a ramblock in "info ramblock" for debug purpose. Before: Offset Used Total 0x 0x0004 0x0004 After: Offset

Re: [PATCH v13 3/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-12-05 Thread Stefan Hajnoczi
On Wed, Nov 30, 2022 at 10:24:10AM +0800, Sam Li wrote: > Stefan Hajnoczi 于2022年11月30日周三 10:01写道: > > On Thu, 27 Oct 2022 at 11:46, Sam Li wrote: > > > @@ -1374,9 +1428,11 @@ static int hdev_probe_blocksizes(BlockDriverState > > > *bs, BlockSizes *bsz) > > > int ret; > > > > > > /* If

Re: [PULL for 7.2-rc4 0/1] loongarch for 7.2-rc4 patch

2022-12-05 Thread Stefan Hajnoczi
On Mon, 5 Dec 2022 at 06:38, gaos...@loongson.cn wrote: > > > 在 2022/12/5 18:48, Peter Maydell 写道: > > On Mon, 5 Dec 2022 at 09:20, gaos...@loongson.cn > > wrote: > >> > >> 在 2022/12/5 15:24, Philippe Mathieu-Daudé 写道: > >>> On 2/12/22 11:25, Song Gao wrote: > The following changes since co

Re: [RFC PATCH] test-bdrv-drain: keep graph manipulations out of coroutines

2022-12-05 Thread Emanuele Giuseppe Esposito
Am 02/12/2022 um 18:22 schrieb Paolo Bonzini: > On 12/2/22 14:42, Emanuele Giuseppe Esposito wrote: >> >> >> Am 02/12/2022 um 14:27 schrieb Paolo Bonzini: >>> Changes to the BlockDriverState graph will have to take the >>> corresponding lock for writing, and therefore cannot be done >>> inside a

Re: [PULL 02/10] pci-bridge/cxl_downstream: Add a CXL switch downstream port

2022-12-05 Thread Jonathan Cameron via
On Mon, 5 Dec 2022 10:54:03 + Jonathan Cameron via wrote: > On Sun, 4 Dec 2022 08:23:55 +0100 > Thomas Huth wrote: > > > On 04/11/2022 07.47, Thomas Huth wrote: > > > On 16/06/2022 18.57, Michael S. Tsirkin wrote: > > >> From: Jonathan Cameron > > >> > > >> Emulation of a simple CXL

Re: [RFC 0/5] Protection information pass-through for block devices

2022-12-05 Thread Klaus Jensen
On Dec 5 12:01, Dmitry Tihov wrote: > On Fri, Nov 25, 2022 at 08:44:18, Klaus Jensen wrote: > > +CC: block layer maintainers (Kevin, Hanna) > > > > On Nov 24 18:58, Dmitry Tihov wrote: > > > This patch set allows using End-to-End Data Protection in NVMe subsystem > > > with integrity capable host

[PATCH for-8.0] target/s390x: The MVCP and MVCS instructions are not privileged

2022-12-05 Thread Thomas Huth
The "MOVE TO PRIMARY/SECONDARY" instructions can also be called from problem state. We just should properly check whether the secondary-space access key is valid here, too, and inject a privileged program exception if it is invalid. Signed-off-by: Thomas Huth --- Found only by code inspection -

Re: [RFC PATCH] test-bdrv-drain: keep graph manipulations out of coroutines

2022-12-05 Thread Kevin Wolf
Am 02.12.2022 um 18:22 hat Paolo Bonzini geschrieben: > On 12/2/22 14:42, Emanuele Giuseppe Esposito wrote: > > > > > > Am 02/12/2022 um 14:27 schrieb Paolo Bonzini: > > > Changes to the BlockDriverState graph will have to take the > > > corresponding lock for writing, and therefore cannot be don

Re: [PATCH v2 3/4] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-12-05 Thread Eugenio Perez Martin
On Mon, Dec 5, 2022 at 5:27 AM Jason Wang wrote: > > On Thu, Dec 1, 2022 at 5:29 PM Eugenio Perez Martin > wrote: > > > > On Thu, Dec 1, 2022 at 9:39 AM Jason Wang wrote: > > > > > > On Wed, Nov 30, 2022 at 3:07 PM Eugenio Perez Martin > > > wrote: > > > > > > > > On Wed, Nov 30, 2022 at 8:02

Re: [PATCH v13 3/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-12-05 Thread Sam Li
Stefan Hajnoczi 于2022年12月5日周一 20:20写道: > > On Wed, Nov 30, 2022 at 10:24:10AM +0800, Sam Li wrote: > > Stefan Hajnoczi 于2022年11月30日周三 10:01写道: > > > On Thu, 27 Oct 2022 at 11:46, Sam Li wrote: > > > > @@ -1374,9 +1428,11 @@ static int > > > > hdev_probe_blocksizes(BlockDriverState *bs, BlockSiz

Re: [PATCH v12 6/7] s390x/cpu_topology: activating CPU topology

2022-12-05 Thread Pierre Morel
On 12/2/22 15:26, Thomas Huth wrote: On 02/12/2022 15.08, Pierre Morel wrote: On 12/2/22 10:05, Thomas Huth wrote: On 01/12/2022 12.52, Pierre Morel wrote: On 12/1/22 11:15, Thomas Huth wrote: On 29/11/2022 18.42, Pierre Morel wrote: The KVM capability, KVM_CAP_S390_CPU_TOPOLOGY is us

Re: qemu iotest 161 and make check

2022-12-05 Thread Christian Borntraeger
Am 27.10.22 um 07:54 schrieb Christian Borntraeger: [...] diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu index 0f1fecc68e..01bdb05575 100644 --- a/tests/qemu-iotests/common.qemu +++ b/tests/qemu-iotests/common.qemu @@ -388,7 +388,7 @@ _cleanup_qemu()

[PATCH for-8.0] target/s390x/tcg/mem_helper: Test the right bits in psw_key_valid()

2022-12-05 Thread Thomas Huth
The PSW key mask is a 16 bit field, and the psw_key variable is in the range from 0 to 15, so it does not make sense to use "0x80 >> psw_key" for testing the bits here. We should use 0x8000 instead. Signed-off-by: Thomas Huth --- Found by code inspection (Linux likely does not use these PSW key

  1   2   3   >