Re: [PATCH] hw/loongarch: remove acpi-build.c unused variable 'aml_len'

2022-08-04 Thread gaosong
Ping for 7.1 On 2022/7/24 上午11:27, Richard Henderson wrote: On 7/21/22 09:30, Song Gao wrote: Fix a compiler warning on openbsd: ../src/hw/loongarch/acpi-build.c:416:12: warning: variable 'aml_len' set but not used [-Wunused-but-set-variable] size_t aml_len = 0;     ^ Reported-by:

Re: [PATCH] target/loongarch: Fix macros SET_FPU_* in cpu.h

2022-08-04 Thread gaosong
Cc: Richard Apply to 7.1? On 2022/8/4 下午9:24, Qi Hu wrote: The macros SET_FPU_* are used to set corresponding bits of fcsr. Unfortunately it forgets to set the result and it causes fcsr's "CAUSE" never being updated. This patch is to fix this bug. Signed-off-by: Qi Hu --- target/loongarch/c

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

2022-08-04 Thread Gavin Shan
Hi Eric, On 8/4/22 5:19 PM, Eric Auger wrote: On 8/4/22 04:47, Gavin Shan wrote: 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/

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

2022-08-04 Thread Laszlo Ersek
On 08/05/22 00:56, Jason A. Donenfeld wrote: > 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.

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

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 supp

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

