Re: [Qemu-devel] [v22 1/2] virtio-crypto: Add virtio crypto device specification

2017-12-07 Thread Gonglei (Arei)
> > On 12/06/2017 08:37 AM, Longpeng(Mike) wrote: > > +\field{outcome_len} is the size of struct virtio_crypto_session_input or > > +ZERO for the session-destroy operation. > > This ain't correct. It should have been something like > virtio_crypto_destroy_session_input. > Right, will fix it. >

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-07 Thread Stefan Hajnoczi
On Thu, Dec 7, 2017 at 7:54 AM, Avi Cohen (A) wrote: > There is already a virtio mechanism in which 2 VMs assigned a virtio device > , are communicating via a veth pair in the host . > KVM just passes a pointer of the page of the writer VM to the reader VM - > resulting in excellent perform

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-07 Thread Jason Wang
On 2017年12月07日 16:04, Stefan Hajnoczi wrote: On Thu, Dec 7, 2017 at 7:54 AM, Avi Cohen (A) wrote: There is already a virtio mechanism in which 2 VMs assigned a virtio device , are communicating via a veth pair in the host . KVM just passes a pointer of the page of the writer VM to the rea

[Qemu-devel] [PATCH] qemu-img: Document --force-share / -U

2017-12-07 Thread Fam Zheng
Signed-off-by: Fam Zheng --- qemu-img.texi | 8 1 file changed, 8 insertions(+) diff --git a/qemu-img.texi b/qemu-img.texi index fdcf120f36..3aa63aad55 100644 --- a/qemu-img.texi +++ b/qemu-img.texi @@ -57,6 +57,14 @@ exclusive with the @var{-O} parameters. It is currently required to

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-07 Thread Wei Wang
On 12/07/2017 02:31 PM, Stefan Hajnoczi wrote: On Thu, Dec 7, 2017 at 3:57 AM, Wei Wang wrote: On 12/07/2017 12:27 AM, Stefan Hajnoczi wrote: On Wed, Dec 6, 2017 at 4:09 PM, Wang, Wei W wrote: On Wednesday, December 6, 2017 9:50 PM, Stefan Hajnoczi wrote: On Tue, Dec 05, 2017 at 11:33:09AM

Re: [Qemu-devel] [qemu-s390x] [RFC PATCH v2 0/3] tests for CCW IDA

2017-12-07 Thread Thomas Huth
On 07.12.2017 07:38, Thomas Huth wrote: > On 08.11.2017 17:54, Halil Pasic wrote: >> I've keept the title althogh the scope shifted a bit: it's >> more about introducing ccw-testdev than about IDA. The goal >> is to facilitate testing the virtual channel subsystem >> implementation, and the ccw int

Re: [Qemu-devel] [PATCH 1/4] spice: remove QXLWorker interface field

2017-12-07 Thread Frediano Ziglio
ping the series > > This fields points to an old interface that is no more > used in the current code. > > Signed-off-by: Frediano Ziglio > --- > hw/display/qxl.c | 1 - > include/ui/spice-display.h | 1 - > ui/spice-display.c | 2 -- > 3 files changed, 4 deletions(-) > > di

Re: [Qemu-devel] [PATCH for-2.12 0/4] qmp dirty bitmap API

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
07.12.2017 03:38, John Snow wrote: On 11/30/2017 07:10 AM, Vladimir Sementsov-Ogievskiy wrote: 18.11.2017 00:35, John Snow wrote: On 11/17/2017 03:22 AM, Vladimir Sementsov-Ogievskiy wrote: 17.11.2017 06:10, John Snow wrote: On 11/16/2017 03:17 AM, Vladimir Sementsov-Ogievskiy wrote: 16.11.

Re: [Qemu-devel] [virtio-dev] virtio - mem-page swap for inter vm comm.

2017-12-07 Thread Avi Cohen (A)
> On 2017年12月07日 16:04, Stefan Hajnoczi wrote: > > On Thu, Dec 7, 2017 at 7:54 AM, Avi Cohen (A) > wrote: > >> There is already a virtio mechanism in which 2 VMs assigned a virtio > >> device > , are communicating via a veth pair in the host . > >> KVM just passes a pointer of the page of the

[Qemu-devel] [RFC QEMU PATCH v4 02/10] xen-hvm: create the hotplug memory region on Xen

2017-12-07 Thread Haozhong Zhang
The guest physical address of vNVDIMM is allocated from the hotplug memory region, which is not created when QEMU is used as Xen device model. In order to use vNVDIMM for Xen HVM domains, this commit reuses the code for pc machine type to create the hotplug memory region for Xen HVM domains. Signe

[Qemu-devel] [RFC QEMU PATCH v4 01/10] xen-hvm: remove a trailing space

2017-12-07 Thread Haozhong Zhang
Signed-off-by: Haozhong Zhang --- Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: "Michael S. Tsirkin" --- hw/i386/xen/xen-hvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/

[Qemu-devel] [RFC QEMU PATCH v4 05/10] xen-hvm: initialize fw_cfg interface

2017-12-07 Thread Haozhong Zhang
Xen is going to reuse QEMU to build ACPI of some devices (e.g., NFIT and SSDT for NVDIMM) for HVM domains. The existing QEMU ACPI build code requires a fw_cfg interface which will also be used to pass QEMU built ACPI to Xen. Therefore, we need to initialize fw_cfg when any ACPI is going to be built

[Qemu-devel] [RFC QEMU PATCH v4 00/10] Implement vNVDIMM for Xen HVM guest

