Re: [Qemu-devel] [PATCH for-2.9?] 9pfs: fix migration_block leak

2017-03-31 Thread Greg Kurz
On Fri, 31 Mar 2017 09:26:35 +0800 Li Qiang wrote: > Hello, > > 2017-03-30 23:46 GMT+08:00 Greg Kurz : > > > On Thu, 30 Mar 2017 08:25:25 -0500 > > Eric Blake wrote: > > > > > On 03/30/2017 07:27 AM, Li Qiang wrote: > > > > The guest can leave the pdu->s->migration_blocker exists by attach > >

Re: [Qemu-devel] [PATCH] Revert "vfio/pci-quirks.c: Disable stolen memory for igd VFIO"

2017-03-31 Thread Zhang, Xiong Y
> On Fri, 31 Mar 2017 02:27:11 + > "Zhang, Xiong Y" wrote: > > > > On Thu, 30 Mar 2017 18:27:21 +0800 > > > Xiong Zhang wrote: > > > > > > > This reverts commit c2b2e158cc7b1cb431bd6039824ec13c3184a775. > > > > > > > > The original patch intend to prevent linux i915 driver from using > > > >

Re: [Qemu-devel] [PATCH v7 14/17] memory: add MemoryRegionIOMMUOps.replay() callback

2017-03-31 Thread Jason Wang
On 2017年03月31日 13:34, Liu, Yi L wrote: -Original Message- From: Jason Wang [mailto:jasow...@redhat.com] Sent: Thursday, March 30, 2017 7:58 PM To: Liu, Yi L ; 'Peter Xu' Cc: 'alex.william...@redhat.com' ; Lan, Tianyu ; Tian, Kevin ; 'm...@redhat.com' ; 'jan.kis...@siemens.com' ; 'bd.a.

Re: [Qemu-devel] [PATCH v2 7/7] vmdk: Update metadata for multiple clusters

2017-03-31 Thread Fam Zheng
On Sat, 03/25 16:48, Ashijeet Acharya wrote: > Include a next pointer in VmdkMetaData struct to point to the previous > allocated L2 table. Modify vmdk_L2update to start updating metadata for > allocation of multiple clusters at once. > > Signed-off-by: Ashijeet Acharya > --- > block/vmdk.c | 13

Re: [Qemu-devel] [PATCH v7 14/17] memory: add MemoryRegionIOMMUOps.replay() callback

2017-03-31 Thread Liu, Yi L
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Friday, March 31, 2017 3:17 PM > To: Liu, Yi L ; 'Peter Xu' > Cc: Lan, Tianyu ; Tian, Kevin ; > 'm...@redhat.com' ; 'jan.kis...@siemens.com' > ; 'bd.a...@gmail.com' ; 'qemu- > de...@nongnu.org' ; 'alex.william...@

[Qemu-devel] [PATCH for-2.10 0/5] x86/vIOMMU: move init back to machine init phase

2017-03-31 Thread Peter Xu
At the very beginning, the x86 vIOMMUs are created via "-M iommu=on". We moved one step further a year ago to have the vIOMMUs just like a general device, so that we can init them with far more specific parameters with "-device" interface. However, gradually we found that problem starts to occur d

[Qemu-devel] [PATCH for-2.10 1/5] QemuOpts: introduce qemu_opts_extract()

2017-03-31 Thread Peter Xu
This helper function is used to extract specific QemuOpts item from an existing QemuOptsList which matches specific patterns. Signed-off-by: Peter Xu --- include/qemu/option.h | 2 ++ util/qemu-option.c| 24 2 files changed, 26 insertions(+) diff --git a/include/qe

[Qemu-devel] [PATCH for-2.10 4/5] q35: init vIOMMU during machine init

2017-03-31 Thread Peter Xu
Now x86 vIOMMUs are init along with all the rest of "-devices". That may not be sufficient since some devices' realization will depend on the vIOMMU object. Let's move the vIOMMU init back to machine init, so that'll be far earlier than all the rest of devices. Signed-off-by: Peter Xu --- hw/pci

[Qemu-devel] [PATCH for-2.10 2/5] util: export device_init_func()

2017-03-31 Thread Peter Xu
This general routine is used to create most of the "-device" objects. Export it so that other modules can use it as well. Signed-off-by: Peter Xu --- include/qemu-common.h | 1 + vl.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/qemu-common.h b/i

[Qemu-devel] [PATCH for-2.10 3/5] util: propagate error for device_func_init()

2017-03-31 Thread Peter Xu
We have error_propagate(). Use it. Signed-off-by: Peter Xu --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index b97b32a..b18bde7 100644 --- a/vl.c +++ b/vl.c @@ -2304,7 +2304,7 @@ int device_init_func(void *opaque, QemuOpts *opts, Error **errp) d

[Qemu-devel] [PATCH for-2.10 5/5] pci: move dma_as init back to bus realize

2017-03-31 Thread Peter Xu
This patch partly reverted commit b86eacb ("hw/pci: delay bus_master_enable_region initialization"). In that patch, we postponed pci DMA address space initialization to support the new "-device" interface for "intel-iommu" device. Now since we have vIOMMUs inited back during machine init phase, we

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-31 Thread Peter Lieven
Am 27.03.2017 um 17:06 schrieb Paolo Bonzini: > > On 27/03/2017 15:21, Peter Lieven wrote: I stumbled across the issue with lseek on a tmpfs because in the build process for our templates I temporarily have vmdks on a tmpfs and it takes ages before qemu-img convert starts to run

Re: [Qemu-devel] [PATCH for-2.9?] 9pfs: fix migration_block leak

