[Qemu-devel] [PATCH v6 0/2] vmdk: Optimize cluster allocation

2014-07-30 Thread Fam Zheng
V6: Address Stefan's comments. See patch 02 for changelog. (Thanks for reviewing) Fam Zheng (2): qemu-iotests: Add data pattern in version3 VMDK sample image in 059 vmdk: Optimize cluster allocation block/vmdk.c | 222 +

[Qemu-devel] [PATCH v6 1/2] qemu-iotests: Add data pattern in version3 VMDK sample image in 059

2014-07-30 Thread Fam Zheng
It's possible that we diverge from the specification with our implementation. Having a reference image in the test cases may detect such problems when we introduce a bug that can read what it creates, but can't handle a real VMDK. Signed-off-by: Fam Zheng f...@redhat.com ---

[Qemu-devel] [PATCH v6 2/2] vmdk: Optimize cluster allocation

2014-07-30 Thread Fam Zheng
This drops the unnecessary bdrv_truncate() from, and also improves, cluster allocation code path. Before, when we need a new cluster, get_cluster_offset truncates the image to bdrv_getlength() + cluster_size, and returns the offset of added area, i.e. the image length before truncating. This is

[Qemu-devel] [PATCH 2/3] pc: Create 2.2 machine type

2014-07-30 Thread Jan Kiszka
Yet identical to 2.1. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/i386/pc_piix.c| 19 --- hw/i386/pc_q35.c | 17 +++-- include/hw/i386/pc.h | 3 +++ 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc_piix.c

[Qemu-devel] [PATCH 3/3] hw/audio/intel-hda: Fix MSI capability address

2014-07-30 Thread Jan Kiszka
According to ICH9 spec, the MSI capability is located at 0x60. This is important for guest drivers that do not parse the capability chain and use absolute addresses instead. CC: Gerd Hoffmann kra...@redhat.com Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/audio/intel-hda.c | 4 +++-

[Qemu-devel] [PATCH 0/3] pc: Small fixes for Intel HDA config space and PC_COMPAT_1_0

2014-07-30 Thread Jan Kiszka
Patch 1 is a repost, likely a harmless issue as no one should have used QEMU 1.0 for such purposes that require compat migration (rather qemu-kvm at that time). Patch 2 prepares compat support for 2.1 machines and the last one fixes the MSI capability address of intel-hda in backward-compatible

Re: [Qemu-devel] [RFC PATCH v2 06/49] serial: fixing vmstate for save/restore

2014-07-30 Thread Pavel Dovgaluk
-Original Message- From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini Sent: Monday, July 28, 2014 1:59 PM To: Pavel Dovgalyuk; qemu-devel@nongnu.org Cc: peter.mayd...@linaro.org; peter.crosthwa...@xilinx.com; mark.bur...@greensocs.com;

[Qemu-devel] [PATCH 1/3] pc: Fix disabling of vapic for compat PC models

2014-07-30 Thread Jan Kiszka
We used to be able to address both the QEMU and the KVM APIC via apic. This doesn't work anymore. So we need to use their parent class to turn off the vapic on machines that should not expose them. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/i386/pc_piix.c | 2 +- 1 file changed, 1

Re: [Qemu-devel] [PATCH v2 4/7] bootindex: delete bootindex when device is removed

2014-07-30 Thread Gonglei (Arei)
Hi, -Original Message- From: Gerd Hoffmann [mailto:kra...@redhat.com] Sent: Friday, July 25, 2014 5:52 PM +del_boot_device_path(dev); You can call this from device_finalize() instead of placing it into each individual device. Maybe put this call in device_finalize is not

Re: [Qemu-devel] [RFC PATCH v2 00/49] Series short description

2014-07-30 Thread Pavel Dovgaluk
From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini - patch 16 should also use subsections, and perhaps apply to all other CPUs too? We implemented replay only for i386 and ARM. If we'll change other targets, it will not add record/replay capabilities

Re: [Qemu-devel] [PATCH] vmdk: improve streamOptimized vmdk support

2014-07-30 Thread Fam Zheng
On Mon, 07/07 10:54, Milos Vyletel wrote: VMDK's streamOptimized format is different that regular sparse format. s/that/from/ L1(GD) and L2(GT) tables are not predefined but rather generated and written during image creation mainly because there is no way to tell how much space data will

Re: [Qemu-devel] [PATCH] vmdk: improve streamOptimized vmdk support

2014-07-30 Thread Stefan Hajnoczi
On Tue, Jul 29, 2014 at 3:49 PM, Milos Vyletel milos.vyle...@gmail.com wrote: On Tue, Jul 29, 2014 at 10:37 AM, Stefan Hajnoczi stefa...@gmail.com wrote: On Tue, Jul 29, 2014 at 2:46 PM, Milos Vyletel milos.vyle...@gmail.com wrote: On Tue, Jul 29, 2014 at 9:37 AM, Stefan Hajnoczi

Re: [Qemu-devel] [PATCH 2/2] qemu-iotests: add multiwrite test cases

