[Qemu-devel] [PATCH v6 0/3] migration: compression optimization

2018-09-06 Thread guangrong . xiao
From: Xiao Guangrong Changelog in v6: Thanks to Juan's review, in this version we 1) move flush compressed data to find_dirty_block() where it hits the end of memblock 2) use save_page_use_compression instead of migrate_use_compression in flush_compressed_data Xiao Guangrong (3): migrat

[Qemu-devel] [PATCH v6 1/3] migration: do not flush_compressed_data at the end of iteration

2018-09-06 Thread guangrong . xiao
From: Xiao Guangrong flush_compressed_data() needs to wait all compression threads to finish their work, after that all threads are free until the migration feeds new request to them, reducing its call can improve the throughput and use CPU resource more effectively We do not need to flush all t

[Qemu-devel] [PATCH v6 2/3] migration: show the statistics of compression

2018-09-06 Thread guangrong . xiao
From: Xiao Guangrong Currently, it includes: pages: amount of pages compressed and transferred to the target VM busy: amount of count that no free thread to compress data busy-rate: rate of thread busy compressed-size: amount of bytes after compression compression-rate: rate of compressed size R

[Qemu-devel] [PATCH v6 3/3] migration: use save_page_use_compression in flush_compressed_data

2018-09-06 Thread guangrong . xiao
From: Xiao Guangrong It avoids to touch compression locks if xbzrle and compression are both enabled Signed-off-by: Xiao Guangrong --- migration/ram.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index 65a563993d..747dd9208b 100644 --

Re: [Qemu-devel] [PATCH] target-ppc: Extend HWCAP2 bits for ISA 3.0

2018-09-06 Thread Laurent Vivier
Le 06/09/2018 à 08:57, Sandipan Das a écrit : > This adds the HWCAP2 bit to detect if a linux user process is > running on an ISA 3.0 compliant cpu like POWER9. This can be > verified using a simple test program that prints the value in > the auxiliary vector for AT_HWCAP2 as shown below. > > Befo

[Qemu-devel] [PATCH v2] intel_iommu: better handling of dmar state switch

2018-09-06 Thread Peter Xu
Let's first take the example of system reset: we will drop all the mappings when system reset, however we'll still keep the existing memory layouts. That'll be problematic since if IOMMU is enabled in the guest and then reboot the guest, SeaBIOS will try to drive a device that with no page mapped

Re: [Qemu-devel] [PATCH v10 6/6] tpm: add ACPI memory clear interface

2018-09-06 Thread Igor Mammedov
On Thu, 6 Sep 2018 07:50:09 +0400 Marc-André Lureau wrote: > Hi > > On Tue, Sep 4, 2018 at 10:47 AM Igor Mammedov wrote: > > > > On Fri, 31 Aug 2018 19:24:24 +0200 > > Marc-André Lureau wrote: > > > > > This allows to pass the last failing test from the Windows HLK TPM 2.0 > > > TCG PPI 1.3

Re: [Qemu-devel] [PATCH V9 1/4] tests/migration: Convert x86 boot block compilation script into Makefile

2018-09-06 Thread Andrew Jones
On Wed, Sep 05, 2018 at 03:15:31PM -0400, Wei Huang wrote: > The x86 boot block header currently is generated with a shell script. > To better support other CPUs (e.g. aarch64), we convert the script > into Makefile. This allows us to 1) support cross-compilation easily, > and 2) avoid creating a s

Re: [Qemu-devel] [PATCH v10 6/6] tpm: add ACPI memory clear interface

2018-09-06 Thread Marc-André Lureau
Hi On Thu, Sep 6, 2018 at 11:58 AM Igor Mammedov wrote: > > On Thu, 6 Sep 2018 07:50:09 +0400 > Marc-André Lureau wrote: > > > Hi > > > > On Tue, Sep 4, 2018 at 10:47 AM Igor Mammedov wrote: > > > > > > On Fri, 31 Aug 2018 19:24:24 +0200 > > > Marc-André Lureau wrote: > > > > > > > This allows

Re: [Qemu-devel] [PATCH v5 1/2] vl.c deprecate incorrect CPUs topology

2018-09-06 Thread Igor Mammedov
On Wed, 5 Sep 2018 10:45:12 -0300 Eduardo Habkost wrote: > On Wed, Sep 05, 2018 at 11:25:11AM +0200, Igor Mammedov wrote: > > On Tue, 4 Sep 2018 23:12:55 -0300 > > Eduardo Habkost wrote: > > > > > On Tue, Sep 04, 2018 at 03:22:35PM +0200, Igor Mammedov wrote: > > > > -smp [cpus],sockets/cor

Re: [Qemu-devel] [PATCH V9 0/4] tests: Add migration test for aarch64

2018-09-06 Thread Juan Quintela
Wei Huang wrote: > This patchset adds a migration test for aarch64. It leverages > Dave Gilbert's migration boot block patches to create a new test case > for aarch64. > > V8->V9: > * Remove accel= setting for AArch64. It uses the default "kvm:tcg" now > * Revise the header file comment (suggest

Re: [Qemu-devel] [PATCH v10 6/6] tpm: add ACPI memory clear interface

2018-09-06 Thread Igor Mammedov
On Thu, 6 Sep 2018 12:01:40 +0400 Marc-André Lureau wrote: > Hi > > On Thu, Sep 6, 2018 at 11:58 AM Igor Mammedov wrote: > > > > On Thu, 6 Sep 2018 07:50:09 +0400 > > Marc-André Lureau wrote: > > > > > Hi > > > > > > On Tue, Sep 4, 2018 at 10:47 AM Igor Mammedov > > > wrote: > > > > > >

