Re: [PULL for-7.1 0/1] Block patches

2022-08-04 Thread Richard Henderson
On 8/4/22 12:02, Stefan Hajnoczi wrote: The following changes since commit 2480f3bbd03814b0651a1f74959f5c6631ee5819: Merge tag 'linux-user-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2022-08-03 08:32:44 -0700) are available in the Git repository at:

Re: Re: PING: [PATCH] KVM: HWPoison: Fix memory address during remap

2022-08-04 Thread zhenwei pi
Hi, Could you please give me any hint about this issue & patch? On 8/4/22 14:59, Eiichi Tsukata wrote: Hi We’ve also hit this case. On May 5, 2022, at 9:32, zhenwei pi wrote: Hi, Paolo I would appreciate it if you could review patch. On 4/20/22 14:45, zhenwei pi wrote: qemu exits

Re: [PULL 0/5] Trivial branch for 7.1 patches

2022-08-04 Thread Markus Armbruster
I was hoping for "[PATCH] contrib/vhost-user-blk: Clean up deallocation of VuVirtqElement". https://patchew.org/QEMU/20220630085219.1305519-1-arm...@redhat.com/ Next time, perhaps?

Re: [PULL 0/5] Trivial branch for 7.1 patches

2022-08-04 Thread Richard Henderson
) Pull request trivial branch 20220804 Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate. r~ Cornelia Huck (1): README.rst: fix link formatting Eugenio Pérez (1

[PATCH v2 0/2] This patch adds runtime check of AVX512

2022-08-04 Thread ling xu
This patch adds runtime check of AVX512 on running machine and update avx512 support for xbzrle_encode_buffer function to accelerate xbzrle encoding speed. The runtime check is added in meson.build and meson_options.txt. The updated AVX512 algorithm is provided in ram.c, xbzrle.h and xbzrle.c.

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
Hey Laszlo, On Thu, Aug 04, 2022 at 03:56:54PM +0200, Laszlo Ersek wrote: > - do we want setup_data chaining work generally? > > - or do we want only the random seed injection to stop crashing OVMF guests? Preferably the first - generally. Which brings us to your point: > > Given we only need

[PATCH v3] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
The boot parameter header refers to setup_data at an absolute address, and each setup_data refers to the next setup_data at an absolute address too. Currently QEMU simply puts the setup_datas right after the kernel image, and since the kernel_image is loaded at prot_addr -- a fixed address

[PATCH for-7.1 v2 1/5] target/loongarch: Fix GDB get the wrong pc

2022-08-04 Thread Song Gao
GDB LoongArch add a register orig_a0, see the base64.xml [1]. We should add the orig_a0 to match the upstream GDB. [1]: https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/base64.xml Signed-off-by: Song Gao --- gdb-xml/loongarch-base64.xml | 1 + target/loongarch/cpu.c

[PATCH for-7.1 v2 2/5] target/loongarch: add gdb_arch_name()

2022-08-04 Thread Song Gao
Matches bfd/cpu-loongarch.c, bfd_loongarch_arch. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/cpu.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index d84ec38cf7..941e2772bc 100644 ---

[BUG] cxl can not create region

2022-08-04 Thread Bobo WL
Hi list I want to test cxl functions in arm64, and found some problems I can't figure out. My test environment: 1. build latest bios from https://github.com/tianocore/edk2.git master branch(cc2db6ebfb6d9d85ba4c7b35fba1fa37fffc0bc2) 2. build latest qemu-system-aarch64 from

Re: [PATCH] hw/net/rocker: Avoid undefined shifts with more than 31 ports

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 11:27 PM Richard Henderson wrote: > > On 8/4/22 03:45, Peter Maydell wrote: > > Ping? > > > > thanks > > -- PMM > > > > On Fri, 29 Jul 2022 at 16:59, Peter Maydell > > wrote: > >> > >> In rocker_port_phys_link_status() and rocker_port_phys_enable_read() > >> we construct

Re: [PATCH] hw/riscv: remove 'fdt' param from riscv_setup_rom_reset_vec()

2022-08-04 Thread Alistair Francis
On Fri, Jul 29, 2022 at 4:19 AM Daniel Henrique Barboza wrote: > > The 'fdt' param is not being used in riscv_setup_rom_reset_vec(). > Simplify the API by removing it. While we're at it, remove the redundant > 'return' statement at the end of function. > > Cc: Palmer Dabbelt > Cc: Alistair

Re: [PATCH v1 00/40] TDX QEMU support

2022-08-04 Thread Xiaoyao Li
On 8/4/2022 1:44 AM, Daniel P. Berrangé wrote: On Tue, Aug 02, 2022 at 06:55:48PM +0800, Xiaoyao Li wrote: On 8/2/2022 5:49 PM, Daniel P. Berrangé wrote: On Tue, Aug 02, 2022 at 03:47:10PM +0800, Xiaoyao Li wrote: - CPU model We cannot create a TD with arbitrary CPU model like what for

Re: [PATCH v2 2/2] vdpa: do not save failed dma maps in SVQ iova tree

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 11:54 PM Eugenio Pérez wrote: > > If a map fails for whatever reason, it must not be saved in the tree. > Otherwise, qemu will try to unmap it in cleanup, leaving to more errors. > > Fixes: 34e3c94eda ("vdpa: Add custom IOTLB translations to SVQ") > Reported-by: Lei Yang >

Re: [PATCH] target/riscv: Fix priority of csr related check in riscv_csrrw_check

2022-08-04 Thread Alistair Francis
On Wed, Aug 3, 2022 at 10:56 PM Weiwei Li wrote: > > Normally, riscv_csrrw_check is called when executing Zicsr instructions. > And we can only do access control for existed CSRs. So the priority of > CSR related check, from highest to lowest, should be as follows: > 1) check whether Zicsr is

