[Qemu-devel] [PATCH V16 5/6] add-cow file format core code.

2012-11-23 Thread Dong Xu Wang
add-cow file format core code. It use block-cache.c as cache code. It lacks of snapshot_blkdev support. v15->v16): 1) Judge if opts is null in add_cow_create function. Signed-off-by: Dong Xu Wang --- block/Makefile.objs |1 + block/add-cow.c | 690 ++

[Qemu-devel] [PATCH V16 0/6] add-cow file format

2012-11-23 Thread Dong Xu Wang
It will introduce a new file format: add-cow. The add-cow file format makes it possible to perform copy-on-write on top of a raw disk image. When we know that no backing file clusters remain visible (e.g. we have streamed the entire image and copied all data from the backing file), then it is pos

[Qemu-devel] [PATCH V16 4/6] rename qcow2-cache.c to block-cache.c

2012-11-23 Thread Dong Xu Wang
We will re-use qcow2-cache as block layer common cache code, so change its name and made some changes, define a struct named BlockTableType, pass BlockTableType and table size parameters to block cache initialization function. Signed-off-by: Dong Xu Wang --- block/Makefile.objs|3 +- blo

[Qemu-devel] [PATCH V6 10/10] remove QEMUOptionParameter related functions and struct

2012-11-23 Thread Dong Xu Wang
Signed-off-by: Dong Xu Wang --- qemu-option.c | 285 - qemu-option.h | 32 --- 2 files changed, 0 insertions(+), 317 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index 63f3474..cda8794 100644 --- a/qemu-option.c +++ b/qemu

[Qemu-devel] [PATCH V6 07/10] add def_print_str and use it in qemu_opts_print.

2012-11-23 Thread Dong Xu Wang
qemu_opts_print has no user now, so can re-write the function safely. qemu_opts_print will be used while using "qemu-img create", it will produce the same output as previous code. The behavior of this function has changed: 1. Print every possible option, whether a value has been set or not. 2. O

Re: [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1)

2012-11-23 Thread Dietmar Maurer
> > Yup, it's already not too bad. I haven't looked into it in much > > detail, but I'd like to reduce it even a bit more. In particular, the > > backup_info field in the BlockDriverState feels wrong to me. In the > > long term the generic block layer shouldn't know at all what a backup > > is, and

[Qemu-devel] [PATCH V6 04/10] introduce qemu_opts_create_nofail function

2012-11-23 Thread Dong Xu Wang
While id is NULL, qemu_opts_create can not fail, so ignore errors is fine. Signed-off-by: Dong Xu Wang --- qemu-option.c |9 + qemu-option.h |1 + 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index e0131ce..1303188 100644 --- a/qem

[Qemu-devel] [PATCH V6 06/10] create new function: qemu_opt_set_number

2012-11-23 Thread Dong Xu Wang
Signed-off-by: Dong Xu Wang --- qemu-option.c | 22 ++ qemu-option.h |1 + 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index 1303188..94557cf 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -695,6 +695,28 @@ int qemu_op

[Qemu-devel] [PATCH 1.3 0/5] QOM/qdev lifetime fixes

2012-11-23 Thread Paolo Bonzini
These patches fix problems in the handling of freeing QOM/qdev objects. Together, they fix hot-unplug of USB mass storage devices, which crashed with an assertion failure. I'm not 100% sure, but I think we were always leaking the scsi-disk in pre-QOM days. Now we're freeing it properly, and the

[Qemu-devel] [PATCH 1.3 4/5] qdev: simplify (de)allocation of buses

2012-11-23 Thread Paolo Bonzini
All conditional deallocation can now be done with object_delete. Remove the @qom_allocated and @glib_allocated fields; replace the latter with a direct assignment of the @free function pointer. Signed-off-by: Paolo Bonzini --- hw/pci.c | 2 +- hw/qdev-core.h | 5 - hw/qdev.c | 1

[Qemu-devel] [PATCH 1.3 2/5] qdev: move bus removal to object_unparent

2012-11-23 Thread Paolo Bonzini
Add an ObjectClass method that is done at object_unparent time. It should remove any backlinks to the object in the composition tree, so that object_delete will be able to drop the last reference and free the object. Use it for qdev buses. Signed-off-by: Paolo Bonzini --- Ping Fan, with

[Qemu-devel] [PATCH 1.3 1/5] qom: fix refcount of non-heap-allocated objects

2012-11-23 Thread Paolo Bonzini
The reference count for embedded objects is always one too low, because object_initialize_with_type returns with zero references to the object. This causes premature finalization of the object (or an assertion failure) after calling object_ref to add an extra reference and object_unref to remove it

[Qemu-devel] [PATCH 1.3 5/5] qom: make object_finalize static

2012-11-23 Thread Paolo Bonzini
It is not used anymore, and there is no need to make it public. Signed-off-by: Paolo Bonzini --- include/qemu/object.h | 9 - qom/object.c | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/include/qemu/object.h b/include/qemu/object.h index 5ddcb4a..ed1f47f

[Qemu-devel] [PATCH] qemu-options: Fix space at EOL

2012-11-23 Thread Michal Privoznik
There's no need to add a space at the end of line. Moreover, it can make problems in some projects that store the help output into a file (and run couple of tests based on that) and have space at EOL forbidden. Signed-off-by: Michal Privoznik --- qemu-options.hx |2 +- 1 files changed, 1 ins

[Qemu-devel] [PATCH 1.3 3/5] qom: make object_delete usable for statically-allocated objects