2014-07-30 Thread Stefan Hajnoczi
On Tue, Jul 29, 2014 at 4:11 PM, Eric Blake ebl...@redhat.com wrote: On 07/29/2014 06:41 AM, Stefan Hajnoczi wrote: This test case covers the basic bdrv_aio_multiwrite() scenarios: 1. Single request 2. Sequential requests 3. Overlapping requests 4. Disjoint requests Signed-off-by: Stefan

Re: [Qemu-devel] [PATCH 1/4] docs: Expand the list of supported image elements with L1/L2 tables

2014-07-30 Thread Fam Zheng
On Thu, 07/24 16:32, Maria Kustova wrote: Signed-off-by: Maria Kustova mari...@catit.be --- tests/image-fuzzer/docs/image-fuzzer.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/image-fuzzer/docs/image-fuzzer.txt b/tests/image-fuzzer/docs/image-fuzzer.txt

Re: [Qemu-devel] [PATCH 1/4] hw:i386:pc_piix: split pc_init1()

2014-07-30 Thread Chen, Tiejun
On 2014/7/29 19:26, Michael S. Tsirkin wrote: On Thu, Jul 24, 2014 at 07:30:26PM +0800, Tiejun Chen wrote: We'd like to split pc_init1 and then we can share something with other stuff. Signed-off-by: Tiejun Chen tiejun.c...@intel.com Did you test this patch? It does not look like it can

Re: [Qemu-devel] [PATCH 2/4] xen:hw:pci-host:piix: create host bridge to passthrough

2014-07-30 Thread Chen, Tiejun
On 2014/7/29 19:17, Michael S. Tsirkin wrote: On Thu, Jul 24, 2014 at 07:30:27PM +0800, Tiejun Chen wrote: Implement that pci s/that/a/ Fixed. host bridge to specific s/to specific/specific/ Fixed. to passthrough. Actually this just inherit s/inherit/inherits/ Fixed. the

Re: [Qemu-devel] [RFC PATCH v2 10/49] rtl8139: adding new fields to vmstate

2014-07-30 Thread Pavel Dovgaluk
From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini Il 28/07/2014 11:54, Pavel Dovgaluk ha scritto: +VMSTATE_TIMER_V(timer, RTL8139State, 5), timer need not be migrated, because it is reinstated by rtl8139_post_load. That's true for

Re: [Qemu-devel] [PATCH 3/4] xen:hw:pci-host:piix: introduce xen_igd_i440fx_init

2014-07-30 Thread Chen, Tiejun
On 2014/7/29 19:19, Michael S. Tsirkin wrote: On Thu, Jul 24, 2014 at 07:30:28PM +0800, Tiejun Chen wrote: This is almost same as an original i440fx_init but just work with that xen igd host bridge to passthrough. Signed-off-by: Tiejun Chen tiejun.c...@intel.com --- hw/pci-host/piix.c | 79

Re: [Qemu-devel] [PATCH 4/4] xen:hw:i386:pc_piix: introduce new machine for IGD passthrough

2014-07-30 Thread Chen, Tiejun
On 2014/7/29 19:29, Michael S. Tsirkin wrote: On Thu, Jul 24, 2014 at 07:30:29PM +0800, Tiejun Chen wrote: Now we can introduce a new machine, xenigd, specific to IGD passthrough. This can avoid involving other common codes. Signed-off-by: Tiejun Chen tiejun.c...@intel.com ---

Re: [Qemu-devel] Behavior of floating point conversion in case the float value is NaN

2014-07-30 Thread Peter Maydell
On 30 July 2014 05:58, Gaurav Sharma gauravs.2...@gmail.com wrote: In the floating point conversion support , if the float value is NaN, I can see that the largest integer value is returned. 1. Is this as per std ? In the IEEE 754 doc i could not find any statement which says, about this. I

Re: [Qemu-devel] [PATCH 2/3] pc: Create 2.2 machine type

2014-07-30 Thread Alex Bligh
On 30/07/2014 08:02, Jan Kiszka wrote: Yet identical to 2.1. If it's *really* identical to 2.1, are we going to add the 2.2 machine type to 2.1 as well, so that things that have difficulty using different source and destination machine types can migrate from 2.2 to 2.1? Or am I missing the

Re: [Qemu-devel] [PATCH 2/3] pc: Create 2.2 machine type

2014-07-30 Thread Jan Kiszka
On 2014-07-30 10:41, Alex Bligh wrote: On 30/07/2014 08:02, Jan Kiszka wrote: Yet identical to 2.1. If it's *really* identical to 2.1, are we going to add the 2.2 machine type to 2.1 as well, so that things that have difficulty using different source and destination machine types can

Re: [Qemu-devel] [PATCH 2/4] runner: Make a copy of a test image for destructive test commands

2014-07-30 Thread Fam Zheng
On Thu, 07/24 16:32, Maria Kustova wrote: Signed-off-by: Maria Kustova mari...@catit.be --- tests/image-fuzzer/runner/runner.py | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/image-fuzzer/runner/runner.py b/tests/image-fuzzer/runner/runner.py