[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

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

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 Franci

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 supp

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. > > Signed-off-b

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 Wang

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

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

[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 git://git.qemu.org/qemu

[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 --- a/target/loongarch

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

[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

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

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 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 --- hw/vi

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

2022-08-04 Thread Richard Henderson
9:47 +0200) 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 Eugeni

Re: Re: PING: [PATCH] KVM: HWPoison: Fix memory address&size 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 durin

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

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

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

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

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] pc: add property for Linux setup_data random number 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: Michael S. Tsirkin Co-developed-by: Jason A. Donenfeld Signed-off-by: Pa

Re: [PATCH] pc: add property for Linux setup_data seed

2022-08-04 Thread Paolo Bonzini
On 8/4/22 16:31, Jason A. Donenfeld wrote: I'm still not really keen on adding a knob for this. I understand ARM has a knob for it for different reasons (better named "dtb-randomness"). If this knob thing is to live on here, maybe it should have "-randomness" in the name also. Ok, I just reused

Re: [PULL 0/1] ppc queue

2022-08-04 Thread Richard Henderson
ository at: https://gitlab.com/danielhb/qemu.git tags/pull-ppc-20220804 for you to fetch changes up to ed021daf2d6c19499ae406055156dc19c073228f: hw/ppc: sam460ex.c: store all GPIO lines in mal_irqs[] (2022-08-04 15:20:14 -0300) --

[PULL for-7.1 1/1] virtiofsd: Fix format strings

2022-08-04 Thread Stefan Hajnoczi
From: Stefan Weil Signed-off-by: Stefan Weil Message-Id: <20220804074833.892604-1...@weilnetz.de> Signed-off-by: Stefan Hajnoczi --- tools/virtiofsd/fuse_lowlevel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lo

[ANNOUNCE] QEMU 7.1.0-rc1 is now available

2022-08-04 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the second release candidate for the QEMU 7.1 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu-project.org/qemu-7.1.0-rc1.tar.xz http://downl

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

2022-08-04 Thread BALATON Zoltan
On Thu, 4 Aug 2022, Peter Maydell wrote: On Thu, 4 Aug 2022 at 19:03, BALATON Zoltan wrote: I was trying to find out how to do it but I don't understand QOM enough to answer the simple question of how to get the cpu object from QOM. My guesses are: object_resolve_path_type("/machine", TYPE_POW

[PULL 1/5] README.rst: fix link formatting

2022-08-04 Thread Laurent Vivier
From: Cornelia Huck Make the links render correctly. Signed-off-by: Cornelia Huck Reviewed-by: Daniel P. Berrangé Message-Id: <20220803090250.136556-1-coh...@redhat.com> Signed-off-by: Laurent Vivier --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/READM

[PULL 0/5] Trivial branch for 7.1 patches

2022-08-04 Thread Laurent Vivier
st trivial branch 20220804 Cornelia Huck (1): README.rst: fix link formatting Eugenio Pérez (1): vdpa: Fix file descriptor leak on get features error Thomas Huth (2): docs/about/removed-features: Move the -soundhw into the rig

[PULL 4/5] ppc: Remove redundant macro MSR_BOOK3S_MASK.

2022-08-04 Thread Laurent Vivier
From: Yonggang Luo Signed-off-by: Yonggang Luo Reviewed-by: Daniel Henrique Barboza Message-Id: <20220728201135.223-1-luoyongg...@gmail.com> Signed-off-by: Laurent Vivier --- target/ppc/excp_helper.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp

[PULL 2/5] vdpa: Fix file descriptor leak on get features error

2022-08-04 Thread Laurent Vivier
From: Eugenio Pérez File descriptor vdpa_device_fd is not free in the case of returning error from vhost_vdpa_get_features. Fixing it by making all errors go to the same error path. Resolves: Coverity CID 1490785 Fixes: 8170ab3f43 ("vdpa: Extract get features part from vhost_vdpa_get_max_queue_

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

2022-08-04 Thread Laurent Vivier
From: Thomas Huth 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: https://releases.llvm.org/6.0.0/tools/clang/docs/LanguageExtensi

[PULL 3/5] docs/about/removed-features: Move the -soundhw into the right section

2022-08-04 Thread Laurent Vivier
From: Thomas Huth 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 -audio as a replacement for -s

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

2022-08-04 Thread Eugenio Pérez
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: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 3 --- 1 fil

[PULL for-7.1 0/1] Block patches

2022-08-04 Thread Stefan Hajnoczi
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: https://gitlab.com/stefanha/qemu.git tags/block

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

2022-08-04 Thread Stefan Hajnoczi
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 s-

Re: [PATCH] util/aio: Defer disabling poll mode as long as possible

2022-08-04 Thread Stefan Hajnoczi
On Sun, Jul 10, 2022 at 08:08:49PM +0800, Chao Gao wrote: > When we measure FIO read performance (cache=writethrough, bs=4k, > iodepth=64) in VMs, ~80K/s notifications (e.g., EPT_MISCONFIG) are observed > from guest to qemu. > > It turns out those frequent notificatons are caused by interference f

Re: [PATCH for-7.1] virtiofsd: Fix format strings

2022-08-04 Thread Stefan Hajnoczi
On Thu, 4 Aug 2022 at 03:50, Stefan Weil via wrote: > > 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? Hi Stefan, Thanks for the fix! I have merged it for 7.1. Please send the G_GNUC_PRINTF fixes for

[PULL 0/1] ppc queue

2022-08-04 Thread Daniel Henrique Barboza
tags/pull-ppc-20220804 for you to fetch changes up to ed021daf2d6c19499ae406055156dc19c073228f: hw/ppc: sam460ex.c: store all GPIO lines in mal_irqs[] (2022-08-04 15:20:14 -0300) ppc patch queue for 2022-08-04: In this shor

[PATCH v7 09/12] vdpa: Extract vhost_vdpa_net_cvq_add from vhost_vdpa_net_handle_ctrl_avail

2022-08-04 Thread Eugenio Pérez
So we can reuse it to inject state messages. Signed-off-by: Eugenio Pérez -- v7: * Remove double free error v6: * Do not assume in buffer sent to the device is sizeof(virtio_net_ctrl_ack) v5: * Do not use an artificial !NULL VirtQueueElement * Use only out size instead of iovec dev_buffers for

[PULL 1/1] hw/ppc: sam460ex.c: store all GPIO lines in mal_irqs[]

2022-08-04 Thread Daniel Henrique Barboza
We're not storing all GPIO lines we're retrieving with qdev_get_gpio_in() in mal_irqs[]. We're storing just the last one in the first index: for (i = 0; i < ARRAY_SIZE(mal_irqs); i++) { mal_irqs[0] = qdev_get_gpio_in(uic[2], 3 + i); } ppc4xx_mal_init(env, 4, 16, mal_irqs); mal

[PATCH v7 12/12] vdpa: Delete CVQ migration blocker

2022-08-04 Thread Eugenio Pérez
We can restore the device state in the destination via CVQ now. Remove the migration blocker. Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost-vdpa.h | 1 - hw/virtio/vhost-vdpa.c | 14 -- net/vhost-vdpa.c | 2 -- 3 files changed, 17 deletions(-) diff

[PATCH v7 06/12] vhost_net: Add NetClientInfo stop callback

2022-08-04 Thread Eugenio Pérez
Used by the backend to perform actions after the device is stopped. In particular, vdpa net use it to unmap CVQ buffers to the device, cleaning the actions performend in prepare(). Signed-off-by: Eugenio Pérez --- include/net/net.h | 2 ++ hw/net/vhost_net.c | 3 +++ 2 files changed, 5 inserti

[PATCH v7 11/12] vdpa: Add virtio-net mac address via CVQ at start

2022-08-04 Thread Eugenio Pérez
This is needed so the destination vdpa device see the same state a the guest set in the source. Signed-off-by: Eugenio Pérez --- v6: * Map and unmap command buffers at the start and end of device usage. v5: * Rename s/start/load/ * Use independent NetClientInfo to only add load callback on cvq.

[PATCH v7 10/12] vhost_net: add NetClientState->load() callback

2022-08-04 Thread Eugenio Pérez
It allows per-net client operations right after device's successful start. In particular, to load the device status. Vhost-vdpa net will use it to add the CVQ buffers to restore the device status. Signed-off-by: Eugenio Pérez --- v5: Rename start / load, naming it more specifically. --- include

[PATCH v7 00/12] NIC vhost-vdpa state restore via Shadow CVQ

2022-08-04 Thread Eugenio Pérez
CVQ of net vhost-vdpa devices can be intercepted since the work of [1]. The virtio-net device model is updated. The migration was blocked because although the state can be megrated between VMM it was not possible to restore on the destination NIC. This series add support for SVQ to inject external

[PATCH v7 07/12] vdpa: add net_vhost_vdpa_cvq_info NetClientInfo

2022-08-04 Thread Eugenio Pérez
Next patches will add a new info callback to restore NIC status through CVQ. Since only the CVQ vhost device is needed, create it with a new NetClientInfo. Signed-off-by: Eugenio Pérez --- v5: Create a new NetClientInfo instead of reusing the dataplane one. --- net/vhost-vdpa.c | 12 +++-

[PATCH 1/2] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-04 Thread Ilya Leoshkevich
When the first instruction of a translation block is located in a non-readable page, qemu-user fills siginfo_t correctly. For the other instructions the result is as if it were the first instruction, which is not correct. The reason is that the current logic expects translate_insn() hook to stop a

Re: [PATCH v2 1/1] target/ppc: fix unreachable code in do_ldst_quad()

2022-08-04 Thread Daniel Henrique Barboza
On 8/4/22 15:05, Peter Maydell wrote: On Mon, 25 Jul 2022 at 21:24, Daniel Henrique Barboza wrote: Coverity reports that commit fc34e81acd51 ("target/ppc: add macros to check privilege level") turned the following code unreachable: if (!prefixed && !(ctx->insns_flags2 & PPC2_LSQ_ISA207)) {

[PATCH v7 05/12] vhost_net: Add NetClientInfo prepare callback

2022-08-04 Thread Eugenio Pérez
This is used by the backend to perform actions before the device is started. In particular, vdpa net use it to map CVQ buffers to the device, so it can send control commands using them. Signed-off-by: Eugenio Pérez --- include/net/net.h | 2 ++ hw/net/vhost_net.c | 7 +++ 2 files changed,

[PATCH v7 08/12] vdpa: Move command buffers map to start of net device

2022-08-04 Thread Eugenio Pérez
As this series will reuse them to restore the device state at the end of a migration (or a device start), let's allocate only once at the device start so we don't duplicate their map and unmap. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 123 ++

Re: [PATCH] disas: Add LoongArch support

2022-08-04 Thread Richard Henderson
On 8/4/22 10:29, Qi Hu wrote: Signed-off-by: Qi Hu --- disas.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/disas.c b/disas.c index e31438f349..d44f46 100644 --- a/disas.c +++ b/disas.c @@ -176,6 +176,8 @@ static void initialize_debug_host(CPUDebug *s) #else #error unsupporte

[PATCH v6 11/12] vdpa: Add virtio-net mac address via CVQ at start

2022-08-04 Thread Eugenio Pérez
This is needed so the destination vdpa device see the same state a the guest set in the source. Signed-off-by: Eugenio Pérez --- v6: * Map and unmap command buffers at the start and end of device usage. v5: * Rename s/start/load/ * Use independent NetClientInfo to only add load callback on cvq.

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

2022-08-04 Thread 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 check that, check if there are new elements only using used idx on vhost_svq_flush. Signed-off-by: Eugenio

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

2022-08-04 Thread Eugenio Pérez
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 --- hw/virtio/vhost-shadow-virtqueue.c | 10 -- 1 file changed, 4 insertions

[PATCH v6 09/12] vdpa: Extract vhost_vdpa_net_cvq_add from vhost_vdpa_net_handle_ctrl_avail

2022-08-04 Thread Eugenio Pérez
So we can reuse it to inject state messages. Signed-off-by: Eugenio Pérez -- v6: * Do not assume in buffer sent to the device is sizeof(virtio_net_ctrl_ack) v5: * Do not use an artificial !NULL VirtQueueElement * Use only out size instead of iovec dev_buffers for these functions. --- net/vhost-

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

2022-08-04 Thread 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 easier to check if an element is a valid head checking a different thing than the VirtQueueElement. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 3 ++-

[PATCH v6 07/12] vdpa: add net_vhost_vdpa_cvq_info NetClientInfo

2022-08-04 Thread Eugenio Pérez
Next patches will add a new info callback to restore NIC status through CVQ. Since only the CVQ vhost device is needed, create it with a new NetClientInfo. Signed-off-by: Eugenio Pérez --- v5: Create a new NetClientInfo instead of reusing the dataplane one. --- net/vhost-vdpa.c | 12 +++-

[PATCH v6 10/12] vhost_net: add NetClientState->load() callback

2022-08-04 Thread Eugenio Pérez
It allows per-net client operations right after device's successful start. In particular, to load the device status. Vhost-vdpa net will use it to add the CVQ buffers to restore the device status. Signed-off-by: Eugenio Pérez --- v5: Rename start / load, naming it more specifically. --- include

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

2022-08-04 Thread 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 check that, check if there are new elements only using used idx on vhost_svq_flush. Signed-off-by: Eugenio

[PATCH 0/2] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-04 Thread Ilya Leoshkevich
Hi, I noticed that when we get a SEGV due to jumping to non-readable memory, sometimes si_addr and program counter in siginfo_t are slightly off. I tracked this down to the assumption that translators stop before the end of a page, while in reality they may stop right after it. Patch 1 fixes the

[PATCH 2/2] tests/tcg: Test siginfo_t contents when jumping to non-readable pages

2022-08-04 Thread Ilya Leoshkevich
Add x86_64 and s390x tests to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/noexec.h | 114 tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/noexec.c | 145 +++ tests/tcg/x86_64/Makefile.targ

[PATCH v6 08/12] vdpa: Move command buffers map to start of net device

2022-08-04 Thread Eugenio Pérez
As this series will reuse them to restore the device state at the end of a migration (or a device start), let's allocate only once at the device start so we don't duplicate their map and unmap. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 123 ++

[PATCH v6 06/12] vhost_net: Add NetClientInfo stop callback

2022-08-04 Thread Eugenio Pérez
Used by the backend to perform actions after the device is stopped. In particular, vdpa net use it to unmap CVQ buffers to the device, cleaning the actions performend in prepare(). Signed-off-by: Eugenio Pérez --- include/net/net.h | 2 ++ hw/net/vhost_net.c | 3 +++ 2 files changed, 5 inserti

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

2022-08-04 Thread Eugenio Pérez
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: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 3 --- 1 fil

Re: [PATCH v5 00/10] NIC vhost-vdpa state restore via Shadow CVQ

2022-08-04 Thread Eugenio Perez Martin
On Thu, Aug 4, 2022 at 6:21 AM Jason Wang wrote: > > > 在 2022/8/3 01:57, Eugenio Pérez 写道: > > CVQ of net vhost-vdpa devices can be intercepted since the work of [1]. The > > virtio-net device model is updated. The migration was blocked because > > although > > the state can be megrated between V

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

2022-08-04 Thread 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 easier to check if an element is a valid head checking a different thing than the VirtQueueElement. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 3 ++-

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

2022-08-04 Thread Peter Maydell
On Thu, 4 Aug 2022 at 19:03, BALATON Zoltan wrote: > I was trying to find out how to do it but I don't understand QOM enough to > answer the simple question of how to get the cpu object from QOM. My > guesses are: > > object_resolve_path_type("/machine", TYPE_POWERPC_CPU, NULL) > > or maybe > > ob

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

2022-08-04 Thread Eugenio Pérez
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 --- hw/virtio/vhost-shadow-virtqueue.c | 10 -- 1 file changed, 4 insertions

[PATCH v6 05/12] vhost_net: Add NetClientInfo prepare callback

2022-08-04 Thread Eugenio Pérez
This is used by the backend to perform actions before the device is started. In particular, vdpa net use it to map CVQ buffers to the device, so it can send control commands using them. Signed-off-by: Eugenio Pérez --- include/net/net.h | 2 ++ hw/net/vhost_net.c | 7 +++ 2 files changed,

[PATCH v6 12/12] vdpa: Delete CVQ migration blocker

2022-08-04 Thread Eugenio Pérez
We can restore the device state in the destination via CVQ now. Remove the migration blocker. Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost-vdpa.h | 1 - hw/virtio/vhost-vdpa.c | 14 -- net/vhost-vdpa.c | 2 -- 3 files changed, 17 deletions(-) diff

[PATCH v6 00/12] NIC vhost-vdpa state restore via Shadow CVQ

2022-08-04 Thread Eugenio Pérez
CVQ of net vhost-vdpa devices can be intercepted since the work of [1]. The virtio-net device model is updated. The migration was blocked because although the state can be megrated between VMM it was not possible to restore on the destination NIC. This series add support for SVQ to inject external

Re: [PATCH] disas: Add LoongArch support

2022-08-04 Thread Peter Maydell
On Thu, 4 Aug 2022 at 18:32, Qi Hu wrote: > More specifically, this is adding support for disassembling on LoongArch hosts. The handling of disassembling LoongArch guests is already connected up. thanks -- PMM

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

2022-08-04 Thread Dan Zhang
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 this new device would be good to have. > > > > > > > Signed-off-by: Iris

Re: [PATCH v2 1/1] target/ppc: fix unreachable code in do_ldst_quad()

2022-08-04 Thread Peter Maydell
On Mon, 25 Jul 2022 at 21:24, Daniel Henrique Barboza wrote: > > Coverity reports that commit fc34e81acd51 ("target/ppc: add macros to > check privilege level") turned the following code unreachable: > > if (!prefixed && !(ctx->insns_flags2 & PPC2_LSQ_ISA207)) { > /* lq and stq were privileged

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

2022-08-04 Thread BALATON Zoltan
On Thu, 4 Aug 2022, Cédric Le Goater wrote: [ Replying to all ] On 8/4/22 16:26, BALATON Zoltan wrote: On Thu, 4 Aug 2022, Cédric Le Goater wrote: On 8/4/22 14:09, BALATON Zoltan wrote: On Thu, 4 Aug 2022, Cédric Le Goater wrote: On 8/4/22 01:36, Daniel Henrique Barboza wrote: Cedric, On 8

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

2022-08-04 Thread Cédric Le Goater
On 8/4/22 18:51, Alex Bennée wrote: Cédric Le Goater writes: Hello Alex, Thanks for putting some time into this problem, On 8/4/22 11:20, Alex Bennée wrote: Investigating why some BMC models are so slow compared to a plain ARM virt machines I did some profiling of: ./qemu-system-arm -M

[PATCH] disas: Add LoongArch support

2022-08-04 Thread Qi Hu
Signed-off-by: Qi Hu --- disas.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/disas.c b/disas.c index e31438f349..d44f46 100644 --- a/disas.c +++ b/disas.c @@ -176,6 +176,8 @@ static void initialize_debug_host(CPUDebug *s) #else #error unsupported RISC-V ABI #endif +#elif defined(

Re: [PATCH v10 11/21] jobs: group together API calls under the same job lock

2022-08-04 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > Now that the API offers also _locked() functions, take advantage > of it and give also the caller control to take the lock and call > _locked functions. > > This makes sense especially when we have for loops, because it > makes n

[PATCH 3/3] iotests, parallels: Add a test for duplicated clusters

2022-08-04 Thread alexander . ivanov
From: Alexander Ivanov Check if original and duplicated offsets refer to the same cluster. Repair the image and check that writing to a referred cluster doesn't affects another referred cluster. Signed-off-by: Natalia Kuzmina Signed-off-by: Alexander Ivanov --- tests/qemu-iotests/314

Re: [RFC 0/3] Add Generic SPI GPIO model

2022-08-04 Thread Dan Zhang
On Tue, Aug 2, 2022 at 7:25 AM Cédric Le Goater wrote: > > On 7/31/22 00:06, Peter Delevoryas wrote: > > On Sat, Jul 30, 2022 at 11:18:33PM +0200, Cédric Le Goater wrote: > >> On 7/29/22 19:30, Peter Delevoryas wrote: > >>> On Fri, Jul 29, 2022 at 03:25:55PM +0200, Cédric Le Goater wrote: > H

[PATCH 1/3] parallels: Add checking and repairing duplicate offsets in BAT

2022-08-04 Thread alexander . ivanov
From: Alexander Ivanov There could be corruptions in the image file: two quest memory areas refer to the same host cluster. If a duplicate offset is found fix it by copying the content of the referred cluster to a new allocated cluster and replace one of the two referring entries by the new clus

[PATCH 2/3] parallels: Let duplicates repairing pass without unwanted messages

2022-08-04 Thread alexander . ivanov
From: Alexander Ivanov When duplicates are repaired a new space area is allocated and further leak check considers it as a leak. Let fix it without printing any messages. Signed-off-by: Alexander Ivanov --- block/parallels.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletio

[PATCH 0/3] Check and repair duplicated clusters in parallels images

2022-08-04 Thread alexander . ivanov
From: Alexander Ivanov Parallels image file can be corrupted this way: two guest memory areas refer to the same host memory area (duplicated offsets in BAT). qemu-img check copies data from duplicated cluster to the new cluster and writes new corresponding offset to BAT instead of duplicated one.

Re: [PATCH v2 09/15] util: move 256-by-128 division helpers to int128

2022-08-04 Thread Lucas Mateus Martins Araujo e Castro
On 12/07/2022 06:35, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Break a cyclic dependency between int128 and host-utils. Reviewed-by: Lucas Mateus Castro Signed-off-by: Marc-André Lureau --- include/qemu/host-utils.h | 3 - include/qemu/int128.h | 3 + util/host-

  1   2   3   >