2017-03-31 Thread Li Qiang
2017-03-31 15:07 GMT+08:00 Greg Kurz : > On Fri, 31 Mar 2017 09:26:35 +0800 > Li Qiang wrote: > > > Hello, > > > > 2017-03-30 23:46 GMT+08:00 Greg Kurz : > > > > > On Thu, 30 Mar 2017 08:25:25 -0500 > > > Eric Blake wrote: > > > > > > > On 03/30/2017 07:27 AM, Li Qiang wrote: > > > > > The guest

Re: [Qemu-devel] qemu-2.9 crashes in tcg_handle_interrupt() during winx64 boot

2017-03-31 Thread Igor Mammedov
On Thu, 30 Mar 2017 16:05:58 +0100 Alex Bennée wrote: > Igor Mammedov writes: > > > (PS: resend due to wrong qemu-devel mail list address in original > > email) > > Le *sigh* another way of x86 generating IRQs ;-) > > Could you test this please? > > target/i386/misc_helper: wrap BQL around

Re: [Qemu-devel] [PATCH 44/51] ram: reorganize last_sent_block

2017-03-31 Thread Peter Xu
On Thu, Mar 23, 2017 at 09:45:37PM +0100, Juan Quintela wrote: > We were setting it far away of when we changed it. Now everything is > done inside save_page_header. Once there, reorganize code to pass > RAMState. > > Signed-off-by: Juan Quintela Nit: would it worth mentioning as well the unif

Re: [Qemu-devel] [PATCH for-2.9] pseries: Enforce homogeneous threads-per-core

2017-03-31 Thread Igor Mammedov
On Fri, 31 Mar 2017 11:04:55 +0530 Bharata B Rao wrote: > On Fri, Mar 31, 2017 at 10:21 AM, David Gibson > wrote: > > > For reasons that may be useful in future, CPU core objects, as used on the > > pseries machine type have their own nr-threads property, potentially > > allowing cores with dif

Re: [Qemu-devel] [PATCH for-2.9?] 9pfs: fix migration_block leak

2017-03-31 Thread Greg Kurz
On Fri, 31 Mar 2017 16:01:15 +0800 Li Qiang wrote: > 2017-03-31 15:07 GMT+08:00 Greg Kurz : > > > On Fri, 31 Mar 2017 09:26:35 +0800 > > Li Qiang wrote: > > > > > Hello, > > > > > > 2017-03-30 23:46 GMT+08:00 Greg Kurz : > > > > > > > On Thu, 30 Mar 2017 08:25:25 -0500 > > > > Eric Blake wrote

Re: [Qemu-devel] [PATCH 44/51] ram: reorganize last_sent_block

2017-03-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We were setting it far away of when we changed it. Now everything is > done inside save_page_header. Once there, reorganize code to pass > RAMState. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c |

[Qemu-devel] [RFC PATCH 2/4] nvdimm: add functions to initialize and perform flush on back store

2017-03-31 Thread Haozhong Zhang
fsync() is used to persist modifications to the back store. If the host NVDIMM is used as the back store, fsync() on Linux will trigger the write to the host flush hint address. Signed-off-by: Haozhong Zhang --- hw/mem/nvdimm.c | 22 ++ include/hw/mem/nvdimm.h | 13 ++

[Qemu-devel] [RFC PATCH 1/4] pc-dimm: add 'reserved-size' to reserve address range after the ending address

2017-03-31 Thread Haozhong Zhang
If option 'reserved-size=RSVD' is present, QEMU will reserve an address range of size 'RSVD' after the ending address of pc-dimm device. For the following example, -object memory-backend-file,id=mem0,size=4G,... -device nvdimm,id=dimm0,memdev=mem0,reserved-size=4K,... -device pc-dimm,i

[Qemu-devel] [RFC PATCH 0/4] nvdimm: enable flush hint address structure

2017-03-31 Thread Haozhong Zhang
This patch series constructs the flush hint address structures for nvdimm devices in QEMU. It's of course not for 2.9. I send it out early in order to get comments on one point I'm uncertain (see the detailed explanation below). Thanks for any comments in advance! Background --- Flus

[Qemu-devel] [RFC PATCH 3/4] nvdimm acpi: record the cache line size in AcpiNVDIMMState

2017-03-31 Thread Haozhong Zhang
Software is allowed to write up to a cache line of data to the flush hint address (ACPI spec 6.1, Table 5-135). NVDIMM ACPI code needs this parameter to decide the address space size for flush hint addresses. Signed-off-by: Haozhong Zhang --- hw/acpi/nvdimm.c| 5 - hw/i386/pc_piix.c

[Qemu-devel] [RFC PATCH 4/4] nvdimm acpi: build flush hint address structure if required

2017-03-31 Thread Haozhong Zhang
Add an boolean option 'flush-hint' to device 'nvdimm'. If it's on, a flush hint address structure will be constructed for each nvdimm device. Signed-off-by: Haozhong Zhang --- hw/acpi/nvdimm.c| 106 +--- hw/i386/pc.c| 5 ++- hw/m

Re: [Qemu-devel] [PATCH v2 7/7] vmdk: Update metadata for multiple clusters

2017-03-31 Thread Ashijeet Acharya
On Fri, Mar 31, 2017 at 12:56 PM, Fam Zheng wrote: > On Sat, 03/25 16:48, Ashijeet Acharya wrote: >> Include a next pointer in VmdkMetaData struct to point to the previous >> allocated L2 table. Modify vmdk_L2update to start updating metadata for >> allocation of multiple clusters at once. >> >> S

