Re: [Qemu-devel] [PATCH] Fixes key mapping so all keys work

2015-01-13 Thread Peter Maydell
On 14 January 2015 at 00:12, Programmingkid programmingk...@gmail.com wrote: This patch allows for all the keys on an Apple extended keyboard to work in QEMU. Signed-off-by: John Arbuckle programmingk...@gmail.com --- ui/cocoa.m | 29 - 1 files changed, 20

[Qemu-devel] [PATCH] AIO: Reduce number of threads for 32bit hosts

2015-01-13 Thread Alexander Graf
On hosts with limited virtual address space (32bit pointers), we can very easily run out of virtual memory with big thread pools. Instead, we should limit ourselves to small pools to keep memory footprint low on those systems. This patch fixes random VM stalls like (process:25114): GLib-ERROR

Re: [Qemu-devel] [RESEND PATCH 0/2] QEMUSizedBuffer/QEMUFile fixes

2015-01-13 Thread Hongyang Yang
Ping... 在 12/19/2014 11:38 AM, Yang Hongyang 写道: Rebased to the latest master. Yang Hongyang (2): QEMUSizedBuffer: only free qsb that qemu_bufopen allocated Tests: QEMUSizedBuffer/QEMUBuffer migration/qemu-file-buf.c | 10 ++ tests/test-vmstate.c | 20

Re: [Qemu-devel] [PATCH v11 09/13] qmp: Add support of dirty-bitmap sync mode for drive-backup