Re: [Qemu-devel] [PATCH v10 6/6] tpm: add ACPI memory clear interface

2018-09-06 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@gmail.com) wrote: > Hi > > On Thu, Sep 6, 2018 at 11:58 AM Igor Mammedov wrote: > > > > On Thu, 6 Sep 2018 07:50:09 +0400 > > Marc-André Lureau wrote: > > > > > Hi > > > > > > On Tue, Sep 4, 2018 at 10:47 AM Igor Mammedov wrote: > > > > > > > > On Fri, 31 A

Re: [Qemu-devel] [libvirt] [PATCH] qga: ignore non present cpus when handling qmp_guest_get_vcpus()

2018-09-06 Thread Peter Krempa
On Fri, Aug 31, 2018 at 12:19:12 +0200, Laszlo Ersek wrote: > On 08/31/18 10:00, Igor Mammedov wrote: > > On Thu, 30 Aug 2018 17:51:13 +0200 > > Laszlo Ersek wrote: > > > >> +Drew > >> > >> On 08/30/18 14:08, Igor Mammedov wrote: > >>> If VM has VCPUs plugged sparselly (for example a VM started w

Re: [Qemu-devel] [PATCH v10 6/6] tpm: add ACPI memory clear interface

2018-09-06 Thread Marc-André Lureau
Hi On Thu, Sep 6, 2018 at 12:59 PM Dr. David Alan Gilbert wrote: > > * Marc-André Lureau (marcandre.lur...@gmail.com) wrote: > > Hi > > > > On Thu, Sep 6, 2018 at 11:58 AM Igor Mammedov wrote: > > > > > > On Thu, 6 Sep 2018 07:50:09 +0400 > > > Marc-André Lureau wrote: > > > > > > > Hi > > > >

Re: [Qemu-devel] [PATCH v3] linux-user: add support for MADV_DONTNEED

2018-09-06 Thread Simon Hausmann
Ping :) On 8/27/18 10:40 AM, Simon Hausmann wrote: Most flags to madvise() are just hints, so typically ignoring the syscall and returning okay is fine. However applications exist that do rely on MADV_DONTNEED behavior to guarantee that upon subsequent access the mapping is refreshed from th

[Qemu-devel] [Bug 1755912] Update Released

2018-09-06 Thread Łukasz Zemczak
The verification of the Stable Release Update for qemu has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a reg

[Qemu-devel] [Bug 1755912] Re: qemu-system-x86_64 crashed with SIGABRT when using option -vga qxl

2018-09-06 Thread Launchpad Bug Tracker
This bug was fixed in the package qemu - 1:2.11+dfsg-1ubuntu7.5 --- qemu (1:2.11+dfsg-1ubuntu7.5) bionic; urgency=medium [Christian Ehrhardt] * d/p/lp-1755912-qxl-fix-local-renderer-crash.patch: Fix an issue triggered by migrations with UI frontends or frequent guest resolutio

Re: [Qemu-devel] [PATCH v3] linux-user: add support for MADV_DONTNEED

2018-09-06 Thread Laurent Vivier
Le 27/08/2018 à 10:40, Simon Hausmann a écrit : > Most flags to madvise() are just hints, so typically ignoring the > syscall and returning okay is fine. However applications exist that do > rely on MADV_DONTNEED behavior to guarantee that upon subsequent access > the mapping is refreshed from the

[Qemu-devel] [PATCH v3 02/10] file-posix: x-check-cache-dropped should default to false on reopen

2018-09-06 Thread Alberto Garcia
The default value of x-check-cache-dropped is false. There's no reason to use the previous value as a default in raw_reopen_prepare() because bdrv_reopen_queue_child() already takes care of putting the old options in the BDRVReopenState.options QDict. If x-check-cache-dropped was previously set bu

[Qemu-devel] [PATCH v3 03/10] block: Remove child references from bs->{options, explicit_options}

2018-09-06 Thread Alberto Garcia
Block drivers allow opening their children using a reference to an existing BlockDriverState. These references remain stored in the 'options' and 'explicit_options' QDicts, but we don't need to keep them once everything is open. What is more important, these values can become wrong if the children

[Qemu-devel] [PATCH v3 07/10] file-posix: Forbid trying to change unsupported options during reopen

2018-09-06 Thread Alberto Garcia
The file-posix code is used for the "file", "host_device" and "host_cdrom" drivers, and it allows reopening images. However the only option that is actually processed is "x-check-cache-dropped", and changes in all other options (e.g. "filename") are silently ignored: (qemu) qemu-io virtio0 "reo

[Qemu-devel] [PATCH v3 08/10] block: Allow changing 'discard' on reopen

2018-09-06 Thread Alberto Garcia
'discard' is one of the basic BlockdevOptions available for all drivers, but it's not handled by bdrv_reopen_prepare() so any attempt to change it results in an error: (qemu) qemu-io virtio0 "reopen -o discard=on" Cannot change the option 'discard' Since there's no reason why we shouldn't a

[Qemu-devel] [PATCH v3 04/10] block: Don't look for child references in append_open_options()

2018-09-06 Thread Alberto Garcia
In the previous patch we removed child references from bs->options, so there's no need to look for them here anymore. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- block.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/block.c b/block.c index c764eb