Re: [Qemu-devel] xhci migration breakage

2017-03-31 Thread Dr. David Alan Gilbert
* Gerd Hoffmann (kra...@redhat.com) wrote: > Hi, > > > dest: > > (qemu) red_dispatcher_loadvm_commands: > > usb-storage msd post_load 0x7f45f510ee50 sig=0 tag=0 > > > > I added these as debug on the 'usb-storage' vmsd element; but > > the signature/tag being 0 I assume they're not the culprit.

Re: [Qemu-devel] qemu-2.9 crashes in tcg_handle_interrupt() during winx64 boot

2017-03-31 Thread Alex Bennée
Igor Mammedov writes: > On Thu, 30 Mar 2017 16:05:58 +0100 > Alex Bennée wrote: > >> Igor Mammedov writes: >> >> > (PS: resend due to wrong qemu-devel mail list address in original >> > email) >> >> Le *sigh* another way of x86 generating IRQs ;-) >> >> Could you test this please? >> >> target

Re: [Qemu-devel] [PATCH v3 for-2.9 2/9] char: Fix socket with "type": "vsock" address

2017-03-31 Thread Stefan Hajnoczi
On Thu, Mar 30, 2017 at 07:43:10PM +0200, Markus Armbruster wrote: > Watch this: > > $ qemu-system-x86_64 -nodefaults -S -display none -qmp stdio > {"QMP": {"version": {"qemu": {"micro": 91, "minor": 8, "major": 2}, > "package": " (v2.8.0-1195-gf84141e-dirty)"}, "capabilities": []}} >

Re: [Qemu-devel] [PATCH v2 7/7] vmdk: Update metadata for multiple clusters

2017-03-31 Thread Fam Zheng
On Fri, 03/31 14:17, Ashijeet Acharya wrote: > On Fri, Mar 31, 2017 at 12:56 PM, Fam Zheng wrote: > > On Sat, 03/25 16:48, Ashijeet Acharya wrote: > >> Include a next pointer in VmdkMetaData struct to point to the previous > >> allocated L2 table. Modify vmdk_L2update to start updating metadata fo

Re: [Qemu-devel] [PATCH 46/51] ram: Remember last_page instead of last_offset

2017-03-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela > --- > migration/ram.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/migration/ram.c b/migration/ram.c > index b1a031e..57b776b 100644 > --- a/migration/ram.c > +++ b/migration/

Re: [Qemu-devel] [PATCH v3 00/11] MTTCG fix-ups for 2.9

2017-03-31 Thread Pavel Dovgalyuk
> From: mttcg-requ...@listserver.greensocs.com > [mailto:mttcg-requ...@listserver.greensocs.com] > Pavel Dovgalyuk writes: > >> From: mttcg-requ...@listserver.greensocs.com [mailto:mttcg- > requ...@listserver.greensocs.com] > >> Pavel Dovgalyuk writes: > >> >> From: mttcg-requ...@listserver.gree

Re: [Qemu-devel] [PATCH v2 7/7] vmdk: Update metadata for multiple clusters

2017-03-31 Thread Ashijeet Acharya
On Fri, Mar 31, 2017 at 2:38 PM, Fam Zheng wrote: > On Fri, 03/31 14:17, Ashijeet Acharya wrote: >> On Fri, Mar 31, 2017 at 12:56 PM, Fam Zheng wrote: >> > On Sat, 03/25 16:48, Ashijeet Acharya wrote: >> >> Include a next pointer in VmdkMetaData struct to point to the previous >> >> allocated L2

Re: [Qemu-devel] [PATCH kernel v8 3/4] mm: add inerface to offer info about unused pages

2017-03-31 Thread Wei Wang
On 03/30/2017 01:48 AM, Michael S. Tsirkin wrote: On Fri, Mar 17, 2017 at 02:55:33PM +0800, Wei Wang wrote: On 03/17/2017 05:28 AM, Andrew Morton wrote: On Thu, 16 Mar 2017 15:08:46 +0800 Wei Wang wrote: From: Liang Li This patch adds a function to provides a snapshot of the present system

Re: [Qemu-devel] [PATCH v3] hmp: fix "info cpu" segfault

2017-03-31 Thread Dr. David Alan Gilbert
* Iwona Kotlarska (iwona260...@gmail.com) wrote: > Running QEMU with "qemu-system-x86_64 -M none -nographic -m 256" and executing > "dump-guest-memory /dev/null 0 8192" results in segfault. > Fix by checking if we have CPU. > > Signed-off-by: Iwona Kotlarska Queued. I've fixed up the title to

Re: [Qemu-devel] [PULL 0/2] Net patches

2017-03-31 Thread Peter Maydell
On 31 March 2017 at 02:15, Jason Wang wrote: > The following changes since commit ddc2c3a57e0752c0650fdb735a8b8322542d4248: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2017-03-30 18:02:33 +0100) > > are available in the git repository at: > > https://githu

Re: [Qemu-devel] [RFC v3 2/3] hw/intc/arm_gicv3_its: Implement state save/restore

2017-03-31 Thread Auger Eric
Hi Juan, On 28/03/2017 21:45, Juan Quintela wrote: > Eric Auger wrote: >> We need to handle both registers and ITS tables. While >> register handling is standard, ITS table handling is more >> challenging since the kernel API is devised so that the >> tables are flushed into guest RAM and not in

Re: [Qemu-devel] [PATCH v3 00/11] MTTCG fix-ups for 2.9