2015-01-13 Thread Fam Zheng
On Tue, 01/13 12:50, John Snow wrote: On 01/13/2015 04:37 AM, Fam Zheng wrote: On Mon, 01/12 11:31, John Snow wrote: For dirty-bitmap sync mode, the block job will iterate through the given dirty bitmap to decide if a sector needs backup (backup all the dirty clusters and skip clean

[Qemu-devel] [PATCH 1/8] spec: add qcow2-dirty-bitmaps specification

2015-01-13 Thread Vladimir Sementsov-Ogievskiy
Persistent dirty bitmaps will be saved into qcow2 files. It may be used as 'internal' bitmaps (for qcow2 drives) or as 'external' bitmaps for other drives (there may be qcow2 file with zero disk size but with several dirty bitmaps for other drives). Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14

2015-01-13 Thread William Dauchy
Hello, On Jan09 23:42, Paolo Bonzini wrote: That's commit 364c3e6b8dd7912e01d19122d791b8c8f6df4f6c on branch uq/master of git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git. maybe the one for: fix regression when reading memory size from config file is also a patch to think about. Thanks, --

Re: [Qemu-devel] [PATCH for 2.3 v2 1/1] xen-hvm: increase maxmem before calling xc_domain_populate_physmap

2015-01-13 Thread Stefano Stabellini
On Mon, 12 Jan 2015, Stefano Stabellini wrote: On Wed, 3 Dec 2014, Don Slutz wrote: From: Stefano Stabellini stefano.stabell...@eu.citrix.com Increase maxmem before calling xc_domain_populate_physmap_exact to avoid the risk of running out of guest memory. This way we can also avoid

Re: [Qemu-devel] [PATCH v5] block/raw-posix.c: Fixes raw_getlength() on Mac OS X so that it reports the correct length of a real CD

2015-01-13 Thread Peter Maydell
On 13 January 2015 at 18:26, Programmingkid programmingk...@gmail.com wrote: Allows for using real cdrom disc in QEMU under Mac OS X. This command was used to see if this patch worked: ./qemu-system-i386 -drive if=none,id=drive0,file=/dev/null,format=raw Signed-off-by: John Arbuckle

[Qemu-devel] [PATCH 6/8] qemu: command line option for dirty bitmaps

2015-01-13 Thread Vladimir Sementsov-Ogievskiy
The patch adds the following command line option: -dirty-bitmap [option1=val1][,option2=val2]... Available options are: name The name for the bitmap (necessary). file The file to load the bitmap from. file_id When specified with 'file' option, then this file

[Qemu-devel] [PATCH 4/8] block: store persistent dirty bitmaps

2015-01-13 Thread Vladimir Sementsov-Ogievskiy
Persistent dirty bitmaps are the bitmaps, for which the new field BdrvDirtyBitmap.file is not NULL. We save all persistent dirty bitmaps owned by BlockDriverState in corresponding bdrv_close(). BdrvDirtyBitmap.file is a BlockDriverState, where we want to save the bitmap. It may be set in

Re: [Qemu-devel] [PATCH v5 0/5] Geometry and blocksize detection for backing devices.

2015-01-13 Thread Markus Armbruster
Stefan Hajnoczi stefa...@redhat.com writes: On Tue, Jan 13, 2015 at 11:51:51AM +0100, Markus Armbruster wrote: Christian Borntraeger borntrae...@de.ibm.com writes: Am 02.01.2015 um 13:57 schrieb Stefan Hajnoczi: On Thu, Dec 18, 2014 at 04:59:50PM +0100, Christian Borntraeger wrote: Are

[Qemu-devel] [PATCH 4/8] rcu: allow nesting of rcu_read_lock/rcu_read_unlock

2015-01-13 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/qemu/rcu.h | 15 ++- tests/rcutorture.c | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h index 91b3a5c..e3d9b63 100644 --- a/include/qemu/rcu.h +++

[Qemu-devel] [PATCH 7/8] memory: protect current_map by RCU

2015-01-13 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/exec/memory.h | 5 + memory.c | 54 ++- 2 files changed, 28 insertions(+), 31 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index

Re: [Qemu-devel] Question regarding two variables in qemu migration code

2015-01-13 Thread Dr. David Alan Gilbert
* Jidong Xiao (jidong.x...@gmail.com) wrote: On Tue, Jan 13, 2015 at 1:38 AM, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Jidong Xiao (jidong.x...@gmail.com) wrote: Hi, Hi, I am looking at the qemu source code, and trying to understand the migration part. In arch_init.c,

[Qemu-devel] [PATCH 0/8] block: persistent dirty bitmaps (RFC)

2015-01-13 Thread Vladimir Sementsov-Ogievskiy
The bitmaps are saved into qcow2 file format. It provides both 'internal' and 'external' dirty bitmaps feature: - for qcow2 drives we can store bitmaps in the same file - for other formats we can store bitmaps in the separate qcow2 file QCow2 header is extended by fields 'nb_dirty_bitmaps' and

Re: [Qemu-devel] [PATCH 0/1] pci: allow 0 address for PCI IO/MEM regions

2015-01-13 Thread Alexander Graf
On 01/13/15 17:17, Michael S. Tsirkin wrote: On Tue, Jan 13, 2015 at 05:54:46PM +0200, Michael S. Tsirkin wrote: I think we already do this for PC: commit 83d08f2673504a299194dcac1657a13754b5932a Author: Michael S. Tsirkin m...@redhat.com Date: Tue Oct 29 13:57:34 2013

[Qemu-devel] [PATCH 1/1] Print PID and time in stderr traces

2015-01-13 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com When debugging migration it's useful to know the PID of each trace message so you can figure out if it came from the source or the destination. Printing the time makes it easy to do latency measurements or timings between trace points.

[Qemu-devel] [PATCH 8/9] balloon: Factor out common is balloon active test

2015-01-13 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com --- balloon.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/balloon.c b/balloon.c index 2884c2d..aa30617 100644 --- a/balloon.c +++ b/balloon.c @@ -36,6 +36,19 @@ static QEMUBalloonEvent

[Qemu-devel] [PATCH 3/9] hmp: Compile hmp_info_spice() only with CONFIG_SPICE

2015-01-13 Thread Markus Armbruster
It's dead code when CONFIG_SPICE is off. If it wasn't, it would crash dereferencing the null pointer returned by the qmp_query_spice() dummy in qmp.c. Signed-off-by: Markus Armbruster arm...@redhat.com --- hmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hmp.c b/hmp.c index

[Qemu-devel] [PATCH 1/9] qmp hmp: Factor out common using spice test

2015-01-13 Thread Markus Armbruster
Into qemu_using_spice(). For want of a better place, put it next the existing monitor command handler dummies in qemu-spice.h. Signed-off-by: Markus Armbruster arm...@redhat.com --- include/ui/qemu-spice.h | 10 ++ monitor.c | 5 +++-- qmp.c | 11

[Qemu-devel] [PATCH 4/9] qmp: Clean up qmp_query_spice() #ifndef !CONFIG_SPICE dummy

2015-01-13 Thread Markus Armbruster
QMP command query-spice exists only #ifdef CONFIG_SPICE. Due to QAPI limitations, we need a dummy function anyway, but it's unreachable. Our current dummy function goes out of its way to produce the exact same error as the QMP core does for unknown commands. Cute, but both unclean and

[Qemu-devel] [PATCH 0/9] qmp hmp balloon: Cleanups around error reporting

2015-01-13 Thread Markus Armbruster
I'm including balloon patches in the hope that they too can go through Luiz's tree. Markus Armbruster (9): qmp hmp: Factor out common using spice test qmp hmp: Improve error messages when SPICE is not in use hmp: Compile hmp_info_spice() only with CONFIG_SPICE qmp: Clean up

[Qemu-devel] [PATCH 5/9] qmp: Simplify recognition of capability negotiation command

2015-01-13 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com --- monitor.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/monitor.c b/monitor.c index cd81289..f8497b6 100644 --- a/monitor.c +++ b/monitor.c @@ -4783,9 +4783,9 @@ static int monitor_can_read(void *opaque)

[Qemu-devel] [PATCH 3/8] rcu: add rcutorture

2015-01-13 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- tests/Makefile | 6 +- tests/rcutorture.c | 447 + util/rcu.c | 1 - 3 files changed, 452 insertions(+), 2 deletions(-) create mode 100644 tests/rcutorture.c diff --git

[Qemu-devel] [PATCH 2/8] rcu: add rcu library

2015-01-13 Thread Paolo Bonzini
This includes a (mangled) copy of the liburcu code. The main changes are: 1) removing dependencies on many other header files in liburcu; 2) removing for simplicity the tentative busy waiting in synchronize_rcu, which has limited performance effects; 3) replacing futexes in synchronize_rcu with