[Qemu-devel] [PATCH v3 00/10] Misc reopen-related patches

2018-09-06 Thread Alberto Garcia
Hi, as part of my blockdev-reopen work here's a new set of patches. This doesn't implement yet the core functionality of the new reopen command, but it does fix a few things that help us pave the way. I believe that the next series after this one will be the last. The main change is the removal o

[Qemu-devel] [PATCH v3 01/10] qemu-io: Fix writethrough check in reopen

2018-09-06 Thread Alberto Garcia
"qemu-io reopen" doesn't allow changing the writethrough setting of the cache, but the check is wrong, causing an error even on a simple reopen with the default parameters: $ qemu-img create -f qcow2 hd.qcow2 1M $ qemu-system-x86_64 -monitor stdio -drive if=virtio,file=hd.qcow2 (qemu) qem

[Qemu-devel] [PATCH v3 05/10] block: Allow child references on reopen

2018-09-06 Thread Alberto Garcia
In the previous patches we removed all child references from bs->{options,explicit_options} because keeping them is useless and wrong. Because of this, any attempt to reopen a BlockDriverState using a child reference as one of its options would result in a failure, because bdrv_reopen_prepare() wo

[Qemu-devel] [PATCH v3 06/10] block: Forbid trying to change unsupported options during reopen

2018-09-06 Thread Alberto Garcia
The bdrv_reopen_prepare() function checks all options passed to each BlockDriverState (in the reopen_state->options QDict) and makes all necessary preparations to apply the option changes requested by the user. Options are removed from the QDict as they are processed, so at the end of bdrv_reopen_

[Qemu-devel] [PATCH v3 09/10] block: Allow changing 'detect-zeroes' on reopen

2018-09-06 Thread Alberto Garcia
'detect-zeroes' is one of the basic BlockdevOptions available for all drivers, but it's not handled by bdrv_reopen_prepare(), so any attempt to change it results in an error: (qemu) qemu-io virtio0 "reopen -o detect-zeroes=on" Cannot change the option 'detect-zeroes' Since there's no reason

Re: [Qemu-devel] [PATCH v10 6/6] tpm: add ACPI memory clear interface

2018-09-06 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@gmail.com) wrote: > Hi > > On Thu, Sep 6, 2018 at 12:59 PM Dr. David Alan Gilbert > wrote: > > > > * Marc-André Lureau (marcandre.lur...@gmail.com) wrote: > > > Hi > > > > > > On Thu, Sep 6, 2018 at 11:58 AM Igor Mammedov wrote: > > > > > > > > On Thu, 6 Sep

[Qemu-devel] [PATCH v3 10/10] block: Allow changing 'force-share' on reopen

2018-09-06 Thread Alberto Garcia
'force-share' is one of the basic BlockdevOptions available for all drivers, but it's not handled by bdrv_reopen_prepare() so any attempt to change it results in a "Cannot change the option" error: (qemu) qemu-io virtio0 "reopen -o force-share=on" Cannot change the option 'force-share' Sinc

Re: [Qemu-devel] [PATCH v6 1/3] migration: do not flush_compressed_data at the end of iteration

2018-09-06 Thread Juan Quintela
guangrong.x...@gmail.com wrote: > From: Xiao Guangrong > > flush_compressed_data() needs to wait all compression threads to > finish their work, after that all threads are free until the > migration feeds new request to them, reducing its call can improve > the throughput and use CPU resource more

Re: [Qemu-devel] [PATCH v2 0/3] target/riscv: use tcg_lookup_and_goto_ptr

2018-09-06 Thread Palmer Dabbelt
On Fri, 31 Aug 2018 15:22:49 PDT (-0700), c...@braap.org wrote: On Fri, Aug 10, 2018 at 13:39:38 -0400, Emilio G. Cota wrote: Changes wrt v1: changed patch 3 as suggested by Richard. Also added his R-b's. You can fetch this series from: https://github.com/cota/qemu/tree/riscv-lookup_ptr-v2

Re: [Qemu-devel] [PATCH] qga: ignore non present cpus when handling qmp_guest_get_vcpus()

2018-09-06 Thread Igor Mammedov
On Thu, 30 Aug 2018 17:51:13 +0200 Laszlo Ersek wrote: > +Drew > > On 08/30/18 14:08, Igor Mammedov wrote: > > If VM has VCPUs plugged sparselly (for example a VM started with > > 3 VCPUs (cpu0, cpu1 and cpu2) and then cpu1 was hotunplugged so > > only cpu0 and cpu2 are present), QGA will rise a

Re: [Qemu-devel] [PATCH v6 3/3] migration: use save_page_use_compression in flush_compressed_data

2018-09-06 Thread Juan Quintela
guangrong.x...@gmail.com wrote: > From: Xiao Guangrong > > It avoids to touch compression locks if xbzrle and compression > are both enabled > > Signed-off-by: Xiao Guangrong Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH v3] linux-user: add support for MADV_DONTNEED

2018-09-06 Thread Simon Hausmann
On 9/6/18 11:34 AM, Laurent Vivier wrote: Le 27/08/2018 à 10:40, Simon Hausmann a écrit : Most flags to madvise() are just hints, so typically ignoring the syscall and returning okay is fine. However applications exist that do rely on MADV_DONTNEED behavior to guarantee that upon subsequent ac