[Qemu-devel] [PATCH v2] aarch64: Allow -kernel option to take a gzip-compressed kernel.

2014-07-30 Thread Richard W.M. Jones
On aarch64 it is the bootloader's job to uncompress the kernel. UEFI and u-boot bootloaders do this automatically when the kernel is gzip-compressed. However the qemu -kernel option does not do this. The following command does not work: qemu-system-aarch64 [...] -kernel /boot/vmlinuz

Re: [Qemu-devel] [Bug 1297218] Re: guest hangs after live migration due to tsc jump

2014-07-30 Thread Alex Bligh
On 29/07/2014 17:45, Paul Boven wrote: https://bugs.launchpad.net/bugs/1297218 ... Bug description: We have two identical Ubuntu servers running libvirt/kvm/qemu, sharing a Gluster filesystem. Guests can be live migrated between them. However, live migration often leads to the guest

[Qemu-devel] [PATCH v2 2/2] qemu-iotests: add multiwrite test cases

2014-07-30 Thread Stefan Hajnoczi
This test case covers the basic bdrv_aio_multiwrite() scenarios: 1. Single request 2. Sequential requests (AABB) 3. Superset overlapping requests (AABBAA) 4. Subset overlapping requests (BBAABB) 5. Head overlapping requests (AABB) 6. Tail overlapping requests (BBAA) 7. Disjoint requests (AA BB)

[Qemu-devel] [PATCH v2 0/2] block: fix multiwrite_merge() overlapping requests

2014-07-30 Thread Stefan Hajnoczi
v2: * s/subset/superset/ in Patch 1 commit message [fam] * Add additional overlapping request test cases [eblake] This is a fix for https://bugs.launchpad.net/qemu/+bug/1343827. Patch 1 fixes the bug. Patch 2 adds a qemu-iotests test case to prevent regressions. Stefan Hajnoczi (2):

[Qemu-devel] [PATCH v2 1/2] block: fix overlapping multiwrite requests

2014-07-30 Thread Stefan Hajnoczi
When request A is a strict superset of request B: multiwrite_merge() merges them as follows: AA The tail of request A should have been included: AAAA This patch fixes data loss but this code path is probably rare. Since guests cannot assume ordering between

Re: [Qemu-devel] [PATCH 1/3] pc: Fix disabling of vapic for compat PC models

2014-07-30 Thread Michael S. Tsirkin
On Wed, Jul 30, 2014 at 09:01:59AM +0200, Jan Kiszka wrote: We used to be able to address both the QEMU and the KVM APIC via apic. This doesn't work anymore. So we need to use their parent class to turn off the vapic on machines that should not expose them. Signed-off-by: Jan Kiszka

Re: [Qemu-devel] Behavior of floating point conversion in case the float value is NaN

2014-07-30 Thread Gaurav Sharma
Even in case of arm, the value returned in such cases is 0 Thanks, Gaurav On Wed, Jul 30, 2014 at 2:07 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 30 July 2014 05:58, Gaurav Sharma gauravs.2...@gmail.com wrote: In the floating point conversion support , if the float value is NaN,

Re: [Qemu-devel] [RFC PATCH v2 06/49] serial: fixing vmstate for save/restore

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 09:01, Pavel Dovgaluk ha scritto: -Original Message- From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini Sent: Monday, July 28, 2014 1:59 PM To: Pavel Dovgalyuk; qemu-devel@nongnu.org Cc: peter.mayd...@linaro.org;

[Qemu-devel] [PATCH v3] aarch64: Allow -kernel option to take a gzip-compressed kernel.

2014-07-30 Thread Richard W.M. Jones
On aarch64 it is the bootloader's job to uncompress the kernel. UEFI and u-boot bootloaders do this automatically when the kernel is gzip-compressed. However the qemu -kernel option does not do this. The following command does not work: qemu-system-aarch64 [...] -kernel /boot/vmlinuz

[Qemu-devel] [PATCH v3] aarch64: Allow -kernel option to take a gzip-compressed

2014-07-30 Thread Richard W.M. Jones
Compared to v2: - In the case where a kernel was larger than max_sz bytes, load_image_gzipped could overwrite max_sz bytes of memory (or overrun the buffer). Fixed. Rich.

Re: [Qemu-devel] [RFC PATCH v2 00/49] Series short description

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 09:44, Pavel Dovgaluk ha scritto: From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini - patch 16 should also use subsections, and perhaps apply to all other CPUs too? We implemented replay only for i386 and ARM. If we'll change other targets, it

Re: [Qemu-devel] [RFC PATCH v2 10/49] rtl8139: adding new fields to vmstate

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 10:24, Pavel Dovgaluk ha scritto: Assertions is a good idea, we added such warning message to qemu_get_timedate function to be sure, that it is used correctly with replay. Another thing, that could help for making snapshots - find a way to load replay structures before all

[Qemu-devel] [Bug 1297218] Re: guest hangs after live migration due to tsc jump