2017-03-31 Thread Paolo Bonzini
On 31/03/2017 11:16, Pavel Dovgalyuk wrote: > > Do you think it would be worth including the dumper script I wrote in > ./scripts/? I mainly wrote it to aid my understanding of the code flow > but it might be useful in future investigations? Yes, I think it is. Alternatively, adding "-d rr" th

Re: [Qemu-devel] [RHEL-7.4 qemu-kvm PATCH] target-i386: get/set/migrate XSAVES state

2017-03-31 Thread Paolo Bonzini
On 30/03/2017 23:01, Eduardo Habkost wrote: > From: Wanpeng Li > > Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1327593 > Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=12913269 > > Add xsaves related definition, it also adds corresponding part > to kvm_get/put, and

[Qemu-devel] [PATCH v3] qemu-ga: add guest-get-osrelease command

2017-03-31 Thread Vinzenz 'evilissimo' Feenstra
From: Vinzenz Feenstra This is a concept change over v2 of the guest-get-osinfo command. The command now adds all information in the os-release format. Vinzenz Feenstra (1): qemu-ga: add guest-get-osrelease command qga/commands-posix.c | 41 + qga/commands-win32.c | 127

Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status

2017-03-31 Thread Paolo Bonzini
On 31/03/2017 09:55, Peter Lieven wrote: >>> Would it be an idea to introduce an inverse flag live BDRV_BLOCK_NOT_ZERO >>> for cases where we know that there is really DATA and thus can avoid the >>> second callout? >> How would you know that a block is nonzero? > I would trust the metadata. At l

[Qemu-devel] [PATCH v3] qemu-ga: add guest-get-osrelease command

2017-03-31 Thread Vinzenz 'evilissimo' Feenstra
From: Vinzenz Feenstra Add a new 'guest-get-osrelease' command to report OS information in the os-release format. As documented here: https://www.freedesktop.org/software/systemd/man/os-release.html The win32 implementation generates the information. On POSIX systems the /etc/os-release or /usr/

[Qemu-devel] [PATCH] xhci: flush dequeue pointer to endpoint context

2017-03-31 Thread Gerd Hoffmann
When done processing a endpoint ring we must update the dequeue pointer in the endpoint context in guest memory. This is needed to make sure the guest has a correct view of things and also to make live migration work properly, because xhci post_load restores alot of the state from xhci data struct

Re: [Qemu-devel] [PATCH qemu] pci: Only unmap bus_master_enabled_region if was added previously

2017-03-31 Thread Max Reitz
On 31.03.2017 06:47, Alexey Kardashevskiy wrote: > Normally pci_init_bus_master() would be called either via > bus->machine_done.notify or directly from do_pci_register_device(). > > However if a device's realize() failed, pci_init_bus_master() is not > called, and do_pci_unregister_device() fails

Re: [Qemu-devel] [PATCH] xhci: flush dequeue pointer to endpoint context

2017-03-31 Thread Dr. David Alan Gilbert
* Gerd Hoffmann (kra...@redhat.com) wrote: > When done processing a endpoint ring we must update the dequeue pointer > in the endpoint context in guest memory. This is needed to make sure > the guest has a correct view of things and also to make live migration > work properly, because xhci post_lo

Re: [Qemu-devel] [PULL for-2.9 0/2] qemu-ga patch queue for 2.9

2017-03-31 Thread Peter Maydell
On 31 March 2017 at 05:01, Michael Roth wrote: > The following changes since commit df9046363220e57d45818312759b954c033c58ab: > > Update version for v2.9.0-rc2 release (2017-03-28 19:11:16 +0100) > > are available in the git repository at: > > git://github.com/mdroth/qemu.git tags/qga-pull-201

[Qemu-devel] [PULL 0/1] hmp queue

2017-03-31 Thread Dr. David Alan Gilbert (git)
t://github.com/dagrh/qemu.git tags/pull-hmp-20170331 for you to fetch changes up to fd5d23babf9838c1b099a9e8020e778aac0ebb4d: hmp: fix "dump-quest-memory" segfault (2017-03-31 11:53:42 +0100) ---

[Qemu-devel] [PULL 1/1] hmp: fix "dump-quest-memory" segfault

2017-03-31 Thread Dr. David Alan Gilbert (git)
From: Iwona Kotlarska Running QEMU with "qemu-system-x86_64 -M none -nographic -m 256" and executing "dump-guest-memory /dev/null 0 8192" results in segfault. Fix by checking if we have CPU. Signed-off-by: Iwona Kotlarska Message-Id: <20170330050924.22134-1-iwona260...@gmail.com> Reviewed-by: S

Re: [Qemu-devel] [PATCH v3 00/11] MTTCG fix-ups for 2.9

2017-03-31 Thread Alex Bennée
Pavel Dovgalyuk writes: >> From: mttcg-requ...@listserver.greensocs.com >> [mailto:mttcg-requ...@listserver.greensocs.com] >> Pavel Dovgalyuk writes: >> >> From: mttcg-requ...@listserver.greensocs.com [mailto:mttcg- >> requ...@listserver.greensocs.com] >> >> Pavel Dovgalyuk writes: >> >> >> F

[Qemu-devel] [for-2.9 PATCH 0/3] 9pfs: fix 9p session reset

2017-03-31 Thread Greg Kurz
When resetting a 9p session we leak the migration blocker: this makes the device unmigratable until the guest remounts/unmounts the 9p share again. We also leak in-flight I/O whose completion will occur in the context of the new session. This violates the 9p specification [*] and is likely to confu

[Qemu-devel] [for-2.9 PATCH 3/3] 9pfs: drop useless loop in v9fs_reset()

