[Qemu-devel] [PATCH 07/15] memory: inc/dec mr's ref when adding/removing from mem view

2012-08-08 Thread Liu Ping Fan
From: Liu Ping Fan memory_region_{add,del}_subregion will inc/dec mr's refcnt. Signed-off-by: Liu Ping Fan --- memory.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/memory.c b/memory.c index 5dc8b59..2eaa2fc 100644 --- a/memory.c +++ b/memory.c @@ -1356,7 +1356,7

[Qemu-devel] [PATCH 01/15] atomic: introduce atomic operations

2012-08-08 Thread Liu Ping Fan
From: Liu Ping Fan If out of global lock, we will be challenged by SMP in low level, so need atomic ops. This file is heavily copied from kernel. Currently, only x86 atomic ops included, and will be extended for other arch for future. Signed-off-by: Liu Ping Fan --- include/qemu/atomic.h | 1

[Qemu-devel] [PATCH 14/15] qom: object_unref call reclaimer

2012-08-08 Thread Liu Ping Fan
From: Liu Ping Fan iohandler/bh/timer may use DeviceState when its refcnt=0, postpone the reclaimer till they have done with it. Signed-off-by: Liu Ping Fan --- qom/object.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/qom/object.c b/qom/object.c index 822bd

[Qemu-devel] [PATCH 02/15] qom: using atomic ops to re-implement object_ref

2012-08-08 Thread Liu Ping Fan
From: Liu Ping Fan Signed-off-by: Liu Ping Fan --- include/qemu/object.h |3 ++- qom/object.c | 13 + 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/include/qemu/object.h b/include/qemu/object.h index 8b17776..58db9d0 100644 --- a/include/qemu/object.h

[Qemu-devel] [PATCH 10/15] memory: change tcg related code to using PhysMap

2012-08-08 Thread Liu Ping Fan
From: Liu Ping Fan Change tcg code to use PhysMap. This is separated from the prev patch for review purpose. Should be merged into prev one. Signed-off-by: Liu Ping Fan --- exec.c | 27 +-- 1 files changed, 21 insertions(+), 6 deletions(-) diff --git a/exec.c b/exec.

[Qemu-devel] [PATCH 08/15] memory: introduce PhysMap to present snapshot of toploygy

2012-08-08 Thread Liu Ping Fan
From: Liu Ping Fan PhysMap contain the flatview and radix-tree view, they are snapshot of system topology and should be consistent. With PhysMap, we can swap the pointer when updating and achieve the atomic. Signed-off-by: Liu Ping Fan --- exec.c |8 memory.c | 33

[Qemu-devel] [PATCH 06/15] memory: use refcnt to manage MemoryRegion

2012-08-08 Thread Liu Ping Fan
From: Liu Ping Fan Using refcnt for mr, so we can separate mr's life cycle management from refered object. When mr->ref 0->1, inc the refered object. When mr->ref 1->0, dec the refered object. The refered object can be DeviceStae, another mr, or other opaque. Signed-off-by: Liu Ping Fan --

[Qemu-devel] [PATCH 13/15] hotplug: introduce qdev_unplug_complete() to remove device from views

2012-08-08 Thread Liu Ping Fan
From: Liu Ping Fan When guest confirm the removal of device, we should --unmap from MemoryRegion view --isolated from device tree view Signed-off-by: Liu Ping Fan --- hw/acpi_piix4.c |4 ++-- hw/pci.c| 13 - hw/pci.h|2 ++ hw/qdev.c | 28 ++

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

2012-08-08 Thread Markus Armbruster
Peter Maydell writes: > 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:/

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

2012-08-08 Thread Markus Armbruster
Andreas Färber writes: > 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' f

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

2012-08-08 Thread Max Filippov
On Tue, Aug 7, 2012 at 11: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

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

2012-08-08 Thread Markus Armbruster
Blue Swirl writes: > 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 -ke

[Qemu-devel] Is it possible to detect guest OS modifying pte inside QEMU?

2012-08-08 Thread Wei-Ren Chen
Hi all, Just for research, we are studying if we can leave the guest page table walk to underlying hardware rather than using software emulation (like current approach). So, maybe (if *doable*) we can use x86 hardware to help us to walk guest (like ARM) page table. The rough idea is we have to m

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

2012-08-08 Thread Paolo Bonzini
Il 08/08/2012 01:46, Peter Crosthwaite ha scritto: > 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. May

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

2012-08-08 Thread Peter Maydell
On 8 August 2012 01:00, Anthony Liguori wrote: > > They need a per machine hook before and after devices are created. This is > okay and it turns out it can be handy for other machines too that do > similiar could not exist outside of a simulator features. If it's 'before and after device creati

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

2012-08-08 Thread Markus Armbruster
Markus Armbruster writes: > 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 strin

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

