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:

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

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

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

2022-12-05 Thread Peter Xu
On Mon, Dec 05, 2022 at 08:07:12PM +0800, 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 > >

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

2022-12-05 Thread Ted Chen
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 Used Total

Sad to see the advent calendar go

2022-12-05 Thread Simon Sharwood
Hi QEMU folk, Simon Sharwood here, virtualization writer for Theregister.com Sad to see the advent calendar going ... I was looking forward to the 2022 edition. I'm totally freelancing in a personal capacity here and not writing a story ... but what order of magnitude of costs are you looking at

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

[PATCH] net/net.c: Fix qemu crash when hot-pluging a vhost-net failed.

2022-12-05 Thread Ming Yang via
Hot-pluging a vhost-net may cause virtual machine crash in following steps: 1. Starting a vm without net devices. 2. Hot-pluging 70 memory devices. 3. Hot-pluging a vhost-net device. The reason is : if hotplug a vhost-net failed, the nc cannot be found via function qemu_find_netdev, as it has

[PATCH] hw/rtc: fix crash caused by lost_clock >= 0 assertion

2022-12-05 Thread Yaowei Bai
In our production environment a guest crashed with this log: qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-5.0.0/hw/rtc/mc146818rtc.c:201: periodic_timer_update: Assertion `lost_clock >= 0' failed. 2022-09-26 10:00:28.747+: shutting down, reason=crashed This happened after the host

Re: REG: TTC Timer

2022-12-05 Thread Gowri Shankar
Hi Konrad, Thanks for your quick response. Now I want to increment the TTC counter value to enable the system tick. How to configure the TTC register to increment it in QEMU. I found the steps to enable the TTC counter which is below. But not able to increment. If possible could you please

[PATCH] net: Fix qemu crash when hot-pluging a vhost-net failed.

2022-12-05 Thread Yangming via
Dear all: I found a bug of qemu: hot-pluging a vhost-net may cause virtual machine crash in following steps: 1. Starting a vm without any net device. 2. Hot-pluging 70 memory devices. 3. Hot-pluging a vhost-net device. After the 3rd step, the qemu crashed with following messages: vhost backend

Re: Call for FOSDEM presentations on QEMU, KVM, and rust-vmm

2022-12-05 Thread Kashyap Chamarthy
(Cc also: libvirt upstream maling list) Gentle reminder ... tl;dr: please submit the proposals by *10th Dec 2022* On Tue, Nov 08, 2022 at 10:45:33AM -0500, Stefan Hajnoczi wrote: > Hi, > The yearly FOSDEM open source conference is now accepting talk > proposals. FOSDEM '23 will be held in

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

2022-12-05 Thread Richard Henderson
On 12/5/22 05:17, Daniel P. Berrangé wrote: 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.

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

2022-12-05 Thread Bin Meng
On Mon, Dec 5, 2022 at 6:37 PM Mayuresh Chitale wrote: > > 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

Re: [PATCH] net/net.c: Fix qemu crash when hot-pluging a vhost-net failed.

2022-12-05 Thread Peter Maydell
On Mon, 5 Dec 2022 at 14:24, Ming Yang via wrote: > > Hot-pluging a vhost-net may cause virtual machine crash in following steps: > 1. Starting a vm without net devices. > 2. Hot-pluging 70 memory devices. > 3. Hot-pluging a vhost-net device. > > The reason is : if hotplug a vhost-net failed, the

Re: [PATCH v5 3/7] target/arm: Make stage_2_format for cache attributes optional

2022-12-05 Thread Peter Maydell
On Sun, 27 Nov 2022 at 13:21, wrote: > > From: Tobias Röhmel > > The v8R PMSAv8 has a two-stage MPU translation process, but, unlike > VMSAv8, the stage 2 attributes are in the same format as the stage 1 > attributes (8-bit MAIR format). Rather than converting the MAIR > format to the format

Re: [PATCH v5 7/7] target/arm: Add ARM Cortex-R52 CPU

2022-12-05 Thread Peter Maydell
On Sun, 27 Nov 2022 at 13:21, wrote: > > From: Tobias Röhmel > > All constants are taken from the ARM Cortex-R52 Processor TRM Revision: r1p3 > > Signed-off-by: Tobias Röhmel Reviewed-by: Peter Maydell thanks -- PMM

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

2022-12-05 Thread Bin Meng
On Mon, Dec 5, 2022 at 6:40 PM Mayuresh Chitale wrote: > > 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

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

2022-12-05 Thread Alex Bennée
Jonathan Cameron via writes: > 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

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

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

2022-12-05 Thread Stefan Hajnoczi
On Mon, Dec 05, 2022 at 09:24:28PM +0800, Sam Li wrote: > 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 @@

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

2022-12-05 Thread David Hildenbrand
On 05.12.22 15:20, Thomas Huth wrote: 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

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

2022-12-05 Thread Peter Maydell
On Sun, 27 Nov 2022 at 13:21, 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

Re: [PATCH v5 1/7] target/arm: Don't add all MIDR aliases for cores that implement PMSA

2022-12-05 Thread Peter Maydell
On Sun, 27 Nov 2022 at 13:21, wrote: > > From: Tobias Röhmel > > Cores with PMSA have the MPUIR register which has the > same encoding as the MIDR alias with opc2=4. So we only > add that alias if we are not realizing a core that > implements PMSA. > > Signed-off-by: Tobias Röhmel Reviewed-by:

Re: [PATCH v5 4/7] target/arm: Enable TTBCR_EAE for ARMv8-R AArch32

2022-12-05 Thread Peter Maydell
On Sun, 27 Nov 2022 at 13:21, wrote: > > From: Tobias Röhmel > > ARMv8-R AArch32 CPUs behave as if TTBCR.EAE is always 1 even > tough they don't have the TTBCR register. > See ARM Architecture Reference Manual Supplement - ARMv8, for the ARMv8-R > AArch32 architecture profile Version:A.c section

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é ;

[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

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

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

[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

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

[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

[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

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

[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

[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

[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

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

[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

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

[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

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

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

[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

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

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

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

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

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

[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

[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

[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

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 >

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

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

[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

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

[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

[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

[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

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

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

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", >soc, TYPE_XLNX_ZYNQMP); So the TTCs should work in the ZCU102. Best Regards, Fred -Original

[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

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

[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

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

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.

[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

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

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

[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

[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

[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

[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

  1   2   3   >