2012-11-23 Thread Paolo Bonzini
Store in the object the freeing function that will be used at deletion time. This makes it possible to use object_delete on statically-allocated (embedded) objects. Dually, it makes it possible to use object_unparent and object_unref without leaking memory, when the lifetime of object might exten

Re: [Qemu-devel] [PATCH 2/5] add basic backup support to block driver

2012-11-23 Thread Dietmar Maurer
> Is there a 1:1 relationship between BackupInfo and BackupBlockJob? Then it > would be nicer to move BlockupInfo fields into BackupBlockJob (which is > empty right now). Then you also don't need to add fields to BlockDriverState > because you know that if your blockjob is running you can access

Re: [Qemu-devel] [PATCH] qemu-options: Fix space at EOL

2012-11-23 Thread Peter Maydell
On 23 November 2012 08:52, Michal Privoznik wrote: > There's no need to add a space at the end of line. > Moreover, it can make problems in some projects that > store the help output into a file (and run couple of > tests based on that) and have space at EOL forbidden. I have no problem with this

Re: [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1)

2012-11-23 Thread Dietmar Maurer
> > My plan was to have something like bs->job->job_type- > >{before,after}_write. > > > >int coroutine_fn (*before_write)(BlockDriverState *bs, > > int64_t sector_num, int nb_sectors, QEMUIOVector *qiov, > > void **cookie); > >int coroutine_fn (*after_write)(BlockDriverStat

Re: [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1)

2012-11-23 Thread Dietmar Maurer
> > > My plan was to have something like bs->job->job_type- > > >{before,after}_write. > > > > > >int coroutine_fn (*before_write)(BlockDriverState *bs, > > > int64_t sector_num, int nb_sectors, QEMUIOVector *qiov, > > > void **cookie); > > >int coroutine_fn (*after_write)(B

Re: [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1)

2012-11-23 Thread Kevin Wolf
Am 23.11.2012 08:38, schrieb Dietmar Maurer: >> In short, the idea is that you can stick filters on top of a >> BlockDriverState, so >> that any read/writes (and possibly more requests, if necessary) are routed >> through the filter before they are passed to the block driver of this BDS. >> Filter

[Qemu-devel] [PATCH V16 1/6] docs: document for add-cow file format

2012-11-23 Thread Dong Xu Wang
Document for add-cow format, the usage and spec of add-cow are introduced. Signed-off-by: Dong Xu Wang --- docs/specs/add-cow.txt | 154 1 files changed, 154 insertions(+), 0 deletions(-) create mode 100644 docs/specs/add-cow.txt diff --git a/d

[Qemu-devel] [PATCH V6 08/10] Create four opts list related functions

2012-11-23 Thread Dong Xu Wang
This patch will create 4 functions, count_opts_list, append_opts_list, free_opts_list and print_opts_list, they will used in following commits. v5->v6): 1) allocate enough space in append_opts_list function. Signed-off-by: Dong Xu Wang --- qemu-option.c | 90 ++

[Qemu-devel] [PATCH V16 3/6] qed_read_string to bdrv_read_string

2012-11-23 Thread Dong Xu Wang
Make qed_read_string function to a common interface, so move it to block.c. Signed-off-by: Dong Xu Wang --- block.c | 27 +++ block.h |2 ++ block/qed.c | 34 -- 3 files changed, 33 insertions(+), 30 deletions(-) diff --git

[Qemu-devel] [PATCH V16 2/6] make path_has_protocol non static

2012-11-23 Thread Dong Xu Wang
We will use path_has_protocol outside block.c, so just make it public. Signed-off-by: Dong Xu Wang Reviewed-by: Michael Roth --- block.c |2 +- block.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index 7d5d628..6b57611 100644 --- a/block.c +++

[Qemu-devel] [PATCH V16 6/6] qemu-iotests: add add-cow iotests support.

2012-11-23 Thread Dong Xu Wang
This patch will use qemu-iotests to test add-cow file format. v15->v16): 1) Rebased on QEMU upstream source tree. Signed-off-by: Dong Xu Wang --- tests/qemu-iotests/017 |2 +- tests/qemu-iotests/020 |2 +- tests/qemu-iotests/common|6 ++ tests/qemu-iotests/common

Re: [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1)

2012-11-23 Thread Paolo Bonzini
Il 23/11/2012 10:05, Dietmar Maurer ha scritto: My plan was to have something like bs->job->job_type- {before,after}_write. int coroutine_fn (*before_write)(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov, void **cookie);

Re: [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1)

2012-11-23 Thread Dietmar Maurer
> > BTW, will such filters work with the new virtio-blk-data-plane? > > No, virtio-blk-data-plane is a hack and will be slowly rewritten to support > all > fancy features. Ah, good to know ;-) thanks.

Re: [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1)

2012-11-23 Thread Paolo Bonzini
Il 23/11/2012 08:42, Dietmar Maurer ha scritto: >> > My plan was to have something like bs->job->job_type->{before,after}_write. >> > >> >int coroutine_fn (*before_write)(BlockDriverState *bs, >> > int64_t sector_num, int nb_sectors, QEMUIOVector *qiov, >> > void **cookie); >>

Re: [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1)

2012-11-23 Thread Dietmar Maurer
> >> Filters would be implemented as BlockDrivers, i.e. you could > >> implement > >> .bdrv_co_write() in a filter to intercept all writes to an image. > > > > I am quite unsure if that make things easier. > > At least it would make for a much cleaner design compared to putting code > for every fe

Re: [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1)