Re: [PATCH v7 02/12] vhost: use SVQ element ndescs instead of opaque data for desc validation

2022-08-04 Thread Jason Wang
On Fri, Aug 5, 2022 at 2:29 AM Eugenio Pérez wrote: > > Since we're going to allow SVQ to add elements without the guest's > knowledge and without its own VirtQueueElement, it's easier to check if > an element is a valid head checking a different thing than the > VirtQueueElement. > >

Re: [PATCH] target/riscv: Fix priority of csr related check in riscv_csrrw_check

2022-08-04 Thread Alistair Francis
On Wed, Aug 3, 2022 at 10:56 PM Weiwei Li wrote: > > Normally, riscv_csrrw_check is called when executing Zicsr instructions. > And we can only do access control for existed CSRs. So the priority of > CSR related check, from highest to lowest, should be as follows: > 1) check whether Zicsr is

Re: [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-08-04 Thread BB
Am 3. August 2022 20:00:18 MESZ schrieb Peter Maydell : >On Wed, 3 Aug 2022 at 18:26, Bernhard Beschow wrote: >> >> On Tue, Aug 2, 2022 at 8:37 AM Philippe Mathieu-Daudé via >> wrote: >>> >>> On 28/7/22 15:16, Igor Mammedov wrote: >>> > On Thu, 28 Jul 2022 13:29:07 +0100 >>> > Peter Maydell

[PATCH v2 1/2] Update AVX512 support for xbzrle_encode_buffer function

2022-08-04 Thread ling xu
This commit adds runtime check of AVX512 on running machine, and implements AVX512 of xbzrle_encode_buffer function to accelerate xbzrle encoding speed. Compared with C version of xbzrle_encode_buffer function, AVX512 version can achieve almost 60%-70% performance improvement on unit test

Re: [RFC 1/1] hw: tpmtisspi: add SPI support to QEMU TPM implementation

2022-08-04 Thread Dan Zhang
On Thu, Aug 4, 2022 at 4:21 PM Peter Delevoryas wrote: > > On Thu, Aug 04, 2022 at 11:07:10AM -0700, Dan Zhang wrote: > > On Wed, Aug 3, 2022 at 10:30 AM Peter Delevoryas wrote: > > > > > > On Wed, Aug 03, 2022 at 10:52:23AM +0200, Cédric Le Goater wrote: > > > > On 8/3/22 04:32, Iris Chen

[PATCH for-7.1 v2 0/5] Fix gdb bugs and update gdb-xml

2022-08-04 Thread Song Gao
Hi,All This series fiex LoongArch GDB get the wrong pc, because the xml missing the register orig_a0, and update loongarch gdb-xml to match GDB[1] [1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch Please review! V2: - Update orig_a0 value to 0; - Update fcc

[PATCH for-7.1 v2 5/5] target/loongarch: Update gdb_set_fpu() and gdb_get_fpu()

2022-08-04 Thread Song Gao
GDB LoongArch fpu use fcc register, update gdb_set_fpu() and gdb_get_fpu() to match it. Signed-off-by: Song Gao --- linux-user/loongarch64/signal.c | 24 ++- target/loongarch/gdbstub.c | 34 ++--- target/loongarch/internals.h| 3 +++ 3

[PATCH for-7.1 v2 4/5] target/loongarch: Update loongarch-fpu.xml

2022-08-04 Thread Song Gao
Rename loongarch-fpu64.xml to loongarch-fpu.xml and update loongarch-fpu.xml to match upstream GDB [1] [1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/fpu.xml Signed-off-by: Song Gao --- configs/targets/loongarch64-softmmu.mak | 2 +- gdb-xml/loongarch-fpu.xml

Re: [PATCH v7 04/12] vhost: Do not depend on !NULL VirtQueueElement on vhost_svq_flush

2022-08-04 Thread Jason Wang
On Fri, Aug 5, 2022 at 2:29 AM Eugenio Pérez wrote: > > Since QEMU will be able to inject new elements on CVQ to restore the > state, we need not to depend on a VirtQueueElement to know if a new > element has been used by the device or not. Instead of check that, check > if there are new elements

Re: [PATCH v7 01/12] vhost: stop transfer elem ownership in vhost_handle_guest_kick

2022-08-04 Thread Jason Wang
On Fri, Aug 5, 2022 at 2:29 AM Eugenio Pérez wrote: > > It was easier to allow vhost_svq_add to handle the memory. Now that we > will allow qemu to add elements to a SVQ without the guest's knowledge, > it's better to handle it in the caller. > > Signed-off-by: Eugenio Pérez Acked-by: Jason

[PATCH v2 2/2] Test code for AVX512 support for xbzrle_encode_buffer function

2022-08-04 Thread ling xu
Signed-off-by: ling xu Co-authored-by: Zhou Zhao Co-authored-by: Jun Jin --- tests/unit/test-xbzrle.c | 307 --- 1 file changed, 290 insertions(+), 17 deletions(-) diff --git a/tests/unit/test-xbzrle.c b/tests/unit/test-xbzrle.c index ef951b6e54..653016826f

RE: [PATCH] net/colo.c: Fix the pointer issuse reported by Coverity.

2022-08-04 Thread Zhang, Chen
> -Original Message- > From: Jason Wang > Sent: Friday, August 5, 2022 11:46 AM > To: Zhang, Chen > Cc: Peter Maydell ; Li Zhijian > ; qemu-dev > Subject: Re: [PATCH] net/colo.c: Fix the pointer issuse reported by Coverity. > > On Tue, Aug 2, 2022 at 4:24 PM Zhang Chen wrote: > > >

Re: [RFC 1/1] hw: tpmtisspi: add SPI support to QEMU TPM implementation

2022-08-04 Thread Peter Delevoryas
On Thu, Aug 04, 2022 at 11:07:10AM -0700, Dan Zhang wrote: > On Wed, Aug 3, 2022 at 10:30 AM Peter Delevoryas wrote: > > > > On Wed, Aug 03, 2022 at 10:52:23AM +0200, Cédric Le Goater wrote: > > > On 8/3/22 04:32, Iris Chen wrote: > > > > From: Iris Chen > > > > > > A commit log telling us about

Re: [PATCH v2 1/2] vdpa: Skip the maps not in the iova tree

2022-08-04 Thread Jason Wang
在 2022/8/4 23:54, Eugenio Pérez 写道: Next patch will skip the registering of dma maps that the vdpa device rejects in the iova tree. We need to consider that here or we cause a SIGSEGV accessing result. Reported-by: Lei Yang Signed-off-by: Eugenio Pérez Acked-by: Jason Wang ---

[PATCH for-7.1 v2 3/5] target/loongarch: update loongarch-base64.xml

2022-08-04 Thread Song Gao
Update loongarch-base64.xml to match the upstream GDB [1]. [1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/base64.xml Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- gdb-xml/loongarch-base64.xml | 12 ++-- 1 file changed, 6 insertions(+), 6

Re: [PATCH] net/colo.c: Fix the pointer issuse reported by Coverity.

2022-08-04 Thread Jason Wang
On Tue, Aug 2, 2022 at 4:24 PM Zhang Chen wrote: > > When enable the virtio-net-pci, guest network packet will > load the vnet_hdr. In COLO status, the primary VM's network > packet maybe redirect to another VM, it need filter-redirect > enable the vnet_hdr flag at the same time, COLO-proxy will

Re: [PATCH v7 03/12] vhost: Delete useless read memory barrier

2022-08-04 Thread Jason Wang
On Fri, Aug 5, 2022 at 2:29 AM Eugenio Pérez wrote: > > As discussed in previous series [1], this memory barrier is useless with > the atomic read of used idx at vhost_svq_more_used. Deleting it. > > [1] https://lists.nongnu.org/archive/html/qemu-devel/2022-07/msg02616.html > > Signed-off-by:

[PATCH] ui/cocoa: Support hardware cursor interface

2022-08-04 Thread Elliot Nunn
Implement dpy_cursor_define() and dpy_mouse_set() on macOS. The main benefit is from dpy_cursor_define: in absolute pointing mode, the host can redraw the cursor on the guest's behalf much faster than the guest can itself. To provide the programmatic movement expected from a hardware cursor,

Re: PING: [PATCH] KVM: HWPoison: Fix memory address during remap

2022-08-04 Thread Eiichi Tsukata
Hi We’ve also hit this case. > On May 5, 2022, at 9:32, zhenwei pi wrote: > > Hi, Paolo > > I would appreciate it if you could review patch. > > On 4/20/22 14:45, zhenwei pi wrote: >> qemu exits during reset with log: >> qemu-system-x86_64: Could not remap addr: 1000@22001000 >> Currently,

Re: [PATCH v4 2/2] target/s390x: support SHA-512 extensions

2022-08-04 Thread Christian Borntraeger
Am 04.08.22 um 08:51 schrieb Harald Freudenberger: On 2022-08-03 14:14, Jason A. Donenfeld wrote: Hi David, On Wed, Aug 03, 2022 at 01:55:21PM +0200, David Hildenbrand wrote: On 02.08.22 21:00, Jason A. Donenfeld wrote: > In order to fully support MSA_EXT_5, we have to also support the

Re: [PATCH v4 2/2] target/s390x: support SHA-512 extensions

2022-08-04 Thread David Hildenbrand
On 04.08.22 08:51, Harald Freudenberger wrote: > On 2022-08-03 14:14, Jason A. Donenfeld wrote: >> Hi David, >> >> On Wed, Aug 03, 2022 at 01:55:21PM +0200, David Hildenbrand wrote: >>> On 02.08.22 21:00, Jason A. Donenfeld wrote: In order to fully support MSA_EXT_5, we have to also support

Re: [PATCH v5 03/10] vhost: Do not depend on !NULL VirtQueueElement on vhost_svq_flush

2022-08-04 Thread Eugenio Perez Martin
On Thu, Aug 4, 2022 at 5:14 AM Jason Wang wrote: > > > 在 2022/8/3 01:57, Eugenio Pérez 写道: > > Since QEMU will be able to inject new elements on CVQ to restore the > > state, we need not to depend on a VirtQueueElement to know if a new > > element has been used by the device or not. Instead of

[PATCH v1 1/1] QIOChannelSocket: Add support for MSG_ZEROCOPY + IPV6

2022-08-04 Thread Leonardo Bras
For using MSG_ZEROCOPY, there are two steps: 1 - io_writev() the packet, which enqueues the packet for sending, and 2 - io_flush(), which gets confirmation that all packets got correctly sent Currently, if MSG_ZEROCOPY is used to send packets over IPV6, no error will be reported in (1), but it

Re: [PATCH v5 06/10] vdpa: Make vhost_vdpa_net_cvq_map_elem accept any out sg

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 4:19 PM Eugenio Perez Martin wrote: > > On Thu, Aug 4, 2022 at 9:51 AM Jason Wang wrote: > > > > On Thu, Aug 4, 2022 at 3:39 PM Eugenio Perez Martin > > wrote: > > > > > > On Thu, Aug 4, 2022 at 6:17 AM Jason Wang wrote: > > > > > > > > > > > > 在 2022/8/3 01:57, Eugenio

Re: [PATCH v2 05/20] ppc/ppc405: Start QOMification of the SoC

2022-08-04 Thread Cédric Le Goater
On 8/4/22 00:23, BALATON Zoltan wrote: On Wed, 3 Aug 2022, Cédric Le Goater wrote: This moves all the code previously done in the ppc405ep_init() routine under ppc405_soc_realize(). We can also adjust the number of banks now that we have control on ppc4xx_sdram_init(). Signed-off-by: Cédric Le

Re: [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-08-04 Thread Ani Sinha
On Wed, Aug 3, 2022 at 3:00 PM Michael S. Tsirkin wrote: > On Thu, Jul 28, 2022 at 07:50:34AM -0400, Igor Mammedov wrote: > > QEMU crashes trying to save VMSTATE when only MIPS target are compiled in > > $ qemu-system-mips -monitor stdio > > (qemu) migrate "exec:gzip -c > STATEFILE.gz" > >

Re: [PATCH v4 2/2] target/s390x: support SHA-512 extensions

2022-08-04 Thread Harald Freudenberger
On 2022-08-03 14:14, Jason A. Donenfeld wrote: Hi David, On Wed, Aug 03, 2022 at 01:55:21PM +0200, David Hildenbrand wrote: On 02.08.22 21:00, Jason A. Donenfeld wrote: > In order to fully support MSA_EXT_5, we have to also support the SHA-512 > special instructions. So implement those. > >

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Michael S. Tsirkin
On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: > The boot parameter header refers to setup_data at an absolute address, > and each setup_data refers to the next setup_data at an absolute address > too. Currently QEMU simply puts the setup_datas right after the kernel > image,

Re: [PATCH v3 4/7] vdpa: Add asid parameter to vhost_vdpa_dma_map/unmap

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 3:48 PM Eugenio Perez Martin wrote: > > On Thu, Aug 4, 2022 at 6:36 AM Jason Wang wrote: > > > > > > 在 2022/8/4 01:18, Eugenio Pérez 写道: > > > So the caller can choose which ASID is destined. > > > > > > No need to update the batch functions as they will always be called

Re: [PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-04 Thread Thomas Huth
On 02/08/2022 16.09, Peter Maydell wrote: On Tue, 2 Aug 2022 at 14:53, Thomas Huth wrote: The XHCI code could enter an endless loop in case the guest points QEMU to fetch TRBs from invalid memory areas. Fix it by properly checking the return value of dma_memory_read(). It certainly makes

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-04 Thread Daniel P . Berrangé
On Wed, Aug 03, 2022 at 06:34:45PM +0100, Daniel P. Berrangé wrote: > On Wed, Aug 03, 2022 at 07:31:41PM +0200, Claudio Imbrenda wrote: > > This patch adds support for asynchronously tearing down a VM on Linux. > > > > When qemu terminates, either naturally or because of a fatal signal, > > the

Re: [PATCH v7 07/14] KVM: Use gfn instead of hva for mmu_notifier_retry

2022-08-04 Thread Isaku Yamahata
On Wed, Jul 06, 2022 at 04:20:09PM +0800, Chao Peng wrote: > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h > index 0bdb6044e316..e9153b54e2a4 100644 > --- a/include/linux/kvm_host.h > +++ b/include/linux/kvm_host.h > @@ -1362,10 +1362,8 @@ void kvm_mmu_free_memory_cache(struct

Re: [PATCH v7 11/14] KVM: Register/unregister the guest private memory regions

2022-08-04 Thread Chao Peng
On Wed, Aug 03, 2022 at 03:51:24PM +, Sean Christopherson wrote: > On Wed, Aug 03, 2022, Chao Peng wrote: > > On Tue, Aug 02, 2022 at 04:38:55PM +, Sean Christopherson wrote: > > > On Tue, Aug 02, 2022, Sean Christopherson wrote: > > > > I think we should avoid UNMAPPABLE even on the KVM

Re: [PATCH] scsi-disk: support setting CD-ROM block size via device options.

2022-08-04 Thread Mark Cave-Ayland
On 01/08/2022 12:08, John Millikin wrote: Gentle ping -- this is my first time sending a patch for QEMU and it hasn't shown up in the qemu-devel mailing list web UI yet, so I can't tell whether the mail is being sent/received successfully. On Tue, Jul 26, 2022 at 12:42:06PM +0900, John

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-04 Thread Mark Cave-Ayland
On 04/08/2022 00:04, BALATON Zoltan wrote: On Wed, 3 Aug 2022, Cédric Le Goater wrote: Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h    | 16 +++ hw/ppc/ppc405_uc.c | 71 +++--- 2 files changed, 64

Re: [PATCH] ui/console: fix qemu_console_resize() regression

2022-08-04 Thread Mark Cave-Ayland
On 25/07/2022 17:35, Mark Cave-Ayland wrote: On 25/07/2022 12:58, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The display may be corrupted when changing screen colour depth in qemu-system-ppc/MacOS since 7.0. Is it worth being more specific here? Whilst MacOS with its NDRV

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 10:58:36AM +0200, Laszlo Ersek wrote: > On 08/04/22 09:03, Michael S. Tsirkin wrote: > > On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: > >> The boot parameter header refers to setup_data at an absolute address, > >> and each setup_data refers to the

Re: [PATCH 1/2] hw/arm/virt: Improve address assignment for highmem IO regions

2022-08-04 Thread Eric Auger
On 8/4/22 04:47, Gavin Shan wrote: > Hi Eric, > > On 8/3/22 10:52 PM, Eric Auger wrote: >> On 8/3/22 15:02, Gavin Shan wrote: >>> On 8/3/22 5:01 PM, Marc Zyngier wrote: On Wed, 03 Aug 2022 04:01:04 +0100, Gavin Shan wrote: > On 8/2/22 7:41 PM, Eric Auger wrote: >> On 8/2/22

Re: [PATCH v5 03/10] vhost: Do not depend on !NULL VirtQueueElement on vhost_svq_flush

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 2:21 PM Eugenio Perez Martin wrote: > > On Thu, Aug 4, 2022 at 5:14 AM Jason Wang wrote: > > > > > > 在 2022/8/3 01:57, Eugenio Pérez 写道: > > > Since QEMU will be able to inject new elements on CVQ to restore the > > > state, we need not to depend on a VirtQueueElement to

Re: [PATCH v5 06/10] vdpa: Make vhost_vdpa_net_cvq_map_elem accept any out sg

2022-08-04 Thread Eugenio Perez Martin
On Thu, Aug 4, 2022 at 6:17 AM Jason Wang wrote: > > > 在 2022/8/3 01:57, Eugenio Pérez 写道: > > So its generic enough to accept any out sg buffer and we can inject > > NIC state messages. > > > > Signed-off-by: Eugenio Pérez > > --- > > v5: Accept out sg instead of dev_buffers[] > > --- > >

[PATCH for-7.1] virtiofsd: Fix format strings

2022-08-04 Thread Stefan Weil via
Signed-off-by: Stefan Weil --- I have also several patches which add missing G_GNUC_PRINTF. Would such changes still be wanted for 7.1? Regards, Stefan Weil tools/virtiofsd/fuse_lowlevel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virtiofsd/fuse_lowlevel.c

Re: [PATCH] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-04 Thread Stefano Garzarella
On Wed, Aug 03, 2022 at 12:28:24PM -0400, Stefan Hajnoczi wrote: As soon as virtio_scsi_data_plane_start() attaches host notifiers the IOThread may start virtqueue processing. There is a race between IOThread virtqueue processing and virtio_scsi_data_plane_start() because it only assigns

Re: [PATCH v3 4/7] vdpa: Add asid parameter to vhost_vdpa_dma_map/unmap

2022-08-04 Thread Eugenio Perez Martin
On Thu, Aug 4, 2022 at 6:36 AM Jason Wang wrote: > > > 在 2022/8/4 01:18, Eugenio Pérez 写道: > > So the caller can choose which ASID is destined. > > > > No need to update the batch functions as they will always be called from > > memory listener updates at the moment. Memory listener updates will

Re: [PATCH v5 06/10] vdpa: Make vhost_vdpa_net_cvq_map_elem accept any out sg

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 3:39 PM Eugenio Perez Martin wrote: > > On Thu, Aug 4, 2022 at 6:17 AM Jason Wang wrote: > > > > > > 在 2022/8/3 01:57, Eugenio Pérez 写道: > > > So its generic enough to accept any out sg buffer and we can inject > > > NIC state messages. > > > > > > Signed-off-by: Eugenio

Re: [PATCH v3 6/7] vhost_net: Add NetClientInfo prepare callback

2022-08-04 Thread Eugenio Perez Martin
On Thu, Aug 4, 2022 at 6:46 AM Jason Wang wrote: > > > 在 2022/8/4 01:18, Eugenio Pérez 写道: > > This is used by the backend to perform actions before the device is > > started. > > > > In particular, vdpa will use it to isolate CVQ in its own ASID if > > possible, and start SVQ unconditionally

Re: [PATCH v3 7/7] vdpa: Always start CVQ in SVQ mode

2022-08-04 Thread Eugenio Perez Martin
On Thu, Aug 4, 2022 at 6:44 AM Jason Wang wrote: > > > 在 2022/8/4 01:18, Eugenio Pérez 写道: > > Isolate control virtqueue in its own group, allowing to intercept control > > commands but letting dataplane run totally passthrough to the guest. > > > > Signed-off-by: Eugenio Pérez > > --- > > v3: >

Re: VGA hardware cursor query

2022-08-04 Thread Mark Cave-Ayland
On 01/08/2022 04:58, Elliot Nunn wrote: Dear all, I want to give Mac OS 9 clients access to hardware cursor support, to improve responsiveness in absolute-cursor mode. Would it be acceptable to add a hardware cursor interface to the VGA device? And if so, can anyone advise on an appropriate

Re: [PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-04 Thread Mauro Matteo Cascella
On Tue, Aug 2, 2022 at 3:48 PM Thomas Huth wrote: > > The XHCI code could enter an endless loop in case the guest points > QEMU to fetch TRBs from invalid memory areas. Fix it by properly > checking the return value of dma_memory_read(). > > Resolves:

Re: [PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-04 Thread Thomas Huth
On 04/08/2022 10.45, Mauro Matteo Cascella wrote: On Tue, Aug 2, 2022 at 3:48 PM Thomas Huth wrote: The XHCI code could enter an endless loop in case the guest points QEMU to fetch TRBs from invalid memory areas. Fix it by properly checking the return value of dma_memory_read(). Resolves:

Re: [PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-04 Thread Peter Maydell
On Thu, 4 Aug 2022 at 09:00, Thomas Huth wrote: > > On 02/08/2022 16.09, Peter Maydell wrote: > > On Tue, 2 Aug 2022 at 14:53, Thomas Huth wrote: > >> > >> The XHCI code could enter an endless loop in case the guest points > >> QEMU to fetch TRBs from invalid memory areas. Fix it by properly >

Re: [PATCH v2 00/20] ppc: QOM'ify 405 board

2022-08-04 Thread Cédric Le Goater
Daniel, On 8/3/22 15:28, Cédric Le Goater wrote: Hello, Here is large series QOM'ifying the PPC405 board. It introduces a new generic machine and SoC models, converts the current device models to QOM and populates the SoC. The process is quite mechanical without too much issues to handle. The

Re: [PATCH v5 02/10] vhost: use SVQ element ndescs instead of opaque data for desc validation

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 1:57 PM Eugenio Perez Martin wrote: > > On Thu, Aug 4, 2022 at 5:01 AM Jason Wang wrote: > > > > > > 在 2022/8/3 01:57, Eugenio Pérez 写道: > > > Since we're going to allow SVQ to add elements without the guest's > > > knowledge and without its own VirtQueueElement, it's

Re: [PATCH v3 6/7] vhost_net: Add NetClientInfo prepare callback

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 3:52 PM Eugenio Perez Martin wrote: > > On Thu, Aug 4, 2022 at 6:46 AM Jason Wang wrote: > > > > > > 在 2022/8/4 01:18, Eugenio Pérez 写道: > > > This is used by the backend to perform actions before the device is > > > started. > > > > > > In particular, vdpa will use it to

Re: [PATCH v5 06/10] vdpa: Make vhost_vdpa_net_cvq_map_elem accept any out sg

2022-08-04 Thread Eugenio Perez Martin
On Thu, Aug 4, 2022 at 9:51 AM Jason Wang wrote: > > On Thu, Aug 4, 2022 at 3:39 PM Eugenio Perez Martin > wrote: > > > > On Thu, Aug 4, 2022 at 6:17 AM Jason Wang wrote: > > > > > > > > > 在 2022/8/3 01:57, Eugenio Pérez 写道: > > > > So its generic enough to accept any out sg buffer and we can

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 07:56:49AM +0200, Claudio Imbrenda wrote: > On Wed, 3 Aug 2022 18:34:45 +0100 > Daniel P. Berrangé wrote: > > > On Wed, Aug 03, 2022 at 07:31:41PM +0200, Claudio Imbrenda wrote: > > > This patch adds support for asynchronously tearing down a VM on Linux. > > > > > > When

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Laszlo Ersek
On 08/04/22 09:03, Michael S. Tsirkin wrote: > On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: >> The boot parameter header refers to setup_data at an absolute address, >> and each setup_data refers to the next setup_data at an absolute address >> too. Currently QEMU simply

Re: [PATCH v2] hw/nvme: Add helper functions for qid-db conversion

2022-08-04 Thread Klaus Jensen
On Aug 3 09:58, Jinhao Fan wrote: > With the introduction of shadow doorbell and ioeventfd, we need to do > frequent conversion between qid and its doorbell offset. The original > hard-coded calculation is confusing and error-prone. Add several helper > functions to do this task. > >

[RFC PATCH] cputlb and ssi: cache class to avoid expensive object_dynamic_cast_assert (HACK!!!)

2022-08-04 Thread Alex Bennée
Investigating why some BMC models are so slow compared to a plain ARM virt machines I did some profiling of: ./qemu-system-arm -M romulus-bmc -nic user \ -drive file=obmc-phosphor-image-romulus.static.mtd,format=raw,if=mtd \ -nographic -serial mon:stdio And saw that

Re: [PATCH v2 2/2] virtio: remove unnecessary host_features in ->get_features()

2022-08-04 Thread Cornelia Huck
On Wed, Aug 03 2022, Stefan Hajnoczi wrote: > Since at least commit 6b8f1020540c27246277377aa2c3331ad2bfb160 ("virtio: > move host_features") the ->get_features() function has been called with > host_features as an argument. > > Some devices manually add host_features in ->get_features()

Re: [PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-04 Thread Peter Maydell
On Thu, 4 Aug 2022 at 11:07, Thomas Huth wrote: > > On 04/08/2022 10.56, Peter Maydell wrote: > > But the point of TRB_LINK_LIMIT is that regardless of what the > > contents of the TRBs are, the loop is not supposed to > > be able to continue for more than TRB_LINK_LIMIT iterations, > > ie 32

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-04 Thread BALATON Zoltan
On Thu, 4 Aug 2022, Mark Cave-Ayland wrote: On 04/08/2022 00:04, BALATON Zoltan wrote: On Wed, 3 Aug 2022, Cédric Le Goater wrote: Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h    | 16 +++ hw/ppc/ppc405_uc.c | 71

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
On Thu, Aug 4, 2022 at 2:11 PM Jason A. Donenfeld wrote: > > Hi Laszlo, > > On Thu, Aug 04, 2022 at 01:31:36PM +0200, Laszlo Ersek wrote: > > None of the existing info passing methods seem early enough, generic > > enough, and secure enough (at the same time)... > > Can you look at the v2 patch?

Re: [PULL 9/9] hw/i386: pass RNG seed via setup_data entry

2022-08-04 Thread Jason A. Donenfeld
Hi Daniel, On Thu, Aug 4, 2022 at 2:01 PM Daniel P. Berrangé wrote: > > On Thu, Jul 21, 2022 at 06:36:21PM +0200, Paolo Bonzini wrote: > > From: "Jason A. Donenfeld" > > > > Tiny machines optimized for fast boot time generally don't use EFI, > > which means a random seed has to be supplied some

[PATCH] pc: add property for Linux setup_data seed

2022-08-04 Thread Paolo Bonzini
Using a property makes it possible to use the normal compat property mechanism instead of ad hoc code; it avoids parameter proliferation in x86_load_linux; and allows shipping the code even if it is disabled by default. Cc: Jason A. Donenfeld Cc: Michael S. Tsirkin Signed-off-by: Paolo Bonzini

Re: [PATCH v1 1/1] QIOChannelSocket: Add support for MSG_ZEROCOPY + IPV6

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 04:10:43AM -0300, Leonardo Bras wrote: > For using MSG_ZEROCOPY, there are two steps: > 1 - io_writev() the packet, which enqueues the packet for sending, and > 2 - io_flush(), which gets confirmation that all packets got correctly sent > > Currently, if MSG_ZEROCOPY is

Re: [PATCH 0/2] vmgenid: add generation counter

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 11:54:05AM +0200, Chalios, Babis wrote: > Hi Daniel, > > On 3/8/22 18:26, Daniel P. Berrangé wrote: > > CAUTION: This email originated from outside of the organization. Do not > > click links or open attachments unless you can confirm the sender and know > > the content

Re: [PATCH v2 00/20] ppc: QOM'ify 405 board

2022-08-04 Thread Daniel Henrique Barboza
On 8/4/22 03:07, Cédric Le Goater wrote: Daniel, On 8/3/22 15:28, Cédric Le Goater wrote: Hello, Here is large series QOM'ifying the PPC405 board. It introduces a new generic machine and SoC models, converts the current device models to QOM and populates the SoC. The process is quite

Re: [PATCH v2 1/2] virtio: document vdc->get_features() callback

2022-08-04 Thread Cornelia Huck
On Wed, Aug 03 2022, Stefan Hajnoczi wrote: > Suggested-by: Cornelia Huck > Signed-off-by: Stefan Hajnoczi > --- > include/hw/virtio/virtio.h | 20 > 1 file changed, 20 insertions(+) > > diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h > index

Re: [PATCH v5 06/10] vdpa: Make vhost_vdpa_net_cvq_map_elem accept any out sg

2022-08-04 Thread Eugenio Perez Martin
On Thu, Aug 4, 2022 at 10:52 AM Jason Wang wrote: > > On Thu, Aug 4, 2022 at 4:19 PM Eugenio Perez Martin > wrote: > > > > On Thu, Aug 4, 2022 at 9:51 AM Jason Wang wrote: > > > > > > On Thu, Aug 4, 2022 at 3:39 PM Eugenio Perez Martin > > > wrote: > > > > > > > > On Thu, Aug 4, 2022 at 6:17

Re: [PATCH] docs/about/removed-features: Move the -soundhw into the right section

2022-08-04 Thread Laurent Vivier
Le 02/08/2022 à 09:56, Thomas Huth a écrit : The note about the removal of '-soundhw' has been accidentally added to the section of removed "linux-user mode CPUs" ... it should reside in the section about removed "System emulator command line arguments" instead. Fixes: 039a68373c ("introduce

Re: [PATCH] include/qemu/host-utils.h: Simplify the compiler check in mulu128()

2022-08-04 Thread Laurent Vivier
Le 21/07/2022 à 09:48, Thomas Huth a écrit : We currently require at least GCC 7.4 or Clang 6.0 for compiling QEMU. GCC has __builtin_mul_overflow since version 5 already, and Clang 6.0 also provides this built-in function (see its documentation on this page:

[PATCH v11 13/15] target/hexagon: import parser for idef-parser

2022-08-04 Thread Anton Johansson via
Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/idef-parser/idef-parser.y| 964 target/hexagon/idef-parser/parser-helpers.c | 2351 +++

[PATCH v11 15/15] target/hexagon: import additional tests

2022-08-04 Thread Anton Johansson via
From: Niccolò Izzo Signed-off-by: Alessandro Di Federico Signed-off-by: Niccolò Izzo Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- tests/tcg/hexagon/Makefile.target | 28 - tests/tcg/hexagon/crt.S| 14 +++ tests/tcg/hexagon/test_abs.S | 17

Re: [PATCH] hw/net/rocker: Avoid undefined shifts with more than 31 ports

2022-08-04 Thread Peter Maydell
Ping? thanks -- PMM On Fri, 29 Jul 2022 at 16:59, Peter Maydell wrote: > > In rocker_port_phys_link_status() and rocker_port_phys_enable_read() > we construct a 64-bit value with one bit per front-panel port. > However we accidentally do the shift as 32-bit arithmetic, which > means that if

Re: [PATCH v2 19/20] ppc/ppc405: QOM'ify I2C

2022-08-04 Thread BALATON Zoltan
On Thu, 4 Aug 2022, Cédric Le Goater wrote: On 8/4/22 01:31, BALATON Zoltan wrote: On Wed, 3 Aug 2022, Cédric Le Goater wrote: Having an explicit I2C model object will help if one day we want to add I2C devices on the bus. Same here as with the UIC in previous patch, it's not QOMifying here

Re: [PATCH] README.rst: fix link formatting

2022-08-04 Thread Laurent Vivier
Le 03/08/2022 à 11:02, Cornelia Huck a écrit : Make the links render correctly. Signed-off-by: Cornelia Huck --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 23795b837740..21df79ef4379 100644 --- a/README.rst +++

Re: [PATCH v10 08/21] jobs: add job lock in find_* functions

2022-08-04 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > Both blockdev.c and job-qmp.c have TOC/TOU conditions, because > they first search for the job and then perform an action on it. > Therefore, we need to do the search + action under the same > job mutex critical section. > >

[PATCH v11 08/15] target/hexagon: add flex/bison/glib2 to qemu.yml

2022-08-04 Thread Anton Johansson via
Note, the glib2-native mapping exists separately from the normal glib2 mapping. The latter uses a `foreign` cross-policy-default, and libvirt-ci is not able to support package mappings for multiple cross-compilation policies. This will probably change in the future. Signed-off-by: Alessandro Di

[PATCH v11 01/15] target/hexagon: update MAINTAINERS for idef-parser

2022-08-04 Thread Anton Johansson via
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5ce4227ff6..6435d54e33

[PATCH v11 00/15] target/hexagon: introduce idef-parser

2022-08-04 Thread Anton Johansson via
This patchset introduces the idef-parser for target/hexagon. It's the eleventh iteration of the patchset and includes fixes suggested in previous iterations. idef-parser is a build-time tool built using flex and bison. Its aim is to generate a large part of the tiny code generator frontend for

[PATCH v11 02/15] target/hexagon: import README for idef-parser

2022-08-04 Thread Anton Johansson via
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/README | 5 + target/hexagon/idef-parser/README.rst | 722 ++ 2 files changed, 727 insertions(+) create

[PATCH v11 11/15] target/hexagon: import lexer for idef-parser

2022-08-04 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/idef-parser/idef-parser.h | 254 +++ target/hexagon/idef-parser/idef-parser.lex | 471 +

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
Hi Ard, On Thu, Aug 4, 2022 at 2:16 PM Ard Biesheuvel wrote: > > On Thu, 4 Aug 2022 at 14:11, Daniel P. Berrangé wrote: > > > > On Thu, Aug 04, 2022 at 02:03:29PM +0200, Jason A. Donenfeld wrote: > > > Hi Daniel, > > > > > > On Thu, Aug 04, 2022 at 10:25:36AM +0100, Daniel P. Berrangé wrote: >

Re: [PATCH v10 09/21] jobs: use job locks also in the unit tests

2022-08-04 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > Add missing job synchronization in the unit tests, with > explicit locks. > > We are deliberately using _locked functions wrapped by a guard > instead of a normal call because the normal call will be removed > in future, as the

Re: [PULL 9/9] hw/i386: pass RNG seed via setup_data entry

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 02:13:41PM +0200, Jason A. Donenfeld wrote: > Hi Daniel, > > On Thu, Aug 4, 2022 at 2:01 PM Daniel P. Berrangé wrote: > > > > On Thu, Jul 21, 2022 at 06:36:21PM +0200, Paolo Bonzini wrote: > > > From: "Jason A. Donenfeld" > > > > > > Tiny machines optimized for fast boot

  1   2   3   >