Re: [Qemu-devel] [PATCH V3 2/7] qemu-nbd: support internal snapshot export

2013-10-10 Thread Wenchao Xia
于 2013/10/2 0:08, Paolo Bonzini 写道: Il 26/09/2013 02:16, Wenchao Xia ha scritto: Now it is possible to directly export an internal snapshot, which can be used to probe the snapshot's contents without qemu-img convert. Signed-off-by: Wenchao Xiaxiaw...@linux.vnet.ibm.com --- block/snapshot.c

Re: [Qemu-devel] [PATCH V3 3/7] qemu-nbd: add doc for internal snapshot export

2013-10-10 Thread Wenchao Xia
于 2013/10/1 22:49, Eric Blake 写道: On 09/25/2013 06:16 PM, Wenchao Xia wrote: Signed-off-by: Wenchao Xiaxiaw...@linux.vnet.ibm.com --- qemu-nbd.c| 11 ++- qemu-nbd.texi | 11 ++- 2 files changed, 20 insertions(+), 2 deletions(-) This should be squashed into 2/7.

Re: [Qemu-devel] [PATCH V3 5/7] qemu-img: add -L for snapshot in convert

2013-10-10 Thread Wenchao Xia
于 2013/10/2 0:07, Paolo Bonzini 写道: Il 26/09/2013 02:16, Wenchao Xia ha scritto: +c = getopt(argc, argv, f:O:B:s:hce6o:pS:t:qnL:); if (c == -1) { break; } @@ -1183,6 +1184,9 @@ static int img_convert(int argc, char **argv) case 's':

Re: [Qemu-devel] [PATCH V3 4/7] qemu-iotests: add 058 internal snapshot export with qemu-nbd case

