Re: [Qemu-devel] [PATCH] CODING_STYLE: explicitly allow braceless 'else if'

2011-07-26 Thread Stefan Hajnoczi
On Mon, Jul 25, 2011 at 6:00 PM, Blue Swirl blauwir...@gmail.com wrote: On Mon, Jul 25, 2011 at 6:55 PM, Avi Kivity a...@redhat.com wrote: It's already allowed by the example; there are about 1800 instances in the tree; and disallowing it would lead to    if (a) {        ...    } else {    

Re: [Qemu-devel] idea: non-ethernet paravirtual network device

2011-07-26 Thread Stefan Hajnoczi
On Mon, Jul 25, 2011 at 4:53 PM, Sassan Panahinejad sas...@sassan.me.uk wrote: Here's a thought, could we improve network performance by creating a paravirtual network device which doesn't emulate ethernet? It shouldn't be too hard to just whack IP packets pretty much directly over a virtio

Re: [Qemu-devel] [PATCH 5/6] scsi-disk: Remove 'drive_kind'

2011-07-26 Thread Hannes Reinecke
On 07/25/2011 05:59 PM, Markus Armbruster wrote: Hannes Reineckeh...@suse.de writes: Instead of using its own definitions scsi-disk should be using the device type of the parent device. Signed-off-by: Hannes Reineckeh...@suse.de --- hw/scsi-defs.h |6 +- hw/scsi-disk.c | 48

Re: [Qemu-devel] [PATCH 5/6] scsi-disk: Remove 'drive_kind'

2011-07-26 Thread Markus Armbruster
Hannes Reinecke h...@suse.de writes: On 07/25/2011 05:59 PM, Markus Armbruster wrote: Hannes Reineckeh...@suse.de writes: Instead of using its own definitions scsi-disk should be using the device type of the parent device. Signed-off-by: Hannes Reineckeh...@suse.de --- hw/scsi-defs.h

Re: [Qemu-devel] [PATCH 5/6] scsi-disk: Remove 'drive_kind'

2011-07-26 Thread Hannes Reinecke
On 07/26/2011 08:38 AM, Markus Armbruster wrote: Hannes Reineckeh...@suse.de writes: On 07/25/2011 05:59 PM, Markus Armbruster wrote: Hannes Reineckeh...@suse.de writes: Instead of using its own definitions scsi-disk should be using the device type of the parent device. Signed-off-by:

Re: [Qemu-devel] [PATCH 1/2] Makefile: distclean should clean all possible targets

2011-07-26 Thread Markus Armbruster
Alexandre Raymond cerb...@gmail.com writes: At the moment, make distclean relies on the TARGET_DIRS variable, set by configure. The problem is that this variable does not always contain all possible targets. For example, the following will leave build data in the tree: ./configure make

Re: [Qemu-devel] [PULL] libcacard AFE support and bug fixes

2011-07-26 Thread Alon Levy
On Fri, Jul 22, 2011 at 06:08:40PM +0300, Alon Levy wrote: Hi, Hi Anthony, Forgot to mention I would like this to be pulled for 0.15.0. Alon Please pull fixes for AFE smart cards, cleanup and missing frees by Robert Relyea and Christophe Fergeau. Thanks. The following changes since

[Qemu-devel] Professional Web Design and Web Development Agency

2011-07-26 Thread Deepak
Hi, As many as 90% websites do not deliver business to their potential because they do not appeal to the target audience. And the reason most visitors leave a website is because of a poor design and navigation. So is your website really customer-ready? Not really, if we go by the

Re: [Qemu-devel] [PULL] libcacard AFE support and bug fixes

2011-07-26 Thread Alon Levy
On Tue, Jul 26, 2011 at 10:02:52AM +0300, Alon Levy wrote: On Fri, Jul 22, 2011 at 06:08:40PM +0300, Alon Levy wrote: Hi, Hi Anthony, Forgot to mention I would like this to be pulled for 0.15.0. Alon Also, I've added a revised patch for libcacard.pc. The original is

Re: [Qemu-devel] [RFC v5 86/86] 440fx: fix PAM, PCI holes