2017-03-31 Thread Greg Kurz
We don't need to wait for the PDU active list to be empty: virtfs_reset() already takes care of that. Signed-off-by: Greg Kurz --- hw/9pfs/9p.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 86ed9065c4e2..16ef6bd5bd8c 100644 --- a/hw/

[Qemu-devel] [for-2.9 PATCH 2/3] 9pfs: cancel active PDUs in virtfs_reset()

2017-03-31 Thread Greg Kurz
According to the 9P spec [1], the version operation should abort any outstanding I/O and clunk all fids, so that a new session may be started in a clean state. The current code tries to clunk and free fids, but it doesn't wait for active PDUs to complete. This can cause an I/O to actually complete

[Qemu-devel] [for-2.9 PATCH 1/3] 9pfs: clear migration blocker at session reset

2017-03-31 Thread Greg Kurz
The migration blocker survives a device reset: if the guest mounts a 9p share and then gets rebooted with system_reset, it will be unmigratable until it remounts and umounts the 9p share again. This happens because the migration blocker is supposed to be cleared when we put the last reference on t

Re: [Qemu-devel] [PATCH v3 00/11] MTTCG fix-ups for 2.9

2017-03-31 Thread Paolo Bonzini
On 31/03/2017 13:21, Alex Bennée wrote: > Anyway I think I'm getting closer to narrowing it down. On record I see > replay_current_step jump backwards with this: > > /* A common event print, called when reading or saving an event */ > static void print_event(uint8_t event) > { > static int e

[Qemu-devel] [RHEL-7.4 qemu-kvm PATCH] target-i386: get/set/migrate XSAVES state

2017-03-31 Thread Eduardo Habkost
From: Wanpeng Li Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1327593 Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=12913269 Add xsaves related definition, it also adds corresponding part to kvm_get/put, and vmstate. Backport notes: * As we didn't have unmigratable_

Re: [Qemu-devel] [RHEL-7.4 qemu-kvm PATCH] target-i386: get/set/migrate XSAVES state

2017-03-31 Thread Eduardo Habkost
Please ignore this. I sent it to the wrong mailing list (again). On Fri, Mar 31, 2017 at 08:35:11AM -0300, Eduardo Habkost wrote: > From: Wanpeng Li > > Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1327593 > Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=12913269 > >

Re: [Qemu-devel] [PATCH v2] hw/intc/arm_gicv3_kvm: Check KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS in reset

