Re: [RFC PATCH v3 27/36] i386/tdx: Disable SMM for TDX VMs

2022-03-21 Thread Xiaoyao Li
On 3/17/2022 9:59 PM, Xiaoyao Li wrote: TDX doesn't support SMM and VMM cannot emulate SMM for TDX VMs because VMM cannot manipulate TDX VM's memory. Disable SMM for TDX VMs and error out if user requests to enable SMM. Signed-off-by: Xiaoyao Li --- target/i386/kvm/tdx.c | 13 +

[PULL 2/3] target/ppc: Replicate double->int32 result for some vector insns

2022-03-21 Thread Cédric Le Goater
From: Richard Henderson Power ISA v3.1 formalizes the previously undefined result in words 1 and 3 to be a copy of the result in words 0 and 2. This affects: xscvdpsxws, xscvdpuxws, xvcvdpsxws, xvcvdpuxws. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/852 Signed-off-by: Richard Hender

Re: [RFC PATCH v3 09/36] KVM: Introduce kvm_arch_pre_create_vcpu()

2022-03-21 Thread Xiaoyao Li
On 3/19/2022 12:56 AM, Isaku Yamahata wrote: On Thu, Mar 17, 2022 at 09:58:46PM +0800, Xiaoyao Li wrote: Introduce kvm_arch_pre_create_vcpu(), to perform arch-dependent work prior to create any vcpu. This is for i386 TDX because it needs call TDX_INIT_VM before creating any vcpu. Signed-off-b

Re: [PATCH 1/3] spapr: Ignore nested KVM hypercalls when not running TCG

2022-03-21 Thread David Gibson
On Fri, Mar 18, 2022 at 10:41:19AM -0300, Fabiano Rosas wrote: > David Gibson writes: > > > On Thu, Mar 17, 2022 at 02:20:47PM -0300, Fabiano Rosas wrote: > >> It is possible that nested KVM hypercalls reach QEMU while we're > >> running KVM. The spapr virtual hypervisor implementation of the nes

[PATCH v3 0/6] Support exporting BDSs via VDUSE

2022-03-21 Thread Xie Yongji
Hi all, Last few months ago, VDUSE (vDPA Device in Userspace) [1] has been merged into Linux kernel as a framework that make it possible to emulate a vDPA device in userspace. This series aimed at implementing a VDUSE block backend based on the qemu-storage-daemon infrastructure. To support that,

[PATCH v3 2/6] linux-headers: Add vduse.h

2022-03-21 Thread Xie Yongji
This adds vduse header to linux headers so that the relevant VDUSE API can be used in subsequent patches. Signed-off-by: Xie Yongji --- linux-headers/linux/vduse.h | 306 scripts/update-linux-headers.sh | 2 +- 2 files changed, 307 insertions(+), 1 deletion

[PATCH v3 3/6] libvduse: Add VDUSE (vDPA Device in Userspace) library

2022-03-21 Thread Xie Yongji
VDUSE [1] is a linux framework that makes it possible to implement software-emulated vDPA devices in userspace. This adds a library as a subproject to help implementing VDUSE backends in QEMU. [1] https://www.kernel.org/doc/html/latest/userspace-api/vduse.html Signed-off-by: Xie Yongji --- MAIN

[PATCH v3 1/6] block: Support passing NULL ops to blk_set_dev_ops()

2022-03-21 Thread Xie Yongji
This supports passing NULL ops to blk_set_dev_ops() so that we can remove stale ops in some cases. Signed-off-by: Xie Yongji --- block/block-backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/block-backend.c b/block/block-backend.c index e0e1aff4b1..35457a6a1d 10

[PATCH v3 6/6] libvduse: Add support for reconnecting

2022-03-21 Thread Xie Yongji
To support reconnecting after restart or crash, VDUSE backend might need to resubmit inflight I/Os. This stores the metadata such as the index of inflight I/O's descriptors to a shm file so that VDUSE backend can restore them during reconnecting. Signed-off-by: Xie Yongji --- block/export/vduse-

[PATCH v3 5/6] vduse-blk: Add vduse-blk resize support

2022-03-21 Thread Xie Yongji
To support block resize, this uses vduse_dev_update_config() to update the capacity field in configuration space and inject config interrupt on the block resize callback. Signed-off-by: Xie Yongji Reviewed-by: Stefan Hajnoczi --- block/export/vduse-blk.c | 20 1 file change

[PATCH v3 4/6] vduse-blk: implements vduse-blk export

2022-03-21 Thread Xie Yongji
This implements a VDUSE block backends based on the libvduse library. We can use it to export the BDSs for both VM and container (host) usage. The new command-line syntax is: $ qemu-storage-daemon \ --blockdev file,node-name=drive0,filename=test.img \ --export vduse-blk,node-name=drive0,i

[PATCH qemu] ppc/spapr/ddw: Add 2M pagesize

2022-03-21 Thread Alexey Kardashevskiy
Recently the LoPAPR spec got a new 2MB pagesize to support in Dynamic DMA Windows API (DDW), this adds the new flag. Linux supports it since https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=38727311871 Signed-off-by: Alexey Kardashevskiy --- PHYP added support for it

Re: [PATCH for-7.1 0/9] spapr: add drc->index, remove spapr_drc_index()

2022-03-21 Thread Daniel Henrique Barboza
On 3/21/22 00:55, David Gibson wrote: On Fri, Mar 18, 2022 at 02:33:11PM -0300, Daniel Henrique Barboza wrote: Hi, I decided to make this change after realizing that (1) spapr_drc_index() always return the same index value for the DRC regardless of machine or device state and (2) we call spa