2014-07-30 Thread Andrey Korolyov
Serge, Paul As I can see all the cases in this ticket involves storage blkcopy with --copy-storage-inc. My initial reason for rolling this patchset back was a freeze on p2p migration without this flag being set. Although I am hitting both of the problems, and cumulative after-migration delay

Re: [Qemu-devel] Behavior of floating point conversion in case the float value is NaN

2014-07-30 Thread Peter Maydell
On 30 July 2014 10:13, Gaurav Sharma gauravs.2...@gmail.com wrote: Even in case of arm, the value returned in such cases is 0 True. We handle that in the arm-specific code before calling the softfloat function. -- PMM

[Qemu-devel] PO files; make install changing stuff in source dir

2014-07-30 Thread Dr. David Alan Gilbert
Hi, I'm finding that sometimes during make install the po/ directory in the source directory gets changed: in /home/dgilbert/try $ make -j 12 make install make -C po install make[1]: Entering directory `/home/dgilbert/try/po' GEN tr.mo GEN /home/dgilbert/git/qemu/po/de_DE.po GEN

[Qemu-devel] [PATCH for-2.2 0/9] memory: remove memory_region_destroy

2014-07-30 Thread Paolo Bonzini
Now that a memory region's owner is used in the QOM tree, there is no need to use memory_region_destroy explicitly. The last reference to keep a region alive will disappear simply when the parent is finalized and destroys all its properties. Paolo Paolo Bonzini (9): qom: object: delete

[Qemu-devel] [PATCH 5/9] nic: do not destroy memory regions in cleanup functions

2014-07-30 Thread Paolo Bonzini
The memory regions should be destroyed in the unrealize function; since these NICs are not even qdev-ified, they cannot be unplugged and they do not have to do anything to destroy their memory regions. Cc: stefa...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/net/dp8393x.c

[Qemu-devel] [PATCH 1/9] qom: object: delete properties before calling instance_finalize

2014-07-30 Thread Paolo Bonzini
This ensures that the children's unparent callback will still have a usable parent. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qom/object.c b/qom/object.c index 0e8267b..f301bc2 100644 --- a/qom/object.c

[Qemu-devel] [PATCH 7/9] memory: convert memory_region_destroy to object_unparent

2014-07-30 Thread Paolo Bonzini
Explicitly call object_unparent in the few places where we will re-create the memory region. If the memory region is simply being destroyed as part of device teardown, let QOM handle it. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- docs/memory.txt | 15 ++-

[Qemu-devel] [PATCH 4/9] vga: do not dynamically allocate chain4_alias

2014-07-30 Thread Paolo Bonzini
Instead, add a boolean variable to indicate the presence of the region. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/display/vga.c | 24 ++-- hw/display/vga_int.h | 3 ++- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/hw/display/vga.c

[Qemu-devel] [PATCH 9/9] tpm_tis: remove instance_finalize callback

2014-07-30 Thread Paolo Bonzini
It is never used, since ISA device are not hot-unpluggable. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/tpm/tpm_tis.c | 8 1 file changed, 8 deletions(-) diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index d398c16..82747ee 100644 --- a/hw/tpm/tpm_tis.c +++

[Qemu-devel] [PATCH 2/9] qom: object: move unparenting to the child property's release callback

2014-07-30 Thread Paolo Bonzini
This ensures that the unparent callback is called automatically when the parent object is finalized. Note that there's no need to keep a reference neither in object_unparent nor in object_finalize_child_property. The reference held by the child property itself will do. Reviewed-by: Peter

[Qemu-devel] [PATCH 6/9] ioport: split deletion and destruction

2014-07-30 Thread Paolo Bonzini
Of the two functions portio_list_del and portio_list_destroy, the latter is just freeing a memory area. However, portio_list_del is the logical equivalent of memory_region_del_subregion so destruction of memory regions does not belong there. Signed-off-by: Paolo Bonzini pbonz...@redhat.com ---

[Qemu-devel] [PATCH 3/9] sysbus: remove unused function sysbus_del_io

2014-07-30 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/core/sysbus.c| 5 - include/hw/sysbus.h | 1 - 2 files changed, 6 deletions(-) diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index f4e760d..414e2a1 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -242,11 +242,6 @@ void

[Qemu-devel] [PATCH 8/9] memory: remove memory_region_destroy

2014-07-30 Thread Paolo Bonzini
The function is empty after the previous patch, so remove it. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- backends/hostmem.c | 10 -- hw/audio/ac97.c| 9 - hw/audio/es1370.c | 8 hw/audio/intel-hda.c | 1 -

[Qemu-devel] QEMU IRQ Emulation

2014-07-30 Thread Raghavendra
Hello, I am new to QEMU development. Recently I've added code to emulate mma7660 (i2c based accelerometer) device. Most of the device code is done, but now I wish to emulate even the IRQs. So my question is how do I emulate IRQs for a particular device? I need some coding guidance as to how

Re: [Qemu-devel] [PATCH] pci: Use bus master address space for delivering MSI/MSI-X messages