2017-03-31 Thread Peter Maydell
On 28 March 2017 at 18:20, Eric Auger wrote: > KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS needs to be checked before > attempting to read ICC_CTLR_EL1; otherwise kernel versions not > exposing this kvm device group will be incompatible with qemu 2.9. > > Fixes: 07a5628 ("hw/intc/arm_gicv3_kvm: Reset GICv3

Re: [Qemu-devel] [RfC PATCH 2/4] memory: add support getting and using a dirty bitmap copy.

2017-03-31 Thread Paolo Bonzini
On 30/03/2017 08:55, Gerd Hoffmann wrote: > > +struct DirtyCopy { > +ram_addr_t start; > +ram_addr_t end; > +unsigned long dirty[]; > +}; > + > #endif Maybe DirtyBitmapSnapshot (and s/copy/snapshot/ in the rest of the API too)? Paolo

Re: [Qemu-devel] [RFC PATCH qemu 2/5] spapr-iommu: Subclass TYPE_IOMMU_MEMORY_REGION

2017-03-31 Thread Alexey Kardashevskiy
On 31/03/17 00:00, Paolo Bonzini wrote: > > > On 30/03/2017 14:47, Alexey Kardashevskiy wrote: >> +static int spapr_tce_get_fd(IOMMUMemoryRegion *iommu) >> +{ >> +sPAPRTCETable *tcet = container_of(iommu, sPAPRTCETable, iommu); >> + >> +return tcet->fd; >> +} >> + >> static int spapr_tce

Re: [Qemu-devel] [PATCH qemu] pci: Only unmap bus_master_enabled_region if was added previously

2017-03-31 Thread Alexey Kardashevskiy
On 31/03/17 21:33, Max Reitz wrote: > On 31.03.2017 06:47, Alexey Kardashevskiy wrote: >> Normally pci_init_bus_master() would be called either via >> bus->machine_done.notify or directly from do_pci_register_device(). >> >> However if a device's realize() failed, pci_init_bus_master() is not >> ca

Re: [Qemu-devel] [RFC PATCH qemu 2/5] spapr-iommu: Subclass TYPE_IOMMU_MEMORY_REGION

2017-03-31 Thread Paolo Bonzini
On 31/03/2017 13:47, Alexey Kardashevskiy wrote: >>> >>> +static void spapr_iommu_memory_region_class_init(ObjectClass *k, void >>> *data) >>> +{ >>> +sPAPRIOMMUMemoryRegionClass *smrc = SPAPR_IOMMU_MEMORY_REGION_CLASS(k); >>> + >>> +smrc->get_fd = spapr_tce_get_fd; >>> +} >>> + >> You

[Qemu-devel] [PATCH for-2.9 0/2] curl: Extend and fix blockdev-add schema

2017-03-31 Thread Max Reitz
Yes, it's yet another episode in our popular get-blockdev-add-ready-for-2.9 drama! Right now, the schema for the curl block driver is seriously lacking. This series improves things at least a bit. To improve things seriously, we might want to structure the URL instead of it being just a plain str

[Qemu-devel] [PATCH for-2.9 1/2] qapi/curl: Extend and fix blockdev-add schema

2017-03-31 Thread Max Reitz
The curl block driver accepts more options than just "filename"; also, the URL is actually expected to be passed through the "url" option instead of "filename". Signed-off-by: Max Reitz --- qapi/block-core.json | 103 ++- 1 file changed, 94 inserti

[Qemu-devel] [PATCH for-2.9 2/2] block/curl: Check protocol prefix

2017-03-31 Thread Max Reitz
If the user has explicitly specified a block driver and thus a protocol, we have to make sure the URL's protocol prefix matches. Otherwise the latter will silently override the former which might catch some users by surprise. Signed-off-by: Max Reitz --- block/curl.c | 10 ++ 1 file chan

Re: [Qemu-devel] qemu-2.9 crashes in tcg_handle_interrupt() during winx64 boot

2017-03-31 Thread Paolo Bonzini
On 31/03/2017 10:58, Alex Bennée wrote: > > Igor Mammedov writes: > >> On Thu, 30 Mar 2017 16:05:58 +0100 >> Alex Bennée wrote: >> >>> Igor Mammedov writes: >>> (PS: resend due to wrong qemu-devel mail list address in original email) >>> >>> Le *sigh* another way of x86 generating

Re: [Qemu-devel] [PATCH qemu] pci: Only unmap bus_master_enabled_region if was added previously

2017-03-31 Thread Marcel Apfelbaum
On 03/31/2017 07:47 AM, Alexey Kardashevskiy wrote: Normally pci_init_bus_master() would be called either via bus->machine_done.notify or directly from do_pci_register_device(). However if a device's realize() failed, pci_init_bus_master() is not called, and do_pci_unregister_device() fails on m

Re: [Qemu-devel] [PATCH 45/51] ram: Use page number instead of an address for the bitmap operations

2017-03-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We use an unsigned long for the page number. Notice that our bitmaps > already got that for the index, so we have that limit. > > Signed-off-by: Juan Quintela > --- > migration/ram.c | 76 > ++---

Re: [Qemu-devel] [PATCH 47/51] ram: Change offset field in PageSearchStatus to page

2017-03-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We are moving everything to work on pages, not addresses. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 50 +- > 1 file changed, 25 insertions(+), 25

[Qemu-devel] [PATCH] tests/libqtest.c: Delete possible stale unix sockets

2017-03-31 Thread Peter Maydell
Occasionally if a test crashes or is interrupted by the user at the wrong moment it could leave behind a stale UNIX socket in /tmp/. This will then cause a subsequent test run to fail spuriously with tests/libqtest.c:70:init_socket: assertion failed (ret != -1): (-1 != -1) if it happens to reuse t

Re: [Qemu-devel] [PULL 0/1] hmp queue

2017-03-31 Thread Peter Maydell
> into staging (2017-03-31 11:09:51 +0100) > > are available in the git repository at: > > git://github.com/dagrh/qemu.git tags/pull-hmp-20170331 > > for you to fetch changes up to fd5d23babf9838c1b099a9e8020e778aac0ebb4d: > > hm

Re: [Qemu-devel] [PATCH v7 2/3] iotests: Improve image-clear tests on non-aligned image

2017-03-31 Thread Max Reitz
On 31.03.2017 00:36, Eric Blake wrote: > Tweak 097 and 176 to operate on an image that is not cluster-aligned, > to give further coverage of clearing out an entire image. > > Tested for qcow (97) and qcow2 (97 and 176). > > The fact that there is a subtle difference between the expected > outputs

Re: [Qemu-devel] [PATCH v7 3/3] qcow2: Discard unaligned tail when wiping image

2017-03-31 Thread Max Reitz
On 31.03.2017 00:36, Eric Blake wrote: > The previous commit pointed out a subtle difference between the > fast and slow path of qcow2_make_empty(), where we failed to discard > the final (partial) cluster of an unaligned image. > > The problem stems from the fact that qcow2_discard_clusters() was

[Qemu-devel] [Bug 1490611] Re: Using qemu >=2.2.1 to convert raw->VHD (fixed) adds extra padding to the result file, which Microsoft Azure rejects as invalid

2017-03-31 Thread Steve Langasek
** Changed in: qemu (Ubuntu Xenial) Importance: Medium => Wishlist -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1490611 Title: Using qemu >=2.2.1 to convert raw->VHD (fixed) adds extra padding

Re: [Qemu-devel] [PATCH RFC] hw/pvrdma: Proposal of a new pvrdma device

2017-03-31 Thread Adit Ranadive
On Thu Mar 30 2017 13:28:21 GMT-0700 (PDT), Doug Ledford wrote: > On 3/30/17 9:13 AM, Leon Romanovsky wrote: > > On Thu, Mar 30, 2017 at 02:12:21PM +0300, Marcel Apfelbaum wrote: > > > From: Yuval Shaia > > > > > > Hi, > > > > > > General description > > > === > > > This is a v

Re: [Qemu-devel] [PATCH v5] hw/unicore32: remove wrong assertion in puv machine init

2017-03-31 Thread Thomas Huth
On 30.03.2017 18:50, Suramya Shah wrote: > Running QEMU with qemu-system-unicore32 without the kernel parameter results > in an assertion error. > Assert should not be used to check user provided parameters. Report an error > and exit instead > Signed-off-by: Suramya Shah Nit: There should be a

[Qemu-devel] [Bug 1490611] Update Released

2017-03-31 Thread Steve Langasek
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

Re: [Qemu-devel] [PATCH for-2.9] iotests: Fix test 147

2017-03-31 Thread Max Reitz
On 31.03.2017 00:12, Max Reitz wrote: > This test has been broken by changing NBD's blockdev-add interface (from > taking a SocketAddress to taking a SocketAddressFlat). This patch makes > it work again. > > Unfortunately, we cannot just flatten all of the addresses because > nbd-server-start stil

[Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters()

2017-03-31 Thread Peter Maydell
Coverity (CID 1307776) points out that in the multiply: space = to_allocate * s->tracks; we are trying to calculate a 64 bit result but the types of to_allocate and s->tracks mean that we actually calculate a 32 bit result. Add an explicit cast to force a 64 bit multiply. Signed-off-by: Peter Ma

Re: [Qemu-devel] [PATCH v3 00/11] MTTCG fix-ups for 2.9

2017-03-31 Thread Alex Bennée
Alex Bennée writes: > Pavel Dovgalyuk writes: > >>> From: mttcg-requ...@listserver.greensocs.com >>> [mailto:mttcg-requ...@listserver.greensocs.com] >>> Pavel Dovgalyuk writes: >>> >> From: mttcg-requ...@listserver.greensocs.com [mailto:mttcg- >>> requ...@listserver.greensocs.com] >>> >> Pave

Re: [Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters()

2017-03-31 Thread Philippe Mathieu-Daudé
Hi, Eduardo you seem skilled regarding Coccinelle scripts, is it possible to write one to find those overflows? Peter having one more macro might help or confuses more? #define MULTIPLY64(a32, b32) ((int64_t)a32 * b32) On 03/31/2017 10:13 AM, Peter Maydell wrote: Coverity (CID 1307776) poin

Re: [Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters()

2017-03-31 Thread Peter Maydell
On 31 March 2017 at 14:27, Philippe Mathieu-Daudé wrote: > Eduardo you seem skilled regarding Coccinelle scripts, is it possible to > write one to find those overflows? This is the final one that Coverity reports on the current codebase. > Peter having one more macro might help or confuses more?

Re: [Qemu-devel] [PATCH] tests/libqtest.c: Delete possible stale unix sockets

2017-03-31 Thread Philippe Mathieu-Daudé
On 03/31/2017 09:36 AM, Peter Maydell wrote: Occasionally if a test crashes or is interrupted by the user at the wrong moment it could leave behind a stale UNIX socket in /tmp/. This will then cause a subsequent test run to fail spuriously with tests/libqtest.c:70:init_socket: assertion failed (

Re: [Qemu-devel] [PATCH for-2.9? v2 resend] ipmi: Fix macro issues

2017-03-31 Thread Corey Minyard
On 03/30/2017 03:00 PM, Eric Blake wrote: On 03/30/2017 02:10 PM, Corey Minyard wrote: Already reviewed by me, so now I'm just adding commentary: Is this still 2.9 material? It silences a build warning under clang, although I didn't analyze whether the unpatched code actually caused an observa

Re: [Qemu-devel] [PATCH v3 for-2.10 0/4] block: Add errp to b{lk, drv}_truncate()

2017-03-31 Thread Max Reitz
On 28.03.2017 22:51, Max Reitz wrote: > Having an Error parameter for these functions makes sense because we > sometimes want a bit more information than just "Something failed". Some > drivers already use error_report() and the like to emit this additional > information, so it's rather obvious tha

[Qemu-devel] [PATCH] qemu-io-cmds: Assert that global and nofile commands don't use ct->perms

2017-03-31 Thread Peter Maydell
It would be a bug for a command with the CMD_NOFILE_OK or CMD_FLAG_GLOBAL flags set to also set the ct->perms field, because the former says "OK for a file not to be open" but the latter is a check on a file. Add an assertion in qemuio_add_command() so we can catch that sort of buggy command defin

Re: [Qemu-devel] [PATCH v3] qemu-ga: add guest-get-osrelease command

2017-03-31 Thread Eric Blake
On 03/31/2017 05:19 AM, Vinzenz 'evilissimo' Feenstra wrote: > From: Vinzenz Feenstra > > This is a concept change over v2 of the guest-get-osinfo command. > The command now adds all information in the os-release format. Cover letters are not necessary (but don't hurt) for one-patch series - but

Re: [Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters()

2017-03-31 Thread Max Reitz
On 31.03.2017 15:13, Peter Maydell wrote: > Coverity (CID 1307776) points out that in the multiply: > space = to_allocate * s->tracks; > we are trying to calculate a 64 bit result but the types > of to_allocate and s->tracks mean that we actually calculate > a 32 bit result. Add an explicit cast

Re: [Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters()

2017-03-31 Thread Eduardo Habkost
On Fri, Mar 31, 2017 at 10:27:44AM -0300, Philippe Mathieu-Daudé wrote: > Hi, > > Eduardo you seem skilled regarding Coccinelle scripts, is it possible to > write one to find those overflows? Probably not. AFAIK, Coccinelle rules are based on local code syntax only. This means it doesn't know the

Re: [Qemu-devel] [PATCH v3] qemu-ga: add guest-get-osrelease command

2017-03-31 Thread Eric Blake
On 03/31/2017 05:19 AM, Vinzenz 'evilissimo' Feenstra wrote: > From: Vinzenz Feenstra > > Add a new 'guest-get-osrelease' command to report OS information in the > os-release format. As documented here: > https://www.freedesktop.org/software/systemd/man/os-release.html > > The win32 implementati

[Qemu-devel] [PATCH] main_loop: Make main_loop_wait() return void

2017-03-31 Thread Peter Maydell
In commit e330c118f2a5a the last usage of main_loop_wait() that cared about the return value was changed to no longer use it. Drop the now-useless return value and make the function return void. Signed-off-by: Peter Maydell --- Coverity complains (CID 1372464) about main_loop() calling main_loop_

Re: [Qemu-devel] [PATCH for-2.9 2/2] block/curl: Check protocol prefix

2017-03-31 Thread Philippe Mathieu-Daudé
On 03/31/2017 09:04 AM, Max Reitz wrote: If the user has explicitly specified a block driver and thus a protocol, we have to make sure the URL's protocol prefix matches. Otherwise the latter will silently override the former which might catch some users by surprise. Signed-off-by: Max Reitz R

[Qemu-devel] [for-2.10 PATCH] fsdev: move stub to libqemustub.a

2017-03-31 Thread Greg Kurz
The qemu_fsdev_add() stub is used by targets that don't build VirtFS, like CRIS for example. This can be handled by libqemustub.a. Signed-off-by: Greg Kurz --- fsdev/Makefile.objs |6 -- fsdev/qemu-fsdev-dummy.c | 21 - stubs/Makefile.objs |1 + stubs/

Re: [Qemu-devel] [PATCH] main_loop: Make main_loop_wait() return void

2017-03-31 Thread Peter Maydell
On 31 March 2017 at 14:51, Peter Maydell wrote: > In commit e330c118f2a5a the last usage of main_loop_wait() that cared > about the return value was changed to no longer use it. Drop the > now-useless return value and make the function return void. > > Signed-off-by: Peter Maydell > --- > Coverit

Re: [Qemu-devel] [PATCH v7 3/3] qcow2: Discard unaligned tail when wiping image

2017-03-31 Thread Eric Blake
On 03/31/2017 07:51 AM, Max Reitz wrote: > On 31.03.2017 00:36, Eric Blake wrote: >> The previous commit pointed out a subtle difference between the >> fast and slow path of qcow2_make_empty(), where we failed to discard >> the final (partial) cluster of an unaligned image. >> >> +/* The calle

Re: [Qemu-devel] [PATCH v7 3/3] qcow2: Discard unaligned tail when wiping image

2017-03-31 Thread Max Reitz
On 31.03.2017 15:56, Eric Blake wrote: > On 03/31/2017 07:51 AM, Max Reitz wrote: >> On 31.03.2017 00:36, Eric Blake wrote: >>> The previous commit pointed out a subtle difference between the >>> fast and slow path of qcow2_make_empty(), where we failed to discard >>> the final (partial) cluster of

Re: [Qemu-devel] [PATCH for-2.9? v2 resend] ipmi: Fix macro issues

2017-03-31 Thread Eric Blake
On 03/31/2017 08:32 AM, Corey Minyard wrote: >> Note, on the other hand, that a call such as >> IPMI_BT_SET_HBUSY(ib->control_reg, 2) would result in writing 0 to the >> HBUSY bit. In other words, the IPMI_BT_SET_HBUSY() macro is rather weird >> in that it sets or clears the HBUSY bit based solely

Re: [Qemu-devel] [PATCH] tests/libqtest.c: Delete possible stale unix sockets

2017-03-31 Thread Eric Blake
On 03/31/2017 07:36 AM, Peter Maydell wrote: > Occasionally if a test crashes or is interrupted by the user > at the wrong moment it could leave behind a stale UNIX > socket in /tmp/. This will then cause a subsequent test > run to fail spuriously with > tests/libqtest.c:70:init_socket: assertion

Re: [Qemu-devel] [for-2.10 PATCH] fsdev: move stub to libqemustub.a

2017-03-31 Thread Paolo Bonzini
On 31/03/2017 15:52, Greg Kurz wrote: > The qemu_fsdev_add() stub is used by targets that don't build VirtFS, like > CRIS for example. This can be handled by libqemustub.a. It can, the question is do we want them to. :) The original purpose of the stubs was for function residing in files that a

Re: [Qemu-devel] [PATCH 1/5] virtio: Error object based virtio_error()

2017-03-31 Thread Greg Kurz
On Tue, 28 Mar 2017 12:14:59 +0200 Cornelia Huck wrote: > On Tue, 28 Mar 2017 11:34:15 +0200 > Greg Kurz wrote: > > > On Tue, 28 Mar 2017 10:24:21 +0200 > > Cornelia Huck wrote: > > > > > On Tue, 28 Mar 2017 10:14:09 +0200 > > > Greg Kurz wrote: > > > > > > > On Mon, 27 Mar 2017 21:20:5

Re: [Qemu-devel] [PATCH] qemu-io-cmds: Assert that global and nofile commands don't use ct->perms

2017-03-31 Thread Max Reitz
On 31.03.2017 15:38, Peter Maydell wrote: > It would be a bug for a command with the CMD_NOFILE_OK or > CMD_FLAG_GLOBAL flags set to also set the ct->perms field, > because the former says "OK for a file not to be open" > but the latter is a check on a file. > > Add an assertion in qemuio_add_comm

Re: [Qemu-devel] [PATCH] main_loop: Make main_loop_wait() return void

2017-03-31 Thread Eric Blake
On 03/31/2017 08:51 AM, Peter Maydell wrote: > In commit e330c118f2a5a the last usage of main_loop_wait() that cared > about the return value was changed to no longer use it. Drop the > now-useless return value and make the function return void. > > Signed-off-by: Peter Maydell > --- > Coverity c

Re: [Qemu-devel] [PATCH v7 3/3] qcow2: Discard unaligned tail when wiping image

2017-03-31 Thread Eric Blake
On 03/31/2017 09:01 AM, Max Reitz wrote: >>Do I need to >> respin for that, or is it something a maintainer could tweak, or is the >> series fine as-is? > > Of course I can fix the code, but changing the commit messages is a bit > more i

  1   2   3   >