2013-10-10 Thread Wenchao Xia
于 2013/10/1 22:53, Eric Blake 写道: On 09/25/2013 06:16 PM, Wenchao Xia wrote: Signed-off-by: Wenchao Xiaxiaw...@linux.vnet.ibm.com --- +_export_nbd_snapshot() +{ +eval $QEMU_NBD -v -t -b 127.0.0.1 -p $nbd_snapshot_port $TEST_IMG -l $1 Uggh. Why do you need an eval here? Especially given

Re: [Qemu-devel] [PATCH V3 6/7] qemu-img: add doc for param -L in convert

2013-10-10 Thread Wenchao Xia
于 2013/10/1 22:56, Eric Blake 写道: On 09/25/2013 06:16 PM, Wenchao Xia wrote: Also renamed snapshot_name to snapshot_id_or_name to tip better. s/to tip better/as a better hint of what it does/ Signed-off-by: Wenchao Xiaxiaw...@linux.vnet.ibm.com --- qemu-img-cmds.hx |2 +- qemu-img.c

Re: [Qemu-devel] [PATCH V3 7/7] qemu-iotests: add test for snapshot in qemu-img convert

2013-10-10 Thread Wenchao Xia
于 2013/10/1 22:57, Eric Blake 写道: On 09/25/2013 06:16 PM, Wenchao Xia wrote: Signed-off-by: Wenchao Xiaxiaw...@linux.vnet.ibm.com --- @@ -53,6 +55,7 @@ _cleanup() kill $NBD_SNAPSHOT_PID fi _cleanup_test_img +rm -f $converted_image Indentation is off. will

Re: [Qemu-devel] [PATCH V3 2/7] qemu-nbd: support internal snapshot export

2013-10-10 Thread Wenchao Xia
于 2013/10/10 14:00, Wenchao Xia 写道: 于 2013/10/2 0:08, Paolo Bonzini 写道: Il 26/09/2013 02:16, Wenchao Xia ha scritto: Now it is possible to directly export an internal snapshot, which can be used to probe the snapshot's contents without qemu-img convert. Signed-off-by: Wenchao

Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually

2013-10-10 Thread Paolo Bonzini
Il 09/10/2013 23:26, Paolo Bonzini ha scritto: Il 09/10/2013 21:41, Marcelo Tosatti ha scritto: How was that tested? For BUS_MCEERR_AO it can work, but BUS_MCEERR_AR calls force_sig_info which does this: ignored = action-sa.sa_handler == SIG_IGN; blocked =

Re: [Qemu-devel] [PATCH 1/2] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second

2013-10-10 Thread Alex Bligh
On 9 Oct 2013, at 20:42, Hans de Goede wrote: Now that we no longer have MIN_REARM_TIMER_NS a bug in the audio subsys has clearly shown it self by trying to make a timer fire every nano second. Note we have a similar problem in 1.6, 1.5 and older but there MIN_REARM_TIMER_NS limits the

Re: [Qemu-devel] [PATCH 1/2] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second

2013-10-10 Thread Hans de Goede
Hi, On 10/10/2013 08:31 AM, Alex Bligh wrote: On 9 Oct 2013, at 20:42, Hans de Goede wrote: Now that we no longer have MIN_REARM_TIMER_NS a bug in the audio subsys has clearly shown it self by trying to make a timer fire every nano second. Note we have a similar problem in 1.6, 1.5 and

Re: [Qemu-devel] [PATCH 1/2] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second

2013-10-10 Thread Alex Bligh
On 10 Oct 2013, at 07:58, Hans de Goede wrote: Which it is, quoting from higher up in the same file: conf.period.ticks = muldiv64 (1, get_ticks_per_sec (), conf.period.hertz); And get_ticks_per_sec () returns ns . Doh! I confused .hertz .ticks. -- Alex Bligh

[Qemu-devel] [PATCH] vmdk: implment bdrv_get_info and bdrv_get_specific_info

2013-10-10 Thread Fam Zheng
.bdrv_get_info reports cluster_size if it's a monolithic image. .bdrv_get_specific_info reports the image version (if applicable) and extent file name list. Signed-off-by: Fam Zheng f...@redhat.com --- block/vmdk.c | 44 qapi-schema.json | 14

[Qemu-devel] [PATCH 1/2] vmdk: convert error reporting

2013-10-10 Thread Fam Zheng
Convert fprintf(stderr,... to error API by passing around errp to functions those want to report error message. There are 2 more fprintf(stderr,... remaining in read/write code path. Signed-off-by: Fam Zheng f...@redhat.com --- block/vmdk.c | 42 +- 1

[Qemu-devel] [PATCH 2/2] vmdk: refuse enabling zeroed grain with flat images

2013-10-10 Thread Fam Zheng
This is a header flag and we needs sparse for the header. Signed-off-by: Fam Zheng f...@redhat.com --- block/vmdk.c | 4 1 file changed, 4 insertions(+) diff --git a/block/vmdk.c b/block/vmdk.c index a98ad23..78c0129 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1656,6 +1656,10 @@

[Qemu-devel] [PATCH v6 0/5] bugs fix for hpet

2013-10-10 Thread Liu Ping Fan
v6: move the setting of intcap to board, and keep the init value as zero. (thanks for the discussion from Paolo and Michael) introduce an extra hpet property compat to tell PC version v5: use stand compat property to fix hpet intcap on pc-q35, while on pc-piix, hard code intcap as IRQ2

[Qemu-devel] [PATCH v6 1/5] hpet: inverse polarity when pin above ISA_NUM_IRQS

2013-10-10 Thread Liu Ping Fan
According to hpet spec, hpet irq is high active. But according to ICH spec, there is inversion before the input of ioapic. So the OS will expect low active on this IRQ line. (On bare metal, if OS driver claims high active on this line, spurious irq is generated) We fold the emulation of this

[Qemu-devel] [PATCH v6 2/5] hpet: enable to entitle more irq pins for hpet

2013-10-10 Thread Liu Ping Fan
On q35, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 of ioapic can be dynamically assigned to hpet as guest chooses. So we introduce intcap property to do that. (currently, its value is IRQ2. Later, it should be set by board.) Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com

[Qemu-devel] [PATCH v6 5/5] PC: differentiate hpet's interrupt capability on piix and q35

2013-10-10 Thread Liu Ping Fan
For pc-piix-*, hpet's intcap is always hard coded as IRQ2. For q35, if it is pc-q35-1.7 and earlier, we use IRQ2 for compat reason, otherwise IRQ2, IRQ8, and IRQ16~23 are allowed. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- hw/i386/pc.c | 21 -

[Qemu-devel] [PATCH v6 3/5] PC: use qdev_xx to create hpet instead of sysbus_create_xx

2013-10-10 Thread Liu Ping Fan
sysbus_create_xx func does not allow us to set a device's extra properties. While hpet need to set its compat property before initialization, so we abandon the wrapper function, and spread its logic inline Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- hw/i386/pc.c| 11

[Qemu-devel] [PATCH v6 4/5] PC: add hpet compat to trace compatability version

2013-10-10 Thread Liu Ping Fan
For guest bug compat, we need to limit hpet's intcap on IRQ2 for pc-q35-1.7 and earlier. We use hpet's compat property to indicate the PC version. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index c6042c7..90f1ea4 100644 ---

[Qemu-devel] [PATCH 1/3] acpi: add interface to access user-installed tables

2013-10-10 Thread Michael S. Tsirkin
Also add a new API to install builtin tables, so that we can distinguish between the two. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- include/hw/acpi/acpi.h | 4 hw/acpi/core.c | 40 2 files changed, 44 insertions(+) diff --git

[Qemu-devel] [PATCH 0/3] acpi-build: add -acpitable support

2013-10-10 Thread Michael S. Tsirkin
This small patchset is on top of my acpi series v9 - as that is very big by now, sending as incremental patches to simplify review. Michael S. Tsirkin (3): acpi: add interface to access user-installed tables pc: use new api to add builtin tables acpi-build: load tables supplied by user

[Qemu-devel] [PATCH 2/3] pc: use new api to add builtin tables

2013-10-10 Thread Michael S. Tsirkin
At this point the only builtin table we have is the DSDT used for Q35. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/i386/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index a7fcbf9..a51f916 100644 --- a/hw/i386/pc.c +++

[Qemu-devel] [PATCH 3/3] acpi-build: load tables supplied by user

2013-10-10 Thread Michael S. Tsirkin
If user supplies any SSDTs using -acpi, install them in addition to the built-in ones. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/i386/acpi-build.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 262d1d6..6cfa044 100644

Re: [Qemu-devel] [Bug 1100843] Re: Live Migration Causes Performance Issues

2013-10-10 Thread Peter Lieven
On 07.10.2013 11:55, Paolo Bonzini wrote: Il 07/10/2013 11:49, Peter Lieven ha scritto: It's in general not easy to do this if you take non-x86 targets into account. What about the dirty way to zero out all non zero pages at the beginning of ram_load? I'm not sure I follow? sth like this for

[Qemu-devel] [PATCH 0/2] vmdk: convert error reporting

2013-10-10 Thread Fam Zheng
The first patch converts fprintf(stderr,... to error_setg with errp. The second patch checks the compatibility of zeroed_grain flag and flat type and reports error if both are true. Fam Zheng (2): vmdk: convert error reporting vmdk: refuse enabling zeroed grain with flat images

Re: [Qemu-devel] An issue in block-migration

2013-10-10 Thread Stefan Hajnoczi
On Thu, Oct 03, 2013 at 04:23:45AM +, Yaodong Yang wrote: In block-migration.c file, line 435, if (bdrv_get_dirty(bmds-bs, sector)) { It looks like this if statement is used to check whether a chunk is dirty or not. If it is dirty, system will migrate a whole chunk, 1MB data, to the

Re: [Qemu-devel] [PATCH 2/2] .gitmodules: use upstream SeaBIOS repo to fix submodule init

2013-10-10 Thread Stefan Hajnoczi
On Thu, Oct 03, 2013 at 06:06:15PM +0900, Peter Maydell wrote: On 3 October 2013 17:58, alex.ben...@linaro.org wrote: From: Alex Bennée a...@bennee.com Currently master is broken as the wanted commit doesn't exist in qemu's mirror of SeaBIOS. --- .gitmodules | 2 +- 1 file

[Qemu-devel] [PATCH 1/2] qcow2: Undo leaked allocations in co_writev

2013-10-10 Thread Max Reitz
If the write request spans more than one L2 table, qcow2_alloc_cluster_offset cannot handle the required allocations atomically. This results in leaks if it allocated new clusters in any but the last L2 table touched and an error occurs in qcow2_co_writev before having established the L2 link.

Re: [Qemu-devel] sniffing traffic between VMs

2013-10-10 Thread Stefan Hajnoczi
On Mon, Oct 07, 2013 at 05:47:46PM +0300, Alexander Binun wrote: Our first task is to trace the traffic between individual VMs and between VMs and the VMM (the KVM driver). So we are searching for proper places to insert sniffer code. We suspect that some functions in qemu/hw/virtio should be

Re: [Qemu-devel] [Bug 1236809] [NEW] qemu-system-x86_64 takes 100% CPU

2013-10-10 Thread Stefan Hajnoczi
On Tue, Oct 08, 2013 at 11:51:19AM -, chenlidong wrote: chenlidong@linux-0rsg:~/develop/qemu ps -ef | grep qemu root 19030 1 14 19:00 ?00:04:24 /usr/local/bin/qemu-system-x86_64 -name rhel6 -S -M pc-i440fx-1.6 -m 2048 -smp 1,sockets=1,cores=1,threads=1 -uuid

[Qemu-devel] [PATCH v2 3/6] qcow2: Add overlap-check options

2013-10-10 Thread Max Reitz
Add runtime options to tune the overlap checks to be performed before write accesses. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 46 ++ block/qcow2.h | 9 + 2 files changed, 55 insertions(+) diff --git a/block/qcow2.c

[Qemu-devel] [PATCH v2 0/6] Configure metadata overlap checks at runtime

2013-10-10 Thread Max Reitz
This series changes the way of selecting what metadata overlap checks to perform from (currently) using a macro to using a variable contained in BDRVQcowState which can be configured at runtime through several command line options. v2: - rebased on Kevin's block branch - patch 1: affects line

Re: [Qemu-devel] [PATCH v6 4/5] PC: add hpet compat to trace compatability version

2013-10-10 Thread Paolo Bonzini
Il 10/10/2013 09:56, Liu Ping Fan ha scritto: For guest bug compat, we need to limit hpet's intcap on IRQ2 for pc-q35-1.7 and earlier. We use hpet's compat property to indicate the PC version. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com diff --git a/hw/i386/pc_piix.c

Re: [Qemu-devel] [PATCH v6 3/5] PC: use qdev_xx to create hpet instead of sysbus_create_xx

2013-10-10 Thread Paolo Bonzini
Il 10/10/2013 09:56, Liu Ping Fan ha scritto: sysbus_create_xx func does not allow us to set a device's extra properties. While hpet need to set its compat property before initialization, so we abandon the wrapper function, and spread its logic inline Signed-off-by: Liu Ping Fan

[Qemu-devel] [PATCH v2 1/6] qcow2: Use negated overflow check mask

2013-10-10 Thread Max Reitz
In qcow2_check_metadata_overlap and qcow2_pre_write_overlap_check, change the parameter signifying the checks to perform from its current positive form to a negative one, i.e., it will no longer explicitly specify every check to perform but rather a mask of checks not to perform. Signed-off-by:

[Qemu-devel] [PATCH v2 5/6] qcow2: Add more overlap check bitmask macros

2013-10-10 Thread Max Reitz
Introduces the macros QCOW2_OL_CONSTANT and QCOW2_OL_ALL in addition to the already existing QCOW2_OL_CACHED, signifying all metadata overlap checks that can be performed in constant time (regardless of image size etc.) and truly all available overlap checks, respectively. Signed-off-by: Max

Re: [Qemu-devel] [PATCH v6 2/5] hpet: enable to entitle more irq pins for hpet

2013-10-10 Thread Paolo Bonzini
Il 10/10/2013 09:56, Liu Ping Fan ha scritto: On q35, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 of ioapic can be dynamically assigned to hpet as guest chooses. So we introduce intcap property to do that. (currently, its value is IRQ2. Later, it should be set by board.)

[Qemu-devel] [PATCH v2 6/6] qcow2: Evaluate overlap check options

2013-10-10 Thread Max Reitz
Evaluate the runtime overlap check options and set BDRVQcowState.overlap_check appropriately. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/block/qcow2.c b/block/qcow2.c index

Re: [Qemu-devel] [PATCH v6 2/5] hpet: enable to entitle more irq pins for hpet

2013-10-10 Thread Michael S. Tsirkin
On Thu, Oct 10, 2013 at 03:56:16PM +0800, Liu Ping Fan wrote: On q35, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 of ioapic can be dynamically assigned to hpet as guest chooses. So we introduce intcap property to do that. (currently, its value is IRQ2. Later, it should be set by

Re: [Qemu-devel] [Nbd] Hibernate and qemu-nbd

2013-10-10 Thread Stefan Hajnoczi
On Fri, Oct 04, 2013 at 07:30:45AM -0700, Mark Trumpold wrote: On 9/26/13 10:18 PM, Stefan Hajnoczi stefa...@gmail.com wrote: Try the qemu-nbd --persistent option. That should prevent it from shutting down when nbd-client is disconnected. Stefan Hi Stefan, Sorry for the

Re: [Qemu-devel] [PATCH v6 5/5] PC: differentiate hpet's interrupt capability on piix and q35

2013-10-10 Thread Michael S. Tsirkin
On Thu, Oct 10, 2013 at 03:56:19PM +0800, Liu Ping Fan wrote: For pc-piix-*, hpet's intcap is always hard coded as IRQ2. For q35, if it is pc-q35-1.7 and earlier, we use IRQ2 for compat reason, otherwise IRQ2, IRQ8, and IRQ16~23 are allowed. Signed-off-by: Liu Ping Fan

Re: [Qemu-devel] [PATCH v6 3/5] PC: use qdev_xx to create hpet instead of sysbus_create_xx

2013-10-10 Thread Michael S. Tsirkin
On Thu, Oct 10, 2013 at 03:56:17PM +0800, Liu Ping Fan wrote: sysbus_create_xx func does not allow us to set a device's extra properties. While hpet need to set its compat property before initialization, so we abandon the wrapper function, and spread its logic inline Signed-off-by: Liu

Re: [Qemu-devel] [PATCH 1/2] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second

2013-10-10 Thread Hans de Goede
Hi, On 9 Oct 2013, at 20:42, Hans de Goede wrote: Now that we no longer have MIN_REARM_TIMER_NS a bug in the audio subsys has clearly shown it self by trying to make a timer fire every nano second. Note we have a similar problem in 1.6, 1.5 and older but there MIN_REARM_TIMER_NS limits the

[Qemu-devel] [PATCH 2/2] qemu-iotests: Extend test 026

2013-10-10 Thread Max Reitz
Extend test case 026 by an aio_write fail test, which should not result in any leaked clusters. Signed-off-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/026 | 31 +++ tests/qemu-iotests/026.out | 8

[Qemu-devel] [PATCH v2 2/6] qcow2: Make overlap check mask variable

2013-10-10 Thread Max Reitz
Replace the QCOW2_OL_DEFAULT macro by a variable overlap_check in BDRVQcowState. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-refcount.c | 2 +- block/qcow2.c | 2 ++ block/qcow2.h | 5 ++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] NBD support for mingw32 (windows)

2013-10-10 Thread Goshen, OrX
Hi, This patch adds support for NBD under mingw32. It contains a small hack with the use of Sleep(). signed-off-by: Goshen, OrX orx.gos...@intel.commailto:orx.gos...@intel.com, Ocheretny, Pavel pavel.ochere...@intel.commailto:pavel.ochere...@intel.com (As part of a work at Intel CORP)

Re: [Qemu-devel] [PATCH v6 2/5] hpet: enable to entitle more irq pins for hpet

2013-10-10 Thread Paolo Bonzini
Il 10/10/2013 11:16, Michael S. Tsirkin ha scritto: On Thu, Oct 10, 2013 at 03:56:16PM +0800, Liu Ping Fan wrote: On q35, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 of ioapic can be dynamically assigned to hpet as guest chooses. So we introduce intcap property to do that.

[Qemu-devel] [PATCH v2 4/6] qcow2: Array assigning options to OL check bits

2013-10-10 Thread Max Reitz
Add an array which assigns the option string to its corresponding overlap check bit. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 1e29bc8..eb17c2a 100644 --- a/block/qcow2.c +++

Re: [Qemu-devel] [PATCH 1/2] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second

2013-10-10 Thread Paolo Bonzini
Il 10/10/2013 11:23, Hans de Goede ha scritto: Hi, On 9 Oct 2013, at 20:42, Hans de Goede wrote: Now that we no longer have MIN_REARM_TIMER_NS a bug in the audio subsys has clearly shown it self by trying to make a timer fire every nano second. Note we have a similar problem in 1.6, 1.5

Re: [Qemu-devel] [PATCH v6 2/5] hpet: enable to entitle more irq pins for hpet

2013-10-10 Thread Michael S. Tsirkin
On Thu, Oct 10, 2013 at 11:33:07AM +0200, Paolo Bonzini wrote: Il 10/10/2013 11:16, Michael S. Tsirkin ha scritto: On Thu, Oct 10, 2013 at 03:56:16PM +0800, Liu Ping Fan wrote: On q35, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 of ioapic can be dynamically assigned to hpet as

[Qemu-devel] [PATCH] Use qemu-project.org domain name

2013-10-10 Thread Stefan Hajnoczi
qemu.org is held by a third-party and no core community contributor has access to the DNS configuration. This leaves the website exposed to outages due to DNS issues or IP address changes. For example, if the web server IP address needs to change we cannot guarantee qemu.org will point to it!

Re: [Qemu-devel] [PATCH v6 2/5] hpet: enable to entitle more irq pins for hpet

2013-10-10 Thread Paolo Bonzini
Il 10/10/2013 11:41, Michael S. Tsirkin ha scritto: Are you sure? This is not done for any other compat property. Paolo It's done if we use the property from C. See PCI_HOST_PROP_PCI_HOLE64_SIZE. You want compiler to catch errors, that's much better than a runtime failure. I agree,

[Qemu-devel] [PATCH] block: Improve driver whitelist checks

2013-10-10 Thread Kevin Wolf
The main intent of this patch is to consolidate the whitelist checks to a single point in the code instead of spreading it everywhere. This adds a nicer error message for read-only whitelisting, too, in places where it was still missing. The patch also contains a bonus bug fix: By finding the

Re: [Qemu-devel] [PATCH] vmdk: implment bdrv_get_info and bdrv_get_specific_info

2013-10-10 Thread Kevin Wolf
Am 10.10.2013 um 09:07 hat Fam Zheng geschrieben: .bdrv_get_info reports cluster_size if it's a monolithic image. .bdrv_get_specific_info reports the image version (if applicable) and extent file name list. Signed-off-by: Fam Zheng f...@redhat.com Would it be useful to include the

[Qemu-devel] [PATCH 0/2] qcow2: Undo leaked allocations in co_writev

2013-10-10 Thread Max Reitz
If a write request on a qcow2 image spans more than one L2 table, qcow2_alloc_cluster_offset cannot allocate the required clusters in a single operation. This results in leaks, if a subsequent (atomic) allocation in that function fails, because qcow2_co_writev does not undo unused cluster

Re: [Qemu-devel] [PATCH] block: improve error message for read-only whitelisted driver

2013-10-10 Thread Kevin Wolf
Am 10.10.2013 um 04:31 hat Fam Zheng geschrieben: Supplement of 7780d47, with message reworded and format probe case included: print an easy to understand message, when user tries to open a read-only format as read-write. Signed-off-by: Fam Zheng f...@redhat.com There's more to be cleaned

Re: [Qemu-devel] [RFC] map 64-bit PCI devices after all possible RAM

2013-10-10 Thread Gerd Hoffmann
Hi, So far from QEMU side it's partially (only memory region mapping and not ACPI window) configurable via {i440FX-pcihost|q35-pcihost}.pci-hole64-size property /me looks. Hmm, so the pci-hole64 memory region basically covers all non-memory area, leaving no free space. The window

Re: [Qemu-devel] [PATCH 1/2] vmdk: convert error reporting

2013-10-10 Thread Fam Zheng
On Thu, 10/10 12:39, Kevin Wolf wrote: Am 10.10.2013 um 09:20 hat Fam Zheng geschrieben: Convert fprintf(stderr,... to error API by passing around errp to functions those want to report error message. There are 2 more fprintf(stderr,... remaining in read/write code path.

[Qemu-devel] kvm binary is deprecated

2013-10-10 Thread Alexander Binun
Stefan , great thanks! We are setting up the scene for experiments... Unfortunately, we ran into yet one trouble. The configuration: Ubuntu 13.04, internal KVM, Qemu 1.4.0. VMs are created using virt-manager. When we try to create a VM the following error message appears: --- kvm binary is

[Qemu-devel] [PATCH v12 0/8] Shared Library Module Support

2013-10-10 Thread Fam Zheng
This series implements feature of shared object building as described in: http://wiki.qemu.org/Features/Modules The main idea behind modules is to isolate dependencies on third party libraries from qemu executables, such as libglusterfs or librbd, so that the end users can install core qemu

[Qemu-devel] [PATCH v12 1/8] ui/Makefile.objs: delete unnecessary cocoa.o dependency

2013-10-10 Thread Fam Zheng
From: Peter Maydell peter.mayd...@linaro.org Delete an unnecessary dependency for cocoa.o; we already have a general rule that tells Make that we can build a .o file from a .m source using an ObjC compiler, so this specific rule is unnecessary. Further, it is using the dubious construct

[Qemu-devel] [PATCH v12 2/8] make.rule: fix $(obj) to a real relative path

2013-10-10 Thread Fam Zheng
Makefile.target includes rule.mak and unnested common-obj-y, then prefix them with '../', this will ignore object specific QEMU_CFLAGS in subdir Makefile.objs: $(obj)/curl.o: QEMU_CFLAGS += $(CURL_CFLAGS) Because $(obj) here is './block', instead of '../block'. This doesn't hurt compiling

[Qemu-devel] [PATCH v12 3/8] rule.mak: allow per object cflags and libs

2013-10-10 Thread Fam Zheng
Adds extract-libs in LINK to expand any per object libs, the syntax to define such a libs options is like: foo.o-libs := $(CURL_LIBS) in block/Makefile.objs. Similarly, foo.o-cflags := $(FOO_CFLAGS) is also supported. foo.o must be listed a nested var (e.g. common-obj-y) to

[Qemu-devel] [PATCH v12 6/8] Makefile: install modules with make install

2013-10-10 Thread Fam Zheng
Install all the modules to ${MODDIR}. Signed-off-by: Fam Zheng f...@redhat.com --- Makefile | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 51de298..356ff5c 100644 --- a/Makefile +++ b/Makefile @@ -365,6 +365,12 @@ install-datadir install-localstatedir ifneq

[Qemu-devel] [PATCH v12 4/8] build-sys: introduce common-obj-m and block-obj-m for DSO

2013-10-10 Thread Fam Zheng
Add necessary rules and flags for shared object generation. $(common-obj-m) will include $(block-obj-m), like $(common-obj-y) does for $(block-obj-y). The new rules introduced here are: 0) For all %.so compiling: QEMU_CFLAGS += -fPIC 1) %.o in $(common-obj-m) is compiled to %.o, then linked

[Qemu-devel] [PATCH v12 7/8] .gitignore: ignore module related files (dll, so, mo)

2013-10-10 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 8e1b73f..ac679ea 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,9 @@ fsdev/virtfs-proxy-helper.pod *.cp *.dvi *.exe +*.dll +*.so +*.mo *.fn *.ky

[Qemu-devel] [PATCH v12 5/8] module: implement module loading

2013-10-10 Thread Fam Zheng
This patch adds loading, stamp checking and initialization of modules. The init function of dynamic module is no longer directly called as __attribute__((constructor)) in static linked version, it is called only after passed the checking of presense of stamp symbol: qemu_stamp_$(date

[Qemu-devel] [PATCH v12 8/8] block: convert block drivers linked with libs to modules

2013-10-10 Thread Fam Zheng
The converted block drivers are: curl iscsi rbd ssh glusterfs no longer adds flags and libs for them to global variables, instead create config-host.mak variables like FOO_CFLAGS and FOO_LIBS, which is used as per object cflags and libs. Signed-off-by: Fam Zheng

Re: [Qemu-devel] [RFC] map 64-bit PCI devices after all possible RAM

2013-10-10 Thread Michael S. Tsirkin
On Thu, Oct 10, 2013 at 12:56:23PM +0200, Gerd Hoffmann wrote: Hi, So far from QEMU side it's partially (only memory region mapping and not ACPI window) configurable via {i440FX-pcihost|q35-pcihost}.pci-hole64-size property /me looks. Hmm, so the pci-hole64 memory region

Re: [Qemu-devel] [PATCHv3 1/3] seccomp: adding blacklist support

2013-10-10 Thread Corey Bryant
On 10/09/2013 05:36 PM, Paul Moore wrote: On Tuesday, October 08, 2013 09:42:24 PM Eduardo Otubo wrote: v3: The -netdev tap option is checked in the vl.c file during the process of the command line argument list. It sets tap_enabled to true or false according to the configuration found. Later

Re: [Qemu-devel] [PATCH 1/2] vmdk: convert error reporting

2013-10-10 Thread Kevin Wolf
Am 10.10.2013 um 09:20 hat Fam Zheng geschrieben: Convert fprintf(stderr,... to error API by passing around errp to functions those want to report error message. There are 2 more fprintf(stderr,... remaining in read/write code path. Signed-off-by: Fam Zheng f...@redhat.com ---

Re: [Qemu-devel] [RFC] map 64-bit PCI devices after all possible RAM

2013-10-10 Thread Michael S. Tsirkin
On Wed, Oct 09, 2013 at 02:23:04PM +0200, Igor Mammedov wrote: I'm posting it to get an oppinion on one of possible approaches on where to map a hotplug memory. This patch assumes that a space for hotplug memory is located right after RamSizeOver4G region and QEMU will provide romfile to

Re: [Qemu-devel] [PATCH v6 2/5] hpet: enable to entitle more irq pins for hpet

2013-10-10 Thread Michael S. Tsirkin
On Thu, Oct 10, 2013 at 11:46:42AM +0200, Paolo Bonzini wrote: Il 10/10/2013 11:41, Michael S. Tsirkin ha scritto: Are you sure? This is not done for any other compat property. Paolo It's done if we use the property from C. See PCI_HOST_PROP_PCI_HOLE64_SIZE. You want compiler

Re: [Qemu-devel] [PATCH v2 0/6] Configure metadata overlap checks at runtime

2013-10-10 Thread Kevin Wolf
Am 10.10.2013 um 11:09 hat Max Reitz geschrieben: This series changes the way of selecting what metadata overlap checks to perform from (currently) using a macro to using a variable contained in BDRVQcowState which can be configured at runtime through several command line options. v2: -

Re: [Qemu-devel] [RFC] map 64-bit PCI devices after all possible RAM

2013-10-10 Thread Gerd Hoffmann
Hi, I think the simplest way to do all this is simply to tell seabios that we have more memory. seabios already programs 64 bit BARs higher than memory. Hmm? As I understand Igor just wants some address space for memory hotplug. So there wouldn't be memory there (yet). And telling

Re: [Qemu-devel] [PATCH v12 5/8] module: implement module loading

2013-10-10 Thread Paolo Bonzini
Il 10/10/2013 13:26, Fam Zheng ha scritto: This patch adds loading, stamp checking and initialization of modules. The init function of dynamic module is no longer directly called as __attribute__((constructor)) in static linked version, it is called only after passed the checking of presense

Re: [Qemu-devel] [PATCH 10/13] Add xxmrgh/xxmrgl

2013-10-10 Thread Tom Musta
On 10/9/2013 3:09 PM, Richard Henderson wrote: On 10/04/2013 06:23 AM, Tom Musta wrote: +tcg_gen_andi_i64(a0, a0, 0xul); \ +tcg_gen_shli_i64(a1, a1, 32); \ +tcg_gen_shri_i64(b0, b0, 32); \ +

Re: [Qemu-devel] [RFC] map 64-bit PCI devices after all possible RAM

2013-10-10 Thread Michael S. Tsirkin
On Thu, Oct 10, 2013 at 02:14:16PM +0200, Gerd Hoffmann wrote: Hi, I think the simplest way to do all this is simply to tell seabios that we have more memory. seabios already programs 64 bit BARs higher than memory. Hmm? As I understand Igor just wants some address space for memory

Re: [Qemu-devel] [PATCH v12 0/8] Shared Library Module Support

2013-10-10 Thread Paolo Bonzini
I have a doubt about patch 5. I have placed the others in a configure branch on github, in preparation for sending a pull request once there's agreement. Paolo

[Qemu-devel] [PATCH] exec: remove qemu_safe_ram_ptr

2013-10-10 Thread Paolo Bonzini
This is not needed since the RAM list is not modified anymore by qemu_get_ram_ptr. Replace it with qemu_get_ram_block. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c | 97 +++--- 1 file changed, 28 insertions(+), 69

Re: [Qemu-devel] [PATCH 1/2] qcow2: Undo leaked allocations in co_writev

2013-10-10 Thread Kevin Wolf
Am 10.10.2013 um 10:52 hat Max Reitz geschrieben: If the write request spans more than one L2 table, qcow2_alloc_cluster_offset cannot handle the required allocations atomically. This results in leaks if it allocated new clusters in any but the last L2 table touched and an error occurs in

Re: [Qemu-devel] [PATCH 11/13] Add xxsel

2013-10-10 Thread Tom Musta
On 10/9/2013 3:13 PM, Richard Henderson wrote: On 10/04/2013 06:24 AM, Tom Musta wrote: +tcg_gen_and_i64(b, b, c); +tcg_gen_not_i64(c, c); +tcg_gen_and_i64(a, a, c); tcg_gen_andc_i64. +#define GEN_XXSEL() \ +GEN_XXSEL_ROW(0x00) \ +GEN_XXSEL_ROW(0x01) \ Why bother with defining

Re: [Qemu-devel] [PATCH v12 5/8] module: implement module loading

2013-10-10 Thread Fam Zheng
On Thu, 10/10 14:16, Paolo Bonzini wrote: Il 10/10/2013 13:26, Fam Zheng ha scritto: This patch adds loading, stamp checking and initialization of modules. The init function of dynamic module is no longer directly called as __attribute__((constructor)) in static linked version, it is

[Qemu-devel] [PATCH v2 1/2] vmdk: convert error code to use errp

2013-10-10 Thread Fam Zheng
Convert fprintf(stderr,... and standardize error messages: Remove a few local_error's and use errp. Remove VMDK: or Vmdk: prefixes in error message and fix to upper case. Signed-off-by: Fam Zheng f...@redhat.com --- block/vmdk.c | 116 +++

[Qemu-devel] [PATCH v2 0/2] vmdk: convert error reporting

2013-10-10 Thread Fam Zheng
The first patch converts fprintf(stderr,... to error_setg with errp, and fixes style of error message texts. The second patch checks the compatibility of zeroed_grain flag and flat type and reports error if both are true. v2: [01] More conversion of error messages, also catch error from

[Qemu-devel] [PATCH v2 2/2] vmdk: refuse enabling zeroed grain with flat images

2013-10-10 Thread Fam Zheng
This is a header flag and we needs sparse for the header. Signed-off-by: Fam Zheng f...@redhat.com --- block/vmdk.c | 4 1 file changed, 4 insertions(+) diff --git a/block/vmdk.c b/block/vmdk.c index 4f8ae77..90340eb 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1664,6 +1664,10 @@

Re: [Qemu-devel] [RFC] map 64-bit PCI devices after all possible RAM

2013-10-10 Thread Gerd Hoffmann
Hi, I think the issue is with legacy guests. E.g. if VCPU claims to support 50 bit of memory do we put high PCI memory at 1 50? If yes old guests which expect at most 40 bit will not be able to use it. Hmm. Sure such guests exist? I wouldn't be surprised. At least some

Re: [Qemu-devel] [PATCH] block: Improve driver whitelist checks

2013-10-10 Thread Fam Zheng
On Thu, 10/10 11:57, Kevin Wolf wrote: The main intent of this patch is to consolidate the whitelist checks to a single point in the code instead of spreading it everywhere. This adds a nicer error message for read-only whitelisting, too, in places where it was still missing. The patch also

Re: [Qemu-devel] [PATCH] Use qemu-project.org domain name

2013-10-10 Thread Peter Maydell
On 10 October 2013 18:39, Stefan Hajnoczi stefa...@redhat.com wrote: --- a/.gitmodules +++ b/.gitmodules @@ -1,27 +1,27 @@ [submodule roms/vgabios] path = roms/vgabios - url = git://git.qemu.org/vgabios.git/ + url = git://git.qemu-project.org/vgabios.git/ I agree we

Re: [Qemu-devel] [PATCH 1/2] qcow2: Undo leaked allocations in co_writev

2013-10-10 Thread Max Reitz
On 2013-10-10 14:26, Kevin Wolf wrote: Am 10.10.2013 um 10:52 hat Max Reitz geschrieben: If the write request spans more than one L2 table, qcow2_alloc_cluster_offset cannot handle the required allocations atomically. This results in leaks if it allocated new clusters in any but the last L2

[Qemu-devel] [RfC PATCH] e820: pass high memory too.

2013-10-10 Thread Gerd Hoffmann
We have a fw_cfg entry to pass e820 entries from qemu to the firmware. Today it's used to pass reservations only. This patch makes qemu pass entries for RAM too. This allows to pass RAM sizes larger than 1TB to the firmware and it will also allow to pass non-contignous memory ramges should we

[Qemu-devel] [PATCH 0/2] Improve -device command line help some more

2013-10-10 Thread armbru
From: Markus Armbruster arm...@redhat.com Marcel's recent improvements (commit dbd94f8..125ee0e) go in the right direction, but there are issues (see PATCH 1/2), and I find the resulting help output still hard to read. This series redoes the help printing part of Marcel's series. Result looks

[Qemu-devel] [PATCH 1/2] Mostly revert qemu-help: Sort devices by logical functionality

2013-10-10 Thread armbru
From: Markus Armbruster arm...@redhat.com This reverts most of commit 3d1237fb2ab4edb926c717767bb5e31d6053a7c5. The commit claims to sort the output of -device help by functionality rather than alphabetical. Issues: * The output was unsorted before, not alphabetically sorted. Misleading, but

[Qemu-devel] [PATCH 2/2] qdev-monitor: Group device_add help and info qdm by category

2013-10-10 Thread armbru
From: Markus Armbruster arm...@redhat.com Output is a long, unsorted list. Not very helpful. Print one list per device category instead, with a header line identifying the category, plus a list of uncategorized devices. Print each list in case-insenitive alphabetical order. Devices with

Re: [Qemu-devel] [PATCH] Use qemu-project.org domain name

2013-10-10 Thread Zhi Yong Wu
qemu-project.org isn't a good domain name, and sound a bit strange, i think personally.:) Maybe we can apply one new domain name such as kemu.org, etc. On Thu, Oct 10, 2013 at 5:39 PM, Stefan Hajnoczi stefa...@redhat.com wrote: qemu.org is held by a third-party and no core community contributor

Re: [Qemu-devel] [RFC] map 64-bit PCI devices after all possible RAM

2013-10-10 Thread Igor Mammedov
On Thu, 10 Oct 2013 14:42:07 +0200 Gerd Hoffmann kra...@redhat.com wrote: Hi, I think the issue is with legacy guests. E.g. if VCPU claims to support 50 bit of memory do we put high PCI memory at 1 50? If yes old guests which expect at most 40 bit will not be able to use

Re: [Qemu-devel] [RFC] map 64-bit PCI devices after all possible RAM

2013-10-10 Thread Igor Mammedov
On Thu, 10 Oct 2013 15:21:32 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Oct 10, 2013 at 02:14:16PM +0200, Gerd Hoffmann wrote: Hi, I think the simplest way to do all this is simply to tell seabios that we have more memory. seabios already programs 64 bit BARs higher

Re: [Qemu-devel] [RFC] map 64-bit PCI devices after all possible RAM

2013-10-10 Thread Gerd Hoffmann
Hi, Guess we can just go with Igor's approach then. etc/mem64-end is a pretty bad name to say please map 64bit pci bars here though. reasoning bind was to tell BIOS where RAM ends and let it decide what to do with this information. But we could do other way around and use etc/pci-info

Re: [Qemu-devel] [Xen-devel] Hvmloader: Add _STA for PCI hotplug slots

2013-10-10 Thread Gonglei (Arei)
Hi, Not enough tests are done in system based the patch. Windows OS can support PCI hot plug/unplug, PCI hot plug/unplug will cause qemu crashes in Redhat6.3/5.8. After reading the ACPI spec, we modify the patch: Index: mk_dsdt.c

  1   2   3   >