Re: [RFC PATCH v3 16/36] i386/tdx: Set kvm_readonly_mem_enabled to false for TDX VM

2022-03-21 Thread Xiaoyao Li
On 3/19/2022 1:11 AM, Isaku Yamahata wrote: On Thu, Mar 17, 2022 at 09:58:53PM +0800, Xiaoyao Li wrote: TDX only supports readonly for shared memory but not for private memory. In the view of QEMU, it has no idea whether a memslot is used by shared memory of private. Thus just mark kvm_readon

Re: [PATCH] block/rbd: fix write zeroes with growing images

2022-03-21 Thread Stefano Garzarella
On Sat, Mar 19, 2022 at 02:23:18PM +0100, Ilya Dryomov wrote: On Sat, Mar 19, 2022 at 1:40 PM Ilya Dryomov wrote: On Fri, Mar 18, 2022 at 9:25 AM Stefano Garzarella wrote: > > On Thu, Mar 17, 2022 at 07:27:05PM +0100, Peter Lieven wrote: > > > > > >> Am 17.03.2022 um 17:26 schrieb Stefano Gar

Re: [PATCH v2] target/i386: kvm: do not access uninitialized variable on older kernels

2022-03-21 Thread Peter Krempa
On Sun, Mar 20, 2022 at 20:39:14 +0100, Paolo Bonzini wrote: > KVM support for AMX includes a new system attribute, KVM_X86_XCOMP_GUEST_SUPP. > Commit 19db68ca68 ("x86: Grant AMX permission for guest", 2022-03-15) however > did not fully consider the behavior on older kernels. First, it warns > to

Re: [PATCH] block/rbd: fix write zeroes with growing images

2022-03-21 Thread Stefano Garzarella
On Sat, Mar 19, 2022 at 04:15:33PM +0100, Peter Lieven wrote: Am 18.03.2022 um 17:47 schrieb Stefano Garzarella : On Fri, Mar 18, 2022 at 04:48:18PM +0100, Peter Lieven wrote: Am 18.03.2022 um 09:25 schrieb Stefano Garzarella : On Thu, Mar 17, 2022 at 07:27:05PM +0100, Peter Lieven wr

Re: Proposal for a regular upstream performance testing

2022-03-21 Thread Lukáš Doktor
Dear qemu developers, you might remember the "replied to" email from a bit over year ago to raise a discussion about a qemu performance regression CI. On KVM forum I presented https://www.youtube.com/watch?v=Cbm3o4ACE3Y&list=PLbzoR-pLrL6q4ZzA4VRpy42Ua4-D2xHUR&index=9 some details about my testi

Re: [RFC PATCH v3 17/36] pflash_cfi01/tdx: Introduce ram_mode of pflash for TDVF

2022-03-21 Thread Xiaoyao Li
On 3/18/2022 10:07 PM, Philippe Mathieu-Daudé wrote: Hi, On 17/3/22 14:58, Xiaoyao Li wrote: TDX VM needs to boot with Trust Domain Virtual Firmware (TDVF). Unlike that OVMF is mapped as rom device, TDVF needs to be mapped as private memory. This is because TDX architecture doesn't provide read

Re: [PATCH v4] tests: Do not treat the iotests as separate meson test target anymore