[Qemu-devel] [PULL 0/2] Xen tree 2015-01-13

2015-01-13 Thread Stefano Stabellini
The following changes since commit 7d5ad15d17f26dd4f9ff5f3491828bc34e74f28c: Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging (2015-01-12 11:13:24 +) are available in the git repository at: git://xenbits.xen.org/people/sstabellini/qemu-dm.git

[Qemu-devel] [PATCH 0/8] RCUification of the memory API, part 1

2015-01-13 Thread Paolo Bonzini
These are the minimal changes to adopt RCU and use it in memory_region_find (and hence in virtio-blk-dataplane). Looks big, but two thirds of it is documentation and tests. Please review! :) Paolo Jan Kiszka (1): memory: remove assertion on memory_region_destroy Paolo Bonzini (7): tls:

[Qemu-devel] [PATCH 2/2] cpu_ldst.h: Collapse laddr() and saddr() into ldst_get_host_addr()

2015-01-13 Thread Peter Maydell
The macros laddr() and saddr() are always defined to be identical to each other. Replace them with a single macro, and give it a longer name so it's easier to grep the codebase and confirm that it's only used in this one place: ldst_get_host_addr(). Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH 1/2] cpu_ldst.h: Remove unused ldul_ macros

2015-01-13 Thread Peter Maydell
The five ldul_ macros are not used anywhere and are marked up with an XXX comment. ldul is a non-standard prefix for our family of load instructions: we don't mark 32-bit accesses for signedness because they return a 32 bit quantity. So just delete them. Signed-off-by: Peter Maydell

Re: [Qemu-devel] [PATCH 2/4] target-i386: do not memcpy in and out of xmm_regs

2015-01-13 Thread Eduardo Habkost
On Wed, Jan 07, 2015 at 06:39:13PM +0100, Paolo Bonzini wrote: After the next patch, we will move the high parts of AVX and AVX512 registers in the same array as the SSE registers. This will make it impossible to memcpy an array of 128-bit values in and out of xmm_regs in one swoop. Use a for

Re: [Qemu-devel] [PATCH 4/9] hbitmap: store / restore

2015-01-13 Thread John Snow
On 01/13/2015 07:59 AM, Vladimir Sementsov-Ogievskiy wrote: Best regards, Vladimir On 09.01.2015 00:21, John Snow wrote: On 12/11/2014 09:17 AM, Vladimir Sementsov-Ogievskiy wrote: Functions to store / restore HBitmap. HBitmap should be saved to linear bitmap format independently of

[Qemu-devel] [PATCH 5/8] block: add bdrv_load_dirty_bitmap

2015-01-13 Thread Vladimir Sementsov-Ogievskiy
The funcion loads dirty bitmap from file, using underlying driver function. Note: the function doesn't change BdrvDirtyBitmap.file field. This field is only used by bdrv_store_dirty_bitmap() function and is ONLY written by bdrv_dirty_bitmap_set_file() function. Signed-off-by: Vladimir

[Qemu-devel] [PATCH] block: update string sizes for filename, backing_file, exact_filename

2015-01-13 Thread Jeff Cody
The string field entries 'filename', 'backing_file', and 'exact_filename' in the BlockDriverState struct are defined as 1024 bytes. However, most places that use these values accept a maximum of PATH_MAX bytes. This patch makes the BlockDriverStruct field string sizes match the most common

[Qemu-devel] [PATCH 6/9] qmp: Eliminate silly QERR_COMMAND_NOT_FOUND macro

2015-01-13 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of rich error objects. They're used with error_set() and qerror_report(), and expand into the first *two* arguments. This trickiness has become pointless. Clean this one up. Signed-off-by: Markus Armbruster arm...@redhat.com ---

[Qemu-devel] [PATCH 7/9] balloon: Inline qemu_balloon(), qemu_balloon_status()

2015-01-13 Thread Markus Armbruster
... and simplify a bit. Permits factoring out common error checks in the next commit. Signed-off-by: Markus Armbruster arm...@redhat.com --- balloon.c | 42 +- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/balloon.c b/balloon.c index

Re: [Qemu-devel] [PATCH v11 09/13] qmp: Add support of dirty-bitmap sync mode for drive-backup

2015-01-13 Thread John Snow
On 01/13/2015 04:37 AM, Fam Zheng wrote: On Mon, 01/12 11:31, John Snow wrote: For dirty-bitmap sync mode, the block job will iterate through the given dirty bitmap to decide if a sector needs backup (backup all the dirty clusters and skip clean ones), just as allocation conditions of top

[Qemu-devel] [PATCH 5/8] rcu: add call_rcu

2015-01-13 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- docs/rcu.txt | 110 +++-- include/qemu/rcu.h | 22 ++ util/rcu.c | 118 + 3 files changed, 246 insertions(+), 4 deletions(-)

Re: [Qemu-devel] [PATCH v4] block/raw-posix.c: Fixes raw_getlength() on Mac OS X so that it reports the correct length of a real CD