2017-12-07 Thread Haozhong Zhang
This is the QEMU part patches that works with the associated Xen patches to enable vNVDIMM support for Xen HVM domains. Xen relies on QEMU to build guest NFIT and NVDIMM namespace devices, and allocate guest address space for vNVDIMM devices. All patches can also be found at Xen: https://github

[Qemu-devel] [RFC QEMU PATCH v4 04/10] nvdimm: do not intiailize nvdimm->label_data if label size is zero

2017-12-07 Thread Haozhong Zhang
The memory region of vNVDIMM on Xen is a RAM memory region, so memory_region_get_ram_ptr() cannot be used in nvdimm_realize() to get a pointer to the label data area in that region. To be worse, it may abort QEMU. As Xen currently does not support labels (i.e. label size is 0) and every access in Q

[Qemu-devel] [RFC QEMU PATCH v4 03/10] hostmem-xen: add a host memory backend for Xen

2017-12-07 Thread Haozhong Zhang
vNVDIMM requires a host memory backend to allocate its backend resources to the guest. When QEMU is used as Xen device model, the backend resource allocation of vNVDIMM is managed out of QEMU. A new host memory backend 'memory-backend-xen' is introduced to represent the backend resource allocated b

[Qemu-devel] [RFC QEMU PATCH v4 06/10] hw/acpi-build, xen-hvm: introduce a Xen-specific ACPI builder

2017-12-07 Thread Haozhong Zhang
QEMU on KVM/TCG and Xen requires different sets of guest ACPI tables. When QEMU builds ACPI for Xen HVM domains, the new Xen-specific ACPI build function xen_acpi_build() is called instead of the existing path from acpi_build(). Signed-off-by: Haozhong Zhang --- Cc: Stefano Stabellini Cc: Anthon

qemu-devel@nongnu.org

2017-12-07 Thread Fernando Casas Schössow
Hi there, Last night while doing a backup of a guest using the live snapshot mechanism the qemu process for the guest seem to had crashed. The snapshot succeeded then the backup of the VM disk had place and also succeeded but the commit to the original disk after the backup seem to have faile

[Qemu-devel] [RFC QEMU PATCH v4 09/10] nvdimm acpi: add compatibility for 64-bit integer in ACPI 2.0 and later

2017-12-07 Thread Haozhong Zhang
When QEMU is used as Xen device model, the QEMU-built NVDIMM ACPI tables (NFIT and SSDT) may be passed to Xen and merged with Xen-built ACPI tables. However, different ACPI versions are used between QEMU (ACPI 1.0) and Xen (ACPI 2.0), and different integer widths are used between ACPI 1.0 (32 bits)

[Qemu-devel] [RFC QEMU PATCH v4 07/10] xen-hvm: add functions to copy data from/to HVM memory

2017-12-07 Thread Haozhong Zhang
Signed-off-by: Haozhong Zhang --- Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: "Michael S. Tsirkin" --- hw/i386/xen/xen-hvm.c | 55 +++ include/hw/xen/xen.h | 3 +++ stubs/xen-hvm.

[Qemu-devel] [RFC QEMU PATCH v4 10/10] xen-hvm: enable building NFIT and SSDT of vNVDIMM for HVM domains

2017-12-07 Thread Haozhong Zhang
When QEMU is used the device model of Xen HVM domain and vNVDIMM devices are present, enable building ACPI tables related to vNVDIMM. Signed-off-by: Haozhong Zhang --- Cc: Stefano Stabellini Cc: Anthony Perard Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habko

[Qemu-devel] [RFC QEMU PATCH v4 08/10] nvdimm acpi: add functions to access DSM memory on Xen

2017-12-07 Thread Haozhong Zhang
Xen hvmloader can load QEMU-built NVDIMM ACPI tables via the BIOSLinkerLoader interface, but it allocates memory in an area not covered by any memory regions in QEMU, i.e., the hvmloader memory cannot be accessed via the normal cpu_physical_memory_{read,write}(). If QEMU on Xen has to access the hv

Re: [Qemu-devel] [PATCH v4] vhost: Don't abort when vhost-user connection is lost during migration

2017-12-07 Thread Ying Fang
On 2017/12/7 0:34, Michael S. Tsirkin wrote: > On Wed, Dec 06, 2017 at 09:30:27PM +0800, Ying Fang wrote: >> >> On 2017/12/1 22:39, Michael S. Tsirkin wrote: >>> On Fri, Dec 01, 2017 at 01:58:32PM +0800, fangying wrote: QEMU will abort when vhost-user process is restarted during migration

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img: Document --force-share / -U

2017-12-07 Thread Kashyap Chamarthy
On Thu, Dec 07, 2017 at 04:44:53PM +0800, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > qemu-img.texi | 8 > 1 file changed, 8 insertions(+) > > diff --git a/qemu-img.texi b/qemu-img.texi > index fdcf120f36..3aa63aad55 100644 > --- a/qemu-img.texi > +++ b/qemu-img.texi > @@ -57,6

Re: [Qemu-devel] [PATCH v5 23/23] sev: add migration blocker

2017-12-07 Thread Dr. David Alan Gilbert
* Brijesh Singh (brijesh.si...@amd.com) wrote: > SEV guest migration is not yet implemented yet. > > Signed-off-by: Brijesh Singh > --- > accel/kvm/sev.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/accel/kvm/sev.c b/accel/kvm/sev.c > index 3edfb5b08416..10647645eacd

Re: [Qemu-devel] [Qemu-arm] [PATCH 4/7] target/arm: Split M profile MNegPri mmu index into user and priv

