Re: [Qemu-devel] Merging kvm-apic into qemu-kvm

2012-01-26 Thread Avi Kivity
On 01/26/2012 05:32 PM, Jan Kiszka wrote: > On 2012-01-26 16:25, Jan Kiszka wrote: > > On 2012-01-26 16:15, Avi Kivity wrote: > >> The changes to kvm-apic are so drastic, that merging them into qemu-kvm > >> in the normal way won't work. I can consider just dropping the existing > >> implementatio

Re: [Qemu-devel] Merging kvm-apic into qemu-kvm

2012-01-26 Thread Jan Kiszka
On 2012-01-26 16:39, Avi Kivity wrote: > On 01/26/2012 05:32 PM, Jan Kiszka wrote: >> On 2012-01-26 16:25, Jan Kiszka wrote: >>> On 2012-01-26 16:15, Avi Kivity wrote: The changes to kvm-apic are so drastic, that merging them into qemu-kvm in the normal way won't work. I can consider jus

Re: [Qemu-devel] Merging kvm-apic into qemu-kvm

2012-01-26 Thread Avi Kivity
On 01/26/2012 05:45 PM, Jan Kiszka wrote: > > > >> I merged the upstream patches one by one, resolving the mechanical and > >> logical conflicts in each step. Was done for that backend/frontend > >> concept, but the adjustments should basically be the same now. Want me > >> to prepare a branch or

[Qemu-devel] [PATCH v8] qdev: Add support for property type bool

2012-01-26 Thread Andreas Färber
From: Andreas Färber VMState supports the type bool but qdev instead supports bit, backed by uint32_t. Therefore let's add PROP_TYPE_BOOL and qdev_prop_set_bool(). With non-programmers in mind, instead of universal true/false provide two different property types: * on/off for DEFINE_PROP_SWITCH(

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-26 Thread Michael Tokarev
26.01.2012 18:55, Michael Tokarev wrote: 26.01.2012 13:54, ronnie sahlberg wrote: Ok so what about this You use a filename starting with "/proc/self/fd/" and you dont have a proc filesystem mounted? you are on your own! BTW, usual idiom (which was implemented in gawk for example) is to use /d

Re: [Qemu-devel] git bisect results

2012-01-26 Thread Jan Kiszka
On 2012-01-26 14:10, Erik Rull wrote: > Hi Jan, > > > > here the results of the sdl printfs. > > > > First of all the modified code: > > > > #include > > #define NO_DEBUG_PATHS 3 > int paths[NO_DEBUG_PATHS] = {0,0,0}; > int last_sec = 0; > struct timeval tv; > > static void handle_mouse

[Qemu-devel] [PATCH 14/22] block: add bdrv_find_backing_image

2012-01-26 Thread Kevin Wolf
From: Marcelo Tosatti Add bdrv_find_backing_image: given a BlockDriverState pointer, and an id, traverse the backing image chain to locate the id. Signed-off-by: Marcelo Tosatti Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block.c | 18 ++ block.h |2 ++

[Qemu-devel] [PATCH 06/22] block: add BlockJob interface for long-running operations

2012-01-26 Thread Kevin Wolf
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block.c | 48 block_int.h | 40 2 files changed, 88 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c

[Qemu-devel] [PATCH 18/22] virtio-blk: add virtio_blk_handle_read trace event

2012-01-26 Thread Kevin Wolf
From: Stefan Hajnoczi There already exists a virtio_blk_handle_write trace event as well as completion events. Add the virtio_blk_handle_read event so it's easy to trace virtio-blk requests for both read and write operations. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- hw/vi

[Qemu-devel] [PATCH 08/22] block: rate-limit streaming operations

2012-01-26 Thread Kevin Wolf
From: Stefan Hajnoczi This patch implements rate-limiting for image streaming. If we've exceeded the bandwidth quota for a 100 ms time slice we sleep the coroutine until the next slice begins. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/stream.c | 65

[Qemu-devel] [PATCH 04/22] block: check bdrv_in_use() before blockdev operations

2012-01-26 Thread Kevin Wolf
From: Stefan Hajnoczi Long-running block operations like block migration and image streaming must have continual access to their block device. It is not safe to perform operations like hotplug, eject, change, resize, commit, or external snapshot while a long-running operation is in progress. Th

[Qemu-devel] [PATCH 20/22] qcow: Return real error code in qcow_open

2012-01-26 Thread Kevin Wolf
From: Li Zhi Hui Signed-off-by: Li Zhi Hui Signed-off-by: Kevin Wolf --- block/qcow.c | 56 +--- 1 files changed, 37 insertions(+), 19 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index b16955d..e0d0b88 100644 --- a/block/qcow.c +

[Qemu-devel] [PATCH 03/22] coroutine: add co_sleep_ns() coroutine sleep function

2012-01-26 Thread Kevin Wolf
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- Makefile.objs |1 + qemu-coroutine-sleep.c | 38 ++ qemu-coroutine.h |9 + 3 files changed, 48 insertions(+), 0 deletions(-) create mode 1006

[Qemu-devel] [PATCH v2 00/18] Support mismatched host and guest logical block sizes