2014-07-30 Thread Michael S. Tsirkin
On Sun, Jul 27, 2014 at 09:08:29AM +0200, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com The spec says (and real HW confirms this) that, if the bus master bit is 0, the device will not generate any PCI accesses. MSI and MSI-X messages fall among these, so we should use the

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Michael S. Tsirkin
On Tue, Jul 29, 2014 at 06:52:19AM -0400, Stefan Berger wrote: From: Stefan Berger stef...@linux.vnet.ibm.com Add an SSDT ACPI table for the TPM device. Add a TCPA table for BIOS logging area when a TPM is being used. The latter follows this spec here:

Re: [Qemu-devel] [PATCH v2 2/2] qemu-iotests: add multiwrite test cases

2014-07-30 Thread Eric Blake
On 07/30/2014 02:53 AM, Stefan Hajnoczi wrote: This test case covers the basic bdrv_aio_multiwrite() scenarios: 1. Single request 2. Sequential requests (AABB) 3. Superset overlapping requests (AABBAA) 4. Subset overlapping requests (BBAABB) 5. Head overlapping requests (AABB) 6. Tail

Re: [Qemu-devel] [PATCH 1/3] pc: Fix disabling of vapic for compat PC models

2014-07-30 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: Il 30/07/2014 10:57, Michael S. Tsirkin ha scritto: On Wed, Jul 30, 2014 at 09:01:59AM +0200, Jan Kiszka wrote: We used to be able to address both the QEMU and the KVM APIC via apic. This doesn't work anymore. So we need to use their parent class to

Re: [Qemu-devel] [PATCH v2 1/2] block: fix overlapping multiwrite requests

2014-07-30 Thread Eric Blake
On 07/30/2014 02:53 AM, Stefan Hajnoczi wrote: When request A is a strict superset of request B: multiwrite_merge() merges them as follows: AA The tail of request A should have been included: AAAA This patch fixes data loss but this code path is

Re: [Qemu-devel] QEMU IRQ Emulation

2014-07-30 Thread Eric Blake
[meta-response] On 07/30/2014 04:21 AM, Raghavendra wrote: Hello, I am new to QEMU development. Recently I've added code to emulate mma7660 (i2c based accelerometer) device. Most of the device code is done, but now I wish to emulate even the IRQs. While I don't have an answer for your

[Qemu-devel] [PATCH 0/2] tpm: acpi generation tweaks

2014-07-30 Thread Michael S. Tsirkin
This tweaks tpm code slightly for readability and robustness. On top of Stefen's patches. Michael S. Tsirkin (2): tpm: remove code duplication acpi: cleanups tcpa table generation hw/tpm/tpm_tis.h | 3 --- include/sysemu/tpm.h | 4 +++- hw/i386/acpi-build.c | 12 3 files

[Qemu-devel] [PATCH 1/2] tpm: remove code duplication

2014-07-30 Thread Michael S. Tsirkin
Move TYPE_TPM_TIS to tpm.h so it can be used by an inline function there. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/tpm/tpm_tis.h | 3 --- include/sysemu/tpm.h | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/tpm/tpm_tis.h b/hw/tpm/tpm_tis.h index

[Qemu-devel] [PATCH 2/2] acpi: cleanups tcpa table generation

2014-07-30 Thread Michael S. Tsirkin
Improve readability, no functional changes. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/i386/acpi-build.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 66cde2b..6ae3a9e 100644 ---

[Qemu-devel] [PATCH 00/14] dataplane: optimization and multi virtqueue support

2014-07-30 Thread Ming Lei
Hi, These patches bring up below 4 changes: - introduce selective coroutine bypass mechanism for improving performance of virtio-blk dataplane with raw format image - introduce object allocation pool and apply it to virtio-blk dataplane for improving its

[Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-30 Thread Ming Lei
This patch introduces several APIs for supporting bypass qemu coroutine in case of being not necessary and for performance's sake. Signed-off-by: Ming Lei ming@canonical.com --- include/block/coroutine.h |8 include/block/coroutine_int.h |5 + qemu-coroutine-lock.c

[Qemu-devel] [PATCH 03/15] block: support to bypass qemu coroutinue

2014-07-30 Thread Ming Lei
This patch adds bypass mode support for the coroutinue in bdrv_co_aio_rw_vector(), which is in the fast path of lots of block device, especially for virtio-blk dataplane. Signed-off-by: Ming Lei ming@canonical.com --- block.c | 129

[Qemu-devel] [PATCH 02/15] qemu aio: prepare for supporting selective bypass coroutine

2014-07-30 Thread Ming Lei
If device thinks that it isn't necessary to apply coroutine in its performance sensitive path, it can call qemu_aio_set_bypass_co(false) to bypass the coroutine which has supported bypass mode and just call the function directly. One example is virtio-blk dataplane. Signed-off-by: Ming Lei

[Qemu-devel] [PATCH 04/15] Revert raw-posix: drop raw_get_aio_fd() since it is no longer used

2014-07-30 Thread Ming Lei
This reverts commit 76ef2cf5493a215efc351f48ae7094d6c183fcac. Reintroduce the helper of raw_get_aio_fd() for enabling coroutinue bypass mode in case of raw image. Signed-off-by: Ming Lei ming@canonical.com --- block/raw-posix.c | 34 ++

[Qemu-devel] [PATCH 06/15] qemu/obj_pool.h: introduce object allocation pool

2014-07-30 Thread Ming Lei
This patch introduces object allocation pool for speeding up object allocation in fast path. Signed-off-by: Ming Lei ming@canonical.com --- include/qemu/obj_pool.h | 64 +++ 1 file changed, 64 insertions(+) create mode 100644

[Qemu-devel] [PATCH 09/15] linux-aio: fix submit aio as a batch

2014-07-30 Thread Ming Lei
In the enqueue path, we can't complete request, otherwise Co-routine re-entered recursively may be caused, so this patch fixes the issue with below ideas: - for -EAGAIN or partial completion, retry the submission by an introduced event handler - for part of completion,

[Qemu-devel] [PATCH 08/15] virtio: decrease size of VirtQueueElement

2014-07-30 Thread Ming Lei
VirtQueueElement is used in performance senstive path, so cut its size by half to speed up its allocation and decrease memory footprint in the dataplane I/O path. Signed-off-by: Ming Lei ming@canonical.com --- hw/net/virtio-net.c |4 +++- hw/virtio/dataplane/vring.c | 23

[Qemu-devel] [PATCH 10/15] linux-aio: increase max event to 256

2014-07-30 Thread Ming Lei
This patch increases max event to 256 for the comming virtio-blk multi virtqueue support. Signed-off-by: Ming Lei ming@canonical.com --- block/linux-aio.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/linux-aio.c b/block/linux-aio.c index 5eb9c92..c06a57d

[Qemu-devel] [PATCH 13/15] hw/virtio/virtio-blk.h: introduce VIRTIO_BLK_F_MQ

2014-07-30 Thread Ming Lei
Prepare for supporting mutli vqs per virtio-blk device. Signed-off-by: Ming Lei ming@canonical.com --- include/hw/virtio/virtio-blk.h |8 1 file changed, 8 insertions(+) diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h index 45f8894..ad70c9a 100644

[Qemu-devel] [PATCH 15/15] dataplane: virtio-blk: support mutlti virtqueue

2014-07-30 Thread Ming Lei
This patch supports to handle host notify from multi virt queues, but still process/submit io in the one iothread. In my fio test over VM which is hosted on the server host, if num_queues is set as 4, JOBS of fio script is set as 4, throughout can be improved by 30% compared with single virtqueue

[Qemu-devel] [PATCH 11/15] linux-aio: remove 'node' from 'struct qemu_laiocb'

2014-07-30 Thread Ming Lei
No one uses the 'node' field any more, so remove it from 'struct qemu_laiocb', and this can save 16byte for the struct on 64bit arch. Signed-off-by: Ming Lei ming@canonical.com --- block/linux-aio.c |1 - 1 file changed, 1 deletion(-) diff --git a/block/linux-aio.c b/block/linux-aio.c

[Qemu-devel] [PATCH 07/15] dataplane: use object pool to speed up allocation for virtio blk request

2014-07-30 Thread Ming Lei
g_slice_new(VirtIOBlockReq), its free pair and access the instance is a bit slow since sizeof(VirtIOBlockReq) takes more than 40KB, so use object pool to speed up its allocation and release. With this patch, ~5% throughput improvement is observed in the VM based on server. Signed-off-by: Ming

[Qemu-devel] [PATCH 12/15] hw/virtio-pci: introduce num_queues property

2014-07-30 Thread Ming Lei
This patch introduces the parameter of 'num_queues', and prepare for supporting mutli vqs of virtio-blk. Signed-off-by: Ming Lei ming@canonical.com --- hw/block/virtio-blk.c |1 + include/hw/virtio/virtio-blk.h |1 + 2 files changed, 2 insertions(+) diff --git

[Qemu-devel] [PATCH 14/15] hw/block/virtio-blk: create num_queues vqs if dataplane is enabled

2014-07-30 Thread Ming Lei
Now we only support multi vqs for dataplane case. Signed-off-by: Ming Lei ming@canonical.com --- hw/block/virtio-blk.c | 18 +- include/hw/virtio/virtio-blk.h |1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c

[Qemu-devel] [PATCH 05/15] dataplane: enable selective bypassing coroutine

2014-07-30 Thread Ming Lei
This patch enables selective bypassing for the coroutine in bdrv_co_aio_rw_vector() if the image format is raw. With this patch, ~7% throughput improvement for raw image is observed in the VM based on server. Signed-off-by: Ming Lei ming@canonical.com --- hw/block/dataplane/virtio-blk.c |

Re: [Qemu-devel] latest rc: virtio-blk hangs forever after migration

2014-07-30 Thread Marcin Gibuła
On 29.07.2014 18:58, Paolo Bonzini wrote: Il 18/07/2014 10:48, Paolo Bonzini ha scritto: It is easy to find out if the fix is related to 1 or 2/3: just write if (cpu-kvm_vcpu_dirty) { printf (do_kvm_cpu_synchronize_state_always: look at 2/3\n);

Re: [Qemu-devel] [PATCH 10/15] linux-aio: increase max event to 256

2014-07-30 Thread Eric Blake
On 07/30/2014 05:39 AM, Ming Lei wrote: This patch increases max event to 256 for the comming s/comming/coming/ virtio-blk multi virtqueue support. Signed-off-by: Ming Lei ming@canonical.com --- block/linux-aio.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-devel] vfio in the guest: no available reset mechanism

2014-07-30 Thread Le Tan
Hi, I am testing vfio in L1 with my VT-d emulation project. I assigned one of the two AHCI controllers in L1 to L2 via vfio. After I ran the QEMU in L1, it complains that: qemu-system-x86_64: vfio: Cannot reset device :00:03.0, no available reset mechanism. qemu-system-x86_64: vfio: Cannot

Re: [Qemu-devel] [PATCH 00/14] dataplane: optimization and multi virtqueue support

2014-07-30 Thread Christian Borntraeger
On 30/07/14 13:39, Ming Lei wrote: These patches bring up below 4 changes: - introduce selective coroutine bypass mechanism for improving performance of virtio-blk dataplane with raw format image - introduce object allocation pool and apply it to

Re: [Qemu-devel] vfio in the guest: no available reset mechanism

2014-07-30 Thread Michael S. Tsirkin
On Wed, Jul 30, 2014 at 08:24:04PM +0800, Le Tan wrote: Hi, I am testing vfio in L1 with my VT-d emulation project. I assigned one of the two AHCI controllers in L1 to L2 via vfio. After I ran the QEMU in L1, it complains that: qemu-system-x86_64: vfio: Cannot reset device :00:03.0, no

Re: [Qemu-devel] [RFC PATCH v2 00/49] Series short description

2014-07-30 Thread Frederic Konrad
On 30/07/2014 11:25, Paolo Bonzini wrote: Il 30/07/2014 09:44, Pavel Dovgaluk ha scritto: From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini - patch 16 should also use subsections, and perhaps apply to all other CPUs too? We implemented replay only for i386 and

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Michael S. Tsirkin
On Tue, Jul 29, 2014 at 06:52:19AM -0400, Stefan Berger wrote: From: Stefan Berger stef...@linux.vnet.ibm.com Add an SSDT ACPI table for the TPM device. Add a TCPA table for BIOS logging area when a TPM is being used. The latter follows this spec here:

Re: [Qemu-devel] [PATCH] qcow2: preallocate() extands image less enough

2014-07-30 Thread Stefan Hajnoczi
On Tue, May 27, 2014 at 10:57:59PM +0800, 蒙聪 wrote: cow2_alloc_cluster_offset() sets the host_offset pointing to the first byte of the cluster referenced by guest_offset other than to the exact byte referenced by guest_offset. In this case, preallocate() fails to extend the image large enough.

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Stefan Berger
Michael S. Tsirkin m...@redhat.com wrote on 07/30/2014 07:17:27 AM: From: Michael S. Tsirkin m...@redhat.com To: Stefan Berger/Watson/IBM@IBMUS Cc: qemu-devel@nongnu.org, Stefan Berger stef...@linux.vnet.ibm.com Date: 07/30/2014 07:18 AM Subject: Re: [PATCH v2] Add ACPI tables for TPM On

Re: [Qemu-devel] [RFC PATCH v2 00/49] Series short description

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 15:19, Frederic Konrad ha scritto: Start by submitting only the icount-based implementation, the other can come later. Paolo Hi all, I think that's actually our implementation cover no? (http://lists.gnu.org/archive/html/qemu-devel/2014-07/msg00677.html) Yes, Pavel's

Re: [Qemu-devel] latest rc: virtio-blk hangs forever after migration

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 14:02, Marcin Gibuła ha scritto: without it: called do_kvm_cpu_synchronize_state_always called do_kvm_cpu_synchronize_state_always called do_kvm_cpu_synchronize_state: vcpu not dirty, getting registers called do_kvm_cpu_synchronize_state: vcpu not dirty, getting registers

Re: [Qemu-devel] [PATCH 2/2] acpi: cleanups tcpa table generation

2014-07-30 Thread Stefan Berger
On 07/30/2014 07:34 AM, Michael S. Tsirkin wrote: Improve readability, no functional changes. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/i386/acpi-build.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/hw/i386/acpi-build.c

Re: [Qemu-devel] [PATCH 1/2] tpm: remove code duplication

2014-07-30 Thread Stefan Berger
On 07/30/2014 07:34 AM, Michael S. Tsirkin wrote: Move TYPE_TPM_TIS to tpm.h so it can be used by an inline function there. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/tpm/tpm_tis.h | 3 --- include/sysemu/tpm.h | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-)

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 13:39, Ming Lei ha scritto: This patch introduces several APIs for supporting bypass qemu coroutine in case of being not necessary and for performance's sake. No, this is wrong. Dataplane *must* use the same code as non-dataplane, anything else is a step backwards. If you want