2012-11-23 Thread Dietmar Maurer
> Actually this was plan B, as a poor-man implementation of the filter > infrastructure. Plan A was that the block filters would materialize suddenly > in > someone's git tree. OK, so let us summarize the options: a.) wait untit it materialize suddenly in someone's git tree. b.) add BlockFilter

Re: [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1)

2012-11-23 Thread Dietmar Maurer
> > >> Filters would be implemented as BlockDrivers, i.e. you could > > >> implement > > >> .bdrv_co_write() in a filter to intercept all writes to an image. > > > > > > I am quite unsure if that make things easier. > > > > At least it would make for a much cleaner design compared to putting > > co

Re: [Qemu-devel] tap devices not receiving packets from a bridge

2012-11-23 Thread Peter Lieven
Am 23.11.2012 um 08:02 schrieb Stefan Hajnoczi: > On Thu, Nov 22, 2012 at 03:29:52PM +0100, Peter Lieven wrote: >> is anyone aware of a problem with the linux network bridge that in very rare >> circumstances stops >> a bridge from sending pakets to a tap device? >> >> My problem occurs in conj

Re: [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1)

2012-11-23 Thread Kevin Wolf
Am 23.11.2012 10:05, schrieb Dietmar Maurer: My plan was to have something like bs->job->job_type- {before,after}_write. int coroutine_fn (*before_write)(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov, void **cookie); >>

[Qemu-devel] [PATCH 1/3] S390: Basic CPU model support

2012-11-23 Thread Jens Freimann
From: Viktor Mihajlovski This enables qemu -cpu ? to return the list of supported CPU models on s390. Since only the host model is supported at this point in time this is pretty straight-forward. Further, a validity check for the requested CPU model was added. This change is needed to allow libvi

[Qemu-devel] [PATCH 3/3] sclp: Fix uninitialized var in handle_write_event_buf().

2012-11-23 Thread Jens Freimann
From: Cornelia Huck Some gcc versions rightly complain about a possibly unitialized rc, so let's move setting it before the QTAILQ_FOREACH(). Signed-off-by: Cornelia Huck Signed-off-by: Christian Borntraeger Signed-off-by: Jens Freimann --- hw/s390x/event-facility.c | 3 ++- 1 file changed,

Re: [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1)

2012-11-23 Thread Kevin Wolf
Am 23.11.2012 10:31, schrieb Dietmar Maurer: > Filters would be implemented as BlockDrivers, i.e. you could > implement > .bdrv_co_write() in a filter to intercept all writes to an image. I am quite unsure if that make things easier. >>> >>> At least it would make for a much c

[Qemu-devel] [PATCH 2/3] s390: clear registers, psw and prefix at vcpu reset

2012-11-23 Thread Jens Freimann
When resetting vcpus on s390/kvm we have to clear registers, psw and prefix as described in the z/Architecture PoP, otherwise a reboot won't work. IPL PSW and prefix are set later on by the s390-ipl device reset code. Signed-off-by: Jens Freimann --- target-s390x/kvm.c | 26 +

[Qemu-devel] [PATCH 0/3] s390: vcpu reset, -cpu ? and minor sclp fix