2012-01-26 Thread Paolo Bonzini
As in v1, the series is logically split in two parts. The first six patches ensure that BDRV_O_NO_CACHE is set for all non-file protocols. This makes sure that large sectors are handled correctly for the libiscsi backend. The next patches add support for arbitrary combinations of host/guest logi

[Qemu-devel] [PATCH v2 01/18] block: do not rely on open_flags for bdrv_is_snapshot

2012-01-26 Thread Paolo Bonzini
The BDRV_O_SNAPSHOT flag is stored in open_flags but not passed to bdrv_open. This makes the usage of bs->open_flags wrong in bdrv_snapshot_goto. (Instead, bdrv_commit uses the backing file's open_flags and those flags never include any of BDRV_O_SNAPSHOT, BDRV_O_NO_BACKING or BDRV_O_RDWR). We w

[Qemu-devel] [PATCH v2 05/18] block: remove enable_write_cache

2012-01-26 Thread Paolo Bonzini
This duplicates a bit in open_flags, we do not need it. Signed-off-by: Paolo Bonzini --- block.c |3 +-- block_int.h |3 --- 2 files changed, 1 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index 5055975..afc327e 100644 --- a/block.c +++ b/block.c @@ -607,7 +607,6 @@

[Qemu-devel] [PATCH v2 02/18] block: store actual flags in bs->open_flags

2012-01-26 Thread Paolo Bonzini
The passed flags are changed slightly before passing them to bdrv_open. Store the same flags in bs->open_flags, so that they are used correctly in bdrv. In addition, this way we will be able to query them and get back consistent values. Signed-off-by: Paolo Bonzini --- block.c | 38 +

[Qemu-devel] [PATCH v2 10/18] raw: probe host_block_size

2012-01-26 Thread Paolo Bonzini
Use ioctls if possible, else see what alignment it takes for O_DIRECT to succeed. Signed-off-by: Paolo Bonzini --- block/raw-posix.c | 72 block/raw-win32.c | 42 +++ 2 files changed, 97 insertions(+), 17 deleti

[Qemu-devel] [PATCH v2 14/18] block: protect against "torn reads" for guest_block_size > host_block_size

2012-01-26 Thread Paolo Bonzini
When the guest sees a higher alignment than the host, writes may be done in multiple steps. So, reads have to be serialized against overlapping writes, so that the writes look atomic to the guest. This is true even when O_DIRECT is not in use. Signed-off-by: Paolo Bonzini --- block.c | 22 +++

[Qemu-devel] [PULL 00/22] Block patches

2012-01-26 Thread Kevin Wolf
The following changes since commit 331636431af32ece373f4b1fb7c3ae9d0615e2a6: vga: compile cirrus_vga in hwlib (2012-01-25 18:32:59 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony Gregory Farnum (1): rbd: wire up snapshot removal and rollback f

[Qemu-devel] [PATCH v2 17/18] block: default min_io_size to host block size when doing rmw

2012-01-26 Thread Paolo Bonzini
Same as the previous patch. However, since the min_io_size is a byte value rather than an exponent, we want to make sure that we pass a 0 when running on 512b-sector disks. Signed-off-by: Paolo Bonzini --- block.c | 17 + block.h |1 + hw/scsi-disk.c |

[Qemu-devel] [PATCH 02/22] block: replace unchecked strdup/malloc/calloc with glib

2012-01-26 Thread Kevin Wolf
From: Stefan Hajnoczi Most of the codebase as been converted to use glib memory allocation functions. There are still a few instances of malloc/calloc in the block layer and qemu-io. Replace them, especially since they do not check the strdup/malloc/calloc return value. Reported-by: Dr David A

[Qemu-devel] [PATCH 21/22] qcow: Use bdrv functions to replace file operation

2012-01-26 Thread Kevin Wolf
From: Li Zhi Hui Since common file operation functions lack of error detection and use much more I/O syscalls, so change them to bdrv series functions and reduce I/O request. Signed-off-by: Li Zhi Hui Signed-off-by: Kevin Wolf --- block/qcow.c | 48 +++---

[Qemu-devel] [PATCH 22/22] scsi: Guard against buflen exceeding req->cmd.xfer in scsi_disk_emulate_command

2012-01-26 Thread Kevin Wolf
From: Thomas Higdon Limit the return value (corresponding to the length of the buffer to be DMAed back to the intiator) to the value in req->cmd.xfer, which is the amount of data that the initiator expects. Eliminate now-duplicate code that does this guarding in the functions for individual comma

[Qemu-devel] [PATCH 01/22] rbd: wire up snapshot removal and rollback functionality

2012-01-26 Thread Kevin Wolf
From: Gregory Farnum Signed-off-by: Greg Farnum Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/rbd.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index db5abf2..46a8579 100644 --- a/block/rbd.c +++ b

[Qemu-devel] [PATCH 15/22] add QERR_BASE_NOT_FOUND

2012-01-26 Thread Kevin Wolf
From: Marcelo Tosatti This qerror will be raised when a given streaming base (backing file) cannot be found. Signed-off-by: Marcelo Tosatti Signed-off-by: Stefan Hajnoczi Acked-by: Luiz Capitulino Signed-off-by: Kevin Wolf --- qapi-schema.json |1 + qerror.c |4 qerror.

[Qemu-devel] [PATCH v2 11/18] iscsi: save host block size

2012-01-26 Thread Paolo Bonzini
The iSCSI backend already gets the block size from the READ CAPACITY command it sends. Save it so that the generic block layer gets it too. Signed-off-by: Paolo Bonzini --- block/iscsi.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index

[Qemu-devel] [PATCH 09/22] qmp: add block_stream command

2012-01-26 Thread Kevin Wolf
From: Stefan Hajnoczi Add the block_stream command, which starts copy backing file contents into the image file. Also add the BLOCK_JOB_COMPLETED QMP event which is emitted when image streaming completes. Later patches add control over the background copy speed, cancelation, and querying runnin

Re: [Qemu-devel] GPLv3 troubles

2012-01-26 Thread Michael Walle
Am Montag 17 Oktober 2011, 19:46:11 schrieb Stefan Weil: > So let's start. For any of my contributions, I agree to GPL v2 or later. > Later generations should have the possibility to replace GPL v2 by > something which matches future requirements. I agree to GPL v2 or later. -- Michael

Re: [Qemu-devel] [PATCH] qmp: add BLOCK_MEDIUM_EJECT event

2012-01-26 Thread Luiz Capitulino
On Wed, 25 Jan 2012 10:42:04 -0200 Luiz Capitulino wrote: > On Wed, 25 Jan 2012 09:41:20 +0100 > Kevin Wolf wrote: > > > Am 24.01.2012 21:03, schrieb Eric Blake: > > > On 01/24/2012 11:16 AM, Luiz Capitulino wrote: > > >> Libvirt wants to be notified when the guest ejects a medium, so that > >

[Qemu-devel] [PATCH 2/3] marvell_88w8618_audio: Use DEFINE_PROP_* macros

2012-01-26 Thread Andreas Färber
Signed-off-by: Anthony Liguori [AF: Use DEFINE_PROP_END_OF_LIST() as well] Signed-off-by: Andreas Färber --- If we're touching it, let's do it right. Causes a trivial merge conflict in [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model. hw/marvell_88w8618_audio.c | 10 +++-

[Qemu-devel] spawning and killing threads in qemu

2012-01-26 Thread Xin Tong
When i attach gdb to qemu running in system mode, i often get things like [Thread 0x7ffed2013700 (LWP 29499) exited] [New Thread 0x7ffed2013700 (LWP 29500)] what spawns these threads and what do these threads do ?

[Qemu-devel] [PATCH v2 16/18] block: default physical block size to host block size

2012-01-26 Thread Paolo Bonzini
Hopefully, this will help operating systems in making less misaligned I/O operations. Not really true for Linux, but why not try. Signed-off-by: Paolo Bonzini --- block.c | 17 + block.h | 15 ++- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/b

Re: [Qemu-devel] spawning and killing threads in qemu

2012-01-26 Thread Paolo Bonzini
On 01/26/2012 07:31 PM, Xin Tong wrote: When i attach gdb to qemu running in system mode, i often get things like [Thread 0x7ffed2013700 (LWP 29499) exited] [New Thread 0x7ffed2013700 (LWP 29500)] what spawns these threads and what do these threads do ? The block layer's thread pool. Paolo

[Qemu-devel] [PATCH 12/22] qmp: add query-block-jobs

2012-01-26 Thread Kevin Wolf
From: Stefan Hajnoczi Add query-block-jobs, which shows the progress of ongoing block device operations. Signed-off-by: Stefan Hajnoczi Acked-by: Luiz Capitulino Signed-off-by: Kevin Wolf --- blockdev.c | 33 + hmp.c| 36 +

[Qemu-devel] [PATCH v2 18/18] qemu-io: add blocksize argument to open

2012-01-26 Thread Paolo Bonzini
Make it possible to test the alignment code using qemu-io. Signed-off-by: Paolo Bonzini --- qemu-io.c | 33 - 1 files changed, 28 insertions(+), 5 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index 7c446b6..268db89 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -

[Qemu-devel] [PATCH v2 09/18] block: add host_block_size

2012-01-26 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block.c |4 +++- block_int.h |3 +++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index 2e1ebeb..af41fb3 100644 --- a/block.c +++ b/block.c @@ -591,6 +591,7 @@ static int bdrv_open_common(BlockDriverState *bs, const

[Qemu-devel] [PATCH 15/15] i440fx: move ram initialization into i440fx-pmc

2012-01-26 Thread Anthony Liguori
--- hw/pc.c | 44 ++-- hw/pc.h |6 -- hw/piix_pci.c | 46 -- 3 files changed, 34 insertions(+), 62 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 4964a64..90bd638 100644 --- a/hw/pc.c ++

[Qemu-devel] [PATCH 19/22] block/vdi: Zero unused parts when allocating a new block (fix #919242)

2012-01-26 Thread Kevin Wolf
From: Stefan Weil The new block was filled with zero when it was allocated by g_malloc0, but when it was reused later and only partially used, data from the previously allocated block were still present and written to the new block. This caused the problems reported by bug #919242 (https://bugs.

[Qemu-devel] [PATCH v2 15/18] block: align and serialize I/O when guest_block_size < host_block_size

2012-01-26 Thread Paolo Bonzini
When the guest sees a lower alignment than the host, and O_DIRECT is in place, I/O might not span an integer number of host sectors. If this is the case, add a few sectors at the beginning and the end. When reading, copy interesting data from there to the guest buffer. When writing, merge data fro

[Qemu-devel] [RFC 00/15] Refactor PC machine to take advantage of QOM

2012-01-26 Thread Anthony Liguori
Since I plan to commit a good chunk of QOM tomorrow, I wanted to share some more forward looking work that really starts to take advantage of the new features of QOM. This series aggressively refactors the PC machine initialization to be more modelled and less ad-hoc. The highlights of this serie

Re: [Qemu-devel] [RFC 00/15] Refactor PC machine to take advantage of QOM

2012-01-26 Thread Peter Maydell
On 26 January 2012 19:00, Anthony Liguori wrote: > We need to modeled MemoryRegions and qemu_irq in QOM too. +1 : this ought to let us get rid of SysBus... >  MemoryRegions > shouldn't be that difficult.  Our habit of passing qemu_irq's as arrays > without > an explicit size will probably requi

[Qemu-devel] [PATCH 10/15] i440fx: move some logic to realize and make inheritance from PCIHost explicit

2012-01-26 Thread Anthony Liguori
--- hw/pci_host.c | 11 hw/pci_host.h |3 ++ hw/piix_pci.c | 72 +++- 3 files changed, 54 insertions(+), 32 deletions(-) diff --git a/hw/pci_host.c b/hw/pci_host.c index 44c6c20..4c9fc49 100644 --- a/hw/pci_host.c +++ b/hw/pci_h

Re: [Qemu-devel] spawning and killing threads in qemu

2012-01-26 Thread Xin Tong
what is that, can you please briefly explain ? Thanks Xin On Thu, Jan 26, 2012 at 1:35 PM, Paolo Bonzini wrote: > On 01/26/2012 07:31 PM, Xin Tong wrote: >> >> When i attach gdb to qemu running in system mode, i often get things like >> >> [Thread 0x7ffed2013700 (LWP 29499) exited] >> [New Thr

Re: [Qemu-devel] [libvirt] libvirt doesn't work with qemu 1.0

2012-01-26 Thread Luiz Capitulino
On Wed, 25 Jan 2012 20:55:14 -0700 Eric Blake wrote: > On 12/02/2011 01:32 PM, Anthony Liguori wrote: > >> But we already have to call 'qemu -h' for other reasons; so we might as > >> well be efficient and learn as much as possible from that result than by > >> calling both 'qemu -h' and 'qemu -q

[Qemu-devel] [PATCH 11/15] i440fx-pmc: refactor to take properties for memory geometry

2012-01-26 Thread Anthony Liguori
--- hw/piix_pci.c | 128 + 1 files changed, 74 insertions(+), 54 deletions(-) diff --git a/hw/piix_pci.c b/hw/piix_pci.c index 52bfc7a..dddc95f 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -104,6 +104,11 @@ struct I440FXPMCState {

[Qemu-devel] [PATCH 3/3] qdev: prepare source tree for code conversion

2012-01-26 Thread Andreas Färber
From: Anthony Liguori These are various small stylistic changes which help make things more consistent such that the automated conversion script can be simpler. It's not necessary to agree or disagree with these style changes because all of this code is going to be rewritten by the patch monkey

Re: [Qemu-devel] [RFC PATCH 5/7] vl.c: added -kerndtb option

2012-01-26 Thread Scott Wood
On 01/24/2012 12:23 PM, Stefan Weil wrote: > I'd prefer a different solution. As far as I have understood, > the dtb is only useful with a kernel, so it could be handled > as an optional attribute to the -kernel parameter: > > -kernel IMAGE[,dtb=DTB] > > Of course the same applies to -append,

Re: [Qemu-devel] [RFC 00/15] Refactor PC machine to take advantage of QOM

2012-01-26 Thread Anthony Liguori
On 01/26/2012 01:12 PM, Peter Maydell wrote: On 26 January 2012 19:00, Anthony Liguori wrote: We need to modeled MemoryRegions and qemu_irq in QOM too. +1 : this ought to let us get rid of SysBus... MemoryRegions shouldn't be that difficult. Our habit of passing qemu_irq's as arrays with

[Qemu-devel] [PATCH v2 12/18] block: allow waiting only for overlapping writes

2012-01-26 Thread Paolo Bonzini
To implement mismatching block size, we will reuse the request tracking mechanism that is used for copy-on-read. However, waiting for overlapping reads is not needed to protect against "torn reads", so add a flag to wait_for_overlapping_requests. Signed-off-by: Paolo Bonzini --- block.c | 13

Re: [Qemu-devel] [RFC PATCH 5/7] vl.c: added -kerndtb option

2012-01-26 Thread Peter Maydell
On 23 January 2012 07:20, Peter A. G. Crosthwaite wrote: > --- a/vl.c > +++ b/vl.c > @@ -233,6 +233,7 @@ int boot_menu; >  uint8_t *boot_splash_filedata; >  int boot_splash_filedata_size; >  uint8_t qemu_extra_params_fw[2]; > +const char *qemu_kerndtb = NULL; > >  typedef struct FWBootEntry FWBoot

Re: [Qemu-devel] [PATCH 01/15] pc: merge pc_piix.c into pc.c

2012-01-26 Thread Anthony Liguori
On 01/26/2012 01:00 PM, Anthony Liguori wrote: A long time ago, there was a grand plan to merge q35 chipset support. The start of that series was a refactoring of pc.c which split a bunch of the "common" functionality into a separate file that could be shared by the two. But q35 never got merge

[Qemu-devel] [PATCH 11/22] qmp: add block_job_cancel command

2012-01-26 Thread Kevin Wolf
From: Stefan Hajnoczi Add block_job_cancel, which stops an active block streaming operation. When the operation has been cancelled the new BLOCK_JOB_CANCELLED event is emitted. Signed-off-by: Stefan Hajnoczi Acked-by: Luiz Capitulino Signed-off-by: Kevin Wolf --- QMP/qmp-events.txt | 24 ++

[Qemu-devel] TB chaining in QEMU

2012-01-26 Thread Xin Tong
It seems to me that when QEMU emits a TB to TB transition, it does not look for whether the code has already been generated or not ( at least x86 on x86 emulation) . it just lay down a 4 byte address, waiting to be patched later. Am I right ? case INDEX_op_goto_tb: if (s->tb_jmp_offset)

[Qemu-devel] [PATCH v2 04/18] block: non-raw protocols never cache

2012-01-26 Thread Paolo Bonzini
Non-raw protocols never cache their data. Make this visible by setting BDRV_O_NOCACHE in the open_flags. It will be used to prohibit block sizes smaller than the backend's block size. Signed-off-by: Paolo Bonzini --- block/curl.c |1 + block/iscsi.c|2 ++ block/nbd.c |

[Qemu-devel] [PATCH 09/15] i440fx: create the PMC through composition

2012-01-26 Thread Anthony Liguori
--- hw/piix_pci.c | 122 - 1 files changed, 69 insertions(+), 53 deletions(-) diff --git a/hw/piix_pci.c b/hw/piix_pci.c index aca4476..fdb372f 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -47,34 +47,6 @@ * function 1.0, there is the

[Qemu-devel] [PATCH 17/22] docs: describe live block operations

2012-01-26 Thread Kevin Wolf
From: Marcelo Tosatti Signed-off-by: Marcelo Tosatti Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- docs/live-block-ops.txt | 58 +++ 1 files changed, 58 insertions(+), 0 deletions(-) create mode 100644 docs/live-block-ops.txt diff

Re: [Qemu-devel] [RFC 00/15] Refactor PC machine to take advantage of QOM

2012-01-26 Thread Markus Armbruster
Peter Maydell writes: > On 26 January 2012 19:00, Anthony Liguori wrote: >> We need to modeled MemoryRegions and qemu_irq in QOM too. > > +1 : this ought to let us get rid of SysBus... > >>  MemoryRegions >> shouldn't be that difficult.  Our habit of passing qemu_irq's as arrays >> without >> a

Re: [Qemu-devel] [RFC 00/15] Refactor PC machine to take advantage of QOM

2012-01-26 Thread Anthony Liguori
On 01/26/2012 01:57 PM, Markus Armbruster wrote: Peter Maydell writes: On 26 January 2012 19:00, Anthony Liguori wrote: We need to modeled MemoryRegions and qemu_irq in QOM too. +1 : this ought to let us get rid of SysBus... MemoryRegions shouldn't be that difficult. Our habit of pass

[Qemu-devel] [PATCH 07/15] i440fx: eliminate i440fx_common_init

2012-01-26 Thread Anthony Liguori
--- hw/piix_pci.c | 48 1 files changed, 12 insertions(+), 36 deletions(-) diff --git a/hw/piix_pci.c b/hw/piix_pci.c index 4735d9c..589708e 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -263,19 +263,17 @@ static int i440fx_initfn(PCIDevice *

Re: [Qemu-devel] [libvirt] [PATCH RFC 0/4] Allow hibernation on guests

2012-01-26 Thread Luiz Capitulino
On Thu, 26 Jan 2012 20:41:13 +0100 Michal Privoznik wrote: > On 26.01.2012 20:35, Luiz Capitulino wrote: > > On Thu, 26 Jan 2012 08:18:03 -0700 > > Eric Blake wrote: > > > >> [adding qemu-devel] > >> > >> On 01/26/2012 07:46 AM, Daniel P. Berrange wrote: > One thing, that you'll probably n

Re: [Qemu-devel] [libvirt] [PATCH RFC 0/4] Allow hibernation on guests

2012-01-26 Thread Luiz Capitulino
On Thu, 26 Jan 2012 08:18:03 -0700 Eric Blake wrote: > [adding qemu-devel] > > On 01/26/2012 07:46 AM, Daniel P. Berrange wrote: > >> One thing, that you'll probably notice is this > >> 'set-support-level' command. Basically, it tells GA what qemu version > >> is it running on. Ideally, this sho

Re: [Qemu-devel] [libvirt] [PATCH RFC 0/4] Allow hibernation on guests

2012-01-26 Thread Michal Privoznik
On 26.01.2012 20:35, Luiz Capitulino wrote: > On Thu, 26 Jan 2012 08:18:03 -0700 > Eric Blake wrote: > >> [adding qemu-devel] >> >> On 01/26/2012 07:46 AM, Daniel P. Berrange wrote: One thing, that you'll probably notice is this 'set-support-level' command. Basically, it tells GA what q

[Qemu-devel] [PATCH 08/15] i440fx: introduce some saner naming conventions

2012-01-26 Thread Anthony Liguori
i440fx-pcihost => i440fx i440fx => i440fx-pmc It might seem like a small change, but it better reflects the fact that the PMC is contained within the i440fx which we will now reflect in composition in the next few changesets. Signed-off-by: Anthony Liguori --- hw/pc.c |2 +- hw/pc.h

[Qemu-devel] [PATCH 13/22] blockdev: make image streaming safe across hotplug

2012-01-26 Thread Kevin Wolf
From: Stefan Hajnoczi Unplugging a storage interface like virtio-blk causes the host block device to be deleted too. Long-running operations like block migration must take a DriveInfo reference to prevent the BlockDriverState from being freed. For image streaming we can do the same thing. Note

[Qemu-devel] [PATCH 03/15] piix3: make PIIX3-xen a subclass of PIIX3

2012-01-26 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/piix_pci.c | 11 +-- 1 files changed, 1 insertions(+), 10 deletions(-) diff --git a/hw/piix_pci.c b/hw/piix_pci.c index 1906427..9065632 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -527,23 +527,14 @@ static TypeInfo piix3_info = { static v

[Qemu-devel] [PATCH 06/15] piix: create i8254 through composition

2012-01-26 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/i8254.c| 35 +++ hw/i8254.h| 38 ++ hw/pc.c |5 + hw/piix_pci.c | 15 ++- 4 files changed, 56 insertions(+), 37 deletions(-) create mode 100644 hw/i82

[Qemu-devel] [PATCH 02/15] pc: make some functions static

2012-01-26 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/pc.c | 24 hw/pc.h | 26 -- 2 files changed, 12 insertions(+), 38 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 3d40aca..4b11e44 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -101,7 +101,7 @@ static const int

[Qemu-devel] [PATCH 1/3] es1370: Drop dead code

2012-01-26 Thread Andreas Färber
Signed-off-by: Anthony Liguori Signed-off-by: Andreas Färber --- Anthony, as requested before, please pull these out of the stylistic changes. hw/es1370.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/hw/es1370.c b/hw/es1370.c index 6a3ba55..3527eb6 100644 --- a/

[Qemu-devel] [PATCH 10/22] qmp: add block_job_set_speed command

2012-01-26 Thread Kevin Wolf
From: Stefan Hajnoczi Add block_job_set_speed, which sets the maximum speed for a background block operation. Signed-off-by: Stefan Hajnoczi Acked-by: Luiz Capitulino Signed-off-by: Kevin Wolf --- blockdev.c | 25 + hmp-commands.hx | 14 ++ hmp.

Re: [Qemu-devel] TB chaining in QEMU

2012-01-26 Thread Peter Maydell
On 26 January 2012 19:52, Xin Tong wrote: > It seems to me that when QEMU emits a TB to TB transition, it does not look > for whether the code has already been generated or not ( at least x86 on x86 > emulation) . it just lay down a 4 byte address, waiting to be patched later. > Am I right ? Yes,

[Qemu-devel] [PATCH 04/15] piix: prepare for composition

2012-01-26 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/piix_pci.c | 26 +- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/hw/piix_pci.c b/hw/piix_pci.c index 9065632..ec75725 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -43,6 +43,9 @@ typedef PCIHostState I440FXStat

[Qemu-devel] [PATCH v2 06/18] block: move flag bits together

2012-01-26 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block_int.h | 17 - 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/block_int.h b/block_int.h index 0bbebe4..6f23d4a 100644 --- a/block_int.h +++ b/block_int.h @@ -222,15 +222,18 @@ struct BlockDriver { struct BlockDriverState {

[Qemu-devel] [PATCH 12/15] i440fx-pmc: calculate PCI memory hole directly

2012-01-26 Thread Anthony Liguori
--- hw/piix_pci.c | 47 +-- 1 files changed, 29 insertions(+), 18 deletions(-) diff --git a/hw/piix_pci.c b/hw/piix_pci.c index dddc95f..b38904d 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -52,6 +52,9 @@ #define XEN_PIIX_NUM_PIRQS 128ULL

[Qemu-devel] [PATCH 05/22] block: make copy-on-read a per-request flag

2012-01-26 Thread Kevin Wolf
From: Stefan Hajnoczi Previously copy-on-read could only be enabled for all requests to a block device. This means requests coming from the guest as well as QEMU's internal requests would perform copy-on-read when enabled. For image streaming we want to support finer-grained behavior than just

[Qemu-devel] [PATCH v2 07/18] raw: remove the aligned_buf

2012-01-26 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/raw-posix.c | 25 +++-- 1 files changed, 3 insertions(+), 22 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index 2ee5d69..007d1d3 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -129,8 +129,6 @@ typedef stru

[Qemu-devel] [PATCH 01/15] pc: merge pc_piix.c into pc.c

2012-01-26 Thread Anthony Liguori
A long time ago, there was a grand plan to merge q35 chipset support. The start of that series was a refactoring of pc.c which split a bunch of the "common" functionality into a separate file that could be shared by the two. But q35 never got merged and the refactoring, in retrospect, just made t

[Qemu-devel] [PATCH 05/15] piix: create the HPET and RTC through composition

2012-01-26 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/hpet.c| 38 +- hw/hpet_emul.h | 40 hw/mc146818rtc.c | 30 ++--- hw/mc146818rtc.h | 27 +++ hw/pc.c | 38 +-- hw/piix_pci

[Qemu-devel] [PATCH 07/22] block: add image streaming block job

2012-01-26 Thread Kevin Wolf
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- Makefile.objs |1 + block/stream.c | 133 block_int.h|3 + trace-events |4 ++ 4 files changed, 141 insertions(+), 0 deletions(-) cre

[Qemu-devel] [PATCH 14/15] i440fx: move bios loading to i440fx

2012-01-26 Thread Anthony Liguori
--- hw/pc.c | 70 -- hw/pc.h |3 +- hw/piix_pci.c | 74 +++- sysemu.h |2 - 4 files changed, 79 insertions(+), 70 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index

[Qemu-devel] [PATCH 13/15] i440fx: allocate MemoryRegion for pci memory space

2012-01-26 Thread Anthony Liguori
--- hw/piix_pci.c | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/piix_pci.c b/hw/piix_pci.c index b38904d..855f402 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -118,7 +118,7 @@ typedef struct I440FXState PCIHostState parent; MemoryRegion *a

[Qemu-devel] [PATCH 16/22] block: add support for partial streaming

2012-01-26 Thread Kevin Wolf
From: Marcelo Tosatti Add support for streaming data from an intermediate section of the image chain (see patch and documentation for details). Signed-off-by: Marcelo Tosatti Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/stream.c | 91 ++

[Qemu-devel] [PATCH v2 08/18] block: rename buffer_alignment to guest_block_size

2012-01-26 Thread Paolo Bonzini
The alignment field is now set to the value that is promised to the guest, rather than required by the host. The next patches will make QEMU aware of the host-provided values, so make this clear. Signed-off-by: Paolo Bonzini --- block.c | 10 +- block.h |2 +-

[Qemu-devel] [PATCH v2 13/18] block: allow waiting at arbitrary granularity

2012-01-26 Thread Paolo Bonzini
When emulating small logical block sizes, the only overlaps that matter are at host block size granularity, not cluster. Make wait_for_overlapping_requests more flexible in this respect, too. Signed-off-by: Paolo Bonzini --- block.c | 43 --- 1 files cha

[Qemu-devel] [PATCH v2 03/18] block: pass protocol flags up to the format

2012-01-26 Thread Paolo Bonzini
In the next patches, the protocols will modify bs->open_flags to signify that they cannot support the exact requested feature set. Pass the modified flags to the format. Signed-off-by: Paolo Bonzini --- block.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/block.c b/b

Re: [Qemu-devel] [RFC PATCH 5/7] vl.c: added -kerndtb option

2012-01-26 Thread Eric Blake
On 01/26/2012 12:34 PM, Scott Wood wrote: > On 01/24/2012 12:23 PM, Stefan Weil wrote: >> I'd prefer a different solution. As far as I have understood, >> the dtb is only useful with a kernel, so it could be handled >> as an optional attribute to the -kernel parameter: >> >> -kernel IMAGE[,dtb=

[Qemu-devel] [PATCH] keep the PID file locked for the lifetime of the process

2012-01-26 Thread Laszlo Ersek
The lockf() call in qemu_create_pidfile() aims at ensuring mutual exclusion. We shouldn't close the pidfile on success, because that drops the lock as well [1]: "File locks shall be released on first close by the locking process of any file descriptor for the file." Coverity may complain

Re: [Qemu-devel] [libvirt] [PATCH RFC 0/4] Allow hibernation on guests

2012-01-26 Thread Michael Roth
On 01/26/2012 02:13 PM, Luiz Capitulino wrote: On Thu, 26 Jan 2012 20:41:13 +0100 Michal Privoznik wrote: On 26.01.2012 20:35, Luiz Capitulino wrote: On Thu, 26 Jan 2012 08:18:03 -0700 Eric Blake wrote: [adding qemu-devel] On 01/26/2012 07:46 AM, Daniel P. Berrange wrote: One thing, that

Re: [Qemu-devel] [libvirt] [PATCH RFC 0/4] Allow hibernation on guests

2012-01-26 Thread Anthony Liguori
On 01/26/2012 09:18 AM, Eric Blake wrote: [adding qemu-devel] On 01/26/2012 07:46 AM, Daniel P. Berrange wrote: One thing, that you'll probably notice is this 'set-support-level' command. Basically, it tells GA what qemu version is it running on. Ideally, this should be done as soon as GA start

Re: [Qemu-devel] [libvirt] [PATCH RFC 0/4] Allow hibernation on guests

2012-01-26 Thread Anthony Liguori
On 01/26/2012 01:35 PM, Luiz Capitulino wrote: On Thu, 26 Jan 2012 08:18:03 -0700 Eric Blake wrote: [adding qemu-devel] On 01/26/2012 07:46 AM, Daniel P. Berrange wrote: One thing, that you'll probably notice is this 'set-support-level' command. Basically, it tells GA what qemu version is it

[Qemu-devel] [Bug 922355] [NEW] qemu crashes when invoked on Pandaboard

2012-01-26 Thread Marietto
Public bug reported: root@omap:~# uname -a Linux omap 3.1.6-x6 #1 SMP Thu Dec 22 11:17:51 UTC 2011 armv7l armv7l armv7l GNU/Linux root@omap:~# qemu Could not initialize KVM, will disable KVM support /build/buildd/qemu-kvm-0.14.1+noroms/tcg/arm/tcg-target.c:848: tcg fatal error ** Affects: qemu

[Qemu-devel] [PATCH] macio: Convert to qdev

2012-01-26 Thread Andreas Färber
From: Anthony Liguori Signed-off-by: Anthony Liguori Split macio into two PCIDevices with declarative device ID, macio-oldworld and macio-newworld. Drop is_oldworld state in favor of two separate init functions and deferred creation. Signed-off-by: Andreas Färber Cc: Alexander Graf --- Anth

Re: [Qemu-devel] [PATCH 02/28] openpic: remove dead code to make a PCI device version

2012-01-26 Thread Andreas Färber
Am 24.01.2012 20:32, schrieb Anthony Liguori: > bus is always NULL so the code in this if clause is dead (and therefore > untested). > > Signed-off-by: Anthony Liguori > --- > hw/openpic.c | 30 +++--- > hw/openpic.h |2 +- > hw/ppc_newworld.c |2 +- >

Re: [Qemu-devel] [libvirt] [PATCH RFC 0/4] Allow hibernation on guests

2012-01-26 Thread Michael Roth
On 01/26/2012 09:18 AM, Eric Blake wrote: [adding qemu-devel] On 01/26/2012 07:46 AM, Daniel P. Berrange wrote: One thing, that you'll probably notice is this 'set-support-level' command. Basically, it tells GA what qemu version is it running on. Ideally, this should be done as soon as GA start

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

2012-01-26 Thread Serge Hallyn
I can reproduce this with upstream qemu - though i must point out that to do so i had to change the definition of VGA_RAM_SIZE in hw/vga_int.h to 16*1024*1024 (as it is in qemu-kvm) in order to be able to use the default high resolution. Command line was: ./x86_64-softmmu/qemu-system-x86_64 -vga

Re: [Qemu-devel] [Android-virt] [PATCH 02/12] arm: make the number of GIC interrupts configurable

2012-01-26 Thread Rusty Russell
On Wed, 25 Jan 2012 15:09:41 +, Peter Maydell wrote: > On 24 January 2012 08:42, Rusty Russell wrote: > > Reading through this, I see a lot of "- 32".  Trivial patch follows, > > which applies to your rebasing branch: > > (If you send patches as fresh new emails then they just apply > with

[Qemu-devel] [PATCH] GRLIB UART: Add RX channel

2012-01-26 Thread Fabien Chouteau
This patch implements the RX channel of GRLIB UART with a FIFO to improve data rate. Signed-off-by: Fabien Chouteau --- hw/grlib_apbuart.c | 99 ++- trace-events |1 + 2 files changed, 90 insertions(+), 10 deletions(-) diff --git a/hw/

Re: [Qemu-devel] [PATCH] memory: fix return value on unassigned reads

2012-01-26 Thread Fabien Chouteau
On 26/01/2012 10:33, Avi Kivity wrote: > The memory API returns -1 on unassigned reads, different from the original > in exec.c, which returned zero. Isn't this return value platform specific? > This breaks grlib_uart; apparently some users depend on it. > > Fix by returning zero; however if rea

Re: [Qemu-devel] [PATCH] GRLIB UART: Add RX channel

2012-01-26 Thread Fabien Chouteau
On 26/01/2012 14:55, Avi Kivity wrote: > On 01/26/2012 03:45 PM, Fabien Chouteau wrote: >> @@ -141,18 +219,19 @@ grlib_apbuart_write(void *opaque, target_phys_addr_t >> addr, >> static bool grlib_apbuart_accepts(void *opaque, target_phys_addr_t addr, >>unsigned

[Qemu-devel] [PATCH V2] GRLIB UART: Add RX channel

2012-01-26 Thread Fabien Chouteau
This patch implements the RX channel of GRLIB UART with a FIFO to improve data rate. Signed-off-by: Fabien Chouteau --- hw/grlib_apbuart.c | 106 +++ trace-events |1 + 2 files changed, 90 insertions(+), 17 deletions(-) diff --git a/hw/

  1   2   3   >