2015-01-13 Thread Programmingkid
On Jan 13, 2015, at 9:05 AM, Stefan Hajnoczi wrote: On Tue, Jan 6, 2015 at 3:04 PM, Programmingkid programmingk...@gmail.com wrote: On Jan 6, 2015, at 9:02 AM, Stefan Hajnoczi wrote: On Fri, Jan 02, 2015 at 04:44:38PM -0500, Programmingkid wrote: Removes redundant ret variable and

Re: [Qemu-devel] [PATCH v4] block/raw-posix.c: Fixes raw_getlength() on Mac OS X so that it reports the correct length of a real CD

2015-01-13 Thread Peter Maydell
On 13 January 2015 at 17:52, Programmingkid programmingk...@gmail.com wrote: What is the exact command you use with QEMU involving the /dev/null device? make check includes some tests which do this... What value is suppose to be returned when using a device like /dev/null? I think we should

Re: [Qemu-devel] Question regarding two variables in qemu migration code

2015-01-13 Thread Jidong Xiao
On Tue, Jan 13, 2015 at 1:38 AM, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Jidong Xiao (jidong.x...@gmail.com) wrote: Hi, Hi, I am looking at the qemu source code, and trying to understand the migration part. In arch_init.c, there are two variables which seems quite confusing to

[Qemu-devel] [PULL 1/2] xen-pt: Fix PCI devices re-attach failed

2015-01-13 Thread Stefano Stabellini
From: Liang Li liang.z...@intel.com Use the 'xl pci-attach $DomU $BDF' command to attach more than one PCI devices to the guest, then detach the devices with 'xl pci-detach $DomU $BDF', after that, re-attach these PCI devices again, an error message will be reported like following: libxl:

[Qemu-devel] [PULL 2/2] xen-hvm: increase maxmem before calling xc_domain_populate_physmap

2015-01-13 Thread Stefano Stabellini
Increase maxmem before calling xc_domain_populate_physmap_exact to avoid the risk of running out of guest memory. This way we can also avoid complex memory calculations in libxl at domain construction time. This patch fixes an abort() when assigning more than 4 NICs to a VM. Signed-off-by:

[Qemu-devel] [PATCH 8/8] iotests: test internal persistent dirty bitmap

2015-01-13 Thread Vladimir Sementsov-Ogievskiy
The test performs several vm reloads with checking and updating dirty bitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy vsement...@parallels.com --- tests/qemu-iotests/115 | 96 ++ tests/qemu-iotests/115.out | 64 +++

[Qemu-devel] [PATCH 2/8] hbitmap: store / restore

2015-01-13 Thread Vladimir Sementsov-Ogievskiy
Functions to store / restore HBitmap. HBitmap should be saved to linear bitmap format independently of endianess. These functions are appropriate for dirty bitmap migration, retoring the bitmap in several steps is available. To save performance, every step writes only the last level of the

[Qemu-devel] [PATCH 1/8] tls: require compiler support for __thread