2011-07-26 Thread Avi Kivity
On 07/26/2011 12:34 AM, Eric Northup wrote: On Wed, Jul 20, 2011 at 9:50 AM, Avi Kivitya...@redhat.com wrote: [...] @@ -130,7 +137,13 @@ static void pc_init1(MemoryRegion *system_memory, if (pci_enabled) { pci_bus = i440fx_init(i440fx_state,piix3_devfn, isa_irq, -

[Qemu-devel] [PATCH v7] showing a splash picture when start

2011-07-26 Thread Wayne Xia
From: wayne xiawenc@Wayne-Libvirt-cim-VM.(none) Added options to let qemu transfer two configuration files to bios: bootsplash.bmp and etc/boot-menu-wait, which could be specified by command -boot splash=P,splash-time=T P is jpg/bmp file name or an absolute path, T have a max value of

Re: [Qemu-devel] qemu crashes on Mac OS X

2011-07-26 Thread Paolo Bonzini
On 07/26/2011 06:58 AM, Alexandre Raymond wrote: +#ifdef __APPLE__ +if (sig == 0) continue; +#endif From looking at the code this should not happen: http://fxr.watson.org/fxr/source/bsd/kern/kern_sig.c?v=xnu-792#L986 1046 sigw = (ut-uu_sigwait siglist); ... 1053

Re: [Qemu-devel] [PATCH 1/1] block/vpc.c: Detect too-large vpc file

2011-07-26 Thread Kevin Wolf
Am 25.07.2011 20:34, schrieb Serge E. Hallyn: VHD files technically can be up to 2Tb, but virtual pc is limited to 127G. Currently qemu-img refused to create vpc files 127G, but it is failing to return error when converting from a non-vpc VHD file which is 127G. It returns success, but

[Qemu-devel] [PATCH 0/1] The intro for QEMU disk I/O limits

2011-07-26 Thread Zhi Yong Wu
The main goal of the patch is to effectively cap the disk I/O speed or counts of one single VM.It is only one draft, so it unavoidably has some drawbacks, if you catch them, please let me know. The patch will mainly introduce one block I/O throttling algorithm, one global timer and one block

[Qemu-devel] [PATCH 1/1] The codes V2 for QEMU disk I/O limits.

2011-07-26 Thread Zhi Yong Wu
Welcome to give me your comments, thanks. Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- Makefile.objs |2 +- block.c | 288 +++-- block.h |1 - block/blk-queue.c | 116 +

[Qemu-devel] [PATCH v2 1/1] The codes V2 for QEMU disk I/O limits.

2011-07-26 Thread Zhi Yong Wu
Welcome to give me your comments, thanks. Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- Makefile.objs |2 +- block.c | 288 +++-- block.h |1 - block/blk-queue.c | 116 +

[Qemu-devel] [PATCH v2 0/1] The intro for QEMU disk I/O limits

2011-07-26 Thread Zhi Yong Wu
The main goal of the patch is to effectively cap the disk I/O speed or counts of one single VM.It is only one draft, so it unavoidably has some drawbacks, if you catch them, please let me know. The patch will mainly introduce one block I/O throttling algorithm, one global timer and one block

[Qemu-devel] Join my network on LinkedIn

2011-07-26 Thread Gioacchino Mendola via LinkedIn
LinkedIn Gioacchino Mendola requested to add you as a connection on LinkedIn: -- I'd like to add you to my professional network on LinkedIn. Accept invitation from Gioacchino Mendola

[Qemu-devel] [PULL 0/7] virtio-balloon: cleanups, fix segfault from use-after-free

2011-07-26 Thread Amit Shah
Hello, This same as the last week's patchset, with Markus's analysis included in 5/7's commit log. I think this should go to 0.15 as well. This series cleans up the virtio-balloon driver and fixes a use-after-free segfault when 'balloon 0' is issued in the monitor. The following changes since

[Qemu-devel] [PATCH 1/7] balloon: Make functions, local vars static

2011-07-26 Thread Amit Shah
balloon.h had function declarations for a couple of functions that are local to balloon.c. Make them static. Drop the 'qemu_' prefix for balloon.c-local variables, and make them static. Signed-off-by: Amit Shah amit.s...@redhat.com Reviewed-by: Markus Armbruster arm...@redhat.com --- balloon.c

[Qemu-devel] [PATCH 2/7] balloon: Add braces around if statements

2011-07-26 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com Reviewed-by: Markus Armbruster arm...@redhat.com --- balloon.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/balloon.c b/balloon.c index f9bcf07..86f629e 100644 --- a/balloon.c +++ b/balloon.c @@ -65,9 +65,10 @@ static

[Qemu-devel] [PATCH 7/7] virtio-balloon: Fix header comment; add Copyright

2011-07-26 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-balloon.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 40b43b0..2ba7e95 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -1,7 +1,9 @@ /* - *

[Qemu-devel] [PATCH 3/7] balloon: Simplify code flow

2011-07-26 Thread Amit Shah
Replace: if (foo) { ... } else { return 0; } by if (!foo) { return 0; } ... Signed-off-by: Amit Shah amit.s...@redhat.com Reviewed-by: Markus Armbruster arm...@redhat.com --- balloon.c | 16 +++- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git

[Qemu-devel] [PATCH 4/7] virtio-balloon: Separate status handling into separate function

2011-07-26 Thread Amit Shah
Separate out the code to retrieve balloon info from the code that sets balloon values. This will be used to separate the two callbacks from balloon.c and help cope with 'balloon 0' on the monitor. Currently, 'balloon 0' causes a segfault in monitor_resume(). Signed-off-by: Amit Shah

[Qemu-devel] [PATCH v8 1/5] coroutine: add gthread dependency

2011-07-26 Thread Stefan Hajnoczi
Commit 1fc7bd4a86a2bfeafcec29445871eb97469a2699 removed the gthread and gio dependency since qemu-ga did not require it. Coroutines require gthread, so add it back in. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- configure |6 +++--- 1 files changed, 3 insertions(+), 3

[Qemu-devel] [PATCH v8 0/5] Coroutines for better asynchronous programming

2011-07-26 Thread Stefan Hajnoczi
QEMU is event-driven and suffers when blocking operations are performed because VM execution may be stopped until the operation completes. Therefore many operations that could block are performed asynchronously and a callback is invoked when the operation has completed. This allows QEMU to

[Qemu-devel] [PATCH v8 5/5] coroutine: add test-coroutine --benchmark-lifecycle

2011-07-26 Thread Stefan Hajnoczi
Add a microbenchmark for coroutine create, enter, and return (aka lifecycle). This is a useful benchmark because users are expected to create many coroutines, one per I/O request for example, and we therefore need to provide good performance in that scenario. To run: make test-coroutine

[Qemu-devel] [PATCH v8 3/5] coroutine: add ucontext and win32 implementations

2011-07-26 Thread Stefan Hajnoczi
From: Kevin Wolf kw...@redhat.com This coroutines implementation is based on the gtk-vnc implementation written by Anthony Liguori anth...@codemonkey.ws but it has been significantly rewritten by Kevin Wolf kw...@redhat.com to use setjmp()/longjmp() instead of the more expensive swapcontext() and

Re: [Qemu-devel] [PATCH v8 0/5] Coroutines for better asynchronous programming

2011-07-26 Thread Stefan Hajnoczi
On Tue, Jul 26, 2011 at 10:21 AM, Stefan Hajnoczi stefa...@linux.vnet.ibm.com wrote: QEMU is event-driven and suffers when blocking operations are performed because VM execution may be stopped until the operation completes.  Therefore many operations that could block are performed

[Qemu-devel] [PATCH v8 4/5] coroutine: add test-coroutine automated tests

2011-07-26 Thread Stefan Hajnoczi
To run automated tests for coroutines: make test-coroutine ./test-coroutine On success the program terminates with exit status 0. On failure an error message is written to stderr and the program exits with exit status 1. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com ---

[Qemu-devel] [PATCH] configure: add --disable-zlib-test

2011-07-26 Thread Alon Levy
This is required for building libcacard which doesn't itself require zlib without bringing in this requirement to the build environment. Signed-off-by: Alon Levy al...@redhat.com --- I'd like this to go into 0.15.0 too, it makes building libcacard possible without zlib-devel being installed. ---

[Qemu-devel] mips-linux-user and POSIX IPC

2011-07-26 Thread Holger Freyther
Hi All, I have no idea about the MIPS ABI (or which one I am actually using). I try to run Qt/Embedded using the linux-user target and have some issues with the code. For semctl qemu enters through the do_ipc method, it appears to be that the 'variable' ptr is really a ptr (to the stack) and

[Qemu-devel] [PATCH 5/7] balloon: Separate out stat and balloon handling

2011-07-26 Thread Amit Shah
Passing on '0' as ballooning target to indicate retrieval of stats is bad API. It also makes 'balloon 0' in the monitor cause a segfault. Have two different functions handle the different functionality instead. Detailed explanation from Markus's review: 1. do_info_balloon() is an info_async()

Re: [Qemu-devel] [RFC PATCH 0/4] Fix subsection ambiguity in the migration format

2011-07-26 Thread Daniel P. Berrange
On Mon, Jul 25, 2011 at 06:23:17PM -0500, Anthony Liguori wrote: We also need a way to future proof ourselves. == What we can do == 1) Add migration capabilities to future proof ourselves. I think the simplest way this would work is to have a 'query-migration-capabilities' command that

[Qemu-devel] [PATCH v8 2/5] coroutine: introduce coroutines API

2011-07-26 Thread Stefan Hajnoczi
Asynchronous code is becoming very complex. At the same time synchronous code is growing because it is convenient to write. Sometimes duplicate code paths are even added, one synchronous and the other asynchronous. This patch introduces coroutines which allow code that looks synchronous but is

Re: [Qemu-devel] [RFC PATCH 0/4] Fix subsection ambiguity in the migration format

2011-07-26 Thread Stefan Hajnoczi
On Mon, Jul 25, 2011 at 06:23:17PM -0500, Anthony Liguori wrote: On 07/25/2011 04:10 PM, Paolo Bonzini wrote: On Thu, Jun 30, 2011 at 17:46, Paolo Bonzinipbonz...@redhat.com wrote: With the current migration format, VMS_STRUCTs with subsections are ambiguous. The protocol cannot tell whether

Re: [Qemu-devel] [PATCH v7 2/4] coroutine: implement coroutines using gthread

2011-07-26 Thread Stefan Hajnoczi
On Mon, Jul 25, 2011 at 9:38 PM, Anthony Liguori anth...@codemonkey.ws wrote: On 07/25/2011 03:04 PM, Stefan Hajnoczi wrote: From: Aneesh Kumar K.Vaneesh.ku...@linux.vnet.ibm.com On platforms that don't support makecontext(3) use gthread based coroutine implementation. Darwin has

Re: [Qemu-devel] [PATCH 03/23] memory: merge adjacent segments of a single memory region

2011-07-26 Thread Avi Kivity
On 07/25/2011 09:48 PM, Anthony Liguori wrote: +/* Attempt to simplify a view by merging ajacent ranges */ +static void flatview_simplify(FlatView *view) +{ +unsigned i; +FlatRange *r1, *r2; + +for (i = 0; i + 1 view-nr; ++i) { +r1 =view-ranges[i]; +r2

[Qemu-devel] [PATCH 6/7] balloon: Fix header comment; add Copyright

2011-07-26 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com --- balloon.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/balloon.c b/balloon.c index 8be3812..a938475 100644 --- a/balloon.c +++ b/balloon.c @@ -1,7 +1,9 @@ /* - * QEMU System Emulator + * Generic Balloon handlers

Re: [Qemu-devel] [PATCH 06/23] memory: rename MemoryRegion::has_ram_addr to ::terminates

2011-07-26 Thread Avi Kivity
On 07/25/2011 09:56 PM, Anthony Liguori wrote: On 07/25/2011 09:02 AM, Avi Kivity wrote: I/O regions will not have ram_addrs, so this is a better name. Signed-off-by: Avi Kivitya...@redhat.com Reviewed-by: Anthony Liguori aligu...@us.ibm.com Although it seems squashable. Yeah, I'm loath

Re: [Qemu-devel] [PATCH 11/23] memory: add ioeventfd support

2011-07-26 Thread Avi Kivity
On 07/25/2011 10:08 PM, Anthony Liguori wrote: +static void as_memory_ioeventfd_add(AddressSpace *as, MemoryRegionIoeventfd *fd) +{ +int r; + +if (!fd-match_data || fd-addr.size != 4) { +abort(); +} + +r = kvm_set_ioeventfd_mmio_long(fd-fd, fd-addr.start, fd-data,

Re: [Qemu-devel] [PATCH 0/3] Add PL111, implement PL110 BGR mode

2011-07-26 Thread Peter Maydell
On 22 July 2011 16:59, Peter Maydell peter.mayd...@linaro.org wrote: This patch series improves the emulation of the PL11x CLCD controllers used by the various ARM dev boards. versatilepb has a PL110 but it also has an external mux controlled by a system register which allows the OS to select

Re: [Qemu-devel] External COW format for raw images

2011-07-26 Thread Stefan Hajnoczi
On Wed, Jul 20, 2011 at 4:57 PM, Marcelo Tosatti mtosa...@redhat.com wrote: On Wed, Jul 20, 2011 at 09:35:05AM +0100, Stefan Hajnoczi wrote: 2011/7/19 Anthony Liguori anth...@codemonkey.ws: On 07/19/2011 04:25 AM, Robert Wang wrote: As you known, raw image is very popular,but the raw image

Re: [Qemu-devel] idea: non-ethernet paravirtual network device

2011-07-26 Thread Hannes Reinecke
On 07/26/2011 08:04 AM, Stefan Hajnoczi wrote: On Mon, Jul 25, 2011 at 4:53 PM, Sassan Panahinejadsas...@sassan.me.uk wrote: Here's a thought, could we improve network performance by creating a paravirtual network device which doesn't emulate ethernet? It shouldn't be too hard to just whack IP

Re: [Qemu-devel] [PATCH 12/23] memory: separate building the final memory map into two steps

2011-07-26 Thread Avi Kivity
On 07/25/2011 10:12 PM, Anthony Liguori wrote: On 07/25/2011 09:02 AM, Avi Kivity wrote: Instead of adding and deleting regions in one pass, do a delete pass followed by an add pass. This fixes the following case: from: 0x-0x0fff ram (a1) 0x1000-0x1fff mmio (a2) 0x2000-0x2fff

Re: [Qemu-devel] [PATCH 13/23] memory: document the memory API

2011-07-26 Thread Avi Kivity
On 07/25/2011 10:15 PM, Anthony Liguori wrote: +Region names + + +Regions are assigned names by the constructor. For most regions these are +only used for debugging purposes, but RAM regions also use the name to identify +live migration sections. This means that RAM region names

Re: [Qemu-devel] [PATCH 14/23] memory: transaction API

2011-07-26 Thread Avi Kivity
On 07/25/2011 10:16 PM, Anthony Liguori wrote: On 07/25/2011 09:02 AM, Avi Kivity wrote: Allow changes to the memory hierarchy to be accumulated and made visible all at once. This reduces computational effort, especially when an accelerator (e.g. kvm) is involved. Useful when a single

Re: [Qemu-devel] [PATCH 15/23] exec.c: initialize memory map

2011-07-26 Thread Avi Kivity
On 07/25/2011 10:17 PM, Anthony Liguori wrote: +static void memory_map_init(void) +{ +system_memory = qemu_malloc(sizeof(*system_memory)); +memory_region_init(system_memory, system, UINT64_MAX); Would be nice to #define MEM_REG_SIZE_ALL UINT64_MAX Without reading the docs, it seems

Re: [Qemu-devel] [PATCH 16/23] ioport: register ranges by byte aligned addresses always

2011-07-26 Thread Avi Kivity
On 07/25/2011 10:20 PM, Anthony Liguori wrote: On 07/25/2011 09:02 AM, Avi Kivity wrote: The I/O port space is byte addressable, even for word and long accesses. An example is the VMware svga card, which has long ports on offsets 0, 1, and 2. Signed-off-by: Avi Kivitya...@redhat.com I've

Re: [Qemu-devel] [PATCH 19/23] pc: move global memory map out of pc_init1() and into its callers

2011-07-26 Thread Avi Kivity
On 07/25/2011 11:02 PM, Anthony Liguori wrote: On 07/25/2011 09:03 AM, Avi Kivity wrote: Signed-off-by: Avi Kivitya...@redhat.com What's the rationale here? Removing globals and making dependencies explicit. -- error compiling committee.c: too many arguments to function

Re: [Qemu-devel] [PATCH 21/23] pci: add MemoryRegion based BAR management API

2011-07-26 Thread Avi Kivity
On 07/25/2011 11:20 PM, Anthony Liguori wrote: On 07/25/2011 09:03 AM, Avi Kivity wrote: Allow registering a BAR using a MemoryRegion. Once all users are converted, pci_register_bar() and pci_register_bar_simple() will be removed. Signed-off-by: Avi Kivitya...@redhat.com diff --git

Re: [Qemu-devel] KVM call agenda for July 26

2011-07-26 Thread Stefan Hajnoczi
On Tue, Jul 26, 2011 at 12:30 AM, Juan Quintela quint...@redhat.com wrote: Please send in any agenda items you are interested in covering. 0.15.0 release candidate testing * http://wiki.qemu.org/Planning/0.15/Testing * Please test hosts, targets, subsystems, or features you care about! * May

Re: [Qemu-devel] [RFC PATCH 2/2] separate thread for VM migration

2011-07-26 Thread Paolo Bonzini
On 07/22/2011 09:58 PM, Umesh Deshapnde wrote: -qemu_mod_timer(s-timer, qemu_get_clock_ms(rt_clock) + 100); +qemu_mod_timer(s-timer, qemu_get_clock_ms(migration_clock) + 100); if (s-freeze_output) return; @@ -246,8 +246,10 @@ static void buffered_rate_tick(void *opaque)

[Qemu-devel] [PATCH v2 04/23] memory: merge adjacent segments of a single memory region

2011-07-26 Thread Avi Kivity
Simple implementations of memory routers, for example the Cirrus VGA memory banks or the 440FX PAM registers can generate adjacent memory regions which are contiguous. Detect these and merge them; this saves kvm memory slots and shortens lookup times. Signed-off-by: Avi Kivity a...@redhat.com

Re: [Qemu-devel] [PATCH 00/23] Memory API, batch 1

2011-07-26 Thread Avi Kivity
On 07/25/2011 11:23 PM, Anthony Liguori wrote: Very nice series. Despite my lack of exciting over ioeventfd and coalescing, if you fix the few minor comments, this should be a no brainer to merge. Thanks; v2 posted. Note that this patchset has a logical dependency on my [PATCH]

[Qemu-devel] [Bug 816370] [NEW] compile error in QEMU 0.15.0-rc0

2011-07-26 Thread rowa
Public bug reported: I've tryed to compile QEMU 0.15.0-rc0 on Ubuntu 10.10 „Maverick Meerkat“ but I get an error (For further details please see http://qemu- buch.de/d/Installation#Quellen_kompilieren ). ./configure --prefix=/usr --enable-spice

Re: [Qemu-devel] [PATCH v2 04/23] memory: merge adjacent segments of a single memory region

2011-07-26 Thread Paolo Bonzini
On 07/26/2011 01:26 PM, Avi Kivity wrote: +while (i view-nr) { +j = i + 1; +while (j view-nr +can_merge(view-ranges[j-1], view-ranges[j])) { +view-ranges[i].addr.size += view-ranges[j].addr.size; +++j; +} +++i; if (j

Re: [Qemu-devel] [PATCH v2 04/23] memory: merge adjacent segments of a single memory region

2011-07-26 Thread Avi Kivity
On 07/26/2011 02:36 PM, Paolo Bonzini wrote: On 07/26/2011 01:26 PM, Avi Kivity wrote: +while (i view-nr) { +j = i + 1; +while (j view-nr + can_merge(view-ranges[j-1], view-ranges[j])) { +view-ranges[i].addr.size += view-ranges[j].addr.size; +++j;

Re: [Qemu-devel] [PATCH 14/23] memory: transaction API

2011-07-26 Thread Avi Kivity
On 07/26/2011 01:48 PM, Avi Kivity wrote: On 07/25/2011 10:16 PM, Anthony Liguori wrote: On 07/25/2011 09:02 AM, Avi Kivity wrote: Allow changes to the memory hierarchy to be accumulated and made visible all at once. This reduces computational effort, especially when an accelerator (e.g. kvm)

[Qemu-devel] [PATCH v2 15/23] exec.c: initialize memory map

2011-07-26 Thread Avi Kivity
Allocate the root memory region and initialize it. Signed-off-by: Avi Kivity a...@redhat.com --- exec.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index 2160ded..d51502f 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,8 @@ #include

[Qemu-devel] [PATCH 00/10] block: Coroutine support

2011-07-26 Thread Kevin Wolf
Depends on Stefan's latest coroutine patches. This series makes qcow and qcow2 take advantage of the new coroutine infrastructure. Both formats used synchronous operations for accessing their metadata and blocked the guest CPU during that time. With coroutines, the I/O will happen asynchronously

[Qemu-devel] [PATCH 02/10] block: Emulate AIO functions with bdrv_co_readv/writev

2011-07-26 Thread Kevin Wolf
Use the bdrv_co_readv/writev callbacks to implement bdrv_aio_readv/writev and bdrv_read/write if a driver provides the coroutine version instead of the synchronous or AIO version. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 98

[Qemu-devel] [PATCH 08/10] coroutines: Use one global bottom half for CoQueue

2011-07-26 Thread Kevin Wolf
Now that AsyncContexts don't exist any more, we can use one global bottom half for restarting coroutines instead of allocating a new one every time (before removing AsyncContexts, the problem with having a global BH was that it had to belong to a single AsyncContexts and wouldn't be executed in a

[Qemu-devel] [PATCH 07/10] async: Remove AsyncContext

2011-07-26 Thread Kevin Wolf
The purpose of AsyncContexts was to protect qcow and qcow2 against reentrancy during an emulated bdrv_read/write (which includes a qemu_aio_wait() call and can run AIO callbacks of different requests if it weren't for AsyncContexts). Now both qcow and qcow2 are protected by CoMutexes and

[Qemu-devel] [PATCH 01/10] block: Add bdrv_co_readv/writev

2011-07-26 Thread Kevin Wolf
Add new block driver callbacks bdrv_co_readv/writev, which work on a QEMUIOVector like bdrv_aio_*, but don't need a callback. The function may only be called inside a coroutine, so a block driver implementing this interface can yield instead of blocking during I/O. Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [PATCH v2 04/23] memory: merge adjacent segments of a single memory region

2011-07-26 Thread Paolo Bonzini
On 07/26/2011 01:38 PM, Avi Kivity wrote: if (j != i) { +memmove(view-ranges[i], view-ranges[j], +(view-nr - j) * sizeof(view-ranges[j])); +view-nr -= j - i; +} } Seems to work both ways? Sure, but you're pointlessly memmove-ing memory over itself.

[Qemu-devel] [PATCH v2 14/23] memory: transaction API

2011-07-26 Thread Avi Kivity
Allow changes to the memory hierarchy to be accumulated and made visible all at once. This reduces computational effort, especially when an accelerator (e.g. kvm) is involved. Useful when a single register update causes multiple changes to an address space. Signed-off-by: Avi Kivity

[Qemu-devel] [PATCH v2 02/23] Hierarchical memory region API

2011-07-26 Thread Avi Kivity
The memory API separates the attributes of a memory region (its size, how reads or writes are handled, dirty logging, and coalescing) from where it is mapped and whether it is enabled. This allows a device to configure a memory region once, then hand it off to its parent bus to map it according

Re: [Qemu-devel] [PATCH 12/55] ide: Fix ATA command READ to set ATAPI signature for CD-ROM

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:23:46PM +0200, Markus Armbruster wrote: Must set the ATAPI device signature, see ACS-2 7.36.6 Outputs for PACKET feature set devices. Odd but true, even if it's 7.38.2 in my local copy of the ACS spec. It defintively should be documented in a comment next to the

Re: [Qemu-devel] [PATCH 13/55] ide: Use a table to declare which drive kinds accept each command

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:23:47PM +0200, Markus Armbruster wrote: No functional change. It would be nice to have handler functions in the table, like commit e1a064f9 did for ATAPI. Left for another day. Looks good, Reviewed-by: Christoph Hellwig h...@lst.de

Re: [Qemu-devel] [PATCH 14/55] ide: Reject ATA commands specific to drive kinds

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:23:48PM +0200, Markus Armbruster wrote: ACS-2 Table B.2 explicitly prohibits ATAPI devices from implementing WIN_RECAL, WIN_READ_EXT, WIN_READDMA_EXT, WIN_READ_NATIVE_MAX, WIN_MULTREAD_EXT, WIN_WRITE, WIN_WRITE_ONCE, WIN_WRITE_EXT, WIN_WRITEDMA_EXT,

Re: [Qemu-devel] [PATCH 15/55] ide/atapi: Clean up misleading name in cmd_start_stop_unit()

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:23:49PM +0200, Markus Armbruster wrote: eject is misleading; it means eject when start is clear, but load when start is set. Rename to loej, because that's how MMC-5 calls it, in section 6.40. Just as clear as the bdrv_eject name :) Looks fine anyway, Reviewed-by:

Re: [Qemu-devel] [PATCH 0/3] Add PL111, implement PL110 BGR mode

2011-07-26 Thread Francis Moreau
On Tue, Jul 26, 2011 at 12:12 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 22 July 2011 16:59, Peter Maydell peter.mayd...@linaro.org wrote: This patch series improves the emulation of the PL11x CLCD controllers used by the various ARM dev boards. versatilepb has a PL110 but it also

Re: [Qemu-devel] [PATCH 16/55] ide/atapi: Track tray open/close state

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:23:50PM +0200, Markus Armbruster wrote: We already track it in BlockDriverState since commit 4be9762a. As discussed in that commit's message, we should track it in the device device models instead, because it's device state. Looks good, Reviewed-by: Christoph

Re: [Qemu-devel] [PATCH 17/55] ide/atapi: Switch from BlockDriverState's tray_open to own

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:23:51PM +0200, Markus Armbruster wrote: Signed-off-by: Markus Armbruster arm...@redhat.com Looks good, although I would have folded this patch into the previous one. Reviewed-by: Christoph Hellwig h...@lst.de

[Qemu-devel] [PATCH 03/10] block: Add bdrv_co_readv/writev emulation

2011-07-26 Thread Kevin Wolf
In order to be able to call bdrv_co_readv/writev for drivers that don't implement the functions natively, add an emulation that uses the AIO functions to implement them. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 84 -

[Qemu-devel] [PATCH v2 10/23] memory: add backward compatibility for old portio registration

2011-07-26 Thread Avi Kivity
Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- memory.c | 32 memory.h | 17 + 2 files changed, 49 insertions(+), 0 deletions(-) diff --git a/memory.c b/memory.c index df0ed0e..5f2c9ef 100644 ---

Re: [Qemu-devel] [PATCH 18/55] scsi-disk: Reject CD-specific SCSI commands to disks

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:23:52PM +0200, Markus Armbruster wrote: Use a table to declare which drive kinds accept each command. Limit READ_CAPACITY, READ_TOC, GET_CONFIGURATION to SCSI_CD, as per SPC-4. READ CAPACITY is defined in SBC, and absolutely required for proper operation with

Re: [Qemu-devel] [PATCH 19/55] scsi-disk: Factor out scsi_disk_emulate_start_stop()

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:23:53PM +0200, Markus Armbruster wrote: Signed-off-by: Markus Armbruster arm...@redhat.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de

Re: [Qemu-devel] [PATCH 20/55] scsi-disk: Track tray open/close state

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:23:54PM +0200, Markus Armbruster wrote: We already track it in BlockDriverState since commit 4be9762a. As discussed in that commit's message, we should track it in the device device models instead, because it's device state. Looks good, Reviewed-by: Christoph

[Qemu-devel] [PATCH v2 08/23] memory: late initialization of ram_addr

2011-07-26 Thread Avi Kivity
For non-RAM memory regions, we cannot tell whether this is an I/O region or an MMIO region. Since the qemu backing registration is different for the two, we have to defer initialization until we know which address space we are in. These shenanigans will be removed once the backing registration

Re: [Qemu-devel] [PATCH v2 04/23] memory: merge adjacent segments of a single memory region

2011-07-26 Thread Avi Kivity
On 07/26/2011 02:51 PM, Paolo Bonzini wrote: On 07/26/2011 01:38 PM, Avi Kivity wrote: if (j != i) { +memmove(view-ranges[i], view-ranges[j], +(view-nr - j) * sizeof(view-ranges[j])); +view-nr -= j - i; +} } Seems to work both ways? Sure, but you're

[Qemu-devel] [PATCH v2 22/23] sysbus: add MemoryRegion based memory management API

2011-07-26 Thread Avi Kivity
Allow registering sysbus device memory using a MemoryRegion. Once all users are converted, sysbus_init_mmio() and sysbus_init_mmio_cb() will be removed. Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/sysbus.c | 27 ---

[Qemu-devel] [PATCH v2 18/23] pc: convert pc_memory_init() to memory API

2011-07-26 Thread Avi Kivity
Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/pc.c | 59 --- hw/pc.h |1 + 2 files changed, 41 insertions(+), 19 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 369566a..1c9d89a

Re: [Qemu-devel] [RFC PATCH 0/4] Fix subsection ambiguity in the migration format

2011-07-26 Thread Juan Quintela
Anthony Liguori anth...@codemonkey.ws wrote: On 07/25/2011 04:10 PM, Paolo Bonzini wrote: == Today == Today we only support generating the latest serialization of devices. To increase the probability of the latest version working on older versions of QEMU, we strategically omit fields that

Re: [Qemu-devel] [PATCH 21/55] block: Revert entanglement of bdrv_is_inserted() with tray status

2011-07-26 Thread Christoph Hellwig
@@ -1066,20 +1066,21 @@ static const struct { [ 0x03 ] = { cmd_request_sense, ALLOW_UA }, [ 0x12 ] = { cmd_inquiry, ALLOW_UA }, [ 0x1a ] = { cmd_mode_sense, /* (6) */ 0 }, -[ 0x1b ] = { cmd_start_stop_unit, 0 },

Re: [Qemu-devel] [PATCH 22/55] block: Drop tray status tracking, no longer used

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:23:56PM +0200, Markus Armbruster wrote: Commit 4be9762a is now completely redone. Signed-off-by: Markus Armbruster arm...@redhat.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de

Re: [Qemu-devel] [PATCH 24/55] ide/atapi: Track tray locked state

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:23:58PM +0200, Markus Armbruster wrote: We already track it in BlockDriverState. Just like tray open/close state, we should track it in the device models instead, because it's device state. Signed-off-by: Markus Armbruster arm...@redhat.com Looks good,

Re: [Qemu-devel] [PATCH 25/55] ide/atapi: Switch from BlockDriverState's locked to own tray_locked

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:23:59PM +0200, Markus Armbruster wrote: Signed-off-by: Markus Armbruster arm...@redhat.com --- hw/ide/atapi.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Looks good, Reviewed-by: Christoph Hellwig h...@lst.de

Re: [Qemu-devel] [PATCH 26/55] scsi-disk: Track tray locked state

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:24:00PM +0200, Markus Armbruster wrote: We already track it in BlockDriverState. Just like tray open/close state, we should track it in the device models instead, because it's device state. Signed-off-by: Markus Armbruster arm...@redhat.com Looks good,

Re: [Qemu-devel] [PATCH 27/55] scsi-disk: Switch from BlockDriverState's locked to own tray_locked

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:24:01PM +0200, Markus Armbruster wrote: Signed-off-by: Markus Armbruster arm...@redhat.com Looks good, although I would have merged it into the previous one. Reviewed-by: Christoph Hellwig h...@lst.de

Re: [Qemu-devel] [PATCH 31/55] ide: Provide IDEDeviceInfo method exit()

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:24:05PM +0200, Markus Armbruster wrote: Signed-off-by: Markus Armbruster arm...@redhat.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de

Re: [Qemu-devel] [PATCH 32/55] ide/atapi: Don't fail eject when tray is already open

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:24:06PM +0200, Markus Armbruster wrote: MMC-5 6.40.2.6 specifies that START STOP UNIT succeeds when the drive already has the requested state. cmd_start_stop_unit() fails when asked to eject while the tray is open and locked. Fix that. Signed-off-by: Markus

Re: [Qemu-devel] [PATCH 33/55] ide/atapi: Avoid physical/virtual tray state mismatch

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:24:07PM +0200, Markus Armbruster wrote: When ide-cd is backed by a physical drive, we want the physical tray match the virtual one. To that end, we call bdrv_eject() on guest's load/eject, and bdrv_lock_medium() on guest's prevent/allow removal. But we don't set the

[Qemu-devel] [PATCH v2 17/23] pc: grab system_memory

2011-07-26 Thread Avi Kivity
While eventually this should come from the machine initialization function, take a short cut to avoid converting all machines now. Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/pc.c |3 ++- hw/pc.h |4 +++- hw/pc_piix.c |8

Re: [Qemu-devel] [PATCH 34/55] scsi-disk: Fix START_STOP to fail when it can't eject

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:24:08PM +0200, Markus Armbruster wrote: Don't fail when tray is already open. Signed-off-by: Markus Armbruster arm...@redhat.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de

Re: [Qemu-devel] [PATCH 35/55] scsi-disk: Avoid physical/virtual tray state mismatch

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:24:09PM +0200, Markus Armbruster wrote: When scsi-cd is backed by a physical drive, we want the physical tray match the virtual one. To that end, we call bdrv_eject() on guest's load/eject, and bdrv_lock_medium() on guest's prevent/allow removal. But we don't set

Re: [Qemu-devel] [PATCH 39/55] block/raw: Fix to forward method bdrv_media_changed()

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:24:13PM +0200, Markus Armbruster wrote: Block driver raw forwards most methods to the underlying block driver. However, it doesn't implement method bdrv_media_changed(). Makes bdrv_media_changed() always return -ENOTSUP. I believe -fda /dev/fd0 gives you raw over

Re: [Qemu-devel] [PATCH 40/55] block: Leave tracking media change to device models

2011-07-26 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:24:14PM +0200, Markus Armbruster wrote: hw/fdc.c is the only one that cares. Signed-off-by: Markus Armbruster arm...@redhat.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de

Re: [Qemu-devel] [PATCH 42/55] block: Clean up bdrv_flush_all()

2011-07-26 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig h...@lst.de

  1   2   3   >