Re: [Qemu-devel] [PATCH 08/15] virtio: decrease size of VirtQueueElement

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 13:39, Ming Lei ha scritto: diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index a60104c..943e72f 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -84,12 +84,17 @@ typedef struct VirtQueue VirtQueue; typedef struct

Re: [Qemu-devel] [PATCH v6 0/2] vmdk: Optimize cluster allocation

2014-07-30 Thread Stefan Hajnoczi
On Wed, Jul 30, 2014 at 02:39:08PM +0800, Fam Zheng wrote: V6: Address Stefan's comments. See patch 02 for changelog. (Thanks for reviewing) Fam Zheng (2): qemu-iotests: Add data pattern in version3 VMDK sample image in 059 vmdk: Optimize cluster allocation block/vmdk.c

Re: [Qemu-devel] [PATCH 09/15] linux-aio: fix submit aio as a batch

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 13:39, Ming Lei ha scritto: In the enqueue path, we can't complete request, otherwise Co-routine re-entered recursively may be caused, so this patch fixes the issue with below ideas: - for -EAGAIN or partial completion, retry the submission by an introduced event

Re: [Qemu-devel] [PATCH 10/15] linux-aio: increase max event to 256

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 13:39, Ming Lei ha scritto: This patch increases max event to 256 for the comming virtio-blk multi virtqueue support. Signed-off-by: Ming Lei ming@canonical.com --- block/linux-aio.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) What makes the new magic