[Qemu-devel] backend for blk or fs with guaranteed blocking/synchronous I/O

2018-09-06 Thread Artem Pisarenko
Hi all, I'm developing paravirtualized target linux system which runs multiple linux containers (LXC) inside itself. (For those, who unfamiliar with LXC, simply put, it's an isolated group of userspace processes with their own rootfs.) Each container should be provided access to its rootfs located

[Qemu-devel] Some confusion about live migration of usb device

2018-09-06 Thread linzhecheng
Hi, Gerd I'm going through relevant codes about live migration of usb devices, it seems that we will not save/load USBpacket in any vmstate, so pending usb packets will be lost after live migration, is it a problem?

Re: [Qemu-devel] [PATCH] qga: ignore non present cpus when handling qmp_guest_get_vcpus()

2018-09-06 Thread Laszlo Ersek
On 09/06/18 11:49, Igor Mammedov wrote: > On Thu, 30 Aug 2018 17:51:13 +0200 > Laszlo Ersek wrote: > >> +Drew >> >> On 08/30/18 14:08, Igor Mammedov wrote: >>> If VM has VCPUs plugged sparselly (for example a VM started with >>> 3 VCPUs (cpu0, cpu1 and cpu2) and then cpu1 was hotunplugged so >>>

Re: [Qemu-devel] [Bug 1790975] [NEW] arm virt ecam pcie conflict

2018-09-06 Thread Auger Eric
Hi, On 09/06/2018 12:08 AM, Jonathan Marler wrote: > Public bug reported: > > This occurs on qemu_v3.0.0 but not on qemu_v2.12.2 (built from > qemu_v3.0.0 tag on github) > > Symptom: You'll see something like this in the kernel output: > > [1.285210] OF: PCI: host bridge /pcie@1000 rang

Re: [Qemu-devel] [PATCH] block/linux-aio: acquire AioContext before qemu_laio_process_completions

2018-09-06 Thread Kevin Wolf
Am 05.09.2018 um 13:23 hat Sergio Lopez geschrieben: > In qemu_laio_process_completions_and_submit, the AioContext is acquired > before the ioq_submit iteration and after qemu_laio_process_completions, > but the latter is not thread safe either. > > This change avoids a number of random crashes wh

Re: [Qemu-devel] [PATCH] qga: ignore non present cpus when handling qmp_guest_get_vcpus()

2018-09-06 Thread Igor Mammedov
On Thu, 6 Sep 2018 12:26:12 +0200 Laszlo Ersek wrote: > On 09/06/18 11:49, Igor Mammedov wrote: > > On Thu, 30 Aug 2018 17:51:13 +0200 > > Laszlo Ersek wrote: > > > >> +Drew > >> > >> On 08/30/18 14:08, Igor Mammedov wrote: > >>> If VM has VCPUs plugged sparselly (for example a VM started w

Re: [Qemu-devel] [PATCH v8 3/3] qmp hmp: Make system_wakeup check wake-up support and run state

2018-09-06 Thread Daniel Henrique Barboza
On 09/05/2018 09:27 PM, Michael Roth wrote: Quoting Daniel Henrique Barboza (2018-07-05 15:08:13) The qmp/hmp command 'system_wakeup' is simply a direct call to 'qemu_system_wakeup_request' from vl.c. This function verifies if runstate is SUSPENDED and if the wake up reason is valid before pr

Re: [Qemu-devel] [PATCH v6 0/3] migration: compression optimization

2018-09-06 Thread Juan Quintela
guangrong.x...@gmail.com wrote: > From: Xiao Guangrong > > Changelog in v6: > > Thanks to Juan's review, in this version we > 1) move flush compressed data to find_dirty_block() where it hits the end >of memblock > 2) use save_page_use_compression instead of migrate_use_compression in >flu

[Qemu-devel] [PATCH v2 0/3] HMP/snapshot changes - do not use ID anymore

2018-09-06 Thread Daniel Henrique Barboza
changes in v2: - removed the "RFC" marker; - added a new patch (patch 2) that removes bdrv_snapshot_delete_by_id_or_name from the code; - made changes in patch 1 as suggested by Murilo; - previous patch set link: https://lists.gnu.org/archive/html/qemu-devel/2018-08/msg04658.html It is not uncomm

[Qemu-devel] [PATCH v2 3/3] qcow2-snapshot: remove redundant find_snapshot_by_id_and_name call

2018-09-06 Thread Daniel Henrique Barboza
In qcow2_snapshot_create there is the following code block: /* Generate an ID */ find_new_snapshot_id(bs, sn_info->id_str, sizeof(sn_info->id_str)); /* Check that the ID is unique */ if (find_snapshot_by_id_and_name(bs, sn_info->id_str, NULL) >= 0) { return -EEXIST; }

[Qemu-devel] [PATCH v2 1/3] block/snapshot.c: eliminate use of ID input in snapshot operations

2018-09-06 Thread Daniel Henrique Barboza
At this moment, QEMU attempts to create/load/delete snapshots by using either an ID (id_str) or a name. The problem is that the code isn't consistent of whether the entered argument is an ID or a name, causing unexpected behaviors. For example, when creating snapshots via savevm , what happens is

[Qemu-devel] [PATCH v2 2/3] block/snapshot: remove bdrv_snapshot_delete_by_id_or_name

2018-09-06 Thread Daniel Henrique Barboza
After the previous patch, the only instance of this function left is inside qemu-img.c. qemu-img is using it inside the 'img_snapshot' function to delete snapshots in the SNAPSHOT_DELETE case, based on a "snapshot_name" string that refers to the tag, not ID, of the QEMUSnapshotInfo struct. This ca

Re: [Qemu-devel] [PATCH 1/3] scsi: move lsi53c895a structures and defines into separate lsi53c895a.h file

2018-09-06 Thread Thomas Huth
On 2018-09-06 07:57, Mark Cave-Ayland wrote: > There is also one small change to the new header file which is the addition > of the previously missing LSI53C810 define. > > Signed-off-by: Mark Cave-Ayland > --- > hw/scsi/lsi53c895a.c | 116 +--- > include/

Re: [Qemu-devel] [PATCH] qga: ignore non present cpus when handling qmp_guest_get_vcpus()

2018-09-06 Thread Laszlo Ersek
On 09/06/18 12:50, Igor Mammedov wrote: > On Thu, 6 Sep 2018 12:26:12 +0200 > Laszlo Ersek wrote: > >> On 09/06/18 11:49, Igor Mammedov wrote: >>> On Thu, 30 Aug 2018 17:51:13 +0200 >>> Laszlo Ersek wrote: >>> +Drew On 08/30/18 14:08, Igor Mammedov wrote: > If VM has VCPU

Re: [Qemu-devel] [PATCH V9 2/4] tests/migration: Support cross compilation in generating boot header file

2018-09-06 Thread Andrew Jones
On Wed, Sep 05, 2018 at 03:15:32PM -0400, Wei Huang wrote: > Recently a new configure option, CROSS_CC_GUEST, was added to > $(TARGET)-softmmu/config-target.mak to support TCG-related tests. This > patch tries to leverage this option to support cross compilation when the > migration boot block file

Re: [Qemu-devel] Some confusion about live migration of usb device

2018-09-06 Thread gerd hoffmann
On Thu, Sep 06, 2018 at 10:25:20AM +, linzhecheng wrote: > Hi, Gerd > > I'm going through relevant codes about live migration of usb devices, > it seems that we will not save/load USBpacket in any vmstate, so > pending usb packets will be lost after live migration, is it a > problem? With usb

Re: [Qemu-devel] Some confusion about live migration of usb device

2018-09-06 Thread linzhecheng
You had said that copying vmstate of usb-host is pointless, so just unpulg and plug it after migration is all right, but will other usb devices like usb-storage devices lose pending USBPackets then? > -Original Message- > From: gerd hoffmann [mailto:kra...@redhat.com] > Sent: Thursday

Re: [Qemu-devel] [PATCH] qga: ignore non present cpus when handling qmp_guest_get_vcpus()

2018-09-06 Thread Igor Mammedov
On Thu, 6 Sep 2018 13:52:49 +0200 Laszlo Ersek wrote: > On 09/06/18 12:50, Igor Mammedov wrote: > > On Thu, 6 Sep 2018 12:26:12 +0200 > > Laszlo Ersek wrote: > > > >> On 09/06/18 11:49, Igor Mammedov wrote: > >>> On Thu, 30 Aug 2018 17:51:13 +0200 > >>> Laszlo Ersek wrote: > >>> > >>>

Re: [Qemu-devel] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions

2018-09-06 Thread Thomas Huth
On 2018-09-06 07:57, Mark Cave-Ayland wrote: > As part of an upcoming 40p patchset I have a requirement to change the PCI > configuration of the LSI SCSI. However since commits a64aa5785d "hw: > Deprecate -drive > if=scsi with non-onboard HBAs" and b891538e81 "hw/ppc/prep: Fix implicit > creation

Re: [Qemu-devel] [PATCH V9 4/4] tests: Add migration test for aarch64

2018-09-06 Thread Andrew Jones
On Wed, Sep 05, 2018 at 03:15:34PM -0400, Wei Huang wrote: > This patch adds migration test support for aarch64. The test code, which > implements the same functionality as x86, is booted as a kernel in qemu. > Here are the design choices we make for aarch64: > > * We choose this -kernel approach

[Qemu-devel] [Bug 1771948] Re: aarch64 msr CNTFRQ_EL0

2018-09-06 Thread Thomas Huth
** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1771948 Title: aarch64 msr CNTFRQ_EL0 Status in QEMU: Invalid Bug description: Hello, I'm ru

[Qemu-devel] [PATCH] target-ppc: Extend HWCAP2 bits for ISA 3.0

2018-09-06 Thread Sandipan Das
This adds the HWCAP2 bit to detect if a linux user process is running on an ISA 3.0 compliant cpu like POWER9. This can be verified using a simple test program that prints the value in the auxiliary vector for AT_HWCAP2 as shown below. Before: $ qemu-ppc64le -cpu power8 test 0x8c00 $ qe

[Qemu-devel] [PATCH risu] ppc64.risu: Fix pattern for darn

2018-09-06 Thread Sandipan Das
This fixes the pattern for the Deliver A Random Number (darn) instruction to ensure that the value of the L field, which is used to determine the type and length of the generated random number, is never 3 which is currently reserved for future use. Signed-off-by: Sandipan Das --- ppc64.risu | 2

Re: [Qemu-devel] [PATCH v8 1/3] qmp: query-current-machine with wakeup-suspend-support

2018-09-06 Thread Daniel Henrique Barboza
On 09/05/2018 09:21 PM, Michael Roth wrote: Quoting Daniel Henrique Barboza (2018-07-05 15:08:11) When issuing the qmp/hmp 'system_wakeup' command, what happens in a nutshell is: - qmp_system_wakeup_request set runstate to RUNNING, sets a wakeup_reason and notify the event - in the main_loop

[Qemu-devel] [PATCH v2] qga: ignore non present cpus when handling qmp_guest_get_vcpus()

2018-09-06 Thread Igor Mammedov
If VM has VCPUs plugged sparselly (for example a VM started with 3 VCPUs (cpu0, cpu1 and cpu2) and then cpu1 was hotunplugged so only cpu0 and cpu2 are present), QGA will rise a error error: internal error: unable to execute QEMU agent command 'guest-get-vcpus': open("/sys/devices/system/cpu/cp

[Qemu-devel] [PATCH v5 06/16] block/mirror: conservative mirror_exit refactor

2018-09-06 Thread John Snow
For purposes of minimum code movement, refactor the mirror_exit callback to use the post-finalization callbacks in a trivial way. Signed-off-by: John Snow --- block/mirror.c | 39 --- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/block/mirror

[Qemu-devel] [PATCH v5 03/16] block/stream: add block job creation flags

2018-09-06 Thread John Snow
Add support for taking and passing forward job creation flags. Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- block/stream.c| 5 +++-- blockdev.c| 3 ++- include/block/block_int.h | 5 - 3 files changed, 9 insertions(+), 4 deletions(-

[Qemu-devel] [PATCH v5 09/16] tests/test-blockjob: remove exit callback

2018-09-06 Thread John Snow
We remove the exit callback and the completed boolean along with it. We can simulate it just fine by waiting for the job to defer to the main loop, and then giving it one final kick to get the main loop portion to run. Signed-off-by: John Snow Reviewed-by: Max Reitz --- tests/test-blockjob.c |

[Qemu-devel] [PATCH v5 04/16] block/commit: refactor commit to use job callbacks

2018-09-06 Thread John Snow
Use the component callbacks; prepare, abort, and clean. NB: prepare is only called when the job has not yet failed; and abort can be called after prepare. complete -> prepare -> abort -> clean complete -> abort -> clean During refactor, a potential problem with bdrv_drop_intermediate was identif

[Qemu-devel] [PATCH v5 00/16] jobs: Job Exit Refactoring Pt 2

2018-09-06 Thread John Snow
This is part two of a two part series that refactors the exit logic of jobs. This series forces all jobs to use the "finalize" semantics that were introduced previously, but only exposed via the backup jobs. Patches 1-3 add plumbing for the auto-dismiss and auto-finalize flags but do not expose t

[Qemu-devel] [PATCH v5 01/16] block/commit: add block job creation flags

2018-09-06 Thread John Snow
Add support for taking and passing forward job creation flags. Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- block/commit.c| 5 +++-- blockdev.c| 7 --- include/block/block_int.h | 5 - 3 files changed, 11 insertions(+), 6 deleti

[Qemu-devel] [PATCH v5 10/16] tests/test-blockjob-txn: move .exit to .clean

2018-09-06 Thread John Snow
The exit callback in this test actually only performs cleanup. Signed-off-by: John Snow Reviewed-by: Max Reitz --- tests/test-blockjob-txn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-blockjob-txn.c b/tests/test-blockjob-txn.c index ef29f35e44..86606f92b3

[Qemu-devel] [PATCH v5 11/16] jobs: remove .exit callback

2018-09-06 Thread John Snow
Now that all of the jobs use the component finalization callbacks, there's no use for the heavy-hammer .exit callback anymore. job_exit becomes a glorified type shim so that we can call job_completed from aio_bh_schedule_oneshot. Move these three functions down into job.c to eliminate a forward r

[Qemu-devel] [PATCH v5 05/16] block/mirror: don't install backing chain on abort

2018-09-06 Thread John Snow
In cases where we abort the block/mirror job, there's no point in installing the new backing chain before we finish aborting. Signed-off-by: John Snow --- block/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index cba555b4ef..bd3e9087

[Qemu-devel] [PATCH v5 02/16] block/mirror: add block job creation flags

2018-09-06 Thread John Snow
Add support for taking and passing forward job creation flags. Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- block/mirror.c| 5 +++-- blockdev.c| 3 ++- include/block/block_int.h | 5 - 3 files changed, 9 insertions(+), 4 deletions(-

[Qemu-devel] [PATCH v5 08/16] tests/blockjob: replace Blockjob with Job

2018-09-06 Thread John Snow
These tests don't actually test blockjobs anymore, they test generic Job lifetimes. Change the types accordingly. Signed-off-by: John Snow Reviewed-by: Max Reitz --- tests/test-blockjob.c | 98 ++- 1 file changed, 50 insertions(+), 48 deletions(-)

[Qemu-devel] [PATCH v5 15/16] block/backup: qapi documentation fixup

2018-09-06 Thread John Snow
Fix documentation to match the other jobs amended for 3.1. Signed-off-by: John Snow Reviewed-by: Max Reitz --- qapi/block-core.json | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index f877e9e414..c0b3d33dbb 10

[Qemu-devel] [PATCH v5 07/16] block/stream: refactor stream to use job callbacks

2018-09-06 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Max Reitz --- block/stream.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/block/stream.c b/block/stream.c index 700eb239e4..81a7ec8ece 100644 --- a/block/stream.c +++ b/block/stream.c @@ -54,16 +54,16 @@ static

[Qemu-devel] [PATCH v5 14/16] qapi/block-stream: expose new job properties

2018-09-06 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Max Reitz --- blockdev.c | 9 + hmp.c| 5 +++-- qapi/block-core.json | 16 +++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index 429cdf9901..0cf8febe6c 100644 --- a/

[Qemu-devel] [PATCH v5 16/16] blockdev: document transactional shortcomings

2018-09-06 Thread John Snow
Presently only the backup job really guarantees what one would consider transactional semantics. To guard against someone helpfully adding them in the future, document that there are shortcomings in the model that would need to be audited at that time. Signed-off-by: John Snow --- blockdev.c | 8

[Qemu-devel] [PATCH v5 13/16] qapi/block-mirror: expose new job properties

2018-09-06 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Max Reitz --- blockdev.c | 14 ++ qapi/block-core.json | 30 -- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index 98b91e75a7..429cdf9901 100644 --- a/blockdev.c +++

[Qemu-devel] [PATCH v5 12/16] qapi/block-commit: expose new job properties

2018-09-06 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Max Reitz --- blockdev.c | 8 qapi/block-core.json | 16 +++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index ec90eb1cf9..98b91e75a7 100644 --- a/blockdev.c +++ b/blockdev.c @@ -320

Re: [Qemu-devel] [PATCH V9 2/4] tests/migration: Support cross compilation in generating boot header file

2018-09-06 Thread Wei Huang
- Original Message - > From: "Andrew Jones" > To: "Wei Huang" > Cc: qemu-devel@nongnu.org, lviv...@redhat.com, "peter maydell" > , quint...@redhat.com, > dgilb...@redhat.com, "alex bennee" > Sent: Thursday, September 6, 2018 7:03:32 AM > Subject: Re: [Qemu-devel] [PATCH V9 2/4] tests

Re: [Qemu-devel] Some confusion about live migration of usb device

2018-09-06 Thread gerd hoffmann
On Thu, Sep 06, 2018 at 12:10:08PM +, linzhecheng wrote: > You had said that copying vmstate of usb-host is pointless, so just unpulg > and plug it after migration is all right, > but will other usb devices like usb-storage devices lose pending USBPackets > then? Ah, emulated usb devices.

Re: [Qemu-devel] [PATCH V9 2/4] tests/migration: Support cross compilation in generating boot header file

2018-09-06 Thread Andrew Jones
On Thu, Sep 06, 2018 at 09:37:04AM -0400, Wei Huang wrote: > > > - Original Message - > > From: "Andrew Jones" > > To: "Wei Huang" > > Cc: qemu-devel@nongnu.org, lviv...@redhat.com, "peter maydell" > > , quint...@redhat.com, > > dgilb...@redhat.com, "alex bennee" > > Sent: Thursday, S

Re: [Qemu-devel] [PATCH v2] qga: ignore non present cpus when handling qmp_guest_get_vcpus()

2018-09-06 Thread Laszlo Ersek
On 09/06/18 14:51, Igor Mammedov wrote: > If VM has VCPUs plugged sparselly (for example a VM started with > 3 VCPUs (cpu0, cpu1 and cpu2) and then cpu1 was hotunplugged so > only cpu0 and cpu2 are present), QGA will rise a error > error: internal error: unable to execute QEMU agent command > 'g

Re: [Qemu-devel] Some confusion about live migration of usb device

2018-09-06 Thread CheneyLin
> -原始邮件- > 发件人: "gerd hoffmann" > 发送时间: 2018-09-06 21:52:23 (星期四) > 收件人: linzhecheng > 抄送: "wangxin (U)" , CheneyLin , > "qemu-devel@nongnu.org" > 主题: Re: [Qemu-devel] Some confusion about live migration of usb device > > On Thu, Sep 06, 2018 at 12:10:08PM +, linzhecheng wrote:

[Qemu-devel] [PATCH] block: Fix use after free error in bdrv_open_inherit()

2018-09-06 Thread Alberto Garcia
When a block device is opened with BDRV_O_SNAPSHOT and the bdrv_append_temp_snapshot() call fails then the error code path tries to unref the already destroyed 'options' QDict. This can be reproduced easily by setting TMPDIR to a location where the QEMU process can't write: $ TMPDIR=/nonexiste

Re: [Qemu-devel] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions

2018-09-06 Thread Peter Maydell
On 6 September 2018 at 13:02, Thomas Huth wrote: > I somehow fail to see that something outside of lsi53c895a.c should > really need to access the internals of LSIState. If there is something > that needs to be configured from the outside, it should be done via QOM > properties instead, shouldn't

Re: [Qemu-devel] [PATCH] RISC-V - Dynamic parameterization of RISC-V memory map

2018-09-06 Thread Michael Eager
Any comments? On 08/30/2018 09:22 AM, Michael Eager wrote: Corrected patch attached. On 08/29/2018 05:48 PM, Michael Eager wrote: Whoops.  I just noticed that this patch is against the riscv-qemu repo on github, not the qemu.org repo.  I will rework it for the qemu.org repo.  Meanwhile, I wel

Re: [Qemu-devel] backend for blk or fs with guaranteed blocking/synchronous I/O

2018-09-06 Thread Michael S. Tsirkin
On Thu, Sep 06, 2018 at 04:24:12PM +0600, Artem Pisarenko wrote: > Hi all, > > I'm developing paravirtualized target linux system which runs multiple linux > containers (LXC) inside itself. (For those, who unfamiliar with LXC, simply > put, it's an isolated group of userspace processes with their

[Qemu-devel] [PATCH 03/10] qom/object: fix iterating properties over a class

2018-09-06 Thread Marc-André Lureau
object_class_property_iter_init() starts from the given class, so the next class should continue with the parent class. Signed-off-by: Marc-André Lureau --- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qom/object.c b/qom/object.c index 75d1d48944..d8666de3f2 1

[Qemu-devel] [PATCH 00/10] Various qemu command line options help improvements

2018-09-06 Thread Marc-André Lureau
Hi, This is a compilation of patches I have to improve command line help support. The first 2 patches have already been sent earlier, I modified the first to fix an issue reported by Markus. The other patches add support for -object help. A few preliminary patches for QOM, to fix/improve some mino

[Qemu-devel] [PATCH 06/10] tests/qom-proplist: check properties are not listed multiple times

2018-09-06 Thread Marc-André Lureau
And factor out a common function used by the follow class properties iterator test. Signed-off-by: Marc-André Lureau --- tests/check-qom-proplist.c | 44 +- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/tests/check-qom-proplist.c b/tests/chec

[Qemu-devel] [PATCH 07/10] tests/qom-proplist: check class properties iterator

2018-09-06 Thread Marc-André Lureau
This test failed before "fix iterating properties over a class". Signed-off-by: Marc-André Lureau --- tests/check-qom-proplist.c | 9 + 1 file changed, 9 insertions(+) diff --git a/tests/check-qom-proplist.c b/tests/check-qom-proplist.c index 8e1b9c27f3..7ed16b704b 100644 --- a/tests/ch

[Qemu-devel] [PATCH 01/10] qemu-option: add help fallback to print the list of options

2018-09-06 Thread Marc-André Lureau
QDev options accept '?' or 'help' in the list of parameters, which is really handy to list the available options. Unfortunately, this isn't built in QemuOpts. qemu_opts_parse_noisily() seems to be the common path for command line options, so place a fallback to check for '?' and print help listing

[Qemu-devel] [PATCH 08/10] vl: handle -object ?

2018-09-06 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- vl.c | 13 + 1 file changed, 13 insertions(+) diff --git a/vl.c b/vl.c index 5ba06adf78..8a5fd0c81f 100644 --- a/vl.c +++ b/vl.c @@ -2731,6 +2731,19 @@ static int machine_set_property(void *opaque, */ static bool object_create_initial(const cha

[Qemu-devel] [PATCH 05/10] tests/qom-proplist: check duplicate "bv" property registration failed

2018-09-06 Thread Marc-André Lureau
"bv" is already a class property. Signed-off-by: Marc-André Lureau --- tests/check-qom-proplist.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/check-qom-proplist.c b/tests/check-qom-proplist.c index 92898e1520..0f6d9c1ce3 100644 --- a/tests/check-qom-proplist.c +

[Qemu-devel] [PATCH 10/10] vl: list user creatable propeties if '?' as argument

2018-09-06 Thread Marc-André Lureau
Iterate over the writable class properties, sort and print them out with the description if available. Ex: qemu -object memory-backend-memfd,? memory-backend-memfd.dump=bool (Set to 'off' to exclude from core dump) memory-backend-memfd.host-nodes=int (Binds memory to the list of NUMA host nodes)

[Qemu-devel] [PATCH 02/10] qemu-option: improve qemu_opts_print_help() output

2018-09-06 Thread Marc-André Lureau
Modify qemu_opts_print_help(): - to print expected argument type - skip description if not available - sort lines - prefix with the list name (like qdev, to avoid confusion) - drop 16-chars alignment, use a '-' as seperator for option name and description For ex, "-spice ?" output is changed fro

[Qemu-devel] [PATCH 04/10] qom/object: register 'type' property as class property

2018-09-06 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qom/object.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qom/object.c b/qom/object.c index d8666de3f2..185d1dd9f8 100644 --- a/qom/object.c +++ b/qom/object.c @@ -2423,9 +2423,10 @@ void object_class_property_set_description(Obje

[Qemu-devel] [PATCH 09/10] hostmem: add some properties description

2018-09-06 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- backends/hostmem-memfd.c | 9 + backends/hostmem.c | 14 ++ 2 files changed, 23 insertions(+) diff --git a/backends/hostmem-memfd.c b/backends/hostmem-memfd.c index 1e20fe0ba8..789c8c3f87 100644 --- a/backends/hostmem-memfd.c +++ b/

Re: [Qemu-devel] [PATCH 01/10] qemu-option: add help fallback to print the list of options

2018-09-06 Thread Eric Blake
On 09/06/2018 10:12 AM, Marc-André Lureau wrote: QDev options accept '?' or 'help' in the list of parameters, which is really handy to list the available options. Unfortunately, this isn't built in QemuOpts. qemu_opts_parse_noisily() seems to be the common path for command line options, so place

Re: [Qemu-devel] [PATCH 02/10] qemu-option: improve qemu_opts_print_help() output

2018-09-06 Thread Eric Blake
On 09/06/2018 10:12 AM, Marc-André Lureau wrote: Modify qemu_opts_print_help(): - to print expected argument type - skip description if not available - sort lines - prefix with the list name (like qdev, to avoid confusion) - drop 16-chars alignment, use a '-' as seperator for option name and d

  1   2   >