[Qemu-devel] [PATCH 05/15] memory: introduce life_ops to MemoryRegion

2012-08-07 Thread Liu Ping Fan
From: Liu Ping Fan The types of referred object by MemoryRegion are variable, ex, another mr, DeviceState, or other struct defined by drivers. So the refer/unrefer may be different by drivers. Using this ops, we can mange the backend object. Signed-off-by: Liu Ping Fan --- hw/ide/piix.c |

[Qemu-devel] [PATCH 12/15] qdev: using devtree lock to protect device's accessing

2012-08-07 Thread Liu Ping Fan
From: Liu Ping Fan lock: qemu_device_tree_mutex competitors: --device_del(destruction of device will be postphoned until unplug ack from guest), --pci hot-unplug --iteration (qdev_reset_all) --device_add Signed-off-by: Liu Ping Fan --- hw/pci-hotplug.c |4 hw/qdev-moni

[Qemu-devel] [PATCH 09/15] memory: prepare flatview and radix-tree for rcu style access

2012-08-07 Thread Liu Ping Fan
From: Liu Ping Fan Flatview and radix view are all under the protection of pointer. And this make sure the change of them seem to be atomic! The mr accessed by radix-tree leaf or flatview will be reclaimed after the prev PhysMap not in use any longer Signed-off-by: Liu Ping Fan --- exec.c

[Qemu-devel] [PATCH 04/15] memory: MemoryRegion topology must be stable when updating

2012-08-07 Thread Liu Ping Fan
From: Liu Ping Fan Using mem_map_lock to protect among updaters. So we can get the intact snapshot of mem topology -- FlatView & radix-tree. Signed-off-by: Liu Ping Fan --- exec.c |3 +++ memory.c | 22 ++ memory.h |2 ++ 3 files changed, 27 insertions(+), 0 del

[Qemu-devel] [PATCH 11/15] lock: introduce global lock for device tree

2012-08-07 Thread Liu Ping Fan
From: Liu Ping Fan Signed-off-by: Liu Ping Fan --- cpus.c | 12 main-loop.h |3 +++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/cpus.c b/cpus.c index b182b3d..a734b36 100644 --- a/cpus.c +++ b/cpus.c @@ -611,6 +611,7 @@ static void qemu_tcg_init_cpu_s

[Qemu-devel] [PATCH 03/15] qom: introduce reclaimer to release obj

2012-08-07 Thread Liu Ping Fan
From: Liu Ping Fan Collect unused object and release them at caller demand. Signed-off-by: Liu Ping Fan --- include/qemu/reclaimer.h | 28 ++ main-loop.c |5 qemu-tool.c |5 qom/Makefile.objs|2 +- qom/reclaimer.c

Re: [Qemu-devel] [RFC/PATCH 1/1] USB code fenced for s390

2012-08-07 Thread Christian Borntraeger
On 07/08/12 22:22, Blue Swirl wrote: > On Tue, Aug 7, 2012 at 12:26 PM, Peter Maydell > wrote: >> On 7 August 2012 13:19, Christian Borntraeger wrote: >>> +#if defined(TARGET_HAS_USB) && (TARGET_HAS_USB == 1) >>> /* init USB devices */ >>> if (usb_enabled) { >>> if (foreach_de

[Qemu-devel] [PATCH 15/15] e1000: using new interface--unmap to unplug

2012-08-07 Thread Liu Ping Fan
From: Liu Ping Fan Signed-off-by: Liu Ping Fan --- hw/e1000.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index 4573f13..fa71455 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -1192,6 +1192,13 @@ e1000_cleanup(VLANClientState *nc) s-

[Qemu-devel] [PATCH 0/15 v2] prepare unplug out of protection of global lock

2012-08-07 Thread Liu Ping Fan
background: refer to orignal plan posted by Marcelo Tosatti, http://lists.gnu.org/archive/html/qemu-devel/2012-06/msg04315.html prev version: https://lists.gnu.org/archive/html/qemu-devel/2012-07/msg03312.html changes v1->v2 --introduce atomic ops --introduce ref cnt for MemoryRegion --make mem

Re: [Qemu-devel] Cirrus bugs vs endian: how two bugs cancel each other out

2012-08-07 Thread Gerd Hoffmann
Hi, >>> The only thing >>> its missing is to fix the endianess for server/client handshaking. >> >> What exactly do you mean here? > > Well that are negotiation messages configuring each channel, its > capabilities, encryption keys , etc. After this negotiation, the > server start to send SPICE

Re: [Qemu-devel] KVM segfaults with 3.5 while installing ubuntu 12.04

2012-08-07 Thread Stefan Priebe
Any news? Was this applied upstream? Am 06.08.2012 14:37, schrieb Avi Kivity: On 08/06/2012 03:12 PM, Avi Kivity wrote: On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote: But still i got the segfault and core dump - this is my main problem? I mean qemu-kvm master isn't declared as st

[Qemu-devel] [PATCH 08/10] pseries: Add PCI MSI/MSI-X support

2012-08-07 Thread David Gibson
This patch implements MSI and MSI-X support for the pseries PCI host bridge. To do this it adds: * A "config_space_address to msi_table" map, since the MSI RTAS calls take a PCI config space address as an identifier. * A MSIX memory region to catch msi_notify()/msix_notiry() from virtio-pci an

[Qemu-devel] [0/10] pseries updates and cleanups

