[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 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 Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua ---

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

2015-01-13 Thread Zhu Guihua
From: Gu Zheng Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- 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 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -316,8 +316,12 @@ void ich9

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

2015-01-13 Thread Zhu Guihua
From: Gu Zheng Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- 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 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -375,8 +375,14 @@ s

[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 Signed-off-by: Gu Zheng --- 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 insertions(+) diff --git a/cpus.c b/cpus.c index d

[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 Signed-off-by: Gu Zheng --- 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 +364,8 @@ static void piix4_device_unplug_request_cb(H

[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 Signed-off-by: Gu Zheng --- hw/i386/pc.c | 36 ++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git

[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 Signed-off-by: Gu Zheng --- 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 +++ b/hw/acpi/ich9.c @@ -304,8 +304,13 @@ void ich9_pm_device_plug_

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

2015-01-13 Thread Zhu Guihua
From: Chen Fan 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 Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- hw/cpu/icc_bus.c| 11 ++

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

2015-01-13 Thread Zhu Guihua
From: Gu Zheng 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 close KVM vcpu fd, just

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

2015-01-13 Thread Zhu Guihua
From: Gu Zheng Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- 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 dd6e8da..b7d5712 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1722,6 +1722,24

[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 QE

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

2015-01-13 Thread Zhu Guihua
From: Gu Zheng Signed-off-by: Chen Fan Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- hw/acpi/cpu_hotplug.c | 38 +- include/hw/acpi/cpu_hotplug.h | 4 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/hw/acpi/cpu_hotplug.

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 The same problem applies to corou

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

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

2015-01-13 Thread Zhu Guihua
From: Gu Zheng 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 Signed-off-by: Zhu Guihua --- include/qom/cpu.h | 1 + target-i386/cpu.c | 8 2 files changed, 9 insertions(+) dif

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

2015-01-13 Thread Zhu Guihua
From: Gu Zheng 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 Signed-off-by: Zhu Guihua --- exec.c| 32 +++- i

[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 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 can not hot plug. C

[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 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 Signed-off-by: Zhu Guihua --- cpus.c| 4 +++- monitor.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus

[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 apic-

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

2015-01-13 Thread Zhu Guihua
From: Chen Fan 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 with a default broadcast va

[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 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 Signed-off-by: Zhu Guihua --- hw/intc/apic_common.c | 3 +-

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

2015-01-13 Thread Zhu Guihua
From: Chen Fan Reviewed-by: Eduardo Habkost Signed-off-by: Chen Fan Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- target-i386/topology.h | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/target-i386/topology.h b/target-i386/topolo

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 Reviewe

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 s

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 01:59:25PM +0100, Paolo Bonzini wrote: > > > On 09/01/2015 13:53, Alexey Kardashevskiy wrote: > >> > I think the minimum version should be 2 as well, because migrating from > >> > version 1 will not set the bypass field correctly. > > This why the patch is "RFC" :) > > >

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 hav

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

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

[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 se

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 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 >

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 > --- > hw/ppc/spapr_pci_vfio.c | 56 >

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 { >>

[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] [PATCH] Fixes key mapping so all keys work

2015-01-13 Thread Peter Maydell
On 14 January 2015 at 00:12, Programmingkid wrote: > This patch allows for all the keys on an Apple extended keyboard to work in > QEMU. > > Signed-off-by: John Arbuckle > > --- > ui/cocoa.m | 29 - > 1 files changed, 20 insertions(+), 9 deletions(-) > > diff --git

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

2015-01-13 Thread Programmingkid
This patch allows for all the keys on an Apple extended keyboard to work in QEMU. Signed-off-by: John Arbuckle --- ui/cocoa.m | 29 - 1 files changed, 20 insertions(+), 9 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index c8535a3..afac987 100644 --- a/ui/co

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

2015-01-13 Thread Peter Maydell
On 13 January 2015 at 20:27, Paolo Bonzini wrote: > On 13/01/2015 21:00, Peter Maydell wrote: >> Hmm. That's a chunk of users who are now going to have to >> change the way they've been building QEMU. Does configure >> at least blow up on the old gcc, or will we just silently >> build a non-workin

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

2015-01-13 Thread Gerhard Wiesinger
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 seq = read_seqcount_begin(&tk_core.seq); 501 502

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

2015-01-13 Thread Paolo Bonzini
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 seq = read_seqcount_begin(&tk_core.seq); > 501 > 502 ts->tv_sec = tk

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

2015-01-13 Thread Gerhard Wiesinger
On 13.01.2015 21:48, Paolo Bonzini wrote: On 13/01/2015 21:13, Gerhard Wiesinger wrote: It happens also with qemu-kvm 2.2.0 on another VM where also PostgreSQL is running: (gdb) bt #0 0x7fff9a1feff4 in gettimeofday () #1 0x006d425e in GetCurrentTimestamp () at timestamp.c:1274 Wh

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

2015-01-13 Thread Cole Robinson
On 01/13/2015 03:48 PM, Paolo Bonzini wrote: > > > On 13/01/2015 21:13, Gerhard Wiesinger wrote: >> >> It happens also with qemu-kvm 2.2.0 on another VM where also PostgreSQL >> is running: >> (gdb) bt >> #0 0x7fff9a1feff4 in gettimeofday () >> #1 0x006d425e in GetCurrentTimestamp (

Re: [Qemu-devel] [PATCH v2 2/2] e1000: decrement RDT if equal to RDH

2015-01-13 Thread Richard Tollerton
Jason Wang writes: > On Tue, Jan 13, 2015 at 3:12 AM, Richard Tollerton > wrote: >> On Thu, Dec 18, 2014 at 12:01:48AM -0500, Jason Wang wrote: >> >>> > Some drivers set RDT=RDH. Oddly, this works on real hardware. To >>> > work around this, autodecrement RDT when this happens. >>> >>> Pl

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

2015-01-13 Thread Michael Roth
Quoting Michael Roth (2015-01-13 15:03:17) > Quoting Paolo Bonzini (2015-01-13 14:40:07) > > On 13/01/2015 20:53, Michael Roth wrote: > > > 364c3e6, "vl.c: fix regression when reading machine type from config > > > file"? > > > > > > I've gone ahead and applied from uq/uq/master, but still waitin

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

2015-01-13 Thread Michael Roth
Quoting Paolo Bonzini (2015-01-13 14:40:07) > On 13/01/2015 20:53, Michael Roth wrote: > > 364c3e6, "vl.c: fix regression when reading machine type from config file"? > > > > I've gone ahead and applied from uq/uq/master, but still waiting on > > > > "vl.c: fix regression when reading memory size

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

2015-01-13 Thread John Snow
On 01/13/2015 12:03 PM, Jeff Cody wrote: 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 fi

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

2015-01-13 Thread Paolo Bonzini
On 13/01/2015 21:13, Gerhard Wiesinger wrote: > > It happens also with qemu-kvm 2.2.0 on another VM where also PostgreSQL > is running: > (gdb) bt > #0 0x7fff9a1feff4 in gettimeofday () > #1 0x006d425e in GetCurrentTimestamp () at timestamp.c:1274 > > What we know: > OK : F20: 3.1

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

2015-01-13 Thread Paolo Bonzini
On 13/01/2015 20:53, Michael Roth wrote: > 364c3e6, "vl.c: fix regression when reading machine type from config file"? > > I've gone ahead and applied from uq/uq/master, but still waiting on > > "vl.c: fix regression when reading memory size from config file" to be picked > up by a maintainer.

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

2015-01-13 Thread Paolo Bonzini
On 13/01/2015 21:00, Peter Maydell wrote: > Hmm. That's a chunk of users who are now going to have to > change the way they've been building QEMU. Does configure > at least blow up on the old gcc, or will we just silently > build a non-working QEMU? At least the build, if not configure, should b

Re: [Qemu-devel] [PATCH 16/19] block/parallels: no need to flush on each block allocation table update

2015-01-13 Thread Denis V. Lunev
On 13/01/15 18:17, Denis V. Lunev wrote: On 13/01/15 17:50, Roman Kagan wrote: On Tue, Dec 30, 2014 at 01:07:09PM +0300, Denis V. Lunev wrote: From the point of guest each write to real disk prior to disk barrier operation could be lost. Therefore there is no problem that "not synced" new blo

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

2015-01-13 Thread Peter Maydell
On 13 January 2015 at 18:24, Stefano Stabellini wrote: > 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:

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 ke

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 >>> >>> Increase maxmem before calling xc_domain_populate_physmap_exact to >>> avoid the risk of running out of guest memory. This way

[Qemu-devel] [PATCH v6] 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 QEMU on Mac OS X to use a real cdrom again. Signed-off-by: John Arbuckle --- Added fallback code - uses lseek() if ioctl() fails. block/raw-posix.c | 25 - 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c ind

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 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 to use a new-enou

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

2015-01-13 Thread Michael Roth
Quoting Michael Roth (2015-01-08 11:33:04) > Hi everyone, > > The following new patches are queued for QEMU stable v2.1.3: > > https://github.com/mdroth/qemu/commits/stable-2.1-staging > > The release is planned for 2015-01-21: > > http://wiki.qemu.org/Planning/2.1 > > Please respond here

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. > > > >

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 t

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 del

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

2015-01-13 Thread Paolo Bonzini
On 13/01/2015 19:37, Eduardo Habkost wrote: >> > +tcg_gen_ld_i64(cpu_tmp1_i64, cpu_env, s_offset + offsetof(XMMReg, >> > XMM_Q(1)); >> > +tcg_gen_st_i64(cpu_tmp1_i64, cpu_env, d_offset + offsetof(XMMReg, >> > XMM_Q(1)); > It looks good (I even sent my Reviewed-by line), but: > > target

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

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 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 > __thre

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 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 one place: ldst_get_hos

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 in

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:45, Programmingkid wrote: > > On Jan 13, 2015, at 1:34 PM, Peter Maydell wrote: > >> On 13 January 2015 at 18:26, Programmingkid >> wrote: >>> Signed-off-by: John Arbuckle >>> +uint64_t sectors = 0; >>> +uint32_t sector_size = 0; >>> + >>> +/* Qu

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 fi

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

2015-01-13 Thread Eduardo Habkost
On Wed, Jan 07, 2015 at 06:39:12PM +0100, Paolo Bonzini wrote: > This was accessing an XMM register's low half without going through XMM_Q. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Paolo Bonzini > --- > target-i386/translate.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >

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 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 >>

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: Michae

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 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. > Remove the > "f

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(DisasCont

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 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 > > --- > Replaced -errno w

[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 ldst_get_host_addr(

[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 --- include/exec/

[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 --- includ

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 a

[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 --- Replaced -errno with 0 for ioctl() failure return value. "make check" now passes wit

[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: Stefan

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

2015-01-13 Thread Stefano Stabellini
From: Liang Li 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: error: libxl_qmp.c:287:

[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 xen-2015-

[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: req

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 > > > > 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 calculatio

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 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 me, >> >

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 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 fall back to the "try l

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 > 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, the

[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 --- 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 memory_region_find(MemoryRe

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

2015-01-13 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- 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 0cd96b1..06ffa1d 100644 --- a/inc

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 > 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 renames sectorSi

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

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

[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 --- 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 +++ b/include/qemu/rcu.h @@ -76,6 +76

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

2015-01-13 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- 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 a/tests/Makefile b/tests/

[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 Qe

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

2015-01-13 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- 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) return (mon->susp

[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 --- configure | 9 +- exec.c | 2 +- include/qemu/tls.h | 52

[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 --- balloon.c | 6 -- include

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

2015-01-13 Thread Paolo Bonzini
From: Jan Kiszka 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 Signed-off-by: Paolo Bonzini --- memory.c | 1 - 1 file changed, 1 deletion(-) diff --git

[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 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 qmp_query_spi

[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 --- balloon.c | 42 +- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/balloon.c b/balloon.c index b70da4f..2884c2d 1006

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 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 --- include/qapi/qmp/qerror.h | 3 --- m

  1   2   3   >