2017-12-07 Thread Peter Maydell
On 5 December 2017 at 21:23, Philippe Mathieu-Daudé wrote: > The patch is correct, but I don't like having magic values. Yeah, you're right this would be better. I've already put this patch into target-arm.next, so I'll just squash in this change: --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@

Re: [Qemu-devel] [PATCH v5 23/23] sev: add migration blocker

2017-12-07 Thread Peter Maydell
On 7 December 2017 at 11:03, Dr. David Alan Gilbert wrote: > * Brijesh Singh (brijesh.si...@amd.com) wrote: >> SEV guest migration is not yet implemented yet. Is there at least a plan for how migration of a guest with encrypted memory would be implemented? thanks -- PMM

Re: [Qemu-devel] [PATCH v5 23/23] sev: add migration blocker

2017-12-07 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On 7 December 2017 at 11:03, Dr. David Alan Gilbert > wrote: > > * Brijesh Singh (brijesh.si...@amd.com) wrote: > >> SEV guest migration is not yet implemented yet. > > Is there at least a plan for how migration of a guest with > encrypted memo

Re: [Qemu-devel] [qemu-s390x] [RFC PATCH v2 0/3] tests for CCW IDA

2017-12-07 Thread Cornelia Huck
On Thu, 7 Dec 2017 10:01:35 +0100 Thomas Huth wrote: > On 07.12.2017 07:38, Thomas Huth wrote: > > On 08.11.2017 17:54, Halil Pasic wrote: > >> I've keept the title althogh the scope shifted a bit: it's > >> more about introducing ccw-testdev than about IDA. The goal > >> is to facilitate testi

Re: [Qemu-devel] [PATCH 15/25] spapr: notify the CPU when the XIVE interrupt priority is more privileged

2017-12-07 Thread Cédric Le Goater
>> +/* Convert a priority number to an Interrupt Pending Buffer (IPB) >> + * register, which indicates a pending interrupt at the priority >> + * corresponding to the bit number >> + */ >> +static uint8_t priority_to_ipb(uint8_t priority) >> +{ >> +return priority > XIVE_PRIORITY_MAX ? >> +

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.12 0/4] qmp dirty bitmap API

2017-12-07 Thread Kashyap Chamarthy
On Tue, Nov 21, 2017 at 07:10:19PM -0500, John Snow wrote: > On 11/21/2017 12:23 PM, Kevin Wolf wrote: [...] # Snip lot of good discussion. > > On another note, I would double check before adding a new block job type > > that this is the right way to go. We have recently noticed that many, if > >

Re: [Qemu-devel] [RFC PATCH v2 1/3] s390x/ccs: add ccw-testdev emulated device