2012-08-08 Thread Paolo Bonzini
Il 07/08/2012 20:46, Anthony Liguori ha scritto: > >> > This will be needed as soon as process_incoming_migration will set >> > handlers on the file. The patch may be removed if > ...? ... we get access to the file descriptor of a QEMUFile in a better way (i.e. improve patch 6). Paolo

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

2012-08-08 Thread Peter Maydell
On 8 August 2012 08:50, Markus Armbruster wrote: > Markus Armbruster writes: >> The string should be suitable for inserting into -help. > > Sufficiently common cases can also be delegated to generic code: > > * Maximum number of CPUs > > Got that: QEMUMachine member max_cpus, main() enforces it

Re: [Qemu-devel] Is it possible to detect guest OS modifying pte inside QEMU?

2012-08-08 Thread Peter Maydell
On 8 August 2012 08:38, 陳韋任 (Wei-Ren Chen) wrote: > Just for research, we are studying if we can leave the guest page > table walk to underlying hardware rather than using software emulation > (like current approach). So, maybe (if *doable*) we can use x86 hardware > to help us to walk guest (li

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

2012-08-08 Thread Stefan Hajnoczi
On Wed, Aug 08, 2012 at 07:51:07AM +0200, Stefan Priebe wrote: > Any news? Was this applied upstream? Kevin is ill. He has asked me to review and test patches in his absence. When he gets back later this week this will get picked up (and included in QEMU 1.2). Here is the tree, it includes this

Re: [Qemu-devel] [PATCH] ivshmem: add 64bit option

2012-08-08 Thread Gerd Hoffmann
On 07/12/12 17:08, Gerd Hoffmann wrote: > This patch adds a "use64" property which will make the ivshmem driver > register a 64bit memory bar when set, so you have something to play with > when testing 64bit pci bits. It also allows to have quite big shared > memory regions, like this: Ping?

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

2012-08-08 Thread Cornelia Huck
On Tue, 7 Aug 2012 21:00:59 + Blue Swirl wrote: > > diff --git a/hw/s390x/css.c b/hw/s390x/css.c > > new file mode 100644 > > index 000..7941c44 > > --- /dev/null > > +++ b/hw/s390x/css.c > > @@ -0,0 +1,440 @@ > > +/* > > + * Channel subsystem base support. > > + * > > + * Copyright 2012

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

2012-08-08 Thread Peter Maydell
On 7 August 2012 15:52, Cornelia Huck wrote: > +static void sch_handle_clear_func(SubchDev *sch) > +{ > +struct pmcw *p = &sch->curr_status.pmcw; > +struct scsw *s = &sch->curr_status.scsw; > +int path; > + > +/* Path management: In our simple css, we always choose the only path. *

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

2012-08-08 Thread Cornelia Huck
On Tue, 7 Aug 2012 20:47:22 + Blue Swirl wrote: > > diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c > > new file mode 100644 > > index 000..8a90c3a > > --- /dev/null > > +++ b/hw/s390x/virtio-ccw.c > > @@ -0,0 +1,962 @@ > > +/* > > + * virtio ccw target implementation > > + *

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

2012-08-08 Thread Stefan Priebe
ah OK - thanks. Will there be a fixed 1.1.2 as well? Stefan Am 08.08.2012 10:06, schrieb Stefan Hajnoczi: On Wed, Aug 08, 2012 at 07:51:07AM +0200, Stefan Priebe wrote: Any news? Was this applied upstream? Kevin is ill. He has asked me to review and test patches in his absence. When he get

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

2012-08-08 Thread Markus Armbruster
Peter Maydell writes: > On 8 August 2012 08:50, Markus Armbruster wrote: >> Markus Armbruster writes: >>> The string should be suitable for inserting into -help. >> >> Sufficiently common cases can also be delegated to generic code: >> >> * Maximum number of CPUs >> >> Got that: QEMUMachine m

[Qemu-devel] [Bug 1033727] Re: USB passthrough doesn't work anymore with qemu-kvm 1.1.1

2012-08-08 Thread Michael Tokarev
I think similar bug has been filed against qemu-kvm debian package (http://bugs.debian.org/683983). Will try to reproduce/bisect as time permits. Note the debian bugreport also mentions segfault on usb_del in monitor. ** Bug watch added: Debian Bug tracker #683983 http://bugs.debian.org/cgi-b

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

2012-08-08 Thread Markus Armbruster
Max Filippov writes: > On Tue, Aug 7, 2012 at 11: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

Re: [Qemu-devel] Is it possible to detect guest OS modifying pte inside QEMU?

2012-08-08 Thread Wei-Ren Chen
On Wed, Aug 08, 2012 at 09:05:18AM +0100, Peter Maydell wrote: > On 8 August 2012 08:38, 陳韋任 (Wei-Ren Chen) wrote: > > Just for research, we are studying if we can leave the guest page > > table walk to underlying hardware rather than using software emulation > > (like current approach). So, may

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

2012-08-08 Thread Bharata B Rao
On Tue, Aug 07, 2012 at 08:15:03PM +, Blue Swirl wrote: > 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 b

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

2012-08-08 Thread Stefan Hajnoczi
On Tue, Aug 7, 2012 at 8:59 PM, Corey Bryant wrote: > > > On 08/07/2012 02:16 PM, Stefan Hajnoczi wrote: >> >> On Fri, Aug 3, 2012 at 6:28 PM, Corey Bryant >> wrote: >>> +snprintf(fd_str, sizeof(fd_str), "%ld", fd); >>> +qerror_report(QERR_FD_NOT_FOUND, fd_str); >> >> >> Why use an fd_str

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

2012-08-08 Thread Cornelia Huck
On Wed, 8 Aug 2012 09:27:32 +0100 Peter Maydell wrote: > On 7 August 2012 15:52, Cornelia Huck wrote: > > +static void sch_handle_clear_func(SubchDev *sch) > > +{ > > +struct pmcw *p = &sch->curr_status.pmcw; > > +struct scsw *s = &sch->curr_status.scsw; > > +int path; > > + > > +

Re: [Qemu-devel] [PATCH 01/15] atomic: introduce atomic operations

2012-08-08 Thread Paolo Bonzini
Il 08/08/2012 08:25, Liu Ping Fan ha scritto: > From: Liu Ping Fan > > If out of global lock, we will be challenged by SMP in low level, > so need atomic ops. > > This file is heavily copied from kernel. Then it cannot be GPLv2 _or later_. Please use the version that I pointed you to. Paolo

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

2012-08-08 Thread David Gibson
On Wed, Aug 08, 2012 at 08:58:07AM +0100, Peter Maydell wrote: > On 8 August 2012 01:00, Anthony Liguori wrote: > > > > They need a per machine hook before and after devices are created. This is > > okay and it turns out it can be handy for other machines too that do > > similiar could not exist

Re: [Qemu-devel] [PATCH 01/15] atomic: introduce atomic operations

2012-08-08 Thread Avi Kivity
On 08/08/2012 09:25 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > If out of global lock, we will be challenged by SMP in low level, > so need atomic ops. > > This file is heavily copied from kernel. Currently, only x86 atomic ops > included, and will be extended for other arch for future. >

Re: [Qemu-devel] Funny -m arguments can crash

2012-08-08 Thread Markus Armbruster
Blue Swirl writes: > On Mon, Jul 30, 2012 at 12:56 PM, Markus Armbruster wrote: >> Blue Swirl writes: >> >>> On Sat, Jul 28, 2012 at 6:41 AM, Markus Armbruster >>> wrote: Blue Swirl writes: > On Wed, Jul 25, 2012 at 11:49 AM, Markus Armbruster > wrote: >> Asking for "f

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

2012-08-08 Thread Avi Kivity
On 08/08/2012 09:25 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > Collect unused object and release them at caller demand. > Please explain the motivation for this patch. -- error compiling committee.c: too many arguments to function

Re: [Qemu-devel] [PATCH 01/15] atomic: introduce atomic operations

2012-08-08 Thread Wei-Ren Chen
> I propose we use gcc builtins. We get automatic architecture support, > and tuning for newer processors if the user so chooses. > > http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html > > In May 2031 we can switch to C11 atomics. Maybe 2013? -- Wei-Ren Chen (陳韋任)

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

2012-08-08 Thread Paolo Bonzini
Il 08/08/2012 11:05, Avi Kivity ha scritto: >> > From: Liu Ping Fan >> > >> > Collect unused object and release them at caller demand. >> > > Please explain the motivation for this patch. It's poor man RCU, I think? Paolo

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

2012-08-08 Thread Andrew Jones
On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: > diff --git a/Documentation/virtual/kvm/pv_event.txt > b/Documentation/virtual/kvm/pv_event.txt > new file mode 100644 > index 000..0ebc890 > --- /dev/null > +++ b/Documentation/virtual/kvm/pv_event.txt > @@ -0,0 +1,32 @@ > +The KV

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

2012-08-08 Thread Avi Kivity
On 08/08/2012 09:25 AM, Liu Ping Fan wrote: > 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 ++

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

2012-08-08 Thread Avi Kivity
On 08/08/2012 12:07 PM, Paolo Bonzini wrote: > Il 08/08/2012 11:05, Avi Kivity ha scritto: >>> > From: Liu Ping Fan >>> > >>> > Collect unused object and release them at caller demand. >>> > >> Please explain the motivation for this patch. > > It's poor man RCU, I think? I thought that it was

Re: [Qemu-devel] [PATCH 01/15] atomic: introduce atomic operations

2012-08-08 Thread Avi Kivity
On 08/08/2012 12:05 PM, 陳韋任 (Wei-Ren Chen) wrote: >> I propose we use gcc builtins. We get automatic architecture support, >> and tuning for newer processors if the user so chooses. >> >> http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html >> >> In May 2031 we can switch to C11 atom

Re: [Qemu-devel] Funny -m arguments can crash

2012-08-08 Thread Peter Maydell
On 8 August 2012 10:04, Markus Armbruster wrote: > Next problem: minimum RAM size. > > For instance, -M pc -m X, where X < 32KiB dies "qemu: fatal: Trying to > execute code outside RAM or ROM at [...] Aborted (core dumped)" with > TCG, and "KVM internal error. Suberror: 1" with KVM. > > Should a m

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

2012-08-08 Thread Avi Kivity
On 08/08/2012 09:25 AM, Liu Ping Fan wrote: > 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 obje

Re: [Qemu-devel] [PATCH 06/15] memory: use refcnt to manage MemoryRegion

2012-08-08 Thread Avi Kivity
On 08/08/2012 09:25 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > Using refcnt for mr, so we can separate mr's life cycle management > from refered object. > When mr->ref 0->1, inc the refered object. > When mr->ref 1->0, dec the refered object. > > The refered object can be DeviceStae, a

Re: [Qemu-devel] [PATCH 01/15] atomic: introduce atomic operations

2012-08-08 Thread Peter Maydell
On 8 August 2012 07:25, Liu Ping Fan wrote: > +static inline void atomic_sub(int i, Atomic *v) > +{ > +asm volatile("lock; subl %1,%0" > + : "+m" (v->counter) > + : "ir" (i)); > +} NAK. We don't want random inline assembly implementations of locking primitives in QEMU,

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

2012-08-08 Thread Wen Congyang
At 08/08/2012 05:12 PM, Andrew Jones Wrote: > On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: >> diff --git a/Documentation/virtual/kvm/pv_event.txt >> b/Documentation/virtual/kvm/pv_event.txt >> new file mode 100644 >> index 000..0ebc890 >> --- /dev/null >> +++ b/Documentation/v

Re: [Qemu-devel] [PATCH 08/15] memory: introduce PhysMap to present snapshot of toploygy

2012-08-08 Thread Avi Kivity
On 08/08/2012 09:25 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > PhysMap contain the flatview and radix-tree view, they are snapshot > of system topology and should be consistent. With PhysMap, we can > swap the pointer when updating and achieve the atomic. > > Signed-off-by: Liu Ping Fan >

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

2012-08-08 Thread Peter Maydell
On 8 August 2012 07:25, Liu Ping Fan wrote: > From: Liu Ping Fan > > lock: > qemu_device_tree_mutex Looking at where it's used, this doesn't seem to have anything to do with device trees (ie dtb, see www.devicetree.org) : poorly named lock? -- PMM

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

2012-08-08 Thread Paolo Bonzini
Il 08/08/2012 08:25, Liu Ping Fan ha scritto: > 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 |

Re: [Qemu-devel] [PATCH 14/15] qom: object_unref call reclaimer

2012-08-08 Thread Paolo Bonzini
Il 08/08/2012 08:25, Liu Ping Fan ha scritto: > From: Liu Ping Fan > > iohandler/bh/timer may use DeviceState when its refcnt=0, > postpone the reclaimer till they have done with it. > > Signed-off-by: Liu Ping Fan > --- > qom/object.c |9 - > 1 files changed, 8 insertions(+), 1 de

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

2012-08-08 Thread Avi Kivity
On 08/08/2012 09:25 AM, Liu Ping Fan wrote: > 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 us

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

2012-08-08 Thread Paolo Bonzini
Il 08/08/2012 08:25, Liu Ping Fan ha scritto: > 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/cpu

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

2012-08-08 Thread Avi Kivity
On 08/08/2012 09:25 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > Please explain the motivation. AFAICT, the big qemu lock is sufficient. -- error compiling committee.c: too many arguments to function

Re: [Qemu-devel] Funny -m arguments can crash

2012-08-08 Thread Avi Kivity
On 08/08/2012 12:04 PM, Markus Armbruster wrote: >> >> Yes please, maybe with a notice to the user. > > Next problem: minimum RAM size. > > For instance, -M pc -m X, where X < 32KiB dies "qemu: fatal: Trying to > execute code outside RAM or ROM at [...] Aborted (core dumped)" with > TCG, and "KVM

Re: [Qemu-devel] [PATCH 13/15] hotplug: introduce qdev_unplug_complete() to remove device from views

2012-08-08 Thread Paolo Bonzini
Il 08/08/2012 08:25, Liu Ping Fan ha scritto: > +void qdev_unplug_complete(DeviceState *dev, Error **errp) > +{ > +/* isolate from mem view */ > +qdev_unmap(dev); > +qemu_lock_devtree(); > +/* isolate from device tree */ > +qdev_unset_parent(dev); > +qemu_unlock_devtree(); >

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

2012-08-08 Thread Paolo Bonzini
Il 08/08/2012 08:25, Liu Ping Fan ha scritto: > > +static void > +pci_e1000_unmap(PCIDevice *p) > +{ > +/* DO NOT FREE anything!until refcnt=0 */ > +/* isolate from memory view */ > +} At least you need to call the superclass method. Paolo > static int > pci_e1000_uninit(PCIDevice *d

Re: [Qemu-devel] Funny -m arguments can crash

2012-08-08 Thread Markus Armbruster
Peter Maydell writes: > On 8 August 2012 10:04, Markus Armbruster wrote: >> Next problem: minimum RAM size. >> >> For instance, -M pc -m X, where X < 32KiB dies "qemu: fatal: Trying to >> execute code outside RAM or ROM at [...] Aborted (core dumped)" with >> TCG, and "KVM internal error. Suberr

[Qemu-devel] [Bug 1033727] Re: USB passthrough doesn't work anymore with qemu-kvm 1.1.1

2012-08-08 Thread Michael Tokarev
Ok. I tried to bisect this, but it appears to be not so easy. The problem is that between 1.0 and 1.1, there's a lot of usb breakage, and bisection leads to segfaults or assertion failures. (qemu) usb_add host:003.002 usb_create: no bus specified, using "usb.0" for "usb-host" (qemu) Segmentatio

Re: [Qemu-devel] [PATCH 13/15] hotplug: introduce qdev_unplug_complete() to remove device from views

2012-08-08 Thread Avi Kivity
On 08/08/2012 12:52 PM, Paolo Bonzini wrote: > Il 08/08/2012 08:25, Liu Ping Fan ha scritto: >> +void qdev_unplug_complete(DeviceState *dev, Error **errp) >> +{ >> +/* isolate from mem view */ >> +qdev_unmap(dev); >> +qemu_lock_devtree(); >> +/* isolate from device tree */ >> +q

[Qemu-devel] [PATCH] target-xtensa: make default CPU depend on target endianness

2012-08-08 Thread Max Filippov
This makes usable default for -cpu option both for qemu-system-xtensa and qemu-system-xtensaeb fixing the following error: $ qemu-system-xtensaeb -M sim Unable to find CPU definition Signed-off-by: Max Filippov --- hw/xtensa_lx60.c|6 +++--- hw/xtensa_sim.c |4 ++-- targ

Re: [Qemu-devel] [PATCH 0/4 v2] target-i386: move tcg intialization inside CPU object

2012-08-08 Thread Igor Mammedov
ping - Original Message - > From: "Igor Mammedov" > To: qemu-devel@nongnu.org > Cc: "peter maydell" , aligu...@us.ibm.com, > ehabk...@redhat.com, s...@weilnetz.de, > mtosa...@redhat.com, ag...@suse.de, mdr...@linux.vnet.ibm.com, > blauwir...@gmail.com, jcmvb...@gmail.com, > a...@redhat.

[Qemu-devel] [Bug 1013888] Re: windows xp sp3 setup blank screen on boot

2012-08-08 Thread Johannes Schauer
The bug also applies to Debian Qemu 1.1.0 Adding the changes of commit c52acf60b6c12ff5eb58eb6ac568c159ae0c8737 on top of the 1.1.0 Debian package fixes the issue. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpa

[Qemu-devel] [PATCH 0/2] 9p-synth: remove poor-man RCU

2012-08-08 Thread Paolo Bonzini
There are several mistakes in the pseudo-RCU usage of 9pfs. This patch series converts everything to a regular mutex. Patch 1 applies enough fixes so that a trivial mutex-based synchronization is correct. Patch 2 uses the mutex for both read and write sides. Paolo Bonzini (2): 9p-synth: fix re

[Qemu-devel] [PATCH 2/2] 9p-synth: use mutex on read-side

2012-08-08 Thread Paolo Bonzini
Even with the fix in the previous patch, the lockless handling of paths in 9p-synth is wrong. Paths can outlive rcu_read_unlock arbitrarily via the V9fsPath objects that 9p-synth creates. This would require a reference counting mechanism that is not there and is quite hard to retrofit into V9fsPa

[Qemu-devel] [PATCH 1/2] 9p-synth: fix read-side critical sections

2012-08-08 Thread Paolo Bonzini
The read-side critical sections in 9p-synth currently only include the navigation of the list. This is incorrect; it works for two reasons, first obviously because rcu_read_lock/unlock are still no-ops; second, because elements of the list are never deleted from the list (only added). In fact, onl

Re: [Qemu-devel] [PATCH] target-xtensa: make default CPU depend on target endianness

2012-08-08 Thread Markus Armbruster
Max Filippov writes: > This makes usable default for -cpu option both for qemu-system-xtensa > and qemu-system-xtensaeb fixing the following error: > > $ qemu-system-xtensaeb -M sim > Unable to find CPU definition > > Signed-off-by: Max Filippov Tested-by: Markus Armbruster

[Qemu-devel] commit da57febfed "qdev: give all devices a canonical path" broke usb_del

2012-08-08 Thread Michael Tokarev
While dealing with USB issues today I noticed that usb_del monitor command is broken, attempting to delete any usb device immediately results in assertion failure: (qemu) usb_del 0.1 ERROR:qom/object.c:408:object_delete: assertion failed: (obj->ref == 0) Aborted I bisected this issue to commit:

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

2012-08-08 Thread Markus Armbruster
Markus Armbruster writes: > Andreas Färber writes: > >> 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: h

Re: [Qemu-devel] commit da57febfed "qdev: give all devices a canonical path" broke usb_del

2012-08-08 Thread Michael Tokarev
On 08.08.2012 16:18, Michael Tokarev wrote: > While dealing with USB issues today I noticed that > usb_del monitor command is broken, attempting to > delete any usb device immediately results in assertion > failure: > > (qemu) usb_del 0.1 > ERROR:qom/object.c:408:object_delete: assertion failed: (

Re: [Qemu-devel] [PATCH] update-linux-headers.sh: Pull in asm-generic/kvm_para.h

2012-08-08 Thread Peter Maydell
Ping? patchwork url: http://patchwork.ozlabs.org/patch/173202/ -- PMM On 25 July 2012 16:29, Peter Maydell wrote: > Add asm-generic/kvm_para.h to the set of non-architecture specific > KVM kernel headers we copy into QEMU. This header may be included > by an architecture's kvm_para.h header. >

Re: [Qemu-devel] [PATCH 35/35] docs: writing-qmp-commands.txt: update error section

2012-08-08 Thread Pavel Hrdina
On 08/07/2012 05:53 PM, Luiz Capitulino wrote: Add information about the new error format and improve the text a bit. Signed-off-by: Luiz Capitulino --- docs/writing-qmp-commands.txt | 47 +-- 1 file changed, 27 insertions(+), 20 deletions(-) diff --g

Re: [Qemu-devel] commit da57febfed "qdev: give all devices a canonical path" broke usb_del

2012-08-08 Thread Paolo Bonzini
Il 08/08/2012 14:22, Michael Tokarev ha scritto: > @@ -152,6 +152,16 @@ int qdev_init(DeviceState *dev) > + > +if (!OBJECT(dev)->parent) { > +static int unattached_count = 0; > +gchar *name = g_strdup_printf("device[%d]", unattached_count++); > + > +object_property_add_c

Re: [Qemu-devel] commit da57febfed "qdev: give all devices a canonical path" broke usb_del

2012-08-08 Thread Andreas Färber
Am 08.08.2012 14:39, schrieb Paolo Bonzini: > Il 08/08/2012 14:22, Michael Tokarev ha scritto: >> [...] should there be a call to object_unref() >> somewhere? > > There should be a call to object_unparent() somewhere actually. > We've been peppering the code with them for a few months now while >

Re: [Qemu-devel] commit da57febfed "qdev: give all devices a canonical path" broke usb_del

2012-08-08 Thread Paolo Bonzini
Il 08/08/2012 14:48, Andreas Färber ha scritto: > Adding object_unparent() to object_delete() looks okay to me, but we > should not forget about the upcoming i440fx and prep_pci use cases where > we want to embed children in the parent's struct, so that > object_delete() will never be called on it.

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

2012-08-08 Thread Stefan Hajnoczi
On Tue, Aug 07, 2012 at 11:58:28AM -0400, Corey Bryant wrote: > @@ -2566,6 +2567,92 @@ FdsetInfoList *qmp_query_fdsets(Error **errp) > return fdset_list; > } > > +int monitor_fdset_get_fd(int64_t fdset_id, int flags) > +{ > +mon_fdset_t *mon_fdset; > +mon_fdset_fd_t *mon_fdset_fd; >

[Qemu-devel] [PATCH 00/12] Migration next 20120808

2012-08-08 Thread Juan Quintela
available in the git repository at: http://repo.or.cz/r/qemu/quintela.git migration-next-20120808 for you to fetch changes up to dd051c7217eae04191169ac62f6ffb7531c8da32: Restart optimization on stage3 update version (2012-08-08 13:51:12 +0200) Juan Quintela (1): Restart optimization

Re: [Qemu-devel] [PATCH v7 0/6] file descriptor passing using fd sets

2012-08-08 Thread Stefan Hajnoczi
On Tue, Aug 7, 2012 at 4:58 PM, Corey Bryant wrote: > libvirt's sVirt security driver provides SELinux MAC isolation for > Qemu guest processes and their corresponding image files. In other > words, sVirt uses SELinux to prevent a QEMU process from opening > files that do not belong to it. > > sV

Re: [Qemu-devel] [PATCH 01/15] atomic: introduce atomic operations

2012-08-08 Thread Stefan Hajnoczi
On Wed, Aug 8, 2012 at 10:21 AM, Peter Maydell wrote: > On 8 August 2012 07:25, Liu Ping Fan wrote: >> +static inline void atomic_sub(int i, Atomic *v) >> +{ >> +asm volatile("lock; subl %1,%0" >> + : "+m" (v->counter) >> + : "ir" (i)); >> +} > > NAK. We don't want ran

Re: [Qemu-devel] commit da57febfed "qdev: give all devices a canonical path" broke usb_del

2012-08-08 Thread Michael Tokarev
On 08.08.2012 16:39, Paolo Bonzini wrote: > Il 08/08/2012 14:22, Michael Tokarev ha scritto: >> @@ -152,6 +152,16 @@ int qdev_init(DeviceState *dev) >> + >> +if (!OBJECT(dev)->parent) { >> +static int unattached_count = 0; >> +gchar *name = g_strdup_printf("device[%d]", unattach

Re: [Qemu-devel] [PATCH 01/15] atomic: introduce atomic operations

2012-08-08 Thread Paolo Bonzini
Il 08/08/2012 15:09, Stefan Hajnoczi ha scritto: >> > NAK. We don't want random inline assembly implementations of locking >> > primitives in QEMU, they are way too hard to keep working with all the >> > possible host architectures we support. I spent some time a while back >> > getting rid of the

Re: [Qemu-devel] [PATCH 35/35] docs: writing-qmp-commands.txt: update error section

2012-08-08 Thread Luiz Capitulino
On Wed, 08 Aug 2012 14:35:23 +0200 Pavel Hrdina wrote: > On 08/07/2012 05:53 PM, Luiz Capitulino wrote: > > Add information about the new error format and improve the text a bit. > > > > Signed-off-by: Luiz Capitulino > > --- > > docs/writing-qmp-commands.txt | 47 > >

Re: [Qemu-devel] [PATCH 01/15] atomic: introduce atomic operations

2012-08-08 Thread Peter Maydell
On 8 August 2012 14:18, Paolo Bonzini wrote: > Il 08/08/2012 15:09, Stefan Hajnoczi ha scritto: >> No need to roll our own or copy the implementation from the kernel. > > To some extent we need to because: > > 1. GCC atomics look ugly, :) do not provide rmb/wmb, and in some > versions of GCC mb is

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

2012-08-08 Thread Corey Bryant
On 08/08/2012 04:52 AM, Stefan Hajnoczi wrote: On Tue, Aug 7, 2012 at 8:59 PM, Corey Bryant wrote: On 08/07/2012 02:16 PM, Stefan Hajnoczi wrote: On Fri, Aug 3, 2012 at 6:28 PM, Corey Bryant wrote: +snprintf(fd_str, sizeof(fd_str), "%ld", fd); +qerror_report(QERR_FD_NOT_FOUND, f

Re: [Qemu-devel] [PATCH 01/15] atomic: introduce atomic operations

2012-08-08 Thread Paolo Bonzini
Il 08/08/2012 15:32, Peter Maydell ha scritto: >> > 1. GCC atomics look ugly, :) do not provide rmb/wmb, and in some >> > versions of GCC mb is known to be (wrongly) a no-op. >> > >> > 2. glib atomics do not provide mb/rmb/wmb either, and >> > g_atomic_int_get/g_atomic_int_set are inefficient: they

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

2012-08-08 Thread Corey Bryant
On 08/08/2012 09:02 AM, Stefan Hajnoczi wrote: On Tue, Aug 07, 2012 at 11:58:28AM -0400, Corey Bryant wrote: @@ -2566,6 +2567,92 @@ FdsetInfoList *qmp_query_fdsets(Error **errp) return fdset_list; } +int monitor_fdset_get_fd(int64_t fdset_id, int flags) +{ +mon_fdset_t *mon_fdset;

Re: [Qemu-devel] [PATCH 01/15] atomic: introduce atomic operations

2012-08-08 Thread Avi Kivity
On 08/08/2012 04:49 PM, Paolo Bonzini wrote: > Il 08/08/2012 15:32, Peter Maydell ha scritto: >>> > 1. GCC atomics look ugly, :) do not provide rmb/wmb, and in some >>> > versions of GCC mb is known to be (wrongly) a no-op. >>> > >>> > 2. glib atomics do not provide mb/rmb/wmb either, and >>> > g_a

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

2012-08-08 Thread Erlon Cruz
On Wed, Aug 8, 2012 at 3:18 AM, Gerd Hoffmann wrote: > 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

Re: [Qemu-devel] [PATCH 0/5] support guest agent general command

2012-08-08 Thread Eric Blake
[adding qemu-devel, for a qemu-ga question] On 08/07/2012 06:04 PM, MATSUDA, Daiki wrote: > Hi, All. > > I rewrote the patches as Eric suggested. > > > > virsh # help qemu-agent-command > NAME > qemu-agent-command - Qemu Guest Agent Command > > SYNOPSIS > qemu-agent-command [--ti

Re: [Qemu-devel] [PATCH v5 2/2] block: Support GlusterFS as a QEMU block backend

2012-08-08 Thread Stefan Hajnoczi
On Tue, Aug 7, 2012 at 9:01 AM, Bharata B Rao wrote: > block: Support GlusterFS as a QEMU block backend. > > From: Bharata B Rao > > This patch adds gluster as the new block backend in QEMU. This gives > QEMU the ability to boot VM images from gluster volumes. Its already > possible to boot from

Re: [Qemu-devel] commit da57febfed "qdev: give all devices a canonical path" broke usb_del

2012-08-08 Thread Michael Tokarev
On 08.08.2012 17:09, Michael Tokarev wrote: [] > Something similar should be applied to 1.1-stable. FWIW, some > changes are not needed there. Cherry-pick to stable-1.1 removes the two unneeded hunks. This is what I plan to include into debian package. It fixes the original usb_del issue, and I

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

2012-08-08 Thread Stefan Hajnoczi
On Wed, Aug 8, 2012 at 2:54 PM, Corey Bryant wrote: > > > On 08/08/2012 09:02 AM, Stefan Hajnoczi wrote: >> >> On Tue, Aug 07, 2012 at 11:58:28AM -0400, Corey Bryant wrote: >>> >>> @@ -2566,6 +2567,92 @@ FdsetInfoList *qmp_query_fdsets(Error **errp) >>> return fdset_list; >>> } >>> >>> +in

Re: [Qemu-devel] [PATCH v7 0/6] file descriptor passing using fd sets

2012-08-08 Thread Corey Bryant
On 08/08/2012 09:04 AM, Stefan Hajnoczi wrote: On Tue, Aug 7, 2012 at 4:58 PM, Corey Bryant wrote: libvirt's sVirt security driver provides SELinux MAC isolation for Qemu guest processes and their corresponding image files. In other words, sVirt uses SELinux to prevent a QEMU process from op

Re: [Qemu-devel] [PATCH 00/10] Quorum disk image corruption resiliency

2012-08-08 Thread Stefan Hajnoczi
On Tue, Aug 7, 2012 at 2:44 PM, Benoît Canet wrote: > This patchset create a block driver implementing a quorum using three qemu > disk > images. Writes are mirrored on the three files. > For the reading part the three files are read at the same time and a vote is > done to determine which is the

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

2012-08-08 Thread Stefan Hajnoczi
On Tue, Aug 7, 2012 at 2: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] [RFC V2 04/10] quorum: Add quorum_close().

2012-08-08 Thread Stefan Hajnoczi
On Tue, Aug 7, 2012 at 9:30 PM, Blue Swirl wrote: > On Tue, Aug 7, 2012 at 1:44 PM, Benoît Canet wrote: >> +static void quorum_close(BlockDriverState *bs) >> +{ >> +BDRVQuorumState *s = bs->opaque; >> +int i; >> + >> +/* Ensure writes reach stable storage */ >> +for (i = 0; i <= 2

[Qemu-devel] virtio-scsi vs. virtio-blk

2012-08-08 Thread Stefan Priebe
Hello list, i wanted to start using virtio-scsi instead of virtio-blk, cause it offers the possibility to use discard / trim support. Kernel: 3.5.0 on host and guest Qemu-kvm: 1.1.1 stable But i'm not seeing the same or nearly the same speed: virtio-scsi: rand. 4k: write: io=677628KB, bw=6

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

2012-08-08 Thread Andreas Färber
Am 08.08.2012 03:45, schrieb 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

[Qemu-devel] [Bug 1034423] Guests running OpenIndiana (and relatives) fail to boot on AMD hardware

2012-08-08 Thread Owen Tuz
Reported as a bug at: https://bugs.launchpad.net/qemu/+bug/1034423 First observed with OpenSolaris 2009.06, and also applies to the latest OpenIndiana release. Version: qemu-kvm 1.1.1 Hardware: 2 x AMD Opteron 6128 8-core processors, 64GB RAM. These guests boot on equivalent Intel hardware. T

  1   2   >