2015-01-13 Thread Paolo Bonzini
The block layer is now using __thread unconditionally. Remove the fake TLS wrappers (that actually aren't TLS on !Linux) in include/qemu/tls.h, and add a testcase. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- configure | 9 +- exec.c | 2 +- include/qemu/tls.h

[Qemu-devel] [PATCH 2/9] qmp hmp: Improve error messages when SPICE is not in use

2015-01-13 Thread Markus Armbruster
Commit 7572150 adopted QERR_DEVICE_NOT_ACTIVE for the purpose, probably because adding another error seemed cumbersome overkill. Produces No spice device has been activated, which is awkward. We've since abandoned our quest for rich error objects. Time to undo the damage to this error message.

[Qemu-devel] [PATCH 6/8] memory: remove assertion on memory_region_destroy

2015-01-13 Thread Paolo Bonzini
From: Jan Kiszka jan.kis...@siemens.com Now that memory_region_destroy can be called from an RCU callback, checking the BQL-protected global memory_region_transaction_depth does not make much sense. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com

[Qemu-devel] [PATCH 9/9] balloon: Eliminate silly QERR_ macros

2015-01-13 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of rich error objects. They're used with error_set() and qerror_report(), and expand into the first *two* arguments. This trickiness has become pointless. Clean up. Signed-off-by: Markus Armbruster arm...@redhat.com --- balloon.c | 6

[Qemu-devel] [PATCH 8/8] memory: avoid ref/unref in memory_region_find

2015-01-13 Thread Paolo Bonzini
Do the entire lookup under RCU. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- memory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/memory.c b/memory.c index a844ced..577e87c 100644 --- a/memory.c +++ b/memory.c @@ -1828,7 +1828,8 @@ MemoryRegionSection

[Qemu-devel] [PATCH v5] block/raw-posix.c: Fixes raw_getlength() on Mac OS X so that it reports the correct length of a real CD

2015-01-13 Thread Programmingkid
Allows for using real cdrom disc in QEMU under Mac OS X. This command was used to see if this patch worked: ./qemu-system-i386 -drive if=none,id=drive0,file=/dev/null,format=raw Signed-off-by: John Arbuckle programmingk...@gmail.com --- Replaced -errno with 0 for ioctl() failure return value.

Re: [Qemu-devel] [PATCH v11 13/13] block: BdrvDirtyBitmap miscellaneous fixup

2015-01-13 Thread John Snow
On 01/13/2015 11:50 AM, Vladimir Sementsov-Ogievskiy wrote: Hmm. May be, update the size field to be uint64_t too? Negative size is not meaningful.. Best regards, Vladimir No, it is not meaningful. However, it does match the return type from bdrv_nb_sectors(bs), which uses -1 to indicate

[Qemu-devel] [PATCH 3/8] qcow2: add dirty-bitmaps feature

2015-01-13 Thread Vladimir Sementsov-Ogievskiy
Adds dirty-bitmaps feature to qcow2 format as specified in docs/specs/qcow2.txt Signed-off-by: Vladimir Sementsov-Ogievskiy vsement...@parallels.com --- block/Makefile.objs| 2 +- block/qcow2-dirty-bitmap.c | 514 + block/qcow2.c

[Qemu-devel] [PATCH 7/8] qmp: print dirty bitmap

2015-01-13 Thread Vladimir Sementsov-Ogievskiy
Adds qmp and hmp commands to print dirty bitmap. This is needed only for testing persistent dirty bitmap feature. Signed-off-by: Vladimir Sementsov-Ogievskiy vsement...@parallels.com --- block.c | 33 + blockdev.c| 13 +

Re: [Qemu-devel] [PATCH v11 08/13] block: Add bitmap successors

2015-01-13 Thread John Snow
On 01/13/2015 04:24 AM, Fam Zheng wrote: On Mon, 01/12 11:31, John Snow wrote: A bitmap successor is an anonymous BdrvDirtyBitmap that is intended to be created just prior to a sensitive operation (e.g. Incremental Backup) that can either succeed or fail, but during the course of which we

[Qemu-devel] [PATCH 0/2] cpu_ldst.h: Minor cleanups in ld/st macros

2015-01-13 Thread Peter Maydell
These two patches make some minor cleanups to cpu_ldst.h which I noticed while I was trying to get my head around our confusing mess of load and store related functions. Peter Maydell (2): cpu_ldst.h: Remove unused ldul_ macros cpu_ldst.h: Collapse laddr() and saddr() into

Re: [Qemu-devel] [PATCH 0/9] qmp hmp balloon: Cleanups around error reporting

2015-01-13 Thread Gerd Hoffmann
On Di, 2015-01-13 at 18:50 +0100, Markus Armbruster wrote: qmp hmp: Factor out common using spice test qmp hmp: Improve error messages when SPICE is not in use hmp: Compile hmp_info_spice() only with CONFIG_SPICE qmp: Clean up qmp_query_spice() #ifndef !CONFIG_SPICE dummy Reviewed-by:

[Qemu-devel] [PATCH v3 4/7] monitor: use cc-get_arch_id as the cpu index

2015-01-13 Thread Zhu Guihua
From: Gu Zheng guz.f...@cn.fujitsu.com Use cc-get_arch_id as the cpu index to avoid the cpu index duplicated issue in the QMP/HMP command output. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- cpus.c| 4 +++- monitor.c | 4 +++- 2

[Qemu-devel] [PATCH v3 5/7] acpi:cpu hotplug: set pcmachine as icc bus' hotplug handler

2015-01-13 Thread Zhu Guihua
From: Gu Zheng guz.f...@cn.fujitsu.com As the pre-check in the qdev_device_add(): if (qdev_hotplug bus !qbus_is_hotpluggable(bus)) { qerror_report(QERR_BUS_NO_HOTPLUG, bus-name); return NULL; } if device has parent bus, the bus must have valid hotplug_handler, otherwise

[Qemu-devel] [PATCH v3 2/7] qom/cpu: move register_vmstate to common CPUClass.realizefn

2015-01-13 Thread Zhu Guihua
From: Gu Zheng guz.f...@cn.fujitsu.com Move cpu vmstate register from cpu_exec_init into cpu_common_realizefn, and use cc-get_arch_id as the instance id that suggested by Igor to fix the migration issue. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua

[Qemu-devel] [PATCH v2 02/11] acpi/cpu: add cpu hot unplug request callback function

2015-01-13 Thread Zhu Guihua
From: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/acpi/cpu_hotplug.c | 38 +-

[Qemu-devel] [PATCH v2 00/11] cpu: add i386 cpu hot remove support

2015-01-13 Thread Zhu Guihua
This series is based on chen fan's previous i386 cpu hot remove patchset: https://lists.nongnu.org/archive/html/qemu-devel/2013-12/msg04266.html Via implementing ACPI standard methods _EJ0 in ACPI table, after Guest OS remove one vCPU online, the fireware will store removed bitmap to QEMU, then

[Qemu-devel] [PATCH v2 05/11] pc: add cpu hot unplug request callback support

2015-01-13 Thread Zhu Guihua
Add cpu hot unplug request callback support, and a pre-check about the active cpus is added to avoid removing the last cpu. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- hw/i386/pc.c | 36 ++-- 1 file

[Qemu-devel] [PATCH v2 04/11] acpi/ich9: add cpu hot unplug request callback support

2015-01-13 Thread Zhu Guihua
Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- hw/acpi/ich9.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index c48d176..b795f8f 100644 --- a/hw/acpi/ich9.c +++

[Qemu-devel] [PATCH v2 03/11] acpi/piix4: add cpu hot unplug request callback support

2015-01-13 Thread Zhu Guihua
Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- hw/acpi/piix4.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 4407388..9b75780 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -364,6

[Qemu-devel] [PATCH v3 1/7] cpu: introduce CpuTopoInfo structure for argument simplification

2015-01-13 Thread Zhu Guihua
From: Chen Fan chen.fan.f...@cn.fujitsu.com Reviewed-by: Eduardo Habkost ehabk...@redhat.com Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- target-i386/topology.h | 33

[Qemu-devel] [PATCH v3 3/7] qom/cpu: move apic vmstate register into x86_cpu_apic_realize

2015-01-13 Thread Zhu Guihua
From: Gu Zheng guz.f...@cn.fujitsu.com move apic vmstate register into x86_cpu_apic_realize, and use cc-get_arch_id as the instance id to avoid using the auto-id which will break the migration if we add device not in order. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Zhu

[Qemu-devel] [PATCH v3 6/7] cpu: add device_add foo-x86_64-cpu support

2015-01-13 Thread Zhu Guihua
From: Chen Fan chen.fan.f...@cn.fujitsu.com Add support to device_add foo-x86_64-cpu, and additional checks of apic id are added into x86_cpuid_set_apic_id() to avoid duplicate. Besides, in order to support device/device_add foo-x86_64-cpu which without specified apic id, we assign cpuid_apic_id

[Qemu-devel] [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support

2015-01-13 Thread Zhu Guihua
This series is based on the previous patchset from Chen Fan: https://lists.nongnu.org/archive/html/qemu-devel/2014-05/msg02360.html We try to make cpu hotplug with device_add, and make -device foo-x86_64-cpu available???also we can set apic-id property with command line, if without setting

[Qemu-devel] [PATCH v3 7/7] i386/cpu: add instance finalize callback

2015-01-13 Thread Zhu Guihua
From: Gu Zheng guz.f...@cn.fujitsu.com Add a func to finalize a cpu's instance. When cpu's device_add failed, and cpu's device_del executed, this func would be invoked. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- include/qom/cpu.h | 1

Re: [Qemu-devel] question about live migration with storage

2015-01-13 Thread Paolo Bonzini
On 14/01/2015 03:41, Zhang Haoyu wrote: Hi, Paolo, what's advantages of drive_mirror over traditional mechanism implemented in block-migration.c ? Why libvirt use drive_mirror instead of traditional iterative mechanism as the default way of live migration with non-shared storage? 1)

Re: [Qemu-devel] [PATCH] AIO: Reduce number of threads for 32bit hosts

2015-01-13 Thread Paolo Bonzini
On 14/01/2015 01:56, Alexander Graf wrote: +if (sizeof(pool) == 4) { +/* 32bit systems run out of virtual memory quickly */ +pool-max_threads = 4; +} else { +pool-max_threads = 64; +} Reviewed-by: Paolo Bonzini pbonz...@redhat.com The same problem

[Qemu-devel] [PATCH v2 01/11] x86: add x86_cpu_unrealizefn() for cpu apic remove

2015-01-13 Thread Zhu Guihua
From: Chen Fan chen.fan.f...@cn.fujitsu.com Implement x86_cpu_unrealizefn() for corresponding x86_cpu_realizefn(), which is mostly used to clean the apic related allocation and vmstates at here. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com

[Qemu-devel] [PATCH v2 09/11] pc: add cpu hot unplug callback support

2015-01-13 Thread Zhu Guihua
From: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/i386/pc.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index

[Qemu-devel] [PATCH v2 11/11] cpus: reclaim allocated vCPU objects

2015-01-13 Thread Zhu Guihua
From: Gu Zheng guz.f...@cn.fujitsu.com After ACPI get a signal to eject a vCPU, the vCPU must be removed from CPU list,before the vCPU really removed, then release the all related vCPU objects. In order to deal well with the kvm vcpus (which can not be removed without any protection), we do not

[Qemu-devel] [PATCH v2 07/11] acpi/piix4: add cpu hot unplug callback support

2015-01-13 Thread Zhu Guihua
From: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/acpi/piix4.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 9b75780..2a923fc

[Qemu-devel] [PATCH v2 06/11] acpi/cpu: add cpu hot unplug callback function

2015-01-13 Thread Zhu Guihua
Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- cpus.c| 7 +++ hw/acpi/cpu_hotplug.c | 8 include/hw/acpi/cpu_hotplug.h | 3 +++ include/qom/cpu.h | 9 + 4 files changed, 27

[Qemu-devel] [PATCH v2 08/11] acpi/ich9: add cpu hot unplug support

2015-01-13 Thread Zhu Guihua
From: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- hw/acpi/ich9.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index b795f8f..a892e5d 100644

[Qemu-devel] [PATCH v2 10/11] cpu hotplug: implement function cpu_status_write() for vcpu ejection

2015-01-13 Thread Zhu Guihua
From: Chen Fan chen.fan.f...@cn.fujitsu.com When OS ejected a vcpu (like: echo 1 /sys/bus/acpi/devices/LNXCPUXX/eject), it would call acpi EJ0 method, the firmware need to write the new cpumap, QEMU would know which vcpu need to be ejected. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com

Re: [Qemu-devel] [PATCH 1/4] target-i386: fix movntsd on big-endian hosts

2015-01-13 Thread Paolo Bonzini
On 13/01/2015 19:48, Eduardo Habkost wrote: if (b1 1) { -gen_stq_env_A0(s, offsetof(CPUX86State, xmm_regs[reg])); +gen_stq_env_A0(s, offsetof(CPUX86State, + xmm_regs[reg].XMM_Q(0))); Do we have (or

Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14

2015-01-13 Thread Michael Roth
Quoting Marcel Apfelbaum (2015-01-13 12:48:50) On 01/13/2015 07:49 PM, William Dauchy wrote: Hello, On Jan09 23:42, Paolo Bonzini wrote: That's commit 364c3e6b8dd7912e01d19122d791b8c8f6df4f6c on branch uq/master of git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git. maybe the one

Re: [Qemu-devel] [PATCH v11 00/13] block: Incremental backup series

2015-01-13 Thread John Snow
Minor update to the github version of this patchset that brings it inline with the recent block pull into master. It also drops a duplicate patch that has since made it upstream. Not re-posting yet to allow time for review and critique. --js On 01/12/2015 11:30 AM, John Snow wrote: Welcome

Re: [Qemu-devel] [PATCH 1/8] tls: require compiler support for __thread

2015-01-13 Thread Peter Maydell
On 13 January 2015 at 17:52, Paolo Bonzini pbonz...@redhat.com wrote: The block layer is now using __thread unconditionally. Where? I did a quick grep for __thread and (other than stuff in the *-user code and some Win32 specific files) there's no use of __thread outside the DEFINE_TLS wrappers.

Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14

2015-01-13 Thread Marcel Apfelbaum
On 01/13/2015 07:49 PM, William Dauchy wrote: Hello, On Jan09 23:42, Paolo Bonzini wrote: That's commit 364c3e6b8dd7912e01d19122d791b8c8f6df4f6c on branch uq/master of git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git. maybe the one for: fix regression when reading memory size from config

Re: [Qemu-devel] [PATCH v5 0/5] Geometry and blocksize detection for backing devices.

2015-01-13 Thread Christian Borntraeger
Am 13.01.2015 um 17:04 schrieb Stefan Hajnoczi: [...] I'm really starting to get worried that you are going to break things. This DASD hack is a layering violation but okay, go ahead if you want. But now you are also thinking about breaking live migration. The proper thing to do is to

Re: [Qemu-devel] [PATCH 2/4] target-i386: do not memcpy in and out of xmm_regs

2015-01-13 Thread Eduardo Habkost
On Wed, Jan 07, 2015 at 06:39:13PM +0100, Paolo Bonzini wrote: [...] diff --git a/target-i386/translate.c b/target-i386/translate.c index 5af4300..253009a 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -2621,10 +2621,10 @@ static inline void gen_sto_env_A0(DisasContext

Re: [Qemu-devel] [PATCH v5] block/raw-posix.c: Fixes raw_getlength() on Mac OS X so that it reports the correct length of a real CD

2015-01-13 Thread Programmingkid
On Jan 13, 2015, at 1:34 PM, Peter Maydell wrote: On 13 January 2015 at 18:26, Programmingkid programmingk...@gmail.com wrote: Allows for using real cdrom disc in QEMU under Mac OS X. This command was used to see if this patch worked: ./qemu-system-i386 -drive

Re: [Qemu-devel] [PATCH 2/2] cpu_ldst.h: Collapse laddr() and saddr() into ldst_get_host_addr()

2015-01-13 Thread Peter Maydell
On 13 January 2015 at 18:32, Peter Maydell peter.mayd...@linaro.org wrote: The macros laddr() and saddr() are always defined to be identical to each other. Replace them with a single macro, and give it a longer name so it's easier to grep the codebase and confirm that it's only used in this

Re: [Qemu-devel] [PATCH 1/8] tls: require compiler support for __thread

2015-01-13 Thread Paolo Bonzini
On 13/01/2015 19:40, Peter Maydell wrote: On 13 January 2015 at 17:52, Paolo Bonzini pbonz...@redhat.com wrote: The block layer is now using __thread unconditionally. Where? I did a quick grep for __thread and (other than stuff in the *-user code and some Win32 specific files) there's no

Re: [Qemu-devel] [PATCH 1/2] cpu_ldst.h: Remove unused ldul_ macros

2015-01-13 Thread Paolo Bonzini
On 13/01/2015 19:32, Peter Maydell wrote: The five ldul_ macros are not used anywhere and are marked up with an XXX comment. ldul is a non-standard prefix for our family of load instructions: we don't mark 32-bit accesses for signedness because they return a 32 bit quantity. So just delete

Re: [Qemu-devel] [PATCH for 2.3 v2 1/1] xen-hvm: increase maxmem before calling xc_domain_populate_physmap

2015-01-13 Thread Don Slutz
On 01/13/15 13:07, Stefano Stabellini wrote: On Mon, 12 Jan 2015, Stefano Stabellini wrote: On Wed, 3 Dec 2014, Don Slutz wrote: From: Stefano Stabellini stefano.stabell...@eu.citrix.com Increase maxmem before calling xc_domain_populate_physmap_exact to avoid the risk of running out of guest

Re: [Qemu-devel] Fedora FC21 - Bug: 100% CPU and hangs in gettimeofday(tp, NULL); forever

2015-01-13 Thread Gerhard Wiesinger
On 12.01.2015 12:41, Gerhard Wiesinger wrote: On 08.01.2015 23:28, Gerhard Wiesinger wrote: I'll keep you up to date in the next days whether it happens again or not. With qemu-kvm 2.2.0 release from the above repository the 100% usage didn't happen so far (although I had to reboot after

Re: [Qemu-devel] [PATCH 0/1] pci: allow 0 address for PCI IO/MEM regions

2015-01-13 Thread Michael S. Tsirkin
On Tue, Jan 13, 2015 at 06:01:53PM +0100, Alexander Graf wrote: On 01/13/15 17:17, Michael S. Tsirkin wrote: On Tue, Jan 13, 2015 at 05:54:46PM +0200, Michael S. Tsirkin wrote: I think we already do this for PC: commit 83d08f2673504a299194dcac1657a13754b5932a Author: Michael S.

Re: [Qemu-devel] [PATCH 1/8] tls: require compiler support for __thread

2015-01-13 Thread Peter Maydell
On 13 January 2015 at 19:48, Paolo Bonzini pbonz...@redhat.com wrote: It's in the pull request. That was sneaky :-) Native TLS is supported by all platforms except Windows and, I think, OpenBSD, which will have to use GCC's emulated TLS. For Windows we already do. OpenBSD ports will have

Re: [Qemu-devel] [PATCH v15 2/2] sPAPR: Implement sPAPRPHBClass::eeh_handler

2015-01-13 Thread David Gibson
On Mon, Jan 05, 2015 at 11:26:28AM +1100, Gavin Shan wrote: The patch implements sPAPRPHBClass::eeh_handler so that the EEH RTAS requests can be routed to VFIO for further handling. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com --- hw/ppc/spapr_pci_vfio.c | 56

Re: [Qemu-devel] [PATCH v15 1/2] sPAPR: Implement EEH RTAS calls

2015-01-13 Thread David Gibson
On Mon, Jan 05, 2015 at 11:26:27AM +1100, Gavin Shan wrote: The emulation for EEH RTAS requests from guest isn't covered by QEMU yet and the patch implements them. The patch defines constants used by EEH RTAS calls and adds callback sPAPRPHBClass::eeh_handler, which is going to be used this

Re: [Qemu-devel] Fedora FC21 - Bug: 100% CPU and hangs in gettimeofday(tp, NULL); forever

2015-01-13 Thread Laine Stump
On 01/13/2015 05:01 PM, Gerhard Wiesinger wrote: On 13.01.2015 22:16, Paolo Bonzini wrote: On 13/01/2015 22:14, Gerhard Wiesinger wrote: I also had a look at the kernel code again: http://lxr.free-electrons.com/source/kernel/time/timekeeping.c?v=3.17#L493 499 do { 500

[Qemu-devel] [PATCH] pseries: Limit PCI host bridge index value

2015-01-13 Thread David Gibson
pseries guests can have large numbers of PCI host bridges. To avoid the user having to specify a number of different configuration values for every one, the device supports an index property which is a shorthand setting the various window and configuration addresses from a predefined sensible

Re: [Qemu-devel] question about live migration with storage

2015-01-13 Thread Zhang Haoyu
On 2015-01-13 17:45:45, Paolo Bonzini wrote: On 13/01/2015 03:03, Zhang Haoyu wrote: I want to live migrate a vm with storage, with regard to the migration of storage, should I use drive_mirror or traditional mechanism implemented in block-migration.c ? Because I don't use

Re: [Qemu-devel] [PATCH v3] spapr-pci: Enable huge BARs

2015-01-13 Thread David Gibson
On Fri, Jan 09, 2015 at 12:11:14PM +1100, Alexey Kardashevskiy wrote: At the moment sPAPR only supports 512MB window for MMIO BARs. However modern devices might want bigger 64bit BARs. This extends MMIO window from 512MB to 62GB (aligned to SPAPR_PCI_WINDOW_SPACING) and advertises it in 2

Re: [Qemu-devel] [RFC PATCH] spapr_vio/spapr_iommu: Move VIO bypass where it belongs

2015-01-13 Thread David Gibson
On Fri, Jan 09, 2015 at 12:02:51PM +1100, Alexey Kardashevskiy wrote: Instead of tweaking a TCE table device by adding there a bypass flag, let's add an alias to RAM and IOMMU memory region, and enable/disable those according to the selected bypass mode. This way IOMMU memory region can have

  1   2   3   >