[Qemu-devel] [PATCH V2 2/2] target-mips/translate.c: Add judgement for msb and lsb

2014-07-30 Thread Dongxue Zhang
Compare the real msb and lsb, when lsb = msb, tranlate the code. When lsb msb, just fall through and don't raise RI exception. Signed-off-by: Dongxue Zhang elta@gmail.com --- target-mips/translate.c | 43 --- 1 file changed, 24 insertions(+), 19

Re: [Qemu-devel] [PATCH 14/15] hw/block/virtio-blk: create num_queues vqs if dataplane is enabled

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 13:39, Ming Lei ha scritto: Now we only support multi vqs for dataplane case. Signed-off-by: Ming Lei ming@canonical.com --- hw/block/virtio-blk.c | 18 +- include/hw/virtio/virtio-blk.h |1 + 2 files changed, 18 insertions(+), 1

Re: [Qemu-devel] [PATCH 07/15] dataplane: use object pool to speed up allocation for virtio blk request

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 13:39, Ming Lei ha scritto: g_slice_new(VirtIOBlockReq), its free pair and access the instance is a bit slow since sizeof(VirtIOBlockReq) takes more than 40KB, so use object pool to speed up its allocation and release. With this patch, ~5% throughput improvement is observed in

Re: [Qemu-devel] vfio in the guest: no available reset mechanism

2014-07-30 Thread Le Tan
Hi Michael, 2014-07-30 21:16 GMT+08:00 Michael S. Tsirkin m...@redhat.com: On Wed, Jul 30, 2014 at 08:24:04PM +0800, Le Tan wrote: Hi, I am testing vfio in L1 with my VT-d emulation project. I assigned one of the two AHCI controllers in L1 to L2 via vfio. After I ran the QEMU in L1, it

[Qemu-devel] 9p mapped-* security model infos are architecture-specific

2014-07-30 Thread Michael Tokarev
Apparently the the mapped-* security models results in a raw bytes being dumped to host without any architecture normalization (in host byte order). This may even lead to security issues in guest when the same files are served from another host for example. This bug has been initially submitted

Re: [Qemu-devel] [RFC PATCH 7/7] cpus: reclaim allocated vCPU objects

2014-07-30 Thread Anshul Makkar
Hi, I am testing the cpu-hotunplug patches. I observed that after the deletion of the cpu with id = x, if I cpu-add the same cpu again id = x, then qemu exits with the error that file descriptor already exists. On debugging I found that if I give cpu-add apic-id = x, then

Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM

2014-07-30 Thread Laszlo Ersek
On 07/30/14 15:20, Michael S. Tsirkin wrote: On Tue, Jul 29, 2014 at 06:52:19AM -0400, Stefan Berger wrote: From: Stefan Berger stef...@linux.vnet.ibm.com Add an SSDT ACPI table for the TPM device. Add a TCPA table for BIOS logging area when a TPM is being used. The latter follows this spec

Re: [Qemu-devel] [PATCH 08/15] virtio: decrease size of VirtQueueElement

2014-07-30 Thread Michael S. Tsirkin
On Wed, Jul 30, 2014 at 03:51:22PM +0200, Paolo Bonzini wrote: Il 30/07/2014 13:39, Ming Lei ha scritto: diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index a60104c..943e72f 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -84,12 +84,17

  1   2   3   >