2012-11-23 Thread Jens Freimann
Hi Alex, a few more s390 patches: Patch 1 enables the -cpu ? option for s390 CPU models. Patch 2 implements vcpu reset Patch 3 takes care of an possibly uninitialized variable in SCLP code regards Jens Cornelia Huck (1): sclp: Fix uninitialized var in handle_write_event_buf(). Jens Freimann (

Re: [Qemu-devel] [PATCH/RFC] block: Ensure that block size constraints are considered

2012-11-23 Thread Heinz Graalfs
On Wed, 2012-11-21 at 10:15 +0100, Kevin Wolf wrote: > Am 21.11.2012 09:58, schrieb Christian Borntraeger: > > From: Heinz Graalfs > > > > While testing IPL code (booting) for s390x we faced some problems > > with cache=none on dasds (4k block size) on bdrv_preads with length > > values != block

Re: [Qemu-devel] [Qemu-ppc] [PATCH 12/12] pseries: Generate unique LIOBNs for PCI host bridges

2012-11-23 Thread Michael S. Tsirkin
On Fri, Nov 23, 2012 at 03:13:07PM +1100, David Gibson wrote: > On Thu, Nov 22, 2012 at 09:23:03AM +0200, Michael S. Tsirkin wrote: > > On Thu, Nov 22, 2012 at 01:27:18PM +1100, David Gibson wrote: > > > On Wed, Nov 21, 2012 at 05:27:37PM +0200, Michael S. Tsirkin wrote: > > > > On Wed, Nov 21, 201

Re: [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1)

2012-11-23 Thread Markus Armbruster
Kevin Wolf writes: > Am 23.11.2012 10:05, schrieb Dietmar Maurer: > My plan was to have something like bs->job->job_type- > {before,after}_write. > >int coroutine_fn (*before_write)(BlockDriverState *bs, > int64_t sector_num, int nb_sectors, QEMUIOVector *qiov, >>>

Re: [Qemu-devel] tap devices not receiving packets from a bridge

2012-11-23 Thread Michael S. Tsirkin
On Fri, Nov 23, 2012 at 10:41:21AM +0100, Peter Lieven wrote: > > Am 23.11.2012 um 08:02 schrieb Stefan Hajnoczi: > > > On Thu, Nov 22, 2012 at 03:29:52PM +0100, Peter Lieven wrote: > >> is anyone aware of a problem with the linux network bridge that in very > >> rare circumstances stops > >> a

Re: [Qemu-devel] tap devices not receiving packets from a bridge

2012-11-23 Thread Peter Lieven
Am 23.11.2012 um 12:01 schrieb Michael S. Tsirkin: > On Fri, Nov 23, 2012 at 10:41:21AM +0100, Peter Lieven wrote: >> >> Am 23.11.2012 um 08:02 schrieb Stefan Hajnoczi: >> >>> On Thu, Nov 22, 2012 at 03:29:52PM +0100, Peter Lieven wrote: is anyone aware of a problem with the linux network

[Qemu-devel] [PATCH] win32: Switch thread abstraction to us TLS variable internally

2012-11-23 Thread Jan Kiszka
We already depend on working __thread support for coroutines, so this complication here is no longer needed. Signed-off-by: Jan Kiszka --- Post-1.3 material. qemu-thread-win32.c | 24 ++-- 1 files changed, 6 insertions(+), 18 deletions(-) diff --git a/qemu-thread-win32.c

Re: [Qemu-devel] [PATCH] win32: Switch thread abstraction to us TLS variable internally

2012-11-23 Thread Paolo Bonzini
> We already depend on working __thread support for coroutines, so this > complication here is no longer needed. > > Signed-off-by: Jan Kiszka Reviewed-by: Paolo Bonzini > --- > > Post-1.3 material. > > qemu-thread-win32.c | 24 ++-- > 1 files changed, 6 insertions(+)

Re: [Qemu-devel] [Qemu-trivial] [PATCH] Legacy qemu-kvm options have no argument

2012-11-23 Thread Luiz Capitulino
On Fri, 23 Nov 2012 07:50:49 +0100 Stefan Hajnoczi wrote: > On Thu, Nov 22, 2012 at 10:34:11AM -0200, Luiz Capitulino wrote: > > On Wed, 21 Nov 2012 13:12:53 +0100 > > Jan Kiszka wrote: > > > > > On 2012-11-20 16:14, Markus Armbruster wrote: > > > > Cc'ing Marcelo & Jan to speed up patch applic

[Qemu-devel] for-1.3: [PATCH] chardev: Use real-time clock for open timer

2012-11-23 Thread Luiz Capitulino
To avoid it getting lost in qemu forest.

Re: [Qemu-devel] [RFC PATCH v2 1/3] virtio-bus : Introduce VirtioBus.

2012-11-23 Thread Cornelia Huck
On Thu, 22 Nov 2012 15:50:50 +0100 fred.kon...@greensocs.com wrote: > +/* Create a virtio bus. */ > +VirtioBus *virtio_bus_new(DeviceState *host, const VirtioBusInfo *info) > +{ > +/* > + * This is needed, as we want to have different names for each > virtio-bus. > + * If we don't d

Re: [Qemu-devel] [PATCH v3 1/1] atapi: make change media detection for guests easier

2012-11-23 Thread Kevin Wolf
Am 21.11.2012 18:17, schrieb Pavel Hrdina: > If you have a guest with a media in the optical drive and you change the media > the windows guest cannot properly recognize this media change. > > Windows needs to detect the sense "NOT_READY with ASC_MEDIUM_NOT_PRESENT" > before we send the sense "UNI

Re: [Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-23 Thread Cornelia Huck
On Thu, 22 Nov 2012 15:50:51 +0100 fred.kon...@greensocs.com wrote: > +static void virtiopci_class_init(ObjectClass *oc, void *data) > +{ > +DeviceClass *dc = DEVICE_CLASS(oc); > +PCIDeviceClass *pc = PCI_DEVICE_CLASS(oc); > + > +pc->init = virtiopci_qdev_init; > +pc->exit = virti

Re: [Qemu-devel] [RFC PATCH v2 1/3] virtio-bus : Introduce VirtioBus.

2012-11-23 Thread Stefan Hajnoczi
On Thu, Nov 22, 2012 at 03:50:50PM +0100, fred.kon...@greensocs.com wrote: > +/* Bind the VirtIODevice to the VirtioBus. */ > +void virtio_bus_bind_device(VirtioBus *bus) > +{ > +BusState *qbus = BUS(bus); > +assert(bus != NULL); > +assert(bus->vdev != NULL); > +virtio_bind_device(b

Re: [Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-23 Thread Stefan Hajnoczi
On Thu, Nov 22, 2012 at 03:50:51PM +0100, fred.kon...@greensocs.com wrote: > +static const struct VirtioBusInfo virtio_bus_info = { > +.init_cb = virtio_pci_init_cb, > +.exit_cb = virtio_pci_exit_cb, > + > +.virtio_bindings = { Eventually VirtIOBindings can probably be inlined into Vir

Re: [Qemu-devel] [RFC PATCH v2 3/3] virtio-blk : add the virtio-blk device.

2012-11-23 Thread Stefan Hajnoczi
On Thu, Nov 22, 2012 at 03:50:52PM +0100, fred.kon...@greensocs.com wrote: > @@ -656,3 +658,83 @@ void virtio_blk_exit(VirtIODevice *vdev) > blockdev_mark_auto_del(s->bs); > virtio_cleanup(vdev); > } > + > +static int virtio_blk_qdev_init(DeviceState *qdev) > +{ > +VirtIOBLKState *s

Re: [Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-23 Thread Peter Maydell
On 23 November 2012 12:29, Stefan Hajnoczi wrote: > On Thu, Nov 22, 2012 at 03:50:51PM +0100, fred.kon...@greensocs.com wrote: >> +static const struct VirtioBusInfo virtio_bus_info = { >> +.init_cb = virtio_pci_init_cb, >> +.exit_cb = virtio_pci_exit_cb, >> + >> +.virtio_bindings = { >

[Qemu-devel] [PATCH] S390: Basic CPU model support

2012-11-23 Thread Jens Freimann
From: Viktor Mihajlovski This enables qemu -cpu ? to return the list of supported CPU models on s390. Since only the host model is supported at this point in time this is pretty straight-forward. Further, a validity check for the requested CPU model was added. This change is needed to allow libvi

Re: [Qemu-devel] [RFC PATCH v2 0/3] Virtio-refactoring.

2012-11-23 Thread Stefan Hajnoczi
On Thu, Nov 22, 2012 at 03:50:49PM +0100, fred.kon...@greensocs.com wrote: > From: KONRAD Frederic > I made the changes you suggest in the last RFC. > > There are still two issues with the command line : > > * When I use ./qemu* -device virtio-blk -device virtio-pci > It is said that

[Qemu-devel] [PATCH 0/1] [PULL] qemu-kvm.git uq/master queue

2012-11-23 Thread Marcelo Tosatti
The following changes since commit 1ccbc2851282564308f790753d7158487b6af8e2: qemu-sockets: Fix parsing of the inet option 'to'. (2012-11-21 12:07:59 +0400) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master Bruce Rogers (1): Legacy qemu

[Qemu-devel] [PATCH 1/1] Legacy qemu-kvm options have no argument

2012-11-23 Thread Marcelo Tosatti
From: Bruce Rogers The options no-kvm, no-kvm-pit, no-kvm-pit-reinjection, and no-kvm-irqchip should be marked as having no argument. Signed-off-by: Bruce Rogers Reviewed-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- qemu-options.hx |8 1 files changed, 4 insertions(+), 4 de

Re: [Qemu-devel] [Qemu-ppc] [PATCH 12/12] pseries: Generate unique LIOBNs for PCI host bridges

2012-11-23 Thread David Gibson
On Fri, Nov 23, 2012 at 12:53:23PM +0200, Michael S. Tsirkin wrote: > On Fri, Nov 23, 2012 at 03:13:07PM +1100, David Gibson wrote: > > On Thu, Nov 22, 2012 at 09:23:03AM +0200, Michael S. Tsirkin wrote: > > > On Thu, Nov 22, 2012 at 01:27:18PM +1100, David Gibson wrote: > > > > On Wed, Nov 21, 201

[Qemu-devel] qemu-xen update to QEMU 1.3.0-rc0

2012-11-23 Thread Stefano Stabellini
Hi all, I have just updated the qemu-xen tree (qemu-upstream-unstable.git) that we use with xen-unstable for QEMU development to QEMU 1.3.0-rc0 (plus a couple of commits). After the updated qemu-xen tree manages to pass the required automated tests, I'll send a patch to flip the switch in libxl to

Re: [Qemu-devel] [PATCH] S390: Basic CPU model support

2012-11-23 Thread Alexander Graf
On 23.11.2012, at 13:36, Jens Freimann wrote: > From: Viktor Mihajlovski > > This enables qemu -cpu ? to return the list of supported CPU models > on s390. Since only the host model is supported at this point in time > this is pretty straight-forward. Further, a validity check for the > request

Re: [Qemu-devel] [PATCH 2/3] s390: clear registers, psw and prefix at vcpu reset

2012-11-23 Thread Alexander Graf
On 23.11.2012, at 11:18, Jens Freimann wrote: > When resetting vcpus on s390/kvm we have to clear registers, psw > and prefix as described in the z/Architecture PoP, otherwise a > reboot won't work. IPL PSW and prefix are set later on by the > s390-ipl device reset code. > > Signed-off-by: Jens

Re: [Qemu-devel] [Qemu-ppc] [PATCH 12/12] pseries: Generate unique LIOBNs for PCI host bridges

2012-11-23 Thread Michael S. Tsirkin
On Fri, Nov 23, 2012 at 11:59:51PM +1100, David Gibson wrote: > > Look, even if solution using a required property is less elegant for CLI > > use, it will work, won't it? > > So how about we merge it so that things work, and then we can discuss a > > patch on top that auto-generates this property?

Re: [Qemu-devel] [PATCH 3/3] sclp: Fix uninitialized var in handle_write_event_buf().

2012-11-23 Thread Alexander Graf
On 23.11.2012, at 11:18, Jens Freimann wrote: > From: Cornelia Huck > > Some gcc versions rightly complain about a possibly unitialized rc, > so let's move setting it before the QTAILQ_FOREACH(). > > Signed-off-by: Cornelia Huck > Signed-off-by: Christian Borntraeger > Signed-off-by: Jens Fr

Re: [Qemu-devel] [Qemu-ppc] [PATCH 12/12] pseries: Generate unique LIOBNs for PCI host bridges

2012-11-23 Thread Alexander Graf
On 23.11.2012, at 14:44, Michael S. Tsirkin wrote: > On Fri, Nov 23, 2012 at 11:59:51PM +1100, David Gibson wrote: >>> Look, even if solution using a required property is less elegant for CLI >>> use, it will work, won't it? >>> So how about we merge it so that things work, and then we can discus

Re: [Qemu-devel] [Qemu-ppc] [PATCH 12/12] pseries: Generate unique LIOBNs for PCI host bridges

2012-11-23 Thread Michael S. Tsirkin
On Fri, Nov 23, 2012 at 02:44:15PM +0100, Alexander Graf wrote: > > On 23.11.2012, at 14:44, Michael S. Tsirkin wrote: > > > On Fri, Nov 23, 2012 at 11:59:51PM +1100, David Gibson wrote: > >>> Look, even if solution using a required property is less elegant for CLI > >>> use, it will work, won't

Re: [Qemu-devel] [Qemu-ppc] [PATCH 12/12] pseries: Generate unique LIOBNs for PCI host bridges

2012-11-23 Thread Alexander Graf
On 23.11.2012, at 15:01, Michael S. Tsirkin wrote: > On Fri, Nov 23, 2012 at 02:44:15PM +0100, Alexander Graf wrote: >> >> On 23.11.2012, at 14:44, Michael S. Tsirkin wrote: >> >>> On Fri, Nov 23, 2012 at 11:59:51PM +1100, David Gibson wrote: > Look, even if solution using a required proper

Re: [Qemu-devel] qcow2: slow internal snapshot creation

2012-11-23 Thread Alexandre DERUMIER
performance is also reduced when snapshot exist. (like if they are no preallocated metadatas) see initial git commit http://git.qemu.org/?p=qemu.git;a=commit;h=a35e1c177debb01240243bd656caca302410d38c "qcow2: Metadata preallocation This introduces a qemu-img create option for qcow2 which allow

Re: [Qemu-devel] qcow2: slow internal snapshot creation

2012-11-23 Thread Kevin Wolf
Am 23.11.2012 15:03, schrieb Alexandre DERUMIER: > performance is also reduced when snapshot exist. (like if they are no > preallocated metadatas) Preallocation doesn't matter much these days. > see initial git commit > > http://git.qemu.org/?p=qemu.git;a=commit;h=a35e1c177debb01240243bd656caca

Re: [Qemu-devel] [PATCH] overflow of int ret: use ssize_t for ret

2012-11-23 Thread Stefan Hajnoczi
On Thu, Nov 22, 2012 at 10:07 AM, Stefan Priebe wrote: > diff --git a/block/rbd.c b/block/rbd.c > index 5a0f79f..0384c6c 100644 > --- a/block/rbd.c > +++ b/block/rbd.c > @@ -69,7 +69,7 @@ typedef enum { > typedef struct RBDAIOCB { > BlockDriverAIOCB common; > QEMUBH *bh; > -int ret;

Re: [Qemu-devel] [RFC PATCH v2 1/3] virtio-bus : Introduce VirtioBus.

2012-11-23 Thread Konrad Frederic
On 23/11/2012 13:08, Cornelia Huck wrote: On Thu, 22 Nov 2012 15:50:50 +0100 fred.kon...@greensocs.com wrote: +/* Create a virtio bus. */ +VirtioBus *virtio_bus_new(DeviceState *host, const VirtioBusInfo *info) +{ +/* + * This is needed, as we want to have different names for each vir

Re: [Qemu-devel] [PATCH] overflow of int ret: use ssize_t for ret

2012-11-23 Thread Peter Maydell
On 23 November 2012 14:11, Stefan Hajnoczi wrote: > On Thu, Nov 22, 2012 at 10:07 AM, Stefan Priebe wrote: >> diff --git a/block/rbd.c b/block/rbd.c >> index 5a0f79f..0384c6c 100644 >> --- a/block/rbd.c >> +++ b/block/rbd.c >> @@ -69,7 +69,7 @@ typedef enum { >> typedef struct RBDAIOCB { >>

Re: [Qemu-devel] [Qemu-ppc] [PATCH 12/12] pseries: Generate unique LIOBNs for PCI host bridges

2012-11-23 Thread Michael S. Tsirkin
On Fri, Nov 23, 2012 at 03:03:24PM +0100, Alexander Graf wrote: > > On 23.11.2012, at 15:01, Michael S. Tsirkin wrote: > > > On Fri, Nov 23, 2012 at 02:44:15PM +0100, Alexander Graf wrote: > >> > >> On 23.11.2012, at 14:44, Michael S. Tsirkin wrote: > >> > >>> On Fri, Nov 23, 2012 at 11:59:51PM

Re: [Qemu-devel] qcow2: slow internal snapshot creation

2012-11-23 Thread Alexandre DERUMIER
>>Preallocation doesn't matter much these days. I have done benchmark through nfs on a netapp san, (with directio), I got 300 iops without preallocation, and 6000 iops with preallocation - Mail original - De: "Kevin Wolf" À: "Alexandre DERUMIER" Cc: "Dietmar Maurer" , qemu-deve

Re: [Qemu-devel] [PATCH 0/2] Followup patches regarding block default interface

2012-11-23 Thread Stefan Hajnoczi
On Thu, Nov 22, 2012 at 9:02 PM, Christian Borntraeger wrote: > here are two followup patches. > > > Christian Borntraeger (2): > block: simply default_drive > block: clarify comment about IF_IDE = 0 > > blockdev.h |6 +- > vl.c | 20 ++-- > 2 files changed, 11

Re: [Qemu-devel] [RFC PATCH v2 1/3] virtio-bus : Introduce VirtioBus.

2012-11-23 Thread Konrad Frederic
On 23/11/2012 13:23, Stefan Hajnoczi wrote: On Thu, Nov 22, 2012 at 03:50:50PM +0100, fred.kon...@greensocs.com wrote: +/* Bind the VirtIODevice to the VirtioBus. */ +void virtio_bus_bind_device(VirtioBus *bus) +{ +BusState *qbus = BUS(bus); +assert(bus != NULL); +assert(bus->vdev !=

Re: [Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-23 Thread Konrad Frederic
On 23/11/2012 13:34, Peter Maydell wrote: On 23 November 2012 12:29, Stefan Hajnoczi wrote: On Thu, Nov 22, 2012 at 03:50:51PM +0100, fred.kon...@greensocs.com wrote: +static const struct VirtioBusInfo virtio_bus_info = { +.init_cb = virtio_pci_init_cb, +.exit_cb = virtio_pci_exit_cb,

Re: [Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-23 Thread Peter Maydell
On 23 November 2012 14:23, Konrad Frederic wrote: > On 23/11/2012 13:34, Peter Maydell wrote: >> On 23 November 2012 12:29, Stefan Hajnoczi wrote: >>> Eventually VirtIOBindings can probably be inlined into VirtioBusInfo. I >>> don't see a need for separate structs. >> >> I agree. It might (or mi

Re: [Qemu-devel] [Qemu-ppc] [PATCH 12/12] pseries: Generate unique LIOBNs for PCI host bridges

2012-11-23 Thread Alexander Graf
On 23.11.2012, at 15:18, Michael S. Tsirkin wrote: > On Fri, Nov 23, 2012 at 03:03:24PM +0100, Alexander Graf wrote: >> >> On 23.11.2012, at 15:01, Michael S. Tsirkin wrote: >> >>> On Fri, Nov 23, 2012 at 02:44:15PM +0100, Alexander Graf wrote: On 23.11.2012, at 14:44, Michael S. Tsi

Re: [Qemu-devel] [RFC PATCH v2 0/3] Virtio-refactoring.

2012-11-23 Thread Konrad Frederic
On 23/11/2012 13:38, Stefan Hajnoczi wrote: On Thu, Nov 22, 2012 at 03:50:49PM +0100, fred.kon...@greensocs.com wrote: From: KONRAD Frederic I made the changes you suggest in the last RFC. There are still two issues with the command line : * When I use ./qemu* -device virtio-blk -device v

Re: [Qemu-devel] [PATCH 2/3] s390: clear registers, psw and prefix at vcpu reset

2012-11-23 Thread Christian Borntraeger
On 23/11/12 14:40, Alexander Graf wrote: > > On 23.11.2012, at 11:18, Jens Freimann wrote: > >> When resetting vcpus on s390/kvm we have to clear registers, psw >> and prefix as described in the z/Architecture PoP, otherwise a >> reboot won't work. IPL PSW and prefix are set later on by the >> s3

Re: [Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-23 Thread Konrad Frederic
On 23/11/2012 15:26, Peter Maydell wrote: On 23 November 2012 14:23, Konrad Frederic wrote: On 23/11/2012 13:34, Peter Maydell wrote: On 23 November 2012 12:29, Stefan Hajnoczi wrote: Eventually VirtIOBindings can probably be inlined into VirtioBusInfo. I don't see a need for separate stru

Re: [Qemu-devel] [PATCH 2/3] s390: clear registers, psw and prefix at vcpu reset

2012-11-23 Thread Alexander Graf
On 23.11.2012, at 15:32, Christian Borntraeger wrote: > On 23/11/12 14:40, Alexander Graf wrote: >> >> On 23.11.2012, at 11:18, Jens Freimann wrote: >> >>> When resetting vcpus on s390/kvm we have to clear registers, psw >>> and prefix as described in the z/Architecture PoP, otherwise a >>> reb

Re: [Qemu-devel] [RFC PATCH v2 1/3] virtio-bus : Introduce VirtioBus.

2012-11-23 Thread Cornelia Huck
On Fri, 23 Nov 2012 15:12:45 +0100 Konrad Frederic wrote: > On 23/11/2012 13:08, Cornelia Huck wrote: > > On Thu, 22 Nov 2012 15:50:50 +0100 > > fred.kon...@greensocs.com wrote: > > > > > >> +/* Create a virtio bus. */ > >> +VirtioBus *virtio_bus_new(DeviceState *host, const VirtioBusInfo *info)

Re: [Qemu-devel] [PATCH] overflow of int ret: use ssize_t for ret

2012-11-23 Thread Stefan Priebe - Profihost AG
Hi, i'm not a ceph or inktank guy. I can't made any decision on what to change. At least right now you'll see failing I/O's in your guest, when you discard whole disks. I could fix this for me with int64 and with ssize_t. So if i should resend another patch i need a concrete advise how to pa

Re: [Qemu-devel] qcow2: slow internal snapshot creation

2012-11-23 Thread Kevin Wolf
Am 23.11.2012 15:17, schrieb Alexandre DERUMIER: >>> Preallocation doesn't matter much these days. > > I have done benchmark through nfs on a netapp san, (with directio), > > I got 300 iops without preallocation, and 6000 iops with preallocation This doesn't sound right, even for writethrou

[Qemu-devel] [PATCH 1.3] aio: avoid livelock behavior for Win32

2012-11-23 Thread Paolo Bonzini
The repeated calls to WaitForMultipleObjects may cause a livelock in aio_poll, where no progress is made on bottom halves. This patch matches the behavior of the POSIX code. Signed-off-by: Paolo Bonzini --- Found by the new unit tests. aio-win32.c | 5 - 1 file changed, 4 insertion

Re: [Qemu-devel] [PATCH 2/3] s390: clear registers, psw and prefix at vcpu reset

2012-11-23 Thread Peter Maydell
On 23 November 2012 10:18, Jens Freimann wrote: > +/* The initial reset call is needed here to reset in-kernel > + * vcpu data that we can't access directly from QEMU. If there's in-kernel vcpu data we can't access from QEMU, doesn't this cause problems for migration? > Before > + *

Re: [Qemu-devel] [PATCH 0/2] Followup patches regarding block default interface

2012-11-23 Thread Markus Armbruster
Christian Borntraeger writes: > here are two followup patches. Thanks! Stefan, PATCH 1/2 could be squashed into "Support default block interfaces per QEMUMachine". Your choice. Reviewed-by: Markus Armbruster

[Qemu-devel] [PATCH] qemu-timer: Don't use RDTSC on 386s and 486s

2012-11-23 Thread Peter Maydell
Adjust the conditional which guards the implementation of cpu_get_real_ticks() via RDTSC, so that we don't try to use it on x86 CPUs which don't implement RDTSC. Instead we will fall back to the no-cycle-counter-available default implementation. Reported-by: Yurij Popov Signed-off-by: Peter Mayd

Re: [Qemu-devel] [PATCH 2/3] s390: clear registers, psw and prefix at vcpu reset

2012-11-23 Thread Alexander Graf
On 23.11.2012, at 16:02, Peter Maydell wrote: > On 23 November 2012 10:18, Jens Freimann wrote: >> +/* The initial reset call is needed here to reset in-kernel >> + * vcpu data that we can't access directly from QEMU. > > If there's in-kernel vcpu data we can't access from QEMU, > doesn

[Qemu-devel] [PATCH 1.3? 0/2] AioContext and thread pool unit tests

2012-11-23 Thread Paolo Bonzini
As requested. :) The tests pass on both Linux and Wine. I'm not sure if it makes sense to include these in 1.3, but the idea has some worth. Paolo Bonzini (2): tests: add AioContext unit tests tests: add thread pool unit tests tests/Makefile | 4 + tests/test-aio.c | 66

[Qemu-devel] [PATCH 1.3? 2/2] tests: add thread pool unit tests

2012-11-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- tests/Makefile | 2 + tests/test-thread-pool.c | 213 +++ 2 files changed, 215 insertions(+) create mode 100644 tests/test-thread-pool.c diff --git a/tests/Makefile b/tests/Makefile index 61cbe3b..b60f0fb 1

[Qemu-devel] [PATCH 1.3? 1/2] tests: add AioContext unit tests

2012-11-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- tests/Makefile | 2 + tests/test-aio.c | 667 +++ 2 files changed, 669 insertions(+) create mode 100644 tests/test-aio.c diff --git a/tests/Makefile b/tests/Makefile index ca680e5..61cbe3b 100644 --- a/test

Re: [Qemu-devel] [PATCH] qemu-timer: Don't use RDTSC on 386s and 486s

2012-11-23 Thread Paolo Bonzini
Il 23/11/2012 16:12, Peter Maydell ha scritto: > Adjust the conditional which guards the implementation of > cpu_get_real_ticks() via RDTSC, so that we don't try to use it > on x86 CPUs which don't implement RDTSC. Instead we will fall > back to the no-cycle-counter-available default implementatio

Re: [Qemu-devel] [PATCH] qemu-timer: Don't use RDTSC on 386s and 486s

2012-11-23 Thread Peter Maydell
On 23 November 2012 15:15, Paolo Bonzini wrote: > Il 23/11/2012 16:12, Peter Maydell ha scritto: >> Adjust the conditional which guards the implementation of >> >> -#elif defined(__i386__) >> +#elif defined(__i586__) >> >> static inline int64_t cpu_get_real_ticks(void) >> { >> > > You should at

Re: [Qemu-devel] [PATCH 1/3] S390: Basic CPU model support

2012-11-23 Thread Andreas Färber
Am 23.11.2012 11:18, schrieb Jens Freimann: > From: Viktor Mihajlovski > > This enables qemu -cpu ? to return the list of supported CPU models > on s390. Since only the host model is supported at this point in time > this is pretty straight-forward. Further, a validity check for the > requested C

Re: [Qemu-devel] drive_add 0 if=scsi crashes

2012-11-23 Thread Markus Armbruster
Paolo Bonzini writes: > Il 22/11/2012 15:02, Markus Armbruster ha scritto: >> Watch this: >> >> (qemu) drive_add 0 if=scsi >> Segmentation fault (core dumped) >> >> Broken in commit 0d936928 "qdev: Convert busses to QEMU Object Model". >> Before: >> >> (qemu) drive_add 0 if=scsi >>

Re: [Qemu-devel] qcow2: slow internal snapshot creation

2012-11-23 Thread Kevin Wolf
Am 23.11.2012 08:26, schrieb Dietmar Maurer: > qcow2 snapshot on newly created files are fast: > > # qemu-img create -f qcow2 test.img 200G > # time qemu-img snapshot -c snap1 test.img > real 0m0.014s > > but if metadata is allocated it gets very slow: > > # qemu-img create -f qcow2 -o "p

Re: [Qemu-devel] [PATCH] qemu-timer: Don't use RDTSC on 386s and 486s

2012-11-23 Thread Jamie Lokier
Peter Maydell wrote: > On 23 November 2012 15:15, Paolo Bonzini wrote: > > Il 23/11/2012 16:12, Peter Maydell ha scritto: > >> Adjust the conditional which guards the implementation of > >> > >> -#elif defined(__i386__) > >> +#elif defined(__i586__) > >> > >> static inline int64_t cpu_get_real_ti

  1   2   >