2012-08-07 Thread David Gibson
Hi Alex, This series contains all my outstanding pseries updates which aren't dependent on getting a generic patch upstream first. I have a number more which are actually more urgent to get into 1.2, but we need to get some word on the generic patches before I can really push those. In the meant

[Qemu-devel] [PATCH 07/10] pseries: Add trace event for PCI irqs

2012-08-07 Thread David Gibson
From: Alexey Kardashevskiy This adds a trace event in the pseries PCI specific set_irq() function to assist in debugging. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson --- hw/spapr_pci.c |1 + trace-events |3 +++ 2 files changed, 4 insertions(+) diff --git a/hw/s

[Qemu-devel] [PATCH 02/10] pseries: Remove extraneous prints

2012-08-07 Thread David Gibson
The pseries machine prints several messages to stderr whenever it starts up and another whenever the vm is reset. It's not normal for qemu machines to do this though, so this patch removes them. We can put them back conditional on a DEBUG symbol if we really need them in future. Signed-off-by: D

[Qemu-devel] [PATCH 06/10] pseries: Export find_phb() utility function for PCI code

2012-08-07 Thread David Gibson
From: Alexey Kardashevskiy The pseries PCI code makes use of an internal find_dev() function which locates a PCIDevice * given a (platform specific) bus ID and device address. Internally this needs to first locate the host bridge on which the device resides based on the bus ID. This patch expos

[Qemu-devel] [PATCH 04/10] pseries: Separate PCI RTAS setup from common from emulation specific PCI setup

2012-08-07 Thread David Gibson
Currently the RTAS functions for handling PCI are registered from the class init code for the PCI host bridge. That sort of makes sense now, but will break in the future when vfio gives us multiple types of host bridge for pseries (emulated and pass-through, at least). The RTAS functions will be

[Qemu-devel] [PATCH 10/10] pseries: Update SLOF firmware image

2012-08-07 Thread David Gibson
This updates SLOF to handle the necessary device tree properties for MSI and MSI-X. Signed-off-by: David Gibson --- pc-bios/README |2 +- pc-bios/slof.bin | Bin 878088 -> 878640 bytes roms/SLOF|2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pc-bios/READM

[Qemu-devel] [PATCH 09/10] pseries dma: DMA window params added to PHB and DT population changed

2012-08-07 Thread David Gibson
From: Alexey Kardashevskiy Previously the only PCI bus supported was the emulated PCI bus with fixed DMA window with start at 0 and size 1GB. As we are going to support PCI pass through which DMA window properties are set by the host kernel, we have to support DMA windows with parameters other th

[Qemu-devel] [PATCH v8 6/6] allower the user to disable pv event support

2012-08-07 Thread Wen Congyang
Signed-off-by: Wen Congyang --- hw/pc_piix.c|6 +- qemu-config.c |4 qemu-options.hx |3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 4af8403..9b877a7 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -151,6 +151,8

[Qemu-devel] [PATCH v8 5/6] introduce a new qom device to deal with panicked event

2012-08-07 Thread Wen Congyang
If the target is x86/x86_64, the guest's kernel will write 0x01 to the port KVM_PV_EVENT_PORT when it is panciked. This patch introduces a new qom device kvm_pv_ioport to listen this I/O port, and deal with panicked event according to panicked_action's value. The possible actions are: 1. emit QEVEN

[Qemu-devel] [PATCH v8 4/6] add a new qevent: QEVENT_GUEST_PANICKED

2012-08-07 Thread Wen Congyang
This event will be emited when the guest is panicked. Signed-off-by: Wen Congyang --- monitor.c |1 + monitor.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 49dccfe..c892b7e 100644 --- a/monitor.c +++ b/monitor.c @@ -458,6 +458,7 @@ sta

[Qemu-devel] [PATCH v8 3/6] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-08-07 Thread Wen Congyang
The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang --- qapi-schema.json |6 +- qmp.c|3 ++- vl.c |7 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index cddf63a..3f

[Qemu-devel] [PATCH v8 2/6] kvm: Update kernel headers

2012-08-07 Thread Wen Congyang
Corresponding kvm.git hash: 439793d4 with my patch for kvm --- linux-headers/asm-s390/kvm.h |2 +- linux-headers/asm-s390/kvm_para.h |2 +- linux-headers/asm-x86/kvm.h |1 + linux-headers/asm-x86/kvm_para.h |9 + linux-headers/linux/kvm.h |3 +++ lin

[Qemu-devel] [PATCH v8 1/6] start vm after reseting it

2012-08-07 Thread Wen Congyang
The guest should run after reseting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. We don't set runstate to RUN_STATE_PAUSED when reseting the guest, so the runstate will be changed from RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED to RUN_STATE_RUNNING(no

[Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-07 Thread Wen Congyang
We can know the guest is panicked when the guest runs on xen. But we do not have such feature on kvm. Another purpose of this feature is: management app(for example: libvirt) can do auto dump when the guest is panicked. If management app does not do auto dump, the guest's user can do dump by hand

[Qemu-devel] [PATCH 03/10] pseries: Rework irq assignment to avoid carrying qemu_irqs around

2012-08-07 Thread David Gibson
Currently, the interfaces in the pseries machine code for assignment and setup of interrupts pass around qemu_irq objects. That was done in an attempt not to be too closely linked to the specific XICS interrupt controller. However interactions with the device tree setup made that attempt rather f

[Qemu-devel] [PATCH 05/10] pseries: added allocator for a block of IRQs

2012-08-07 Thread David Gibson
From: Alexey Kardashevskiy The patch adds a simple helper which allocates a consecutive sequence of IRQs calling spapr_allocate_irq for each and checks that allocated IRQs go consequently. The patch is required for upcoming support of MSI/MSIX on POWER. Signed-off-by: Alexey Kardashevskiy Sign

Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence

2012-08-07 Thread David Gibson
On Wed, Aug 08, 2012 at 12:32:39AM +0200, Andreas Färber wrote: > Am 08.08.2012 00:02, schrieb Benjamin Herrenschmidt: > > On Fri, 2012-08-03 at 17:01 +0200, Andreas Färber wrote: > >> > >> I have posted a suggestion where CPU reset is triggered by "the > >> machine > >> as an abstract concept" (ne

Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence

2012-08-07 Thread Anthony Liguori
On Aug 7, 2012 5:32 PM, "Andreas Färber" wrote: > > Am 08.08.2012 00:02, schrieb Benjamin Herrenschmidt: > > On Fri, 2012-08-03 at 17:01 +0200, Andreas Färber wrote: > >> > >> I have posted a suggestion where CPU reset is triggered by "the > >> machine > >> as an abstract concept" (needs a bit of

Re: [Qemu-devel] [PATCH 1/2] qom: Reimplement Interfaces

2012-08-07 Thread Peter Crosthwaite
Hi All, We seem to be having difficulty getting a review/merge on this patch. I have sent two series, two pings and a PULL, with only a single reply from P. Maydell asking for other reviewers to weigh in: - on July 17 P. Maydell wrote --- I guess I should mention that I'm assumin

Re: [Qemu-devel] [PATCH 2/2] xilinx_axi*: Re-implemented interconnect

2012-08-07 Thread Edgar E. Iglesias
On Mon, Aug 06, 2012 at 01:07:15PM +1000, Peter A. G. Crosthwaite wrote: > Re-implemented the interconnect between the Xilinx AXI ethernet and DMA > controllers. A QOM interface "stream" is created, for the two stream > interfaces. > > As per Edgars request, this is designed to be more generic th

[Qemu-devel] tracing the guest physical address of tb->pc

2012-08-07 Thread Steven
Hi, I have a question about obtaining the guest physical address of tb->pc of a running VM. I use "-d exec" to get the log file of tb->pc of each executed TB. For example, in the log file I have Trace 0x40ef8140 [7ffe8afd] Trace 0x40e89fc0 [7ffe625c] Trace 0x40e8a420 [7ff

Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence

2012-08-07 Thread Andreas Färber
Am 08.08.2012 00:02, schrieb Benjamin Herrenschmidt: > On Fri, 2012-08-03 at 17:01 +0200, Andreas Färber wrote: >> >> I have posted a suggestion where CPU reset is triggered by "the >> machine >> as an abstract concept" (needs a bit of tweaking still, but the >> general >> idea is there). >> Based

Re: [Qemu-devel] [PATCH v7 2/6] qapi: Introduce add-fd, remove-fd, query-fdsets

2012-08-07 Thread Eric Blake
On 08/07/2012 11:07 AM, Corey Bryant wrote: >>> +# >>> +# Since: 1.2.0 >> >> We're not very consistent on '1.2' vs. '1.2.0' in since listings, but >> that's probably worth a global cleanup closer to hard freeze. >> > > I'll make a note of it. Or does Luiz usually do a cleanup? No idea. >>> +##

Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence

2012-08-07 Thread Benjamin Herrenschmidt
On Fri, 2012-08-03 at 17:01 +0200, Andreas Färber wrote: > > I have posted a suggestion where CPU reset is triggered by "the > machine > as an abstract concept" (needs a bit of tweaking still, but the > general > idea is there). > Based on that, shouldn't it be rather easy to add a Notifier simila

Re: [Qemu-devel] [PATCH] Allow QEMUMachine to override reset sequencing

2012-08-07 Thread Benjamin Herrenschmidt
On Tue, 2012-08-07 at 16:41 +1000, David Gibson wrote: > qemu_system_reset() function always performs the same basic actions on > all machines. This includes running all the reset handler hooks, > however the order in which these will run is not always easily predictable. > > This patch splits th

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc: Fix bug in handling of PAPR hypercall exits

2012-08-07 Thread Alexander Graf
On 07.08.2012, at 23:03, Benjamin Herrenschmidt wrote: > On Tue, 2012-08-07 at 11:05 +0200, Alexander Graf wrote: > >>> This patch therefore changes to ret = 0, which is both a bugfix and a small >>> optimization. >>> >>> Signed-off-by: David Gibson >> >> Thanks, applied to ppc-next. > > Whe

[Qemu-devel] [Bug 918791] Re: qemu-kvm dies when using vmvga driver and unity in the guest

2012-08-07 Thread Serge Hallyn
the oneiric-proposed fix was deleted by a security update. As noone has verified it since march, I will wait until someone asks for it before re-uploading. (simple debdiff from the cached .dsc's for 6.2 and 6.3) -- You received this bug notification because you are a member of qemu- devel-ml, w

Re: [Qemu-devel] For all targets and machine types: "start to monitor" smoke test

2012-08-07 Thread Blue Swirl
On Tue, Aug 7, 2012 at 7:26 PM, Markus Armbruster wrote: > Very basic smoke test: start QEMU with -monitor stdio, quit immediately. > Wouldn't it be nice if that worked for all targets and machine types? > > Many targets have mandatory options (fun oxymoron), such as -kernel or > -pflash. Can't s

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc: Fix bug in handling of PAPR hypercall exits

2012-08-07 Thread Benjamin Herrenschmidt
On Tue, 2012-08-07 at 11:05 +0200, Alexander Graf wrote: > > This patch therefore changes to ret = 0, which is both a bugfix and a small > > optimization. > > > > Signed-off-by: David Gibson > > Thanks, applied to ppc-next. When do you plan to send your queue to Anthony ? Some of that stuff sh

Re: [Qemu-devel] [PATCH 2/5] s390: Virtual channel subsystem support.

2012-08-07 Thread Blue Swirl
On Tue, Aug 7, 2012 at 2:52 PM, Cornelia Huck wrote: > Provide a mechanism for qemu to provide fully virtual subchannels to > the guest. In the KVM case, this relies on the kernel's css support. > The !KVM case is not yet supported. > > Signed-off-by: Cornelia Huck > --- > hw/s390x/Makefile.objs

[Qemu-devel] [RFC 11/15] rename qdev_prop_register_global_list to qemu_globals_register_list

2012-08-07 Thread Eduardo Habkost
The function is not qdev-specific, it just keeps a global driver/property/value list. Signed-off-by: Eduardo Habkost --- global-properties.c | 2 +- hw/qdev.h | 8 +--- vl.c| 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/global-properties.

[Qemu-devel] [RFC 03/15] kvm: set vcpu_id to APIC ID instead of CPU index

2012-08-07 Thread Eduardo Habkost
The CPU ID in KVM is supposed to be the APIC ID, so change the KVM_CREATE_VCPU call to match it. It didn't break anything yet because today the APIC ID is assumed to be == the CPU index, but this won't be true in the future. Signed-off-by: Eduardo Habkost --- kvm-all.c | 2 +- 1 file changed, 1

[Qemu-devel] [RFC 06/15] pc: set FW_CFG data based on APIC ID calculation

2012-08-07 Thread Eduardo Habkost
This changes FW_CFG_MAX_CPUS and FW_CFG_NUMA to use apic_id_for_cpu(), so the NUMA table can be based on the APIC IDs, instead of CPU index (SeaBIOS knows nothing about CPU indexes, just APIC IDs). Signed-off-by: Eduardo Habkost --- hw/pc.c | 23 --- target-i386/cpu

Re: [Qemu-devel] [PATCH 3/5] s390: Add new channel I/O based virtio transport.

2012-08-07 Thread Blue Swirl
On Tue, Aug 7, 2012 at 2:52 PM, Cornelia Huck wrote: > Add a new virtio transport that uses channel commands to perform > virtio operations. > > Add a new machine type s390-ccw that uses this virtio-ccw transport > and make it the default machine for s390. > > Signed-off-by: Cornelia Huck > --- >

[Qemu-devel] [RFC 01/15] cpus.h: include cpu-common.h

2012-08-07 Thread Eduardo Habkost
Needed for the definition of fprint_function. This is not necessary right now, but it will be necessary if code that doesn't include cpu-common.h includes cpus.h. Signed-off-by: Eduardo Habkost --- cpus.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpus.h b/cpus.h index 81bd817..061ff

[Qemu-devel] [RFC 12/15] create qemu_global_get() function

2012-08-07 Thread Eduardo Habkost
Useful for cases where code is not converted to QOM and/or QDEV yet, but needs to check the value of a global property. Signed-off-by: Eduardo Habkost --- global-properties.c | 11 +++ hw/qdev.h | 8 2 files changed, 19 insertions(+) diff --git a/global-properties.c

[Qemu-devel] [PATCH v2 6/9] x86: use wrappers for memory access helpers

2012-08-07 Thread Blue Swirl
Switch to wrapped versions of memory access functions. Signed-off-by: Blue Swirl --- target-i386/cpu.h| 10 ++ target-i386/mem_helper.c | 10 ++ target-i386/seg_helper.c | 209 +++--- 3 files changed, 126 insertions(+), 103 deletions(-) diff

[Qemu-devel] [RFC 15/15] generate APIC IDs according to CPU topology (v2)

2012-08-07 Thread Eduardo Habkost
This keeps compatibility on machine-types pc-1.1 and lower, and prints a warning in case the requested configuration won't get the correct topology. Changes v1 -> v2: - Move code to cpu.c - keep using cpu_index on *-user - Use SMP.contiguous_apic_ids global property - Prints warning in case th

[Qemu-devel] [RFC 09/15] isolate qdev-independent parts of qdev_prop_set_globals()

2012-08-07 Thread Eduardo Habkost
Create a qdev-independent function, and use a callback that calls qdev_prop_parse(). Signed-off-by: Eduardo Habkost --- global-properties.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/global-properties.c b/global-properties.c index a1c3581..d99bcee

Re: [Qemu-devel] [RFC V2 03/10] quorum: Add quorum_open().

2012-08-07 Thread Eric Blake
On 08/07/2012 02:30 PM, Blue Swirl wrote: > On Tue, Aug 7, 2012 at 1:44 PM, Benoît Canet wrote: >> Signed-off-by: Benoit Canet >> --- >> block/quorum.c | 62 >> >> 1 file changed, 62 insertions(+) >> >> diff --git a/block/quorum.c b/blo

Re: [Qemu-devel] For all targets and machine types: "start to monitor" smoke test

2012-08-07 Thread Eric Blake
On 08/07/2012 02:30 PM, Markus Armbruster wrote: > Peter Maydell writes: > >> On 7 August 2012 20:55, Markus Armbruster wrote: >>> Anthony Liguori writes: Perhaps we could add a QEMUMachine parameter that indicates that the machine doesn't start without special options. >>> >>> Recomm

Re: [Qemu-devel] For all targets and machine types: "start to monitor" smoke test

2012-08-07 Thread Andreas Färber
Am 07.08.2012 21:26, schrieb Markus Armbruster: > Very basic smoke test: start QEMU with -monitor stdio, quit immediately. [...] > Summary of results: > > * Bad unexplained [...] > qemu-system-ppc64 prep > qemu: hardware error: Unknown device 'i82378' for bus 'PCI' This is an untested con

[Qemu-devel] [RFC 04/15] i386: create apic_id_for_cpu() function (v2)

2012-08-07 Thread Eduardo Habkost
Currently we need a way to calculate the Initial APIC ID using only the CPU index (without needing a CPU object), as the NUMA fw_cfg data is APIC-ID-based, and may include data for hotplug CPUs (that don't exist yet), up to max_cpus. Changes v1 -> v2: - make function return value 'unsigned int'

Re: [Qemu-devel] [RFC V2 04/10] quorum: Add quorum_close().

2012-08-07 Thread Blue Swirl
On Tue, Aug 7, 2012 at 1:44 PM, Benoît Canet wrote: > Signed-off-by: Benoit Canet > --- > block/quorum.c | 12 > 1 file changed, 12 insertions(+) > > diff --git a/block/quorum.c b/block/quorum.c > index de58ab8..9da0432 100644 > --- a/block/quorum.c > +++ b/block/quorum.c > @@ -10

[Qemu-devel] [PATCH v2 5/9] x86: avoid AREG0 for SMM helpers

2012-08-07 Thread Blue Swirl
Add an explicit CPUX86State parameter instead of relying on AREG0. Signed-off-by: Blue Swirl --- target-i386/Makefile.objs |1 - target-i386/helper.h |2 +- target-i386/smm_helper.c | 14 -- target-i386/translate.c |2 +- 4 files changed, 6 insertions(+), 13 del

Re: [Qemu-devel] [RFC V2 03/10] quorum: Add quorum_open().

2012-08-07 Thread Blue Swirl
On Tue, Aug 7, 2012 at 1:44 PM, Benoît Canet wrote: > Signed-off-by: Benoit Canet > --- > block/quorum.c | 62 > > 1 file changed, 62 insertions(+) > > diff --git a/block/quorum.c b/block/quorum.c > index e0405b6..de58ab8 100644 > --- a

Re: [Qemu-devel] For all targets and machine types: "start to monitor" smoke test

2012-08-07 Thread Markus Armbruster
Peter Maydell writes: > On 7 August 2012 20:55, Markus Armbruster wrote: >> Anthony Liguori writes: >>> Perhaps we could add a QEMUMachine parameter that indicates that the >>> machine doesn't start without special options. >> >> Recommend to make it a string that lists the mandatory options. >

[Qemu-devel] [PATCH v2 9/9] x86: switch to AREG0 free mode

2012-08-07 Thread Blue Swirl
Add an explicit CPUX86State parameter instead of relying on AREG0. Remove temporary wrappers and switch to AREG0 free mode. Signed-off-by: Blue Swirl --- configure |2 +- cpu-all.h | 22 ++ target-i386/Makefile.objs |2 - target-i386/cpu.h |

[Qemu-devel] [RFC 10/15] create object_prop_set_globals()

2012-08-07 Thread Eduardo Habkost
It's like qdev_prop_set_globals(), but calls object_property_parse(). Signed-off-by: Eduardo Habkost --- global-properties.c | 5 + hw/qdev.h | 1 + 2 files changed, 6 insertions(+) diff --git a/global-properties.c b/global-properties.c index d99bcee..d827955 100644 --- a/global-p

[Qemu-devel] [RFC 05/15] remove FW_CFG_MAX_CPUS from fw_cfg_init()

2012-08-07 Thread Eduardo Habkost
PC will not use max_cpus for that field, so move it outside the common code so it can use a different value on PC. Signed-off-by: Eduardo Habkost --- hw/fw_cfg.c | 1 - hw/pc.c | 2 +- hw/ppc_newworld.c | 1 + hw/ppc_oldworld.c | 1 + hw/sun4m.c| 3 +++ hw/sun4u.c

[Qemu-devel] [RFC 13/15] tests: support target-specific unit tests

2012-08-07 Thread Eduardo Habkost
To make unit tests that depend on target-specific files, use check-unit--y and test-obj--y. Signed-off-by: Eduardo Habkost --- tests/Makefile | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index f3f4159..79796aa 100644 --- a/

[Qemu-devel] [RFC 00/15] attempt to fix CPU topology info on CPU APIC IDs

2012-08-07 Thread Eduardo Habkost
First, the bug description: The CPU APIC IDs generated by QEMU are broken if the number of cores-per-socket or threads-per-core are not powers of 2, as the bits on the APIC ID do not correspond to what's expected to reflect the CPU sockets/cores/threads topology[1]. [1] http://software.intel.com

Re: [Qemu-devel] [RFC V2 01/10] quorum: Create quorum.c, add QuorumSingleAIOCB and QuorumAIOCB.

2012-08-07 Thread Blue Swirl
On Tue, Aug 7, 2012 at 1:44 PM, Benoît Canet wrote: > Signed-off-by: Benoit Canet > --- > block/Makefile.objs |1 + > block/quorum.c | 44 > 2 files changed, 45 insertions(+) > create mode 100644 block/quorum.c > > diff --git a/block/Makef

Re: [Qemu-devel] [RFC/PATCH 1/1] USB code fenced for s390

2012-08-07 Thread Blue Swirl
On Tue, Aug 7, 2012 at 12:26 PM, Peter Maydell wrote: > On 7 August 2012 13:19, Christian Borntraeger wrote: >> +#if defined(TARGET_HAS_USB) && (TARGET_HAS_USB == 1) >> /* init USB devices */ >> if (usb_enabled) { >> if (foreach_device_config(DEV_USB, usb_parse) < 0) >>

[Qemu-devel] [RFC 02/15] hw/apic.c: rename bit functions to not conflict with bitops.h (v2)

2012-08-07 Thread Eduardo Habkost
Changes v1 -> v2: - Coding style change: break too-long line Signed-off-by: Eduardo Habkost --- hw/apic.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 38e..e1f633a 100644 --- a/hw/apic.c +++ b/hw/apic.c

Re: [Qemu-devel] [PATCH v5 1/2] qemu: Add a config option for GlusterFS as block backend

2012-08-07 Thread Blue Swirl
On Tue, Aug 7, 2012 at 8:00 AM, Bharata B Rao wrote: > qemu: Add a config option for GlusterFS as block backend > > From: Bharata B Rao > > GlusterFS support in QEMU depends on libgfapi, libgfrpc and > libgfxdr provided by GlusterFS. > > Signed-off-by: Bharata B Rao > --- > > configure | 34 +

[Qemu-devel] [RFC 08/15] move global properties code to global-properties.c

2012-08-07 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- Makefile.objs| 1 + global-properties.c | 56 hw/qdev-properties.c | 54 -- 3 files changed, 57 insertions(+), 54 deletions(-) create mode 100644 glob

Re: [Qemu-devel] For all targets and machine types: "start to monitor" smoke test

2012-08-07 Thread Peter Maydell
On 7 August 2012 20:55, Markus Armbruster wrote: > Anthony Liguori writes: >> Perhaps we could add a QEMUMachine parameter that indicates that the >> machine doesn't start without special options. > > Recommend to make it a string that lists the mandatory options. How are you going to say "need

Re: [Qemu-devel] [PATCH v6 2/6] qapi: Introduce add-fd, remove-fd, query-fdsets

2012-08-07 Thread Corey Bryant
On 08/07/2012 02:16 PM, Stefan Hajnoczi wrote: On Fri, Aug 3, 2012 at 6:28 PM, Corey Bryant wrote: diff --git a/monitor.c b/monitor.c index 49dccfe..9aa9f7e 100644 --- a/monitor.c +++ b/monitor.c @@ -140,6 +140,24 @@ struct mon_fd_t { QLIST_ENTRY(mon_fd_t) next; }; +/* file descripto

[Qemu-devel] [RFC 14/15] i386: topology & APIC ID utility functions (v2)

2012-08-07 Thread Eduardo Habkost
Changes v1 -> v2: - Support 32-bit APIC IDs (in case x2APIC is going to be used) - Coding style changes - Use TARGET_I386_TOPOLOGY_H instead of __QEMU_X86_TOPOLOGY_H__ - Rename topo_make_apic_id() to topo_apicid_for_cpu() - Rename __make_apicid() to topo_make_apicid() - Spaces around operator

[Qemu-devel] [RFC 07/15] qdev: allow qdev_prop_parse() to report errors

2012-08-07 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/qdev-monitor.c| 6 +- hw/qdev-properties.c | 21 - hw/qdev.h| 3 ++- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index b22a37a..99784c1 100644 --- a/hw/qdev-m

Re: [Qemu-devel] For all targets and machine types: "start to monitor" smoke test

2012-08-07 Thread Markus Armbruster
Anthony Liguori writes: > Markus Armbruster writes: > >> Very basic smoke test: start QEMU with -monitor stdio, quit immediately. >> Wouldn't it be nice if that worked for all targets and machine types? >> >> Many targets have mandatory options (fun oxymoron), such as -kernel or >> -pflash. Can

[Qemu-devel] [PATCH v2 8/9] x86: avoid AREG0 in segmentation helpers

2012-08-07 Thread Blue Swirl
Add an explicit CPUX86State parameter instead of relying on AREG0. Rename remains of op_helper.c to seg_helper.c. Signed-off-by: Blue Swirl --- target-i386/Makefile.objs |1 - target-i386/helper.h | 38 target-i386/seg_helper.c | 217 +--

[Qemu-devel] [PATCH v2 7/9] x86: avoid AREG0 for misc helpers

2012-08-07 Thread Blue Swirl
Add an explicit CPUX86State parameter instead of relying on AREG0. Signed-off-by: Blue Swirl --- target-i386/Makefile.objs |1 - target-i386/helper.h | 40 target-i386/misc_helper.c | 77 + target-i386/translate.c

[Qemu-devel] [PATCH v2 4/9] x86: avoid AREG0 for SVM helpers

2012-08-07 Thread Blue Swirl
Add an explicit CPUX86State parameter instead of relying on AREG0. Signed-off-by: Blue Swirl --- target-i386/Makefile.objs |1 - target-i386/helper.h | 22 +++--- target-i386/svm_helper.c | 181 ++--- target-i386/translate.c | 21 +++--- 4

[Qemu-devel] [PATCH v2 3/9] x86: avoid AREG0 for integer helpers

2012-08-07 Thread Blue Swirl
Add an explicit CPUX86State parameter instead of relying on AREG0. Signed-off-by: Blue Swirl --- target-i386/Makefile.objs |1 - target-i386/helper.h| 50 +- target-i386/int_helper.c| 36 +- target-i386/shift_h

[Qemu-devel] [PATCH v2 2/9] x86: avoid AREG0 for condition code helpers

2012-08-07 Thread Blue Swirl
Add an explicit CPUX86State parameter instead of relying on AREG0. Signed-off-by: Blue Swirl --- target-i386/Makefile.objs |1 - target-i386/cc_helper.c | 199 +-- target-i386/cc_helper_template.h| 36 +++--- target-i386/helper.h

[Qemu-devel] [PATCH v2 0/9] x86 AREG0 conversion

2012-08-07 Thread Blue Swirl
Finally, I found the bug in SSE helpers (passed cpu_env to pshufx, not caught because of the ugly casts). Now this also passes the test with OpenSUSE-12.1-GNOME-LiveCD-x86_64. It's also possible to use Clang to compile x86 targets with my earlier Clang patch set applied. I think this is 1.2 mate

Re: [Qemu-devel] [PATCH v6 3/6] monitor: Clean up fd sets on monitor disconnect

2012-08-07 Thread Corey Bryant
On 08/07/2012 01:32 PM, Stefan Hajnoczi wrote: On Fri, Aug 03, 2012 at 01:28:06PM -0400, Corey Bryant wrote: Each fd set has a boolean that keeps track of whether or not the fd set is in use by a monitor connection. When a monitor disconnects, all fds that are members of an fd set with refcou

Re: [Qemu-devel] Cirrus bugs vs endian: how two bugs cancel each other out

2012-08-07 Thread Erlon Cruz
>On Tue, Aug 7, 2012 at 11:07 AM, Gerd Hoffmann wrote: > > On 08/07/12 15:05, Erlon Cruz wrote: > > Em 07/08/2012 05:01, "Gerd Hoffmann" escreveu: > >> > >> Hi, > >> > >>> Why not make libspice mandatory? > >> > >> spice needs to build and run on alot of platforms where it doesn't run > >> toda

Re: [Qemu-devel] For all targets and machine types: "start to monitor" smoke test

2012-08-07 Thread Peter Maydell
On 7 August 2012 20:26, Markus Armbruster wrote: > qemu-system-arm lm3s811evb > qemu-system-arm lm3s6965evb > qemu-system-arm: /work/armbru/qemu/hw/qdev.c:310: qdev_get_gpio_in: > Assertion `n >= 0 && n < dev->num_gpio_in' failed. This is fixed by http://patchwork.ozlabs.org/patch/1728

Re: [Qemu-devel] For all targets and machine types: "start to monitor" smoke test

2012-08-07 Thread Anthony Liguori
Markus Armbruster writes: > Very basic smoke test: start QEMU with -monitor stdio, quit immediately. > Wouldn't it be nice if that worked for all targets and machine types? > > Many targets have mandatory options (fun oxymoron), such as -kernel or > -pflash. Can't stop me, I just try a bunch unt

[Qemu-devel] For all targets and machine types: "start to monitor" smoke test

2012-08-07 Thread Markus Armbruster
Very basic smoke test: start QEMU with -monitor stdio, quit immediately. Wouldn't it be nice if that worked for all targets and machine types? Many targets have mandatory options (fun oxymoron), such as -kernel or -pflash. Can't stop me, I just try a bunch until something works. Many targets exp

Re: [Qemu-devel] [PATCH 00/12] Migration next v12

2012-08-07 Thread Luiz Capitulino
On Mon, 6 Aug 2012 21:42:46 +0300 Orit Wasserman wrote: > Changes from v11: > Fix example for query-migrate-cache-size commands > Move patch 10 (Change total_time to total-time) to patch 9 and fix > comment. Looks good now: Reviewed-by: Luiz Capitulino

Re: [Qemu-devel] [PATCH 4/6] migration: remove iohandlers before closing the file

2012-08-07 Thread Anthony Liguori
Paolo Bonzini writes: > This will be needed as soon as process_incoming_migration will set > handlers on the file. The patch may be removed if ...? Regards, Anthony Liguori > > Signed-off-by: Paolo Bonzini > --- > savevm.c | 3 +++ > 1 file modificato, 3 inserzioni(+) > > diff --git a/sav

Re: [Qemu-devel] [PATCH v6 3/6] monitor: Clean up fd sets on monitor disconnect

2012-08-07 Thread Stefan Hajnoczi
On Fri, Aug 03, 2012 at 01:28:06PM -0400, Corey Bryant wrote: > Each fd set has a boolean that keeps track of whether or not the > fd set is in use by a monitor connection. When a monitor > disconnects, all fds that are members of an fd set with refcount > of zero are closed. This prevents any fd

Re: [Qemu-devel] [PATCH v6 2/6] qapi: Introduce add-fd, remove-fd, query-fdsets

2012-08-07 Thread Stefan Hajnoczi
On Fri, Aug 3, 2012 at 6:28 PM, Corey Bryant wrote: > diff --git a/monitor.c b/monitor.c > index 49dccfe..9aa9f7e 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -140,6 +140,24 @@ struct mon_fd_t { > QLIST_ENTRY(mon_fd_t) next; > }; > > +/* file descriptor associated with a file descriptor s

Re: [Qemu-devel] [PATCH v7 2/6] qapi: Introduce add-fd, remove-fd, query-fdsets

2012-08-07 Thread Corey Bryant
On 08/07/2012 12:49 PM, Eric Blake wrote: On 08/07/2012 09:58 AM, Corey Bryant wrote: This patch adds support that enables passing of file descriptors to the QEMU monitor where they will be stored in specified file descriptor sets. A file descriptor set can be used by a client like libvirt to

Re: [Qemu-devel] [PATCH v7 2/6] qapi: Introduce add-fd, remove-fd, query-fdsets

2012-08-07 Thread Eric Blake
On 08/07/2012 09:58 AM, Corey Bryant wrote: > This patch adds support that enables passing of file descriptors > to the QEMU monitor where they will be stored in specified file > descriptor sets. > > A file descriptor set can be used by a client like libvirt to > store file descriptors for the sam

Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets

2012-08-07 Thread Corey Bryant
On 08/06/2012 10:15 AM, Corey Bryant wrote: On 08/06/2012 09:51 AM, Kevin Wolf wrote: Am 06.08.2012 15:32, schrieb Corey Bryant: On 08/06/2012 05:15 AM, Kevin Wolf wrote: Am 03.08.2012 00:21, schrieb Corey Bryant: @@ -84,6 +158,36 @@ int qemu_open(const char *name, int flags, ...)

[Qemu-devel] [PATCH 08/35] qerror: qerror_format(): return an allocated string

2012-08-07 Thread Luiz Capitulino
Simplifies current and future users. Signed-off-by: Luiz Capitulino --- error.c | 5 + qerror.c | 10 -- qerror.h | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/error.c b/error.c index 58f55a0..3a62592 100644 --- a/error.c +++ b/error.c @@ -65,10 +65,7 @@

[Qemu-devel] [PATCH 11/35] qmp: query-block: add 'valid_encryption_key' field

2012-08-07 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- block.c | 1 + qapi-schema.json | 8 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 24323c1..59f6dd8 100644 --- a/block.c +++ b/block.c @@ -2445,6 +2445,7 @@ BlockInfoList *qmp_query_block(Error **errp)

[Qemu-devel] [PATCH 09/35] qerror: don't delay error message construction

2012-08-07 Thread Luiz Capitulino
Today, the error message is only constructed when it's used. This commit changes qerror to construct the error message when the error object is built (ie. when the error is reported). This eliminates the need of storing a pointer to qerror_table[], which will be dropped soon, and also simplifies t

[Qemu-devel] [PATCH v7 4/6] block: Convert open calls to qemu_open

2012-08-07 Thread Corey Bryant
This patch converts all block layer open calls to qemu_open. Note that this adds the O_CLOEXEC flag to the changed open paths when the O_CLOEXEC macro is defined. Signed-off-by: Corey Bryant --- v2: -Convert calls to qemu_open instead of file_open (kw...@redhat.com) -Mention introduction of O_

[Qemu-devel] [PATCH 4/6] migration: remove iohandlers before closing the file

2012-08-07 Thread Paolo Bonzini
This will be needed as soon as process_incoming_migration will set handlers on the file. The patch may be removed if Signed-off-by: Paolo Bonzini --- savevm.c | 3 +++ 1 file modificato, 3 inserzioni(+) diff --git a/savevm.c b/savevm.c index 57cae52..8f075e5 100644 --- a/savevm.c +++ b/savevm

[Qemu-devel] [PATCH 1/6] migration: clean up server sockets and handlers before invoking process_incoming_migration

2012-08-07 Thread Paolo Bonzini
We will not accept any other migration from the server socket, so we can close it. Signed-off-by: Paolo Bonzini --- migration-exec.c | 2 +- migration-fd.c | 2 +- migration-tcp.c | 7 +++ migration-unix.c | 7 +++ 4 file modificati, 8 inserzioni(+), 10 rimozioni(-) diff --git a/migr

[Qemu-devel] [PATCH 27/35] hmp: hmp_change(): use error_get_class()

2012-08-07 Thread Luiz Capitulino
The error_is_type() function is going to be dropped. Signed-off-by: Luiz Capitulino --- hmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hmp.c b/hmp.c index 3a9688d..5900251 100644 --- a/hmp.c +++ b/hmp.c @@ -799,7 +799,8 @@ void hmp_change(Monitor *mon, const QDict *q

[Qemu-devel] [PATCH v7 1/6] qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsg

2012-08-07 Thread Corey Bryant
Set the close-on-exec flag for the file descriptor received via SCM_RIGHTS. Signed-off-by: Corey Bryant --- v4 -This patch is new in v4 (ebl...@redhat.com) v5 -Fallback to FD_CLOEXEC if MSG_CMSG_CLOEXEC is not available (ebl...@redhat.com, stefa...@linux.vnet.ibm.com) v6 -Set cloexec on co

  1   2   3   >