2022-03-21 Thread Hanna Reitz
On 18.03.22 18:36, Thomas Huth wrote: On 18/03/2022 18.04, Hanna Reitz wrote: On 10.03.22 08:50, Thomas Huth wrote: If there is a failing iotest, the output is currently not logged to the console anymore. To get this working again, we need to run the meson test runner with "--print-errorlogs" (

Re: [PATCH 0/3] qga: Implement guest-network-get-interfaces for Solaris

2022-03-21 Thread Michal Prívozník
On 3/20/22 22:38, Andrew Deason wrote: > This implements the guest agent guest-network-get-interfaces command on > Solaris. Solaris provides a getifaddrs() that's very similar to the Linux one, > so the implementation is mostly the same. > > Andrew Deason (3): > qga/commands-posix: Use getifaddr

Re: [PATCH 3/3] qga/commands-posix: Fix listing ifaces for Solaris

2022-03-21 Thread Michal Prívozník
On 3/20/22 22:38, Andrew Deason wrote: > The code for guest-network-get-interfaces needs a couple of small > adjustments for Solaris: > > - The results from SIOCGIFHWADDR are documented as being in ifr_addr, > not ifr_hwaddr (ifr_hwaddr doesn't exist on Solaris). > > - The implementation of gue

Re: [RFC PATCH-for-7.0 v4 0/2] cocoa: run qemu_init in the main thread

2022-03-21 Thread Paolo Bonzini
On 3/19/22 14:56, Philippe Mathieu-Daudé wrote:    1. Move setgid and setuid calls after [+NSApplication    sharedApplication] to let NSApplication initialize as the original    user. Another possibility is to move the code up to "[QemuApplication sharedApplication]" from main() to cocoa_displ

Re: [PATCH v4] tests: Do not treat the iotests as separate meson test target anymore

2022-03-21 Thread Thomas Huth
On 21/03/2022 10.06, Hanna Reitz wrote: On 18.03.22 18:36, Thomas Huth wrote: On 18/03/2022 18.04, Hanna Reitz wrote: On 10.03.22 08:50, Thomas Huth wrote: If there is a failing iotest, the output is currently not logged to the console anymore. To get this working again, we need to run the mes

Re: [PATCH v3 00/11] s390x/tcg: Implement Vector-Enhancements Facility 2

2022-03-21 Thread David Hildenbrand
On 20.03.22 02:14, David Miller wrote: > Is this waiting on me for anything? > I wanted to ensure this is wrapped up before starting a new project. This fell through the cracks because I wasn't cc-ed by Richard on this series. I'll try reviewing this week. -- Thanks, David / dhildenb

Re: [PATCH v3 01/11] tcg: Implement tcg_gen_{h,w}swap_{i32,i64}

2022-03-21 Thread David Hildenbrand
On 08.03.22 02:53, Richard Henderson wrote: > Swap half-words (16-bit) and words (32-bit) within a larger value. > Mirrors functions of the same names within include/qemu/bitops.h. > > Signed-off-by: Richard Henderson > --- > include/tcg/tcg-op.h | 6 ++ > tcg/tcg-op.c | 30

Re: [PATCH v3 02/11] target/s390x: vxeh2: vector convert short/32b

2022-03-21 Thread David Hildenbrand
On 08.03.22 02:53, Richard Henderson wrote: > From: David Miller > > Signed-off-by: David Miller > Reviewed-by: Richard Henderson > Message-Id: <20220307020327.3003-2-dmiller...@gmail.com> > Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [RFC PATCH-for-7.0 v4 0/2] cocoa: run qemu_init in the main thread

2022-03-21 Thread Akihiko Odaki
On 2022/03/21 18:14, Paolo Bonzini wrote: On 3/19/22 14:56, Philippe Mathieu-Daudé wrote:    1. Move setgid and setuid calls after [+NSApplication    sharedApplication] to let NSApplication initialize as the original    user. Another possibility is to move the code up to "[QemuApplication sha

Re: Account creation on QEMU Wiki

2022-03-21 Thread Daniel P . Berrangé
On Sun, Mar 20, 2022 at 06:04:17PM -0400, Ben Westover wrote: > Hello, > > I'd like to create an account on the QEMU Wiki, but as it says on the main > page, account creation is currently disabled to reduce spam. > It says to ask someone with an existing account to create one for me, but I > don't

Re: Proposal for a regular upstream performance testing

2022-03-21 Thread Stefan Hajnoczi
On Mon, Mar 21, 2022 at 09:46:12AM +0100, Lukáš Doktor wrote: > Dear qemu developers, > > you might remember the "replied to" email from a bit over year ago to raise a > discussion about a qemu performance regression CI. On KVM forum I presented > https://www.youtube.com/watch?v=Cbm3o4ACE3Y&list

Re: [PATCH v2 2/3] docs: rSTify MailingLists wiki; move it to QEMU Git

2022-03-21 Thread Kashyap Chamarthy
On Tue, Mar 15, 2022 at 04:12:50PM +, Peter Maydell wrote: > On Tue, 15 Mar 2022 at 16:00, Kashyap Chamarthy wrote: > > > > On Tue, Mar 15, 2022 at 02:25:05PM +0100, Thomas Huth wrote: > > > On 14/03/2022 11.49, Kashyap Chamarthy wrote: > > > > [...] > > > > > At least the "users" mailing list

Re: Proposal for a regular upstream performance testing

2022-03-21 Thread Lukáš Doktor
Hello Stefan, Dne 21. 03. 22 v 10:42 Stefan Hajnoczi napsal(a): > On Mon, Mar 21, 2022 at 09:46:12AM +0100, Lukáš Doktor wrote: >> Dear qemu developers, >> >> you might remember the "replied to" email from a bit over year ago to raise >> a discussion about a qemu performance regression CI. On KVM

Re: [PATCH v3 03/11] target/s390x: vxeh2: vector string search

2022-03-21 Thread David Hildenbrand
On 08.03.22 02:53, Richard Henderson wrote: > From: David Miller > > Signed-off-by: David Miller > Message-Id: <20220307020327.3003-3-dmiller...@gmail.com> > [rth: Rewrite helpers; fix validation of m6.] > Signed-off-by: Richard Henderson > --- > > The substring search was incorrect, in that i

Memory leak in via_isa_realize()

2022-03-21 Thread Thomas Huth
Hi! FYI, I'm seeing a memory leak in via_isa_realize() when building QEMU with sanitizers enabled or when running QEMU through valgrind: $ valgrind --leak-check=full --show-leak-kinds=definite ./qemu-system-mips64el --nographic -M fuloong2e ==210405== Memcheck, a memory error detector ==2104

Re: comparison of coroutine backends

2022-03-21 Thread Stefan Hajnoczi
On Fri, Mar 18, 2022 at 09:48:37AM +0100, Paolo Bonzini wrote: > Hi all, > > based on the previous discussions here is a comparison of the various > possibilities for implementing coroutine backends in QEMU and the > respective advantages and disadvantages. > > I'm adding a third possibility for

Re: [PATCH v1 0/1] hw/gpio Add ASPEED GPIO model for AST1030

2022-03-21 Thread Cédric Le Goater
Hello Jamin, On 3/21/22 10:14, Jamin Lin wrote: 1. Add GPIO read/write trace event. 2. Support GPIO index mode for write operation. It did not support GPIO index mode for read operation. 3. AST1030 integrates one set of Parallel GPIO Controller Is the AST1030 a new SoC you are developing ? We

Re: [PATCH RESEND 1/2] hw/vfio/pci-quirks: Resolve redundant property getters

2022-03-21 Thread Bernhard Beschow
Am 1. März 2022 22:52:19 UTC schrieb Bernhard Beschow : >The QOM API already provides getters for uint64 and uint32 values, so reuse >them. > >Signed-off-by: Bernhard Beschow >Reviewed-by: Philippe Mathieu-Daudé >--- > hw/vfio/pci-quirks.c | 34 +- > 1 file changed,

Re: [PATCH v2 2/3] docs: rSTify MailingLists wiki; move it to QEMU Git

2022-03-21 Thread Peter Maydell
On Mon, 21 Mar 2022 at 09:55, Kashyap Chamarthy wrote: > > On Tue, Mar 15, 2022 at 04:12:50PM +, Peter Maydell wrote: > > On Tue, 15 Mar 2022 at 16:00, Kashyap Chamarthy wrote: > > > > > > On Tue, Mar 15, 2022 at 02:25:05PM +0100, Thomas Huth wrote: > > > > On 14/03/2022 11.49, Kashyap Chamar

Re: Memory leak in via_isa_realize()

2022-03-21 Thread Peter Maydell
On Mon, 21 Mar 2022 at 10:31, Thomas Huth wrote: > FYI, I'm seeing a memory leak in via_isa_realize() when building > QEMU with sanitizers enabled or when running QEMU through valgrind: > Same problem happens with qemu-system-ppc64 and the pegasos2 machine. > > No clue how to properly fix this...

Re: [PATCH v3 04/11] target/s390x: vxeh2: Update for changes to vector shifts

2022-03-21 Thread David Hildenbrand
On 08.03.22 02:53, Richard Henderson wrote: > From: David Miller > > Prior to vector enhancements 2, the shift count was supposed to be equal > for each byte lest the result be unpredictable, which allowed us to assume > that the shift count was the same, and optimize accordingly. > > With vecto

Re: [PATCH v2 2/3] docs: rSTify MailingLists wiki; move it to QEMU Git

2022-03-21 Thread Kashyap Chamarthy
On Mon, Mar 21, 2022 at 11:01:28AM +, Peter Maydell wrote: > On Mon, 21 Mar 2022 at 09:55, Kashyap Chamarthy wrote: [...] > > > Yes, I think that about/ should have a document something like > > > "Contacting the project" or "Support", which could tell users about not > > > just > > > the u

Re: [PATCH v3 05/11] target/s390x: vxeh2: vector shift double by bit

2022-03-21 Thread David Hildenbrand
On 08.03.22 02:53, Richard Henderson wrote: > From: David Miller > > Signed-off-by: David Miller > Message-Id: <20220307020327.3003-4-dmiller...@gmail.com> > [rth: Split out of larger patch.] > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate_vx.c.inc | 47 ++

Re: [PATCH v3 11/11] target/s390x: Fix writeback to v1 in helper_vstl

2022-03-21 Thread David Hildenbrand
On 08.03.22 02:53, Richard Henderson wrote: > Copy-paste error from vector load length -- do not write > zeros back to v1 after storing from v1. Fixes: 0e0a5b49ad58 ("s390x/tcg: Implement VECTOR STORE WITH LENGTH") Reviewed-by: David Hildenbrand > > Signed-off-by: Richard Henderson > --- > ta

Re: [PATCH v3 09/11] target/s390x: add S390_FEAT_VECTOR_ENH2 to cpu max

2022-03-21 Thread David Hildenbrand
On 08.03.22 02:53, Richard Henderson wrote: > From: David Miller QEMU is in soft freeze now. We'll have to perform that change for the new 7.1 machine only, so we have to fixup the qemu model for the 7.0 machine. Subject should be "... to qemu CPU model" > > Signed-off-by: David Miller > Mess

Re: [PATCH qemu 00/13] Add tail agnostic behavior for rvv instructions

2022-03-21 Thread Weiwei Li
在 2022/3/21 下午3:50, eop Chen 写道: Hi WeiWei, Thanks for reviewing this PR. === Regarding to possible behaviors on agnostic elements to mask instructions, I want to ask for you and other's opinion on this proposed PR bef

Re: [PATCH v3 06/11] target/s390x: vxeh2: vector {load, store} elements reversed

2022-03-21 Thread David Hildenbrand
On 08.03.22 02:53, Richard Henderson wrote: > From: David Miller > > Signed-off-by: David Miller > Message-Id: <20220307020327.3003-5-dmiller...@gmail.com> > [rth: Use new hswap and wswap tcg expanders.] > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate_vx.c.inc | 84 ++

Re: [PATCH v3 07/11] target/s390x: vxeh2: vector {load, store} byte reversed elements

2022-03-21 Thread David Hildenbrand
On 08.03.22 02:53, Richard Henderson wrote: > From: David Miller > > Signed-off-by: David Miller > Message-Id: <20220307020327.3003-6-dmiller...@gmail.com> > [rth: Split out elements (plural) from element (scalar) > Use tcg little-endian memory ops, plus hswap and wswap.] > Signed-off-by:

Re: [PATCH v2 2/3] qapi: nbd-export: allow select bitmaps by node/name pair

2022-03-21 Thread Vladimir Sementsov-Ogievskiy
17.03.2022 00:28, Eric Blake wrote: On Tue, Mar 15, 2022 at 12:32:25AM +0300, Vladimir Sementsov-Ogievskiy wrote: From: Vladimir Sementsov-Ogievskiy Hi all! Current logic of relying on search through backing chain is not safe neither convenient. Sometimes it leads to necessity of extra bitmap

Re: [PATCH v5 1/8] migration: Export ram_transferred_ram()

2022-03-21 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > 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 2c6dc3675d..2e

Re: Memory leak in via_isa_realize()

2022-03-21 Thread BALATON Zoltan
On Mon, 21 Mar 2022, Peter Maydell wrote: On Mon, 21 Mar 2022 at 10:31, Thomas Huth wrote: FYI, I'm seeing a memory leak in via_isa_realize() when building QEMU with sanitizers enabled or when running QEMU through valgrind: Same problem happens with qemu-system-ppc64 and the pegasos2 machine.

Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept

2022-03-21 Thread Vladimir Sementsov-Ogievskiy
17.03.2022 00:55, Emanuele Giuseppe Esposito wrote: Am 09/03/2022 um 14:26 schrieb Emanuele Giuseppe Esposito: Next, I have a problem in mind, that in past lead to a lot of iotest 30 failures. Next there were different fixes and improvements, but the core problem (as far as I understand) is st

Re: [PATCH v3 08/11] target/s390x: vxeh2: vector {load, store} byte reversed element

2022-03-21 Thread David Hildenbrand
On 08.03.22 02:53, Richard Henderson wrote: > From: David Miller > > This includes VLEBR* and VSTEBR* (single element); > VLBRREP (load single element and replicate); and > VLLEBRZ (load single element and zero). "load byte reversed element and ..." > > Signed-off-by: David Miller > Message-I

Re: [PATCH v5 14/15] docs: Add documentation for SR-IOV and Virtualization Enhancements

2022-03-21 Thread Lukasz Maniak
On Tue, Mar 01, 2022 at 01:23:18PM +0100, Klaus Jensen wrote: > On Feb 17 18:45, Lukasz Maniak wrote: > > Signed-off-by: Lukasz Maniak > > Please add a short commit description as well. Otherwise, Klaus, Sorry I forgot to add the description in v6 aka v7, been really busy recently. I am going t

Re: Memory leak in via_isa_realize()

2022-03-21 Thread Peter Maydell
On Mon, 21 Mar 2022 at 12:11, BALATON Zoltan wrote: > > On Mon, 21 Mar 2022, Peter Maydell wrote: > > On Mon, 21 Mar 2022 at 10:31, Thomas Huth wrote: > >> FYI, I'm seeing a memory leak in via_isa_realize() when building > >> QEMU with sanitizers enabled or when running QEMU through valgrind: > >

Re: Memory leak in via_isa_realize()

2022-03-21 Thread Philippe Mathieu-Daudé
Cc'ing Bernhard who did a similar cleanup recently. On 21/3/22 11:31, Thomas Huth wrote:  Hi! FYI, I'm seeing a memory leak in via_isa_realize() when building QEMU with sanitizers enabled or when running QEMU through valgrind: $ valgrind --leak-check=full --show-leak-kinds=definite ./qemu-s

Re: [PATCH RESEND 1/2] hw/vfio/pci-quirks: Resolve redundant property getters

2022-03-21 Thread Philippe Mathieu-Daudé
On 21/3/22 11:57, Bernhard Beschow wrote: Am 1. März 2022 22:52:19 UTC schrieb Bernhard Beschow : The QOM API already provides getters for uint64 and uint32 values, so reuse them. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé --- hw/vfio/pci-quirks.c | 34 +--

[PATCH] hw/pvrdma: Protect against buggy or malicious guest driver

2022-03-21 Thread Yuval Shaia
Guest driver might execute HW commands when shared buffers are not yet allocated. This might happen on purpose (malicious guest) or because some other guest/host address mapping. We need to protect againts such case. Reported-by: Mauro Matteo Cascella Signed-off-by: Yuval Shaia --- hw/rdma/vmw/

Re: [PATCH v4] tests: Do not treat the iotests as separate meson test target anymore

2022-03-21 Thread Hanna Reitz
On 21.03.22 10:17, Thomas Huth wrote: On 21/03/2022 10.06, Hanna Reitz wrote: On 18.03.22 18:36, Thomas Huth wrote: On 18/03/2022 18.04, Hanna Reitz wrote: On 10.03.22 08:50, Thomas Huth wrote: If there is a failing iotest, the output is currently not logged to the console anymore. To get thi

Re: [PATCH v4 00/18] iotests: add enhanced debugging info to qemu-img failures

2022-03-21 Thread Hanna Reitz
On 18.03.22 22:14, John Snow wrote: On Fri, Mar 18, 2022 at 9:36 AM Hanna Reitz wrote: On 18.03.22 00:49, John Snow wrote: Hiya! This series effectively replaces qemu_img_pipe_and_status() with a rewritten function named qemu_img() that raises an exception on non-zero return code by default.

Re: [libvirt RFC] virFile: new VIR_FILE_WRAPPER_BIG_PIPE to improve performance

2022-03-21 Thread Andrea Righi
On Fri, Mar 18, 2022 at 02:34:29PM +0100, Claudio Fontana wrote: ... > I have lots of questions here, and I tried to involve Jiri and Andrea Righi > here, who a long time ago proposed a POSIX_FADV_NOREUSE implementation. > > 1) What is the reason iohelper was introduced? > > 2) Was Jiri's commen

[PATCH v1 0/1] hw/gpio Add ASPEED GPIO model for AST1030

2022-03-21 Thread Jamin Lin
1. Add GPIO read/write trace event. 2. Support GPIO index mode for write operation. It did not support GPIO index mode for read operation. 3. AST1030 integrates one set of Parallel GPIO Controller with maximum 151 control pins, which are 21 groups (A~U, exclude pin: M6 M7 Q5 Q6 Q7 R0 R1 R4 R5 R6 R7

[PATCH v1 1/1] hw/gpio: Add ASPEED GPIO model for AST1030

2022-03-21 Thread Jamin Lin
1. Add GPIO read/write trace event. 2. Support GPIO index mode for write operation. It did not support GPIO index mode for read operation. 3. AST1030 integrates one set of Parallel GPIO Controller with maximum 151 control pins, which are 21 groups (A~U, exclude pin: M6 M7 Q5 Q6 Q7 R0 R1 R4 R5 R6 R7

[PATCH] hw/sd/sdhci: Block Size Register bits [14:12] is lost

2022-03-21 Thread Lu Gao
Block Size Register bits [14:12] is SDMA Buffer Boundary, it is missed in register write, but it is needed in SDMA transfer. e.g. it will be used in sdhci_sdma_transfer_multi_blocks to calculate boundary_ variables. Missing this field will cause wrong operation for different SDMA Buffer Boundary s

[PATCH v1 1/1] test/avocado/machine_aspeed.py: Add ast1030 test case

2022-03-21 Thread Jamin Lin
Add test case to test "ast1030-evb" machine with zephyr os Signed-off-by: Jamin Lin --- tests/avocado/machine_aspeed.py | 36 + 1 file changed, 36 insertions(+) create mode 100644 tests/avocado/machine_aspeed.py diff --git a/tests/avocado/machine_aspeed.py b/tes

Re: [PATCH qemu 00/13] Add tail agnostic behavior for rvv instructions

2022-03-21 Thread eop Chen
Hi WeiWei, Thanks for reviewing this PR. === Regarding to possible behaviors on agnostic elements to mask instructions, I want to ask for you and other's opinion on this proposed PR before sending the next version. I u

[PATCH v1 0/1] tests/avocado: Add ast1030 test case

2022-03-21 Thread Jamin Lin
1. Add tests/avocado/machines_aspeed.py to test ASPEED SOCs with avocado framework 2. Add test case to test "ast1030-evb" machine with zephyr os Jamin Lin (1): test/avocado/machine_aspeed.py: Add ast1030 test case tests/avocado/machine_aspeed.py | 36 + 1 file

Re: [PATCH v3 4/6] vduse-blk: implements vduse-blk export

2022-03-21 Thread Eric Blake
On Mon, Mar 21, 2022 at 03:14:37PM +0800, Xie Yongji wrote: > This implements a VDUSE block backends based on > the libvduse library. We can use it to export the BDSs > for both VM and container (host) usage. > > The new command-line syntax is: > > $ qemu-storage-daemon \ > --blockdev file,no

Re: [PATCH v2 2/3] qapi: nbd-export: allow select bitmaps by node/name pair

2022-03-21 Thread Eric Blake
On Mon, Mar 21, 2022 at 02:50:25PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > > +++ b/qapi/block-export.json > > > @@ -6,6 +6,7 @@ > > > ## > > > { 'include': 'sockets.json' } > > > +{ 'include': 'block-core.json' } > > > > Hmm. Does this extra inclusion negatively impact qemu-storage-dae

Re: [PATCH 01/15] iotests: replace calls to log(qemu_io(...)) with qemu_io_log()

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:41PM -0400, John Snow wrote: > This makes these callsites a little simpler, but the real motivation is > a forthcoming commit will change the return type of qemu_io(), so removing > users of the return value now is helpful. > > Signed-off-by: John Snow > --- Reviewe

[RFC PATCH] gitlab: disable accelerated zlib for s390x

2022-03-21 Thread Alex Bennée
Apparently this causes problems with migration. Signed-off-by: Alex Bennée Cc: Peter Maydell --- .gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml | 12 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml b/.gitlab-ci.d/custom-runners

Re: [PULL for-7.0 1/2] aio-posix: fix build failure io_uring 2.2

2022-03-21 Thread Stefan Hajnoczi
On Thu, Mar 17, 2022 at 05:14:20PM +, Daniel P. Berrangé wrote: > On Thu, Mar 17, 2022 at 04:57:42PM +, Stefan Hajnoczi wrote: > > From: Haiyue Wang > > > > The io_uring fixed "Don't truncate addr fields to 32-bit on 32-bit": > > https://git.kernel.dk/cgit/liburing/commit/?id=d84c29b19ed0

Re: [PATCH v4 06/18] iotests: add qemu_img_json()

2022-03-21 Thread Eric Blake
On Thu, Mar 17, 2022 at 07:49:25PM -0400, John Snow wrote: > qemu_img_json() is a new helper built on top of qemu_img() that tries to > pull a valid JSON document out of the stdout stream. > > In the event that the return code is negative (the program crashed), or > the code is greater than zero a

Re: [PATCH 02/15] iotests/163: Fix broken qemu-io invocation

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:42PM -0400, John Snow wrote: > The 'read' commands to qemu-io were malformed, and this invocation only > worked by coincidence because the error messages were identical. Oops. > > There's no point in checking the patterning of the reference image, so > just check the

Re: [RFC PATCH] gitlab: disable accelerated zlib for s390x

2022-03-21 Thread Peter Maydell
On Mon, 21 Mar 2022 at 13:39, Alex Bennée wrote: > > Apparently this causes problems with migration. More specifically: # There appears to be a bug in the s390 hardware-accelerated version # of zlib distributed with Ubuntu 20.04, which makes our test # /i386/migration/multifd/tcp/zlib hit an ass

Re: [PATCH 03/15] iotests: Don't check qemu_io() output for specific error strings

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:43PM -0400, John Snow wrote: > A forthcoming commit updates qemu_io() to raise an exception on non-zero > return by default, and changes its return type. > > In preparation, simplify some calls to qemu_io() that assert that > specific error message strings do not appe

Re: [PATCH v4 1/3] qmp: Support for querying stats

2022-03-21 Thread Markus Armbruster
First: sorry for my slow response. Mark Kanda writes: > Thank you Markus. > > On 3/11/2022 7:06 AM, Markus Armbruster wrote: >> Mark Kanda writes: >> >>> Introduce QMP support for querying stats. Provide a framework for adding new >>> stats and support for the following commands: >>> >>> - quer

Re: [PATCH v3 4/6] vduse-blk: implements vduse-blk export

2022-03-21 Thread Yongji Xie
On Mon, Mar 21, 2022 at 9:25 PM Eric Blake wrote: > > On Mon, Mar 21, 2022 at 03:14:37PM +0800, Xie Yongji wrote: > > This implements a VDUSE block backends based on > > the libvduse library. We can use it to export the BDSs > > for both VM and container (host) usage. > > > > The new command-line

[PATCH v3 4/5] cpu: Free cpu->cpu_ases in cpu_address_space_destroy()

2022-03-21 Thread Mark Kanda
Create cpu_address_space_destroy() to free a CPU's cpu_ases list. vCPU hotunplug related leak reported by Valgrind: ==132362== 216 bytes in 1 blocks are definitely lost in loss record 7,119 of 8,549 ==132362==at 0x4C3ADBB: calloc (vg_replace_malloc.c:1117) ==132362==by 0x69EE4CD: g_mallo

[PATCH v3 0/5] vCPU hotunplug related memory leaks

2022-03-21 Thread Mark Kanda
This series addresses a few vCPU hotunplug related leaks (found with Valgrind). v3: - patch 4: create cpu_address_space_destroy() to free cpu_ases (Phillipe) - patch 5: create _destroy_vcpu_thread() to free xsave_buf (Phillipe) v2: Create AccelOpsClass::destroy_vcpu_thread() for vcpu thread relat

[PATCH v3 5/5] i386/cpu: Free env->xsave_buf in KVM and HVF destory_vcpu_thread routines

2022-03-21 Thread Mark Kanda
Create KVM and HVF specific destory_vcpu_thread() routines to free env->xsave_buf. vCPU hotunplug related leak reported by Valgrind: ==132362== 4,096 bytes in 1 blocks are definitely lost in loss record 8,440 of 8,549 ==132362==at 0x4C3B15F: memalign (vg_replace_malloc.c:1265) ==132362==

[PATCH v3 2/5] softmmu/cpus: Free cpu->thread in generic_destroy_vcpu_thread()

2022-03-21 Thread Mark Kanda
Free cpu->thread in a new AccelOpsClass::destroy_vcpu_thread() handler generic_destroy_vcpu_thread(). vCPU hotunplug related leak reported by Valgrind: ==102631== 8 bytes in 1 blocks are definitely lost in loss record 1,037 of 8,555 ==102631==at 0x4C3ADBB: calloc (vg_replace_malloc.c:1117) ==

[PATCH v3 1/5] accel: Introduce AccelOpsClass::destroy_vcpu_thread()

2022-03-21 Thread Mark Kanda
Add destroy_vcpu_thread() to AccelOps as a method for vcpu thread cleanup. This will be used in subsequent patches. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Mark Kanda Reviewed-by: Philippe Mathieu-Daudé --- include/sysemu/accel-ops.h | 1 + softmmu/cpus.c | 3 +++ 2 fi

Re: [PATCH v4 10/18] iotests: add qemu_img_map() function

2022-03-21 Thread Eric Blake
On Thu, Mar 17, 2022 at 07:49:29PM -0400, John Snow wrote: > Add a qemu_img_map() function by analogy with qemu_img_measure(), > qemu_img_check(), and qemu_img_info() that all return JSON information. > > Replace calls to qemu_img_pipe('map', '--output=json', ...) with this > new function, which p

[PATCH v3 3/5] softmmu/cpus: Free cpu->halt_cond in generic_destroy_vcpu_thread()

2022-03-21 Thread Mark Kanda
vCPU hotunplug related leak reported by Valgrind: ==102631== 56 bytes in 1 blocks are definitely lost in loss record 5,089 of 8,555 ==102631==at 0x4C3ADBB: calloc (vg_replace_malloc.c:1117) ==102631==by 0x69EE4CD: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.5600.4) ==102631==by 0x924452

[PATCH v2] hw/i386/amd_iommu: Fix maybe-uninitialized error with GCC 12

2022-03-21 Thread Paolo Bonzini
Be more explicit that the loop must roll at least once. Avoids the following warning: FAILED: libqemu-x86_64-softmmu.fa.p/hw_i386_amd_iommu.c.o In function 'pte_get_page_mask', inlined from 'amdvi_page_walk' at hw/i386/amd_iommu.c:945:25, inlined from 'amdvi_do_translate' at hw/i3

Re: [PATCH v2] hw/i386/amd_iommu: Fix maybe-uninitialized error with GCC 12

2022-03-21 Thread Philippe Mathieu-Daudé
On 21/3/22 15:33, Paolo Bonzini wrote: Be more explicit that the loop must roll at least once. Avoids the following warning: FAILED: libqemu-x86_64-softmmu.fa.p/hw_i386_amd_iommu.c.o In function 'pte_get_page_mask', inlined from 'amdvi_page_walk' at hw/i386/amd_iommu.c:945:25,

Re: [PULL for-7.0 0/2] Block patches

2022-03-21 Thread Stefan Hajnoczi
On Thu, Mar 17, 2022 at 06:36:36PM +, Peter Maydell wrote: > On Thu, 17 Mar 2022 at 16:57, Stefan Hajnoczi wrote: > > > > The following changes since commit 1d60bb4b14601e38ed17384277aa4c30c57925d3: > > > > Merge tag 'pull-request-2022-03-15v2' of https://gitlab.com/thuth/qemu > > into stag

[PATCH-for-7.0] qemu/main-loop: Disable block backend global state assertion on Darwin

2022-03-21 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Since commit 0439c5a462 ("block/block-backend.c: assertions for block-backend") QEMU crashes on Darwin hosts, example on macOS: $ qemu-system-i386 Assertion failed: (qemu_in_main_thread()), function blk_all_next, file block-backend.c, line 552. Abort trap: 6

Re: [PATCH 04/15] iotests/040: Don't check image pattern on zero-length image

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:44PM -0400, John Snow wrote: > qemu-io fails on read/write with zero-length raw images, so skip these > when running the zero-length image tests. On my first read, I wondered what we accomplish by rejecting zero-length reads on a zero-length image, and whether enterin

Re: [PATCH v4 1/3] qmp: Support for querying stats

2022-03-21 Thread Paolo Bonzini
On 3/21/22 14:50, Markus Armbruster wrote: Mark Kanda writes: Thank you Markus. On 3/11/2022 7:06 AM, Markus Armbruster wrote: Are the stats bulky enough to justfify the extra complexity of filtering? If this was only for KVM, the complexity probably isn't worth it. However, the framework is

[PULL 1/4] block-qdict: Fix -Werror=maybe-uninitialized build failure

2022-03-21 Thread Markus Armbruster
From: Murilo Opsfelder Araujo Building QEMU on Fedora 37 (Rawhide Prerelease) ppc64le failed with the following error: $ ../configure --prefix=/usr/local/qemu-disabletcg --target-list=ppc-softmmu,ppc64-softmmu --disable-tcg --disable-linux-user ... $ make -j$(nproc) ... In f

[PULL 0/4] Miscellaneous patches patches for 2022-03-21

2022-03-21 Thread Markus Armbruster
If it's too late for trivial cleanup, I'll respin this with the last patch dropped. The following changes since commit 2058fdbe81e2985c226a026851dd26b146d3395c: Merge tag 'fixes-20220318-pull-request' of git://git.kraxel.org/qemu into staging (2022-03-19 11:28:54 +) are available in the G

[PULL 2/4] scripts/coccinelle: New use-g_new-etc.cocci

2022-03-21 Thread Markus Armbruster
This is the semantic patch from commit b45c03f585 "arm: Use g_new() & friends where that makes obvious sense". Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Message-Id: <20220315144156.1595462-2-arm...@redhat.com> -

[PULL 4/4] Use g_new() & friends where that makes obvious sense

2022-03-21 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

[PULL 3/4] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-21 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

Re: [PATCH 05/15] iotests: create generic qemu_tool() function

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:45PM -0400, John Snow wrote: > reimplement qemu_img() in terms of qemu_tool() in preparation for doing > the same with qemu_io(). > > Signed-off-by: John Snow > --- > tests/qemu-iotests/iotests.py | 37 +++ > 1 file changed, 24 insert

Re: [PATCH 1/1] MAINTAINERS: Update maintainers for Guest x86 HAXM CPUs

2022-03-21 Thread Markus Armbruster
Perhaps this can go via qemu-trivial (cc'ed). "Wang, Wenchao" writes: > diff --git a/MAINTAINERS b/MAINTAINERS > index f2e9ce1da2..36f877cf74 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -492,7 +492,6 @@ Guest CPU Cores (HAXM) > - > X86 HAXM CPUs > M: Wenchao Wang > -

Re: [PATCH v4 1/3] qmp: Support for querying stats

2022-03-21 Thread Mark Kanda
On 3/21/2022 9:55 AM, Paolo Bonzini wrote: On 3/21/22 14:50, Markus Armbruster wrote: Mark Kanda writes: Thank you Markus. On 3/11/2022 7:06 AM, Markus Armbruster wrote: Are the stats bulky enough to justfify the extra complexity of filtering? If this was only for KVM, the complexity probab

Re: [PATCH v21 0/9] support dirty restraint on vCPU

2022-03-21 Thread Hyman Huang
Ping Hi! I think this patchset is meaningful to merge, not just for it provides interfaces for limiting dirty page rate, but also it builds foundation for the dirtylimit capability of live migration. Which is implemented in the following repo: https://github.com/newfriday/qemu/tree/migration_dirt

Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept

2022-03-21 Thread Vladimir Sementsov-Ogievskiy
09.03.2022 16:26, Emanuele Giuseppe Esposito wrote: Am 02/03/2022 um 12:07 schrieb Vladimir Sementsov-Ogievskiy: 01.03.2022 17:21, Emanuele Giuseppe Esposito wrote: This serie tries to provide a proof of concept and a clear explanation on why we need to use drains (and more precisely subtree_

  1   2   3   >