2017-12-07 Thread Cornelia Huck
On Thu, 7 Dec 2017 07:33:19 +0100 Thomas Huth wrote: > On 08.11.2017 17:54, Halil Pasic wrote: > > +static ccw_cb_t get_ccw_cb(CcwTestDevOpMode op_mode) > > +{ > > +switch (op_mode) { > > +case OP_MODE_FIB: > > +return ccw_testdev_ccw_cb_mode_fib; > > +case OP_MODE_NOP: > > +

Re: [Qemu-devel] [PATCH v18 05/10] xbitmap: add more operations

2017-12-07 Thread Wei Wang
On 12/03/2017 09:50 AM, Tetsuo Handa wrote: Matthew Wilcox wrote: On Fri, Dec 01, 2017 at 03:09:08PM +, Wang, Wei W wrote: On Friday, December 1, 2017 9:02 PM, Tetsuo Handa wrote: If start == end is legal, for (; start < end; start = (start | (IDA_BITMAP_BITS - 1)) + 1) { makes this

Re: [Qemu-devel] About the light VM solution!

2017-12-07 Thread Richard W.M. Jones
I did a bit of work on this back in early 2016 and wrote a paper which analyzes what Intel were doing with Clear Containers back then, and how it fitted with the more distribution-centric view of Fedora and Red Hat, ie that we ideally want a single qemu binary, a single kernel, a single SeaBIOS, et

[Qemu-devel] QEMU not honouring bootorder

2017-12-07 Thread Michal Privoznik
Dear list, I've encountered the following problem. I have two disks: /var/lib/libvirt/images/fedora.qcow2 (which contains OS) /dev/sde (iSCSI dummy disk just for testing) Now, when I configure QEMU to start with both of them, QEMU/Seabios tries to boot from /dev/sde which fails obviously. E

Re: [Qemu-devel] [PATCH v2 2/2] s390x: deprecate s390-squash-mcss machine prop

2017-12-07 Thread Cornelia Huck
On Wed, 6 Dec 2017 15:44:38 +0100 Halil Pasic wrote: > With the cssids unrestricted (commit "s390x/css: unrestrict cssids") the > s390-squash-mcss machine property should not be used. Actually Libvirt > never supported this, so the expectation is that removing it should be > pretty painless. B

Re: [Qemu-devel] [PATCH v2 0/2] unrestrict cssids related patches

2017-12-07 Thread Cornelia Huck
On Wed, 6 Dec 2017 15:44:36 +0100 Halil Pasic wrote: > See the commit messages and cover letters of the individual > patches for more details. > > v1 -> v2: > * Squashed advertising via property into #1 > * Fixed commit message for #1 > * Dropped machine name in the doc and changed > how th

Re: [Qemu-devel] [RFC PATCH v2 1/3] s390x/ccs: add ccw-testdev emulated device

2017-12-07 Thread Halil Pasic
On 12/07/2017 12:59 PM, Cornelia Huck wrote: > On Thu, 7 Dec 2017 07:33:19 +0100 > Thomas Huth wrote: > >> On 08.11.2017 17:54, Halil Pasic wrote: > >>> +static ccw_cb_t get_ccw_cb(CcwTestDevOpMode op_mode) >>> +{ >>> +switch (op_mode) { >>> +case OP_MODE_FIB: >>> +return ccw_t

Re: [Qemu-devel] [RFC PATCH v2 1/3] s390x/ccs: add ccw-testdev emulated device

2017-12-07 Thread Halil Pasic
On 11/08/2017 05:54 PM, Halil Pasic wrote: > +/* TODO This is the out-of-band variant. We may want to get rid of it */ > +static int set_mode_diag(const uint64_t *args) > +{ > +uint64_t subch_id = args[0]; > +uint64_t op_mode = args[1]; > +SubchDev *sch; > +CcwTestDevDevice *dev;

[Qemu-devel] [PATCH] linux-user: wrap fork() in a start/end exclusive section

2017-12-07 Thread Peter Maydell
When we do a fork() in usermode emulation, we need to be in a start/end exclusive section, so that we can ensure that no other thread is in an RCU section. Otherwise you can get this deadlock: - fork thread: has mmap_lock, waits for rcu_sync_lock (because rcu_init_lock() is registered as a pthre

Re: [Qemu-devel] [RFC PATCH v2 1/3] s390x/ccs: add ccw-testdev emulated device

2017-12-07 Thread Cornelia Huck
On Thu, 7 Dec 2017 13:38:22 +0100 Halil Pasic wrote: > On 12/07/2017 12:59 PM, Cornelia Huck wrote: > > On Thu, 7 Dec 2017 07:33:19 +0100 > > Thomas Huth wrote: > > > >> On 08.11.2017 17:54, Halil Pasic wrote: > > > >>> +static ccw_cb_t get_ccw_cb(CcwTestDevOpMode op_mode) > >>> +{ > >>>

Re: [Qemu-devel] [PATCH v2] linux-user: Use *at functions instead of caching interp_prefix contents

2017-12-07 Thread Peter Maydell
On 5 December 2017 at 04:48, Richard Henderson wrote: > From: Richard Henderson > > If the interp_prefix is a complete chroot, it may have a *lot* of files. > Setting up the cache for this is quite expensive. Instead, use the *at > versions of various syscalls to attempt the operation in the pre

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-07 Thread Stefan Hajnoczi
On Thu, Dec 7, 2017 at 9:02 AM, Wei Wang wrote: > On 12/07/2017 02:31 PM, Stefan Hajnoczi wrote: >> >> On Thu, Dec 7, 2017 at 3:57 AM, Wei Wang wrote: >>> >>> On 12/07/2017 12:27 AM, Stefan Hajnoczi wrote: On Wed, Dec 6, 2017 at 4:09 PM, Wang, Wei W wrote: > > On Wednesday

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-07 Thread Michael S. Tsirkin
On Thu, Dec 07, 2017 at 07:54:48AM +, Avi Cohen (A) wrote: > There is already a virtio mechanism in which 2 VMs assigned a virtio device > , are communicating via a veth pair in the host . > KVM just passes a pointer of the page of the writer VM to the reader VM - > resulting in excellen

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-07 Thread Michael S. Tsirkin
On Thu, Dec 07, 2017 at 01:08:04PM +, Stefan Hajnoczi wrote: > Instead of responding individually to these points, I hope this will > explain my perspective. Let me know if you do want individual > responses, I'm happy to talk more about the points above but I think > the biggest difference is

Re: [Qemu-devel] [PATCH v3 09/50] qapi: add #if/#endif helpers

2017-12-07 Thread Markus Armbruster
Marc-André Lureau writes: > Add helpers to wrap generated code with #if/#endif lines. > > Add a function decorator that will be used to wrap visitor methods. > The decorator will check if code was generated before adding #if/#endif > lines. Used in the following patches. > > Signed-off-by: Marc-A

Re: [Qemu-devel] [Qemu-arm] [PATCH 4/7] target/arm: Split M profile MNegPri mmu index into user and priv

2017-12-07 Thread Philippe Mathieu-Daudé
On 12/07/2017 08:07 AM, Peter Maydell wrote: > On 5 December 2017 at 21:23, Philippe Mathieu-Daudé wrote: >> The patch is correct, but I don't like having magic values. > > Yeah, you're right this would be better. I've already put this > patch into target-arm.next, so I'll just squash in this cha

Re: [Qemu-devel] [PATCH v2] linux-user: Use *at functions instead of caching interp_prefix contents

2017-12-07 Thread Richard Henderson
On 12/07/2017 05:05 AM, Peter Maydell wrote: > On 5 December 2017 at 04:48, Richard Henderson > wrote: >> From: Richard Henderson >> >> If the interp_prefix is a complete chroot, it may have a *lot* of files. >> Setting up the cache for this is quite expensive. Instead, use the *at >> versions o

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-07 Thread Stefan Hajnoczi
On Thu, Dec 07, 2017 at 04:31:27PM +0800, Jason Wang wrote: > > > On 2017年12月07日 16:04, Stefan Hajnoczi wrote: > > On Thu, Dec 7, 2017 at 7:54 AM, Avi Cohen (A) wrote: > > > There is already a virtio mechanism in which 2 VMs assigned a virtio > > > device , are communicating via a veth pair i

Re: [Qemu-devel] [Qemu-block] [PATCH] block: avoid recursive AioContext acquire in bdrv_inactivate_all()

2017-12-07 Thread Stefan Hajnoczi
On Wed, Dec 06, 2017 at 07:40:28PM +0100, Kevin Wolf wrote: > Am 06.12.2017 um 18:54 hat Stefan Hajnoczi geschrieben: > > From: Paolo Bonzini > > > > BDRV_POLL_WHILE() does not support recursive AioContext locking. It > > only releases the AioContext lock once regardless of how many times the >

Re: [Qemu-devel] [PATCH v3 10/50] qapi-introspect: modify to_qlit() to append ', ' on level > 0

2017-12-07 Thread Markus Armbruster
Marc-André Lureau writes: > The following patch is going to break list entries with #if/#endif, so > they should have the trailing ',' as suffix. > > Signed-off-by: Marc-André Lureau > --- > scripts/qapi-introspect.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/s

Re: [Qemu-devel] [PATCH v3 11/50] qapi-introspect: modify to_qlit() to generate #if code

2017-12-07 Thread Markus Armbruster
Marc-André Lureau writes: > The generator now accepts (obj, condition) tuples to wrap generated > QLit objects for 'obj' with #if/#endif conditions. > > Signed-off-by: Marc-André Lureau > --- > scripts/qapi-introspect.py | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/scripts/qa

Re: [Qemu-devel] [PATCH v2] linux-user: Use *at functions instead of caching interp_prefix contents

2017-12-07 Thread Peter Maydell
On 7 December 2017 at 14:43, Richard Henderson wrote: > On 12/07/2017 05:05 AM, Peter Maydell wrote: >> gcc doesn't like this pattern: >> >> /home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/syscall.c: In >> function ‘do_name_to_handle_at’: >> /home/petmay01/linaro/qemu-from-laptop/qemu/linux

[Qemu-devel] [PATCH/RFC v2] s390x: start a new memory region if the old one exceeds KVM_MEM_MAX_NR_PAGES

2017-12-07 Thread Christian Borntraeger
KVM does not allow memory regions > KVM_MEM_MAX_NR_PAGES, basically limiting the memory per slot to 8TB-4k. Lets start a new memory region if we cross that boundary. With that (and optimistic overcommitment in the kernel) I was able to start a 24TB guest on a 1TB system. Signed-off-by: Christian

Re: [Qemu-devel] [PATCH v3] rcu: reduce more than 7MB heap memory by malloc_trim()

2017-12-07 Thread Yang Zhong
On Wed, Dec 06, 2017 at 10:48:45AM +0100, Paolo Bonzini wrote: > On 06/12/2017 10:26, Yang Zhong wrote: > > Hello Paolo, > > > > The best option is only trim one time after guest kernel bootup or VM > > bootup, and as for > > hotplug/unhotplug operations during the VM running, the trim stil

[Qemu-devel] [PATCH v2 for-2.12 3/5] s390x/tcg: implement SET CLOCK PROGRAMMABLE FIELD

2017-12-07 Thread David Hildenbrand
Needed for machine check handling inside Linux (when restoring registers). Except for SIGP and machine checks, we don't make use of the register yet. Sufficient for now. Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 1 + target/s390x/insn-data.def

[Qemu-devel] [PATCH v2 for-2.12 1/5] s390x/kvm: factor out build_channel_report_mcic() into cpu.h

2017-12-07 Thread David Hildenbrand
We'll need it later on in two places. Refactor it to just indicate the validity bits. While at it, introduce a define for the used CR14 bit (we'll also need later on). Signed-off-by: David Hildenbrand --- target/s390x/cpu.h | 22 ++ target/s390x/kvm.c | 25 ++-

[Qemu-devel] [PATCH v2 for-2.12 0/5] s390x/tcg: CCW hotplug support

2017-12-07 Thread David Hildenbrand
Hotplugging a ccw device currently fails due to different reasons. 1. The stored machine check information is partially wrong. 2. The TOD programmable field cannot be restored. 3. STCRW cannot get executed. With these patches, I am able to sucessfully hotplug e.g. virtio-rng by issuing "device_ad

[Qemu-devel] [PATCH v2 for-2.12 5/5] s390x/tcg: wire up STORE CHANNEL REPORT WORD

2017-12-07 Thread David Hildenbrand
CRW machine check handling requires STCRW. So let's wire it up. Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 1 + target/s390x/misc_helper.c | 9 + target/s390x/translate.c | 8 4 files changed, 1

[Qemu-devel] [PATCH v2 for-2.12 2/5] s390x/tcg: fix and cleanup mcck injection

2017-12-07 Thread David Hildenbrand
The architecture mode indication wasn't stored. The split of certain 64bit fields was unnecessary. Also, the complete clock comparator, not just bit 0-55 (starting at byte 1) was stored. We now generate a proper MCIC via the same helper we use for KVM. There is be more to clean up, but we will ch

[Qemu-devel] [PATCH v2 for-2.12 4/5] s390x/tcg: indicate value of TODPR in STCKE

2017-12-07 Thread David Hildenbrand
We were not yet using the value of the TOD Programmable Register. Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- target/s390x/translate.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 48b031894a..8da8610839 1006

Re: [Qemu-devel] [PATCH v2] rcu: reduce more than 7MB heap memory by malloc_trim()

2017-12-07 Thread Marc-André Lureau
Hi On Thu, Nov 23, 2017 at 7:41 AM, Yang Zhong wrote: > Since there are some issues in memory alloc/free machenism > in glibc for little chunk memory, if Qemu frequently > alloc/free little chunk memory, the glibc doesn't alloc > little chunk memory from free list of glibc and still > allocate fr

Re: [Qemu-devel] [PATCH v3 12/50] qapi-introspect: add preprocessor conditions to generated QLit

2017-12-07 Thread Markus Armbruster
Marc-André Lureau writes: > Add 'ifcond' condition to top-level QLit objects. > > to_qlit() handles the (obj, ifcond) tuples in previous patch. > > Signed-off-by: Marc-André Lureau According to my testing, this patch adds blank lines between the elements of qmp_schema_qlit. I suspect this is b

Re: [Qemu-devel] [PATCH v18 05/10] xbitmap: add more operations

2017-12-07 Thread Michael S. Tsirkin
On Thu, Dec 07, 2017 at 08:01:24PM +0800, Wei Wang wrote: > On 12/03/2017 09:50 AM, Tetsuo Handa wrote: > > Matthew Wilcox wrote: > > > On Fri, Dec 01, 2017 at 03:09:08PM +, Wang, Wei W wrote: > > > > On Friday, December 1, 2017 9:02 PM, Tetsuo Handa wrote: > > > > > If start == end is legal, >

[Qemu-devel] [PATCH v2 1/6] nbd/server: add additional assert to nbd_export_put

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
This place is not obvious, nbd_export_close may theoretically reduce refcount to 0. It may happen if someone calls nbd_export_put on named export not through nbd_export_set_name when refcount is 1. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- n

[Qemu-devel] [PATCH v2 6/6] iotest 201: new test for qmp nbd-server-remove

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/201 | 130 + tests/qemu-iotests/201.out | 5 ++ tests/qemu-iotests/group | 1 + 3 files changed, 136 insertions(+) create mode 100644 tests/qemu-iotests/201 create mode 10064

[Qemu-devel] [PATCH v2 4/6] iotest 147: add cases to test new @name parameter of nbd-server-add

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/147 | 68 +- tests/qemu-iotests/147.out | 4 +-- 2 files changed, 57 insertions(+), 15 deletions(-) diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147 index 90f40ed245..d

[Qemu-devel] [PATCH v2 5/6] iotests: implement QemuIoInteractive class

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 38 ++ 1 file changed, 38 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 6f057904a9..a9f312db83 100644 --- a/tests/qemu-iotests/iote

[Qemu-devel] [PATCH v2 2/6] qapi: add name parameter to nbd-server-add

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
Allow user to specify name for new export, to not reuse internal node name and to not show it to clients. This also allows creating several exports per device. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block.json | 9 +++-- blockdev-nbd.c | 14 +- hmp.c |

Re: [Qemu-devel] Hotplug ram and vhost-user

2017-12-07 Thread Maxime Coquelin
Hi David, On 12/05/2017 06:41 PM, Dr. David Alan Gilbert wrote: Hi, Since I'm reworking the memory map update code I've been trying to test it with hot adding RAM; but even on upstream I'm finding that hot adding RAM causes the guest to stop passing packets with vhost-user-bridge; have eithe

[Qemu-devel] [PATCH v2 0/6] nbd export qmp interface

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
Here: 1. separate export name from device name 1.1 several exports per device possible 2. add nbd-server-remove v2: 01: add r-bs by Max and Eric, add comment to code (hope you don't mind) 03: address export by its name, not by device name make it possible to force-remove export, wh

[Qemu-devel] [PATCH v2 3/6] qapi: add nbd-server-remove

2017-12-07 Thread Vladimir Sementsov-Ogievskiy
Add command for export removing. It is needed for cases when we don't want to keep export after the operation on it was completed. The other example is temporary node, created with blockdev-add. If we want to delete it we should firstly remove corresponding NBD export. Signed-off-by: Vladimir Seme

Re: [Qemu-devel] Hotplug ram and vhost-user

2017-12-07 Thread Michael S. Tsirkin
On Thu, Dec 07, 2017 at 04:52:18PM +0100, Maxime Coquelin wrote: > Hi David, > > On 12/05/2017 06:41 PM, Dr. David Alan Gilbert wrote: > > Hi, > >Since I'm reworking the memory map update code I've been > > trying to test it with hot adding RAM; but even on upstream > > I'm finding that hot ad

Re: [Qemu-devel] [PATCH v3 15/50] qapi-types: refactor variants handling

2017-12-07 Thread Markus Armbruster
Marc-André Lureau writes: > Generate variants objects outside gen_object(). This will allow to > easily wrap gen_object() with ifcond_decorator in the following patch. > > Signed-off-by: Marc-André Lureau > --- > scripts/qapi-types.py | 37 +++-- > 1 file changed

[Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?

2017-12-07 Thread Peter Maydell
Hi; I'm currently writing '-cpu max' support for ARM. For that I'd like to be able to do the "probe host kernel for its supported feature set" in the CPU object's instance-init function, but I'd like to do it just once and cache the answer. Can I rely on something or other having the BQL or otherwi

Re: [Qemu-devel] [PATCH v3 17/50] qapi: do not define enumeration value explicitely

2017-12-07 Thread Markus Armbruster
Marc-André Lureau writes: > The C standard has the initial value at 0 and the subsequent values > incremented by 1. No need to set this explicitely. > > This will prevent from artificial "gaps" when compiling out some enum > values and having unnecessarily large MAX values & enums arrays. > > Sig

Re: [Qemu-devel] Hotplug ram and vhost-user

2017-12-07 Thread Dr. David Alan Gilbert
* Maxime Coquelin (maxime.coque...@redhat.com) wrote: > Hi David, > > On 12/05/2017 06:41 PM, Dr. David Alan Gilbert wrote: > > Hi, > >Since I'm reworking the memory map update code I've been > > trying to test it with hot adding RAM; but even on upstream > > I'm finding that hot adding RAM ca

Re: [Qemu-devel] [PATCH v2 0/2] unrestrict cssids related patches

2017-12-07 Thread Cornelia Huck
On Wed, 6 Dec 2017 15:44:36 +0100 Halil Pasic wrote: > See the commit messages and cover letters of the individual > patches for more details. > > v1 -> v2: > * Squashed advertising via property into #1 > * Fixed commit message for #1 > * Dropped machine name in the doc and changed > how th

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-07 Thread Stefan Hajnoczi
On Thu, Dec 7, 2017 at 2:02 PM, Michael S. Tsirkin wrote: > On Thu, Dec 07, 2017 at 01:08:04PM +, Stefan Hajnoczi wrote: >> Instead of responding individually to these points, I hope this will >> explain my perspective. Let me know if you do want individual >> responses, I'm happy to talk mor

Re: [Qemu-devel] [PATCH RFC 0/2] s390x: cut down on unattached devices

2017-12-07 Thread Cornelia Huck
On Tue, 5 Dec 2017 09:59:06 +0100 Bjoern Walk wrote: > Cornelia Huck [2017-11-28, 02:46PM +0100]: > > info qom-tree shows several devices under unattached that probably > > should go somewhere. > > > > The css bridge should attach to the machine, as it has a similar > > purpose as e.g. a pci ho

Re: [Qemu-devel] [RFC PATCH v2 1/3] s390x/ccs: add ccw-testdev emulated device

2017-12-07 Thread Halil Pasic
On 12/07/2017 01:57 PM, Cornelia Huck wrote: > On Thu, 7 Dec 2017 13:38:22 +0100 > Halil Pasic wrote: > >> On 12/07/2017 12:59 PM, Cornelia Huck wrote: >>> On Thu, 7 Dec 2017 07:33:19 +0100 >>> Thomas Huth wrote: >>> On 08.11.2017 17:54, Halil Pasic wrote: >>> > +static ccw_cb

Re: [Qemu-devel] Hotplug ram and vhost-user

2017-12-07 Thread Maxime Coquelin
On 12/07/2017 04:56 PM, Michael S. Tsirkin wrote: On Thu, Dec 07, 2017 at 04:52:18PM +0100, Maxime Coquelin wrote: Hi David, On 12/05/2017 06:41 PM, Dr. David Alan Gilbert wrote: Hi, Since I'm reworking the memory map update code I've been trying to test it with hot adding RAM; but even

Re: [Qemu-devel] [RFC PATCH v2 1/3] s390x/ccs: add ccw-testdev emulated device

2017-12-07 Thread Cornelia Huck
On Thu, 7 Dec 2017 17:35:26 +0100 Halil Pasic wrote: > On 12/07/2017 01:57 PM, Cornelia Huck wrote: > > On Thu, 7 Dec 2017 13:38:22 +0100 > > Halil Pasic wrote: > > > >> On 12/07/2017 12:59 PM, Cornelia Huck wrote: > >>> On Thu, 7 Dec 2017 07:33:19 +0100 > >>> Thomas Huth wrote: > >>>

Re: [Qemu-devel] Hotplug ram and vhost-user

2017-12-07 Thread Maxime Coquelin
On 12/07/2017 05:25 PM, Dr. David Alan Gilbert wrote: * Maxime Coquelin (maxime.coque...@redhat.com) wrote: Hi David, On 12/05/2017 06:41 PM, Dr. David Alan Gilbert wrote: Hi, Since I'm reworking the memory map update code I've been trying to test it with hot adding RAM; but even on upst

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-07 Thread Michael S. Tsirkin
On Thu, Dec 07, 2017 at 04:29:45PM +, Stefan Hajnoczi wrote: > On Thu, Dec 7, 2017 at 2:02 PM, Michael S. Tsirkin wrote: > > On Thu, Dec 07, 2017 at 01:08:04PM +, Stefan Hajnoczi wrote: > >> Instead of responding individually to these points, I hope this will > >> explain my perspective.

Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?

2017-12-07 Thread Igor Mammedov
On Thu, 7 Dec 2017 16:05:50 + Peter Maydell wrote: > Hi; I'm currently writing '-cpu max' support for ARM. For that I'd > like to be able to do the "probe host kernel for its supported feature > set" in the CPU object's instance-init function, but I'd like to do > it just once and cache the a

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img: Document --force-share / -U

2017-12-07 Thread Eric Blake
On 12/07/2017 04:58 AM, Kashyap Chamarthy wrote: > On Thu, Dec 07, 2017 at 04:44:53PM +0800, Fam Zheng wrote: >> Signed-off-by: Fam Zheng >> --- >> qemu-img.texi | 8 >> 1 file changed, 8 insertions(+) >> >> diff --git a/qemu-img.texi b/qemu-img.texi >> index fdcf120f36..3aa63aad55 10064

[Qemu-devel] [PATCH v2 for-2.12 00/10] s390x/tcg: facilitites and instructions

2017-12-07 Thread David Hildenbrand
Wire up some io instructions and implement new facilitites. Make sure to take care of MTTCG when it comes to atomic operations. As we are now able to install/boot a Fedora 26/27 as well as an upstream kernel compiled for z12, let's bump up the QEMU cpu model to a very stripped down version of a z1

[Qemu-devel] [PATCH v2 for-2.12 01/10] s390x/tcg: ASI/ASGI are atomic with interlocked-acccess facility 1

2017-12-07 Thread David Hildenbrand
The semantics of these operations changed. Let's implement them just like LOAD AND ADD, so they are atomic. This fixes random crashes when booting a Linux kernel compiled for z196+ with SMP + MTTCG. Signed-off-by: David Hildenbrand --- target/s390x/insn-data.def | 4 ++-- target/s390x/translat

[Qemu-devel] [PATCH v2 for-2.12 02/10] s390x/tcg: ALSI/ALSGI are atomic with interlocked-acccess facility 1

2017-12-07 Thread David Hildenbrand
We can simply reuse our ASI implementation. Only the way CC is calculated differs. Signed-off-by: David Hildenbrand --- target/s390x/insn-data.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index 57f2e5133f..166

[Qemu-devel] [PATCH v2 for-2.12 03/10] s390x/tcg: implement Interlocked-Access Facility 2

2017-12-07 Thread David Hildenbrand
With this facility, OI/OIY, NI/NIY and XI/XIY are atomic. All operate on one byte (MO_UB). Signed-off-by: David Hildenbrand --- target/s390x/cpu_models.c | 1 + target/s390x/insn-data.def | 12 ++-- target/s390x/translate.c | 33 + 3 files changed, 40

Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?

2017-12-07 Thread Peter Maydell
On 7 December 2017 at 16:48, Igor Mammedov wrote: > On Thu, 7 Dec 2017 16:05:50 + > Peter Maydell wrote: > >> Hi; I'm currently writing '-cpu max' support for ARM. For that I'd >> like to be able to do the "probe host kernel for its supported feature >> set" in the CPU object's instance-init

[Qemu-devel] [PATCH v2 for-2.12 04/10] s390x/tcg: wire up SET ADDRESS LIMIT

2017-12-07 Thread David Hildenbrand
Let's handle it just like KVM: Depending on the model, this instruction may not be provided. When this instruction is not provided, it is checked for operand exception and privileged-opera- tion exception, and then is suppressed. Signed-off-by: David Hildenbrand --- target/s390x/

[Qemu-devel] [PATCH v2 for-2.12 07/10] s390x/tcg: Implement SIGNAL ADAPTER instruction

2017-12-07 Thread David Hildenbrand
KVM suppresses SIGA, setting cc=3. Let's do the same for TCG, so we're at least equal. Signed-off-by: David Hildenbrand --- target/s390x/insn-data.def | 1 + target/s390x/translate.c | 8 2 files changed, 9 insertions(+) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-dat

[Qemu-devel] [PATCH v2 for-2.12 06/10] s390x/tcg: Implement STORE CHANNEL PATH STATUS

2017-12-07 Thread David Hildenbrand
Just like KVM does, we should suppress this instruction: When this instruction is not provided, it is checked for privileged operation exception and the instruction is suppressed by the machine Signed-off-by: David Hildenbrand --- target/s390x/insn-data.def | 1 + target/s390x/transl

[Qemu-devel] [PATCH v2 for-2.12 05/10] s390x/tcg: wire up SET CHANNEL MONITOR

2017-12-07 Thread David Hildenbrand
Let's just wire it up like KVM. Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 1 + target/s390x/misc_helper.c | 9 + target/s390x/translate.c | 7 +++ 4 files changed, 18 insertions(+) diff --git a/target/s390x/helper.h b/targe

Re: [Qemu-devel] Hotplug ram and vhost-user

2017-12-07 Thread Michael S. Tsirkin
On Thu, Dec 07, 2017 at 05:35:13PM +0100, Maxime Coquelin wrote: > > > On 12/07/2017 04:56 PM, Michael S. Tsirkin wrote: > > On Thu, Dec 07, 2017 at 04:52:18PM +0100, Maxime Coquelin wrote: > > > Hi David, > > > > > > On 12/05/2017 06:41 PM, Dr. David Alan Gilbert wrote: > > > > Hi, > > > >

[Qemu-devel] [PATCH v2 for-2.12 08/10] s390x/tcg: implement extract-CPU-time facility

2017-12-07 Thread David Hildenbrand
It only provides the EXTRACT CPU TIME instruction. We can reuse the stpt helper, which calculates the CPU timer value. As the instruction is not privileged, but we don't have a CPU timer value in case of linux user, we simply fake the CPU timer to be 0. Signed-off-by: David Hildenbrand --- targ

Re: [Qemu-devel] [PATCH RFC 0/2] s390x: cut down on unattached devices

2017-12-07 Thread Halil Pasic
On 12/07/2017 05:34 PM, Cornelia Huck wrote: > On Tue, 5 Dec 2017 09:59:06 +0100 > Bjoern Walk wrote: > >> Cornelia Huck [2017-11-28, 02:46PM +0100]: >>> info qom-tree shows several devices under unattached that probably >>> should go somewhere. >>> >>> The css bridge should attach to the mach

[Qemu-devel] [PATCH v2 for-2.12 09/10] s390x/tcg: we already implement the Set-Program-Parameter facility

2017-12-07 Thread David Hildenbrand
The Set-Program-Parameter facility (also known as Load-Program-Parameter facility) provides the LPP instruction used to load the program parameter. We already implement that instruction in TCG, so add it to our list. Note: Not documented in the PoP but in "The Load-Program-Parameter and CPU-Measur

Re: [Qemu-devel] [PATCH RFC 0/2] s390x: cut down on unattached devices

2017-12-07 Thread Cornelia Huck
On Thu, 7 Dec 2017 18:01:46 +0100 Halil Pasic wrote: > On 12/07/2017 05:34 PM, Cornelia Huck wrote: > > On Tue, 5 Dec 2017 09:59:06 +0100 > > Bjoern Walk wrote: > > > >> Cornelia Huck [2017-11-28, 02:46PM +0100]: > >>> info qom-tree shows several devices under unattached that probably > >>

  1   2   3   >