[PATCH] ppc/e500: Free irqs array to avoid memleak

2020-12-04 Thread Gan Qixin
When running qom-test, a memory leak occurred in the ppce500_init function, this patch free irqs array to fix it. ASAN shows memory leak stack: Direct leak of 40 byte(s) in 1 object(s) allocated from: #0 0xfffc5ceee1f0 in __interceptor_calloc (/lib64/libasan.so.5+0xee1f0) #1 0xfffc5c80680

Re: [for-6.0 v5 00/13] Generalize memory encryption models

2020-12-04 Thread Christian Borntraeger
On 04.12.20 06:44, David Gibson wrote: > A number of hardware platforms are implementing mechanisms whereby the > hypervisor does not have unfettered access to guest memory, in order > to mitigate the security impact of a compromised hypervisor. > > AMD's SEV implements this with in-cpu memory

Re: [for-6.0 v5 12/13] securable guest memory: Alter virtio default properties for protected guests

2020-12-04 Thread Christian Borntraeger
On 04.12.20 06:44, David Gibson wrote: > The default behaviour for virtio devices is not to use the platforms normal > DMA paths, but instead to use the fact that it's running in a hypervisor > to directly access guest memory. That doesn't work if the guest's memory > is protected from hypervis

[PATCH 0/3] Fix some memleaks caused by timer_new_ns

2020-12-04 Thread Gan Qixin
Hi all, When running device-introspect-test, I found some memory leaks caused by timer_new_ns in the init function, so I free it in the finalize function. Gan Qixin (3): pl031: Use timer_free() in the finalize function to avoid memleaks misc/mos6522: Use timer_free() in the finalize function

[PATCH 2/3] misc/mos6522: Use timer_free() in the finalize function to avoid memleak

2020-12-04 Thread Gan Qixin
When running device-introspect-test, a memory leak occurred in the mos6522_init function, this patch use timer_free() in the finalize function to fix it. ASAN shows memory leak stack: Direct leak of 96 byte(s) in 2 object(s) allocated from: #0 0xfffd5fe9e1f0 in __interceptor_calloc (/lib64/li

[PATCH 1/3] pl031: Use timer_free() in the finalize function to avoid memleaks

2020-12-04 Thread Gan Qixin
When running device-introspect-test, a memory leak occurred in the pl031_init function, this patch use timer_free() in the finalize function to fix it. ASAN shows memory leak stack: Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0xab97e1f0 in __interceptor_calloc (/lib64/liba

Re: [for-6.0 v5 12/13] securable guest memory: Alter virtio default properties for protected guests

2020-12-04 Thread Cornelia Huck
On Fri, 4 Dec 2020 09:10:36 +0100 Christian Borntraeger wrote: > On 04.12.20 06:44, David Gibson wrote: > > The default behaviour for virtio devices is not to use the platforms normal > > DMA paths, but instead to use the fact that it's running in a hypervisor > > to directly access guest memory.

[PATCH 3/3] s390x/cpu: Use timer_free() in the finalize function to avoid memleaks

2020-12-04 Thread Gan Qixin
When running device-introspect-test, a memory leak occurred in the s390_cpu_initfn function, this patch use timer_free() in the finalize function to fix it. ASAN shows memory leak stack: Direct leak of 3552 byte(s) in 74 object(s) allocated from: #0 0xfffeb3d4e1f0 in __interceptor_calloc (/l

Re: [PATCH v5 0/2] MTE support for KVM guest

2020-12-04 Thread Haibo Xu
On Fri, 20 Nov 2020 at 17:51, Steven Price wrote: > > On 19/11/2020 19:11, Marc Zyngier wrote: > > On 2020-11-19 18:42, Andrew Jones wrote: > >> On Thu, Nov 19, 2020 at 03:45:40PM +, Peter Maydell wrote: > >>> On Thu, 19 Nov 2020 at 15:39, Steven Price wrote: > >>> > This series adds support

Re: [for-6.0 v5 12/13] securable guest memory: Alter virtio default properties for protected guests

2020-12-04 Thread Christian Borntraeger
On 04.12.20 09:17, Cornelia Huck wrote: > On Fri, 4 Dec 2020 09:10:36 +0100 > Christian Borntraeger wrote: > >> On 04.12.20 06:44, David Gibson wrote: >>> The default behaviour for virtio devices is not to use the platforms normal >>> DMA paths, but instead to use the fact that it's running in

Re: [PATCH 3/3] s390x/cpu: Use timer_free() in the finalize function to avoid memleaks

2020-12-04 Thread Cornelia Huck
On Fri, 4 Dec 2020 16:12:09 +0800 Gan Qixin wrote: > When running device-introspect-test, a memory leak occurred in the > s390_cpu_initfn > function, this patch use timer_free() in the finalize function to fix it. > > ASAN shows memory leak stack: > > Direct leak of 3552 byte(s) in 74 object(s

[PATCH] s390x: pv: Fence additional unavailable SCLP facilities for PV guests

2020-12-04 Thread Janosch Frank
There's no VSIE support for a protected guest, so let's better not advertise it and its support facilities. Signed-off-by: Janosch Frank --- CI: https://gitlab.com/frankja/qemu/-/pipelines/224881703 --- target/s390x/cpu_features.c | 38 - target/s390x/cpu_mode

Re: [PATCH for-6.0 v2 2/3] spapr/xive: Fix size of END table and number of claimed IPIs

2020-12-04 Thread Cédric Le Goater
>> I don't think we need much more than patch 1 which clarifies the >> nature of the values being manipulated, quantities vs. numbering. >> >> The last 2 patches are adding complexity to try to optimize the >> XIVE VP space in a case scenario which is not very common (vSMT). >> May be it's not w

Re: [PATCH for-6.0 v2 2/3] spapr/xive: Fix size of END table and number of claimed IPIs

2020-12-04 Thread Greg Kurz
On Fri, 4 Dec 2020 09:46:31 +0100 Cédric Le Goater wrote: > >> I don't think we need much more than patch 1 which clarifies the > >> nature of the values being manipulated, quantities vs. numbering. > >> > >> The last 2 patches are adding complexity to try to optimize the > >> XIVE VP space in

Re: [PATCH 3/3] s390x/cpu: Use timer_free() in the finalize function to avoid memleaks

2020-12-04 Thread David Hildenbrand
On 04.12.20 09:36, Cornelia Huck wrote: > On Fri, 4 Dec 2020 16:12:09 +0800 > Gan Qixin wrote: > >> When running device-introspect-test, a memory leak occurred in the >> s390_cpu_initfn >> function, this patch use timer_free() in the finalize function to fix it. >> >> ASAN shows memory leak stac

[PATCH v5 4/4] migration: implementation of background snapshot thread

2020-12-04 Thread Andrey Gruzdev via
Introducing implementation of 'background' snapshot thread which in overall follows the logic of precopy migration while internally utilizes completely different mechanism to 'freeze' vmstate at the start of snapshot creation. This mechanism is based on userfault_fd with wr-protection support and

[PATCH v5 3/4] migration: support UFFD write fault processing in ram_save_iterate()

2020-12-04 Thread Andrey Gruzdev via
In this particular implementation the same single migration thread is responsible for both normal linear dirty page migration and procesing UFFD page fault events. Processing write faults includes reading UFFD file descriptor, finding respective RAM block and saving faulting page to the migration

[PATCH v5 1/4] migration: introduce 'background-snapshot' migration capability

2020-12-04 Thread Andrey Gruzdev via
Add new capability to 'qapi/migration.json' schema. Update migrate_caps_check() to validate enabled capability set against introduced one. Perform checks for required kernel features and compatibility with guest memory backends. Signed-off-by: Andrey Gruzdev --- migration/migration.c | 116 +

[PATCH v5 0/4] migration: UFFD write-tracking migration/snapshots

2020-12-04 Thread Andrey Gruzdev via
This patch series is a kind of 'rethinking' of Denis Plotnikov's ideas he's implemented in his series '[PATCH v0 0/4] migration: add background snapshot'. Currently the only way to make (external) live VM snapshot is using existing dirty page logging migration mechanism. The main problem is that i

[PATCH v5 2/4] migration: introduce UFFD-WP low-level interface helpers

2020-12-04 Thread Andrey Gruzdev via
Glue code to the userfaultfd kernel implementation. Querying feature support, createing file descriptor, feature control, memory region registration, IOCTLs on registered registered regions. Signed-off-by: Andrey Gruzdev --- include/exec/memory.h | 1 + include/qemu/userfaultfd.h | 35 ++

Re: [PATCH 0/6] qapi: Add support for aliases

2020-12-04 Thread Kevin Wolf
Am 12.11.2020 um 18:28 hat Kevin Wolf geschrieben: > This series introduces alias definitions for QAPI object types (structs > and unions). > > This allows using the same QAPI type and visitor even when the syntax > has some variations between different external interfaces such as QMP > and the co

Re: [for-6.0 v5 00/13] Generalize memory encryption models

2020-12-04 Thread Daniel P . Berrangé
On Fri, Dec 04, 2020 at 04:44:02PM +1100, David Gibson wrote: > A number of hardware platforms are implementing mechanisms whereby the > hypervisor does not have unfettered access to guest memory, in order > to mitigate the security impact of a compromised hypervisor. > > AMD's SEV implements this

Re: [PATCH] pcie_aer: Fix help message of pcie_aer_inject_error command

2020-12-04 Thread Dr. David Alan Gilbert
* Zenghui Yu (yuzeng...@huawei.com) wrote: > There is an interesting typo in the help message of pcie_aer_inject_error > command. Use 'tlp' instead of 'tlb' to match the PCIe AER term. > > Signed-off-by: Zenghui Yu Well spotted; thanks! Reviewed-by: Dr. David Alan Gilbert > --- > hmp-comman

Re: [RFC PATCH-for-5.2 1/2] net: Do not accept packets bigger then NET_BUFSIZE

2020-12-04 Thread P J P
+-- On Fri, 27 Nov 2020, Philippe Mathieu-Daudé wrote --+ | Do not allow qemu_send_packet*() and qemu_net_queue_send() | functions to accept packets bigger then NET_BUFSIZE. | | We have to put a limit somewhere. NET_BUFSIZE is defined as: | /* Maximum GSO packet size (64k) plus plenty of room fo

Re: [RFC PATCH v2 0/5] eBPF RSS support for virtio-net

2020-12-04 Thread Toke Høiland-Jørgensen
Yuri Benditovich writes: > On Wed, Dec 2, 2020 at 4:18 PM Toke Høiland-Jørgensen > wrote: > >> Jason Wang writes: >> >> > On 2020/11/19 下午7:13, Andrew Melnychenko wrote: >> >> This set of patches introduces the usage of eBPF for packet steering >> >> and RSS hash calculation: >> >> * RSS(Receiv

[PATCH] file-posix: check the use_lock

2020-12-04 Thread Li Feng
When setting the file.locking = false, we shouldn't set the lock. Signed-off-by: Li Feng --- block/file-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index d5fd1dbcd2..806764f7e3 100644 --- a/block/file-posix.c +++ b/block/fil

Re: [PATCH] file-posix: check the use_lock

2020-12-04 Thread Kevin Wolf
Am 04.12.2020 um 11:28 hat Li Feng geschrieben: > When setting the file.locking = false, we shouldn't set the lock. > > Signed-off-by: Li Feng This looks right to me, but can you add a test for this scenario to iotest 182? This would both demonstrate the effect of the bug (I think it would be th

Re: [PATCH] hw/block: m25p80: Fix fast read for SST flashes

2020-12-04 Thread Francisco Iglesias
Hello Bin, On [2020 Dec 04] Fri 15:52:12, Bin Meng wrote: > Hi Francisco, > > On Thu, Dec 3, 2020 at 4:38 PM Francisco Iglesias > wrote: > > > > Hi Bin and Alistair, > > > > On [2020 Dec 02] Wed 11:40:11, Alistair Francis wrote: > > > On Sun, Nov 29, 2020 at 6:55 PM Bin Meng wrote: > > > > > >

Re: [PATCH RFC] vfio: Move the saving of the config space to the right place in VFIO migration

2020-12-04 Thread Shenming Lu
On 2020/12/2 18:55, Dr. David Alan Gilbert wrote: > * Shenming Lu (lushenm...@huawei.com) wrote: >> Hi, >> >> After reading everyone's opinions, we have a rough idea for this issue. >> >> One key point is whether it is necessary to setup the config space before >> the device can accept further m

Re: [PATCH] hw/block: m25p80: Fix fast read for SST flashes

2020-12-04 Thread Bin Meng
Hi Francisco, On Fri, Dec 4, 2020 at 6:46 PM Francisco Iglesias wrote: > > Hello Bin, > > On [2020 Dec 04] Fri 15:52:12, Bin Meng wrote: > > Hi Francisco, > > > > On Thu, Dec 3, 2020 at 4:38 PM Francisco Iglesias > > wrote: > > > > > > Hi Bin and Alistair, > > > > > > On [2020 Dec 02] Wed 11:40:

Re: [PATCH] file-posix: check the use_lock

2020-12-04 Thread Li Feng
Hi Kevin, Thanks for your reply. In my scenario, my NFS server doesn't support the file lock. And when I set the file.locking = false, the Qemu still reports: qemu-system-x86_64: -drive file=/tmp/nfs/a,format=raw,cache=none,aio=native,if=none,id=drive-virtio-disk1,file.locking=on: Failed to lock b

Re: [PATCH] hw/block: m25p80: Fix fast read for SST flashes

2020-12-04 Thread Francisco Iglesias
Hello Bin, On [2020 Dec 04] Fri 18:52:50, Bin Meng wrote: > Hi Francisco, > > On Fri, Dec 4, 2020 at 6:46 PM Francisco Iglesias > wrote: > > > > Hello Bin, > > > > On [2020 Dec 04] Fri 15:52:12, Bin Meng wrote: > > > Hi Francisco, > > > > > > On Thu, Dec 3, 2020 at 4:38 PM Francisco Iglesias > >

Re: [PATCH 1/9] console: allow con==NULL in dpy_set_ui_info

2020-12-04 Thread Marc-André Lureau
Hi On Thu, Dec 3, 2020 at 3:20 PM Gerd Hoffmann wrote: > Use active_console in that case like we do in many other places. > > Signed-off-by: Gerd Hoffmann > Why not do it for the remaining functions? At least dpy_get_ui_info() for consistency. --- > ui/console.c | 4 +++- > 1 file changed, 3

Re: [PATCH 2/9] console: add check for ui_info pointer

2020-12-04 Thread Marc-André Lureau
On Thu, Dec 3, 2020 at 3:08 PM Gerd Hoffmann wrote: > Verify the hw_ops->ui_info function pointer is non-zero before > calling it. Can be triggered by qxl which changes hw_ops when > switching between qxl-native and vga-compat modes. > > Signed-off-by: Gerd Hoffmann > --- > ui/console.c | 4 ++

Re: [PATCH 3/9] vnc: use enum for features

2020-12-04 Thread Marc-André Lureau
On Thu, Dec 3, 2020 at 3:08 PM Gerd Hoffmann wrote: > Use an enum for the vnc feature bits. That way they are enumerated > automatically and we don't have to do that manually when adding or > removing features. > > Signed-off-by: Gerd Hoffmann > Reviewed-by: Marc-André Lureau --- > ui/vnc.h

Re: [PATCH 4/9] vnc: drop unused copyrect feature

2020-12-04 Thread Marc-André Lureau
On Thu, Dec 3, 2020 at 3:17 PM Gerd Hoffmann wrote: > vnc stopped using the copyrect pseudo encoding in 2017, in commit > 50628d3479e4 ("cirrus/vnc: zap bitblit support from console code.") > So we can drop the now unused copyrect feature bit. > > Signed-off-by: Gerd Hoffmann > Reviewed-by: Mar

Re: [PATCH 5/9] vnc: add pseudo encodings

2020-12-04 Thread Marc-André Lureau
On Thu, Dec 3, 2020 at 3:15 PM Gerd Hoffmann wrote: > Add #defines for two new pseudo encodings: > * cursor with alpha channel. > * extended desktop resize. > > Signed-off-by: Gerd Hoffmann > It might be worth documenting somewhere where those values come from. My understanding is that the o

Re: [PATCH 6/9] vnc: add alpha cursor support

2020-12-04 Thread Marc-André Lureau
Hi On Thu, Dec 3, 2020 at 3:11 PM Gerd Hoffmann wrote: > There is a new vnc extension for cursors with an alpha channel. Use > it if supported by the vnc client, prefer it over the "rich cursor" > extension which supports only a bitmask for transparency. > > This is a visible improvement especi

Re: [PATCH 7/9] vnc: force initial resize message

2020-12-04 Thread Marc-André Lureau
Hi On Thu, Dec 3, 2020 at 3:12 PM Gerd Hoffmann wrote: > The vnc server should send desktop resize notifications unconditionally > on a new client connect, for feature negotiation reasons. Add a bool > flag to vnc_desktop_resize() to force sending the message even in case > there is no size cha

[PATCH v2] tests/acceptance: test hot(un)plug of ccw devices

2020-12-04 Thread Cornelia Huck
Hotplug a virtio-net-ccw device, and then hotunplug it again. Signed-off-by: Cornelia Huck --- v1->v2: - switch device id - clear out dmesg before looking for CRW messages --- tests/acceptance/machine_s390_ccw_virtio.py | 16 1 file changed, 16 insertions(+) diff --git a/test

Re: [PATCH 8/9] vnc: add support for extended desktop resize

2020-12-04 Thread Daniel P . Berrangé
On Thu, Dec 03, 2020 at 12:08:04PM +0100, Gerd Hoffmann wrote: > The extended desktop resize encoding adds support for (a) clients > sending resize requests to the server, and (b) multihead support. > > This patch implements (a). All resize requests are rejected by qemu. > Qemu can't resize the f

Re: [PATCH 9/9] qxl: add ui_info callback

2020-12-04 Thread Daniel P . Berrangé
On Thu, Dec 03, 2020 at 12:08:05PM +0100, Gerd Hoffmann wrote: > This makes qxl respond to user interface window resizes > when not using spice, so it works with gtk and vnc too. > > Signed-off-by: Gerd Hoffmann > --- > hw/display/qxl.c | 27 +++ > 1 file changed, 27 inse

Re: [PATCH 8/9] vnc: add support for extended desktop resize

2020-12-04 Thread Marc-André Lureau
Hi On Thu, Dec 3, 2020 at 3:13 PM Gerd Hoffmann wrote: > The extended desktop resize encoding adds support for (a) clients > sending resize requests to the server, and (b) multihead support. > > This patch implements (a). All resize requests are rejected by qemu. > Qemu can't resize the framebu

Re: [PATCH 8/9] vnc: add support for extended desktop resize

2020-12-04 Thread Daniel P . Berrangé
On Fri, Dec 04, 2020 at 07:37:50AM +0100, Gerd Hoffmann wrote: > Hi, > > > > +case VNC_ENCODING_DESKTOP_RESIZE_EXT: > > > +vs->features |= VNC_FEATURE_RESIZE_EXT_MASK; > > > > IIUC, we shouldn't set this flag unless all current displays adapters > > associated with the VNC s

Re: [RFC PATCH v2 0/5] eBPF RSS support for virtio-net

2020-12-04 Thread Yuri Benditovich
On Fri, Dec 4, 2020 at 12:09 PM Toke Høiland-Jørgensen wrote: > Yuri Benditovich writes: > > > On Wed, Dec 2, 2020 at 4:18 PM Toke Høiland-Jørgensen > > wrote: > > > >> Jason Wang writes: > >> > >> > On 2020/11/19 下午7:13, Andrew Melnychenko wrote: > >> >> This set of patches introduces the usa

Re: [PATCH 9/9] qxl: add ui_info callback

2020-12-04 Thread Marc-André Lureau
On Fri, Dec 4, 2020 at 4:21 PM Daniel P. Berrangé wrote: > On Thu, Dec 03, 2020 at 12:08:05PM +0100, Gerd Hoffmann wrote: > > This makes qxl respond to user interface window resizes > > when not using spice, so it works with gtk and vnc too. > > > > Signed-off-by: Gerd Hoffmann > > --- > > hw/d

Re: [PATCH 9/9] qxl: add ui_info callback

2020-12-04 Thread Daniel P . Berrangé
On Fri, Dec 04, 2020 at 04:45:41PM +0400, Marc-André Lureau wrote: > On Fri, Dec 4, 2020 at 4:21 PM Daniel P. Berrangé > wrote: > > > On Thu, Dec 03, 2020 at 12:08:05PM +0100, Gerd Hoffmann wrote: > > > This makes qxl respond to user interface window resizes > > > when not using spice, so it work

Re: [for-6.0 v5 01/13] qom: Allow optional sugar props

2020-12-04 Thread Cornelia Huck
On Fri, 4 Dec 2020 16:44:03 +1100 David Gibson wrote: > From: Greg Kurz > > Global properties have an @optional field, which allows to apply a given > property to a given type even if one of its subclasses doesn't support > it. This is especially used in the compat code when dealing with the >

Re: [for-6.0 v5 00/13] Generalize memory encryption models

2020-12-04 Thread Cornelia Huck
On Fri, 4 Dec 2020 09:06:50 +0100 Christian Borntraeger wrote: > On 04.12.20 06:44, David Gibson wrote: > > A number of hardware platforms are implementing mechanisms whereby the > > hypervisor does not have unfettered access to guest memory, in order > > to mitigate the security impact of a comp

Re: [for-6.0 v5 00/13] Generalize memory encryption models

2020-12-04 Thread Dr. David Alan Gilbert
* Cornelia Huck (coh...@redhat.com) wrote: > On Fri, 4 Dec 2020 09:06:50 +0100 > Christian Borntraeger wrote: > > > On 04.12.20 06:44, David Gibson wrote: > > > A number of hardware platforms are implementing mechanisms whereby the > > > hypervisor does not have unfettered access to guest memory,

Re: [for-6.0 v5 03/13] securable guest memory: Handle memory encryption via interface

2020-12-04 Thread Cornelia Huck
On Fri, 4 Dec 2020 16:44:05 +1100 David Gibson wrote: > At the moment AMD SEV sets a special function pointer, plus an opaque > handle in KVMState to let things know how to encrypt guest memory. > > Now that we have a QOM interface for handling things related to securable > guest memory, use a

Re: [for-6.0 v5 00/13] Generalize memory encryption models

2020-12-04 Thread Cornelia Huck
On Fri, 4 Dec 2020 13:07:27 + "Dr. David Alan Gilbert" wrote: > * Cornelia Huck (coh...@redhat.com) wrote: > > On Fri, 4 Dec 2020 09:06:50 +0100 > > Christian Borntraeger wrote: > > > > > On 04.12.20 06:44, David Gibson wrote: > > > > A number of hardware platforms are implementing mech

Re: [for-6.0 v5 00/13] Generalize memory encryption models

2020-12-04 Thread Daniel P . Berrangé
On Fri, Dec 04, 2020 at 01:07:27PM +, Dr. David Alan Gilbert wrote: > * Cornelia Huck (coh...@redhat.com) wrote: > > On Fri, 4 Dec 2020 09:06:50 +0100 > > Christian Borntraeger wrote: > > > > > On 04.12.20 06:44, David Gibson wrote: > > > > A number of hardware platforms are implementing mech

Re: [PATCH 1/3] tests/acceptance: test virtio-ccw revision handling

2020-12-04 Thread Wainer dos Santos Moschetta
Hi, On 11/30/20 3:02 PM, Cornelia Huck wrote: The max_revision prop of virtio-ccw devices can be used to force an older revision for compatibility handling. The easiest way to check this is to force a device to revision 0, which turns off virtio-1. Signed-off-by: Cornelia Huck --- tests/acce

Re: [PATCH 18/23] tests/docker: auto-generate centos7 with lcitool

2020-12-04 Thread Daniel P . Berrangé
On Wed, Dec 02, 2020 at 01:07:39PM +0100, Gerd Hoffmann wrote: > Hi, > > > +RUN echo 'skip_missing_names_on_install=0' >> /etc/yum.conf && \ > > +yum install -y epel-release && \ > > +yum install -y centos-release-xen-48 && \ > > +yum update -y && \ > > +yum install -y \ > > +

Re: [PATCH 2/3] tests/acceptance: verify s390x device detection

2020-12-04 Thread Wainer dos Santos Moschetta
On 11/30/20 3:02 PM, Cornelia Huck wrote: The kernel/initrd combination does not provide the virtio-net driver; therefore, simply check whether the presented device type is indeed virtio-net for the two virtio-net-{ccw,pci} devices. Signed-off-by: Cornelia Huck --- tests/acceptance/machine_

Re: [PATCH 09/13] u2f-passthru: put it into the 'usb' category

2020-12-04 Thread Philippe Mathieu-Daudé
On 11/17/20 2:37 PM, ganqixin wrote: >> -Original Message- >> From: Philippe Mathieu-Daudé [mailto:phi...@redhat.com] >> Sent: Monday, November 16, 2020 10:05 PM >> To: ganqixin ; qemu-devel@nongnu.org; >> qemu-triv...@nongnu.org; Marc-André Lureau >> ; th...@redhat.com >> Cc: Chenqun (kuhn

Re: [PATCH 3/3] tests/acceptance: test s390x zpci fid propagation

2020-12-04 Thread Wainer dos Santos Moschetta
On 11/30/20 3:02 PM, Cornelia Huck wrote: Verify that a fid specified on the command line shows up correctly as the function_id in the guest. Signed-off-by: Cornelia Huck --- tests/acceptance/machine_s390_ccw_virtio.py | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) R

Re: [for-6.0 v5 00/13] Generalize memory encryption models

2020-12-04 Thread Halil Pasic
On Fri, 4 Dec 2020 13:25:00 + Daniel P. Berrangé wrote: > On Fri, Dec 04, 2020 at 01:07:27PM +, Dr. David Alan Gilbert wrote: > > * Cornelia Huck (coh...@redhat.com) wrote: > > > On Fri, 4 Dec 2020 09:06:50 +0100 > > > Christian Borntraeger wrote: > > > > > > > On 04.12.20 06:44, David

Re: [RFC v7 00/22] i386 cleanup [hw/core/cpu.c common]

2020-12-04 Thread Claudio Fontana
On 11/30/20 3:35 AM, Claudio Fontana wrote: > Hi all, this is v7 of the i386 cleanup, This is fairly broken still and I am fixing it up, but a question arises while hunting bugs here. Silent bugs are introduced when trying to use code like #ifndef CONFIG_USER_ONLY in files that are built in "c

Re: [RFC v7 00/22] i386 cleanup [hw/core/cpu.c common]

2020-12-04 Thread Claudio Fontana
On 12/4/20 2:54 PM, Claudio Fontana wrote: > On 11/30/20 3:35 AM, Claudio Fontana wrote: >> Hi all, this is v7 of the i386 cleanup, > > This is fairly broken still and I am fixing it up, > > but a question arises while hunting bugs here. > > Silent bugs are introduced when trying to use code lik

Re: [RFC PATCH v2 0/5] eBPF RSS support for virtio-net

2020-12-04 Thread Toke Høiland-Jørgensen
Yuri Benditovich writes: > On Fri, Dec 4, 2020 at 12:09 PM Toke Høiland-Jørgensen > wrote: > >> Yuri Benditovich writes: >> >> > On Wed, Dec 2, 2020 at 4:18 PM Toke Høiland-Jørgensen >> > wrote: >> > >> >> Jason Wang writes: >> >> >> >> > On 2020/11/19 下午7:13, Andrew Melnychenko wrote: >> >>

Re: [RFC PATCH-for-5.2 1/2] net: Do not accept packets bigger then NET_BUFSIZE

2020-12-04 Thread Philippe Mathieu-Daudé
On 12/4/20 11:03 AM, P J P wrote: > +-- On Fri, 27 Nov 2020, Philippe Mathieu-Daudé wrote --+ > | Do not allow qemu_send_packet*() and qemu_net_queue_send() > | functions to accept packets bigger then NET_BUFSIZE. > | > | We have to put a limit somewhere. NET_BUFSIZE is defined as: > | /* Maxi

Re: Plans to bring QMP 'x-blockdev-reopen' out of experimental?

2020-12-04 Thread Alberto Garcia
On Wed 02 Dec 2020 06:51:21 PM CET, Kevin Wolf wrote: >> I had tried this already and it does work when inserting the filter (we >> know that 'hd0-file' is about to be detached from the parent so we can >> put it in the list) but I don't think it's so easy if we want to remove >> the filter, i.e. >

Re: [RFC PATCH 00/25] Introduce CXL 2.0 Emulation

2020-12-04 Thread Chris Browy
Hi Ben, Trying to bring up the environment using the latest developments as follows: 1. Linux kernel baseline version is cloned using git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git Using master branch. Merged the 9 CXL linux kernel patches manually and built ke

Re: [PATCH v2] tests/acceptance: test hot(un)plug of ccw devices

2020-12-04 Thread Wainer dos Santos Moschetta
Hi, On 12/4/20 9:14 AM, Cornelia Huck wrote: Hotplug a virtio-net-ccw device, and then hotunplug it again. Signed-off-by: Cornelia Huck --- v1->v2: - switch device id - clear out dmesg before looking for CRW messages --- tests/acceptance/machine_s390_ccw_virtio.py | 16 1

Re: [PATCH-for-5.2? 1/1] Acceptance tests: bump Fedora to 32

2020-12-04 Thread Philippe Mathieu-Daudé
On 12/3/20 6:02 PM, Daniel P. Berrangé wrote: > On Thu, Dec 03, 2020 at 11:50:33AM -0500, Cleber Rosa wrote: >> On Thu, Dec 03, 2020 at 10:37:01AM +0100, Philippe Mathieu-Daudé wrote: >>> On 12/2/20 10:57 PM, Cleber Rosa wrote: Currently in use Fedora 31 has been moved out of the standard down

Re: [PATCH v12 02/19] multi-process: add configure and usage information

2020-12-04 Thread Marc-André Lureau
Hi On Wed, Dec 2, 2020 at 12:23 AM Jagannathan Raman wrote: > From: Elena Ufimtseva > > Adds documentation explaining the command-line arguments needed > to use multi-process. Also adds a python script that illustrates the > usage. > > Signed-off-by: Elena Ufimtseva > Signed-off-by: Jagannatha

Re: [PATCH v2] tests/acceptance: test hot(un)plug of ccw devices

2020-12-04 Thread Cornelia Huck
On Fri, 4 Dec 2020 11:05:34 -0300 Wainer dos Santos Moschetta wrote: > Hi, > > On 12/4/20 9:14 AM, Cornelia Huck wrote: > > Hotplug a virtio-net-ccw device, and then hotunplug it again. > > > > Signed-off-by: Cornelia Huck > > --- > > > > v1->v2: > > - switch device id > > - clear out dmesg bef

Re: [PATCH v12 03/19] memory: alloc RAM from file at offset

2020-12-04 Thread Marc-André Lureau
On Wed, Dec 2, 2020 at 12:23 AM Jagannathan Raman wrote: > Allow RAM MemoryRegion to be created from an offset in a file, instead > of allocating at offset of 0 by default. This is needed to synchronize > RAM between QEMU & remote process. > > Signed-off-by: Jagannathan Raman > Signed-off-by: Jo

Re: [PATCH v12 03/19] memory: alloc RAM from file at offset

2020-12-04 Thread Marc-André Lureau
On Fri, Dec 4, 2020 at 6:13 PM Marc-André Lureau wrote: > > > On Wed, Dec 2, 2020 at 12:23 AM Jagannathan Raman > wrote: > >> Allow RAM MemoryRegion to be created from an offset in a file, instead >> of allocating at offset of 0 by default. This is needed to synchronize >> RAM between QEMU & rem

Re: [PATCH-for-5.2? 1/1] Acceptance tests: bump Fedora to 32

2020-12-04 Thread Daniel P . Berrangé
On Fri, Dec 04, 2020 at 03:08:52PM +0100, Philippe Mathieu-Daudé wrote: > On 12/3/20 6:02 PM, Daniel P. Berrangé wrote: > > On Thu, Dec 03, 2020 at 11:50:33AM -0500, Cleber Rosa wrote: > >> On Thu, Dec 03, 2020 at 10:37:01AM +0100, Philippe Mathieu-Daudé wrote: > >>> On 12/2/20 10:57 PM, Cleber Ros

Re: [RFC PATCH 00/25] Introduce CXL 2.0 Emulation

2020-12-04 Thread Daniel P . Berrangé
Just copying in the two primary QEMU maintainers for the PCI subsystem to bring it to their attention. On Tue, Nov 10, 2020 at 09:46:59PM -0800, Ben Widawsky wrote: > Introduce emulation of Compute Express Link 2.0, which was released > today at https://www.computeexpresslink.org/. > > I've pushe

Re: [PATCH v12 05/19] multi-process: setup PCI host bridge for remote device

2020-12-04 Thread Marc-André Lureau
On Wed, Dec 2, 2020 at 12:23 AM Jagannathan Raman wrote: > PCI host bridge is setup for the remote device process. It is > implemented using remote-pcihost object. It is an extension of the PCI > host bridge setup by QEMU. > Remote-pcihost configures a PCI bus which could be used by the remote >

Re: [PATCH v12 05/19] multi-process: setup PCI host bridge for remote device

2020-12-04 Thread Marc-André Lureau
On Wed, Dec 2, 2020 at 12:23 AM Jagannathan Raman wrote: > PCI host bridge is setup for the remote device process. It is > implemented using remote-pcihost object. It is an extension of the PCI > host bridge setup by QEMU. > Remote-pcihost configures a PCI bus which could be used by the remote >

Re: [PATCH v12 06/19] multi-process: setup a machine object for remote device process

2020-12-04 Thread Marc-André Lureau
On Wed, Dec 2, 2020 at 12:23 AM Jagannathan Raman wrote: > x-remote-machine object sets up various subsystems of the remote > device process. Instantiate PCI host bridge object and initialize RAM, IO & > PCI memory regions. > > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman >

Re: [PATCH v12 02/19] multi-process: add configure and usage information

2020-12-04 Thread Daniel P . Berrangé
On Tue, Dec 01, 2020 at 03:22:37PM -0500, Jagannathan Raman wrote: > From: Elena Ufimtseva > > Adds documentation explaining the command-line arguments needed > to use multi-process. Also adds a python script that illustrates the > usage. > > Signed-off-by: Elena Ufimtseva > Signed-off-by: Jaga

Re: [PATCH v11 05/19] multi-process: add qio channel function to transmit

2020-12-04 Thread Marc-André Lureau
On Thu, Oct 15, 2020 at 10:05 PM Jagannathan Raman wrote: > From: Elena Ufimtseva > > The entire array of the memory regions and file handlers. > Will be used in the next patch. > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > Reviewed-by

Re: [PATCH v12 07/19] multi-process: add qio channel function to transmit data and fds

2020-12-04 Thread Marc-André Lureau
On Wed, Dec 2, 2020 at 12:23 AM Jagannathan Raman wrote: > From: Elena Ufimtseva > > Adds QIO channel functions that transmits the input iovs as well as the > supplied fds. > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > Reviewed-by: Ste

Re: [RFC PATCH-for-5.2] gitlab-ci: Do not automatically run Avocado integration tests anymore

2020-12-04 Thread Wainer dos Santos Moschetta
On 11/27/20 3:29 PM, Thomas Huth wrote: On 27/11/2020 18.57, Philippe Mathieu-Daudé wrote: On 11/27/20 6:47 PM, Thomas Huth wrote: On 27/11/2020 18.41, Philippe Mathieu-Daudé wrote: We lately realized that the Avocado framework was not designed to be regularly run on CI environments. Therefo

Re: [for-6.0 v5 12/13] securable guest memory: Alter virtio default properties for protected guests

2020-12-04 Thread Halil Pasic
On Fri, 4 Dec 2020 09:29:59 +0100 Christian Borntraeger wrote: > > > On 04.12.20 09:17, Cornelia Huck wrote: > > On Fri, 4 Dec 2020 09:10:36 +0100 > > Christian Borntraeger wrote: > > > >> On 04.12.20 06:44, David Gibson wrote: > >>> The default behaviour for virtio devices is not to use the

Re: [PATCH v4 01/11] hvf: Add hypervisor entitlement to output binaries

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:47AM +0100, Alexander Graf wrote: > In macOS 11, QEMU only gets access to Hypervisor.framework if it has the > respective entitlement. Add an entitlement template and automatically self > sign and apply the entitlement in the build. > Reviewed-by: Roman Bolshakov Te

Re: [PATCH v4 02/11] hvf: x86: Remove unused definitions

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:48AM +0100, Alexander Graf wrote: > The hvf i386 has a few struct and cpp definitions that are never > used. Remove them. > Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Thanks, Roman

Re: [PATCH v4 03/11] hvf: Move common code out

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:49AM +0100, Alexander Graf wrote: > Until now, Hypervisor.framework has only been available on x86_64 systems. > With Apple Silicon shipping now, it extends its reach to aarch64. To > prepare for support for multiple architectures, let's move common code out > into its

Re: [PATCH v4 05/11] arm: Set PSCI to 0.2 for HVF

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:51AM +0100, Alexander Graf wrote: > In Hypervisor.framework, we just pass PSCI calls straight on to the QEMU > emulation > of it. That means, if TCG is compatible with PSCI 0.2, so are we. Let's > transpose > that fact in code too. > Reviewed-by: Roman Bolshakov

Re: [PATCH 2/4] block/io: bdrv_refresh_limits(): use ERRP_GUARD

2020-12-04 Thread Alberto Garcia
On Thu 03 Dec 2020 11:27:11 PM CET, Vladimir Sementsov-Ogievskiy wrote: > This simplifies following commit. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Berto

Re: [PATCH 3/4] block/io: bdrv_check_byte_request(): drop bdrv_is_inserted()

2020-12-04 Thread Alberto Garcia
On Thu 03 Dec 2020 11:27:12 PM CET, Vladimir Sementsov-Ogievskiy wrote: > Move bdrv_is_inserted() calls into callers. > > We are going to make bdrv_check_byte_request() a clean thing. > bdrv_is_inserted() is not about checking the request, it's about > checking the bs. So, it should be separate. >

Re: [PATCH v4 06/11] hvf: Simplify post reset/init/loadvm hooks

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:52AM +0100, Alexander Graf wrote: > The hooks we have that call us after reset, init and loadvm really all > just want to say "The reference of all register state is in the QEMU > vcpu struct, please push it". > > We already have a working pushing mechanism though cal

Re: [RFC v7 00/22] i386 cleanup [hw/core/cpu.c common]

2020-12-04 Thread Paolo Bonzini
Il ven 4 dic 2020, 14:54 Claudio Fontana ha scritto: > On 11/30/20 3:35 AM, Claudio Fontana wrote: > > Hi all, this is v7 of the i386 cleanup, > > This is fairly broken still and I am fixing it up, > > but a question arises while hunting bugs here. > > Silent bugs are introduced when trying to us

[PATCH 1/2] virtio-blk: Acquire context while switching them on dataplane start

2020-12-04 Thread Sergio Lopez
On dataplane start, acquire the new AIO context before calling 'blk_set_aio_context', releasing it immediately afterwards. This prevents reaching the AIO context attach/detach notifier functions without having acquired it first. It was also the only place where 'blk_set_aio_context' was called wit

Re: [PATCH 7/9] target/mips: Extract msa_translate_init() from mips_tcg_init()

2020-12-04 Thread Richard Henderson
On 12/2/20 12:44 PM, Philippe Mathieu-Daudé wrote: > Extract the logic initialization of the MSA registers from > the generic initialization. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/mips/translate.c | 35 --- > 1 file changed, 20 insertions(+), 15

[PATCH 2/2] nbd/server: Quiesce coroutines on context switch

2020-12-04 Thread Sergio Lopez
When switching between AIO contexts we need to me make sure that both recv_coroutine and send_coroutine are not scheduled to run. Otherwise, QEMU may crash while attaching the new context with an error like this one: aio_co_schedule: Co-routine was already scheduled in 'aio_co_schedule' To achiev

x86 TCG helpers clobbered registers

2020-12-04 Thread Stephane Duverger
Hello, While looking at tcg/i386/tcg-target.c.inc:tcg_out_qemu_st(), I discovered that the TCG generates a call to a store helper at the end of the TB which is executed on TLB miss and get back to the remaining translated ops. I tried to mimick this behavior around the fast path (right between tcg

Re: [PATCH 8/9] target/mips: Remove CPUMIPSState* argument from gen_msa*() methods

2020-12-04 Thread Richard Henderson
On 12/2/20 12:44 PM, Philippe Mathieu-Daudé wrote: > The gen_msa*() methods don't use the "CPUMIPSState *env" > argument. Remove it to simplify. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/mips/translate.c | 57 - > 1 file changed, 28 insertio

[PATCH v1 1/1] intc/ibex_plic: Clear interrupts that occur during claim process

2020-12-04 Thread Alistair Francis
Previously if an interrupt occured during the claim process (after the interrupt is claimed but before it's completed) it would never be cleared. This patch ensures that we also clear the hidden_pending bits as well. Signed-off-by: Alistair Francis --- hw/intc/ibex_plic.c | 13 ++--- 1 f

Re: [PATCH 1/2] virtio-blk: Acquire context while switching them on dataplane start

2020-12-04 Thread Eric Blake
On 12/4/20 10:53 AM, Sergio Lopez wrote: > On dataplane start, acquire the new AIO context before calling > 'blk_set_aio_context', releasing it immediately afterwards. This > prevents reaching the AIO context attach/detach notifier functions > without having acquired it first. > > It was also the

[PATCH] block/nvme: Do not allow image creation with NVMe block driver

2020-12-04 Thread Philippe Mathieu-Daudé
The NVMe driver does not support image creation. The full drive has to be passed to the guest. Before: $ qemu-img create -f raw nvme://:04:00.0/1 20G Formatting 'nvme://:04:00.0/1', fmt=raw size=21474836480 $ qemu-img info nvme://:04:00.0/1 image: nvme://:04:00.0/1 file

Re: [for-6.0 v5 12/13] securable guest memory: Alter virtio default properties for protected guests

2020-12-04 Thread Cornelia Huck
On Fri, 4 Dec 2020 16:44:14 +1100 David Gibson wrote: > The default behaviour for virtio devices is not to use the platforms normal > DMA paths, but instead to use the fact that it's running in a hypervisor > to directly access guest memory. That doesn't work if the guest's memory > is protecte

Re: [PATCH v4 09/11] arm/hvf: Add a WFI handler

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:55AM +0100, Alexander Graf wrote: > From: Peter Collingbourne > > Sleep on WFI until the VTIMER is due but allow ourselves to be woken > up on IPI. > > In this implementation IPI is blocked on the CPU thread at startup and > pselect() is used to atomically unblock t

Re: [PATCH 9/9] target/mips: Explode gen_msa_branch() as gen_msa_BxZ_V/BxZ()

2020-12-04 Thread Richard Henderson
On 12/2/20 12:44 PM, Philippe Mathieu-Daudé wrote: > +static bool gen_msa_BxZ(DisasContext *ctx, int df, int wt, int s16, bool > if_not) > +{ > +check_msa_access(ctx); > + > +if (ctx->hflags & MIPS_HFLAG_BMASK) { > +generate_exception_end(ctx, EXCP_RI); > +return true; > +

  1   2   >