[Qemu-devel] [PATCH] pseries: Refactor spapr irq allocation

2011-09-16 Thread David Gibson
Paulo Bonzini changed the original spapr code, which manually assigned irq numbers for each virtual device, to allocate them automatically from the device initialization. That allowed spapr virtual devices to be constructed with -device, which is a good start. However, the way that patch worked do

Re: [Qemu-devel] [PATCH RFC] main loop: fix some accesses made in sighandler context

2011-09-16 Thread Laszlo Ersek
On 09/15/11 21:44, Peter Maydell wrote: On 15 September 2011 18:22, Laszlo Ersek wrote: -int no_shutdown = 0; +volatile int no_shutdown = 0; So why 'volatile' and not 'sig_atomic_t', then? The sigaction() spec says"volatile sig_atomic_t", so that would be ideal. My assumption was that "si

Re: [Qemu-devel] [0/9] Preliminary work for IOMMU emulation support; the easy bits (v2)

2011-09-16 Thread David Gibson
So.. there were no serious objections to the last version of this series, AFAICT, but no response at all to this one. Anthony, please apply? -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_

Re: [Qemu-devel] [PATCH RFC] main loop: fix some accesses made in sighandler context

2011-09-16 Thread Laszlo Ersek
On 09/15/11 21:16, Anthony Liguori wrote: On 09/15/2011 12:22 PM, Laszlo Ersek wrote: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03_03 I don't think you can rely on snprintf being signal safe. I think you should just exit on failure. OpenBSD lists snp

Re: [Qemu-devel] Design of the blobstore

2011-09-16 Thread Kevin Wolf
Am 15.09.2011 16:19, schrieb Stefan Berger: > On 09/15/2011 07:40 AM, Kevin Wolf wrote: >> Am 15.09.2011 13:17, schrieb Stefan Hajnoczi: >>> On Wed, Sep 14, 2011 at 6:05 PM, Stefan Berger >>> wrote: One property of the blobstore is that it has a certain required size for accommodating

Re: [Qemu-devel] Design of the blobstore

2011-09-16 Thread Kevin Wolf
Am 15.09.2011 13:58, schrieb Stefan Hajnoczi: >>> What about live migration? If each VM has a LUN assigned on a SAN >>> then these qcow2 files add a new requirement for a shared file system. >>> >>> Perhaps it makes sense to include the blobstore in the VM state data >>> instead? If you take that

Re: [Qemu-devel] [Bug 818673] Re: virtio: trying to map MMIO memory

2011-09-16 Thread hkran
On 09/16/2011 03:37 AM, Rick Vernam wrote: On Thursday 15 September 2011 11:23:53 Rick Vernam wrote: On Wednesday 14 September 2011 16:30:11 Rick Vernam wrote: On Wednesday 14 September 2011 14:42:09 vrozenfe wrote: Thank you, Rick. Could you help me to narrow this problem down? Absolutely.

[Qemu-devel] [PATCH v2] main loop: fix some accesses made in sighandler context

2011-09-16 Thread Laszlo Ersek
Make variables volatile. "sig_atomic_t" should cover "int" and "pid_t", but where it doesn't, the patch should still do no harm. Also replace calls to functions that are not required to be async-signal-safe [1]. termsig_handler() -> qemu_system_killed(): shutdown_signal, shutdown_pid, no_shutdo

Re: [Qemu-devel] [PATCH RFC] main loop: fix some accesses made in sighandler context

2011-09-16 Thread Markus Armbruster
Laszlo Ersek writes: > On 09/15/11 21:44, Peter Maydell wrote: >> On 15 September 2011 18:22, Laszlo Ersek wrote: >>> -int no_shutdown = 0; >>> +volatile int no_shutdown = 0; >> >> So why 'volatile' and not 'sig_atomic_t', then? > > The sigaction() spec says"volatile sig_atomic_t", so that woul

[Qemu-devel] [PATCH] qdev: print bus properties too

2011-09-16 Thread Gerd Hoffmann
Make qdev_device_help print both device and bus properties. Helps libvirt to figure whenever bus properties such as PCI.multifunction are supported present or not. Signed-off-by: Gerd Hoffmann --- hw/qdev.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/qdev.c b

Re: [Qemu-devel] [RFC] Plan for moving forward with QOM

2011-09-16 Thread Gerd Hoffmann
Hi, Also, NE2000 methods have to call ISA_NE2000 and PCI_NE2000 methods, yes? That's going to be more difficult. Not impossible, just hard. It's probably going to involve device specific code that models what type of glue was used for that particular device/bus combo. I'd expect our new, shi

Re: [Qemu-devel] [PATCH] usb: change VID/PID for usb-hub and usb-msd to prevent conflict

2011-09-16 Thread Gerd Hoffmann
Hi, lsusb says: Bus 004 Device 002: ID 0409:55aa NEC Corp. Hub Looks sensible. Is that actually a USB 1.1 Hub? Yes. If you want a USB 2.0 ID, use 0x03f0:0x2002 (HP Hub) instead. Using USB 1.1 ID to prevent "High Speed" information cloud in XP. No, a USB 1.1 Hub ID is perfectly fine as w

Re: [Qemu-devel] [RFC] Plan for moving forward with QOM

2011-09-16 Thread Kevin Wolf
Am 15.09.2011 16:11, schrieb Anthony Liguori: > On 09/15/2011 08:43 AM, Jan Kiszka wrote: >> On 2011-09-15 00:11, Anthony Liguori wrote: >>> On 09/14/2011 04:15 PM, Jan Kiszka wrote: On 2011-09-14 21:42, Anthony Liguori wrote: >> Such names can get fairly long I'm afraid... > > A u

[Qemu-devel] How to share files between WinXP guest on PuppyLinux host.

2011-09-16 Thread Srinivas Nayak
Dear All, I am using WinXP as guest on PuppyLinux host. What is the safest and best way for file sharing. My system has no Internet connection and I have no idea about networking stuff. Please suggest. Sincerely, Srinivas

Re: [Qemu-devel] Design of the blobstore [API of the NVRAM]

2011-09-16 Thread Stefan Hajnoczi
On Thu, Sep 15, 2011 at 08:34:55AM -0400, Stefan Berger wrote: > On 09/15/2011 07:17 AM, Stefan Hajnoczi wrote: > >On Wed, Sep 14, 2011 at 6:05 PM, Stefan Berger > > wrote: > >> One property of the blobstore is that it has a certain required size for > >>accommodating all blobs of device that wan

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/58] spapr: proper qdevification

2011-09-16 Thread Paolo Bonzini
On 09/16/2011 05:06 AM, David Gibson wrote: > > 1) do you mean, in Linux terms, one target per SCSI _host_ or one > target per SCSI _channel_? i.e. if you looks at > /sys/bus/scsi/devices, right now it looks like > > 0:0:0:00:0:1:0 (two targets on the same host and channel) > >

[Qemu-devel] [PATCH] removed usused offset variable

2011-09-16 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- posix-aio-compat.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/posix-aio-compat.c b/posix-aio-compat.c index 3193dbf..63a8fae 100644 --- a/posix-aio-compat.c +++ b/posix-aio-compat.c @@ -181,7 +181,6 @@ qemu_pwritev(int fd, cons

Re: [Qemu-devel] Design of the blobstore [API of the NVRAM]

2011-09-16 Thread Stefan Berger
On 09/16/2011 06:35 AM, Stefan Hajnoczi wrote: On Thu, Sep 15, 2011 at 08:34:55AM -0400, Stefan Berger wrote: On 09/15/2011 07:17 AM, Stefan Hajnoczi wrote: [...] Everything is kind of changing now. But here's what I have right now: tb->s.tpm_ltpms->nvram = nvram_setup(tpm_ltpms->drive_

Re: [Qemu-devel] [RFC] Plan for moving forward with QOM

2011-09-16 Thread Anthony Liguori
On 09/16/2011 05:12 AM, Kevin Wolf wrote: Am 15.09.2011 16:11, schrieb Anthony Liguori: An example is a NIC with nvram that stores a mac address. In QOM, the guest could change the mac address, then a user could hot unplug the device, and then hot plug the device into a different PCI slot. The

Re: [Qemu-devel] [PATCH 0/2] omap_intc: convert to MemoryRegion, qdev

2011-09-16 Thread Anthony Liguori
On 09/09/2011 11:48 AM, Peter Maydell wrote: Ping? Is anyone actively maintaining the omap device model? Regards, Anthony Liguori -- PMM On 31 August 2011 16:55, Peter Maydell wrote: This patchset converts the omap_intc device to MemoryRegion and qdev. The MemoryRegion conversion is fa

Re: [Qemu-devel] [PATCH] Add astyle option file for code formatting

2011-09-16 Thread Anthony Liguori
On 09/11/2011 12:00 PM, Stefan Weil wrote: For new C code (and maybe also for existing code), a code formatter like Artistic Style is helpful because it can fix tabs, indentation and other style issues. This option file tries to set astyle options which match QEMU's coding conventions. The qual

Re: [Qemu-devel] [PATCH v2] pkg-config: Add a pkg-config script for cross compilations

2011-09-16 Thread Anthony Liguori
On 09/11/2011 01:25 PM, Stefan Weil wrote: This script can be used for cross compilations. I use it on Debian / Ubuntu to provide a cross pkg-config for MinGW (32 and 64 bit), ARM, MIPS and PowerPC. v2: Improvements as suggested by Peter Maydell. Thanks for the review. Signed-off-by: Stefa

Re: [Qemu-devel] [PATCH 0/3] Remove QEMUFile abuse

2011-09-16 Thread Anthony Liguori
Reviewed-by: Anthony Liguori malc, please Ack. Regards, Anthony Liguori On 09/13/2011 07:52 AM, Juan Quintela wrote: Hi QEMUFile is intended to be used only for migration. Change the other three users to use FILE * operations directly. gcc on Fedora 15 complains about fread/write not che

Re: [Qemu-devel] [PATCH] qemu: Fix build failure without VNC support

2011-09-16 Thread Anthony Liguori
On 09/14/2011 09:16 AM, Boris Dolgov wrote: Hello! Qemu 0.15.0 doesn't build with vnc support disabled. The following patch fixes the problem. Signed-off-by: Boris Dolgov Please submit patches against the latest git tree (and use git diff to generate the diff). Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH] mips_malta: move i8259 initialization after piix4 initialization

2011-09-16 Thread Anthony Liguori
On 09/12/2011 08:07 AM, Avi Kivity wrote: i8259 is an ISA device (or at least, depends on the ISA infrastructure to register its ioport); and the ISA bus is supplied by piix4. Later patches make this dependency explicit. Move the i8259 initialization until after the ISA bus is created; and supp

Re: [Qemu-devel] [PATCH] qemu: Fix build failure without VNC support

2011-09-16 Thread Luiz Capitulino
On Fri, 16 Sep 2011 08:13:29 -0500 Anthony Liguori wrote: > On 09/14/2011 09:16 AM, Boris Dolgov wrote: > > Hello! > > > > Qemu 0.15.0 doesn't build with vnc support disabled. The following > > patch fixes the problem. > > > > Signed-off-by: Boris Dolgov > > Please submit patches against the lat

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/58] spapr: proper qdevification

2011-09-16 Thread Thomas Huth
Hi all! Am Fri, 16 Sep 2011 12:41:40 +0200 schrieb Paolo Bonzini : > On 09/16/2011 05:06 AM, David Gibson wrote: > >> > > >> > 1) do you mean, in Linux terms, one target per SCSI _host_ or one > >> > target per SCSI _channel_? i.e. if you looks at > >> > /sys/bus/scsi/devices, right now it

Re: [Qemu-devel] [PATCH] Makefile: Remove 'tarbin' target

2011-09-16 Thread Anthony Liguori
On 09/02/2011 11:15 AM, Peter Maydell wrote: Remove the 'tarbin' target -- it isn't used as part of the official QEMU release process, and it's out of date (various new bios files were never added to its list of files). It's better not to provide it at all than to have a broken makefile target we

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/58] spapr: proper qdevification

2011-09-16 Thread Paolo Bonzini
On 09/16/2011 03:27 PM, Thomas Huth wrote: So I suggest that I change SLOF to also use the "Logical unit addressing method" like Linux does, which should result in the fact that SLOF tries to scan the target IDs instead of the channels/bus IDs. What do you think, does that sound ok? Yes, that'

Re: [Qemu-devel] [PATCH] vga: Respect isa_mem_base when registering chain4 alias

2011-09-16 Thread Anthony Liguori
On 09/15/2011 04:26 AM, Jan Kiszka wrote: This does not yet unbreak PPC (which has its own problems) but potentially other non-x86 systems where isa_mem_base is != 0. Signed-off-by: Jan Kiszka Applied. Thanks. Regards, Anthony Liguori --- hw/vga.c |1 + 1 files changed, 1 insertion

Re: [Qemu-devel] [PATCH] Fix termination by signal with -no-shutdown

2011-09-16 Thread Anthony Liguori
On 09/14/2011 08:38 AM, Kevin Wolf wrote: On signals such as SIGTERM qemu should exit instead of just stopping the VM even with -no-shutdown. Signed-off-by: Kevin Wolf Applied. Thanks. Regards, Anthony Liguori --- vl.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff

Re: [Qemu-devel] [PATCH v2] hw/integratorcp: Fix bugs in writes to CM_CTRL system register

2011-09-16 Thread Anthony Liguori
On 09/12/2011 09:43 AM, Peter Maydell wrote: Fix a number of bugs in the implementation of writes to the CM_CTRL system register: * write to cm_ctrl, not cm_init ! * an '&' vs '^' typo meant we would write the inverse of the bits * handling the LED via printf() meant we spew lots of output

[Qemu-devel] [PATCH v2 01/15] sheepdog: add coroutine_fn markers

2011-09-16 Thread Paolo Bonzini
This makes the following patch easier to review. Cc: MORITA Kazutaka Signed-off-by: Paolo Bonzini --- block/sheepdog.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index c1f6e07..af696a5 100644 --- a/block/sheepdog.c +

[Qemu-devel] [PATCH v2 02/15] add socket_set_block

2011-09-16 Thread Paolo Bonzini
Cc: MORITA Kazutaka Signed-off-by: Paolo Bonzini --- oslib-posix.c |7 +++ oslib-win32.c |6 ++ qemu_socket.h |1 + 3 files changed, 14 insertions(+), 0 deletions(-) diff --git a/oslib-posix.c b/oslib-posix.c index a304fb0..dbc8ee8 100644 --- a/oslib-posix.c +++ b/oslib-posi

[Qemu-devel] [PATCH v2 04/15] coroutine-io: handle zero returns from recv

2011-09-16 Thread Paolo Bonzini
When the other side is shutdown, read returns zero (writes return EPIPE). In this case, care must be taken to avoid infinite loops. This error was already present in sheepdog. Cc: MORITA Kazutaka Signed-off-by: Paolo Bonzini --- cutils.c |8 +++- 1 files changed, 7 insertions(+), 1 del

[Qemu-devel] [PATCH v2 03/15] sheepdog: move coroutine send/recv function to generic code

2011-09-16 Thread Paolo Bonzini
Outside coroutines, avoid busy waiting on EAGAIN by temporarily making the socket blocking. The API of qemu_recvv/qemu_sendv is slightly different from do_readv/do_writev because they do not handle coroutines. It returns the number of bytes written before encountering an EAGAIN. The specificity

[Qemu-devel] [PATCH v2 07/15] block: add bdrv_co_flush support

2011-09-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block.c | 45 +++-- block_int.h |1 + 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/block.c b/block.c index 394ecaf..f4b9089 100644 --- a/block.c +++ b/block.c @@ -66,6 +66,8 @@ static BlockDrive

Re: [Qemu-devel] [PATCH RFC] main loop: fix some accesses made in sighandler context

2011-09-16 Thread Eric Blake
+++ b/cpus.c @@ -289,9 +289,16 @@ static void qemu_event_increment(void) /* EAGAIN is fine, a read must be pending. */ if (ret < 0 && errno != EAGAIN) { -fprintf(stderr, "qemu_event_increment: write() failed: %s\n", -strerror(errno)); -exit (1); +

Re: [Qemu-devel] [PATCH] Add astyle option file for code formatting

2011-09-16 Thread Stefan Weil
Am 16.09.2011 15:07, schrieb Anthony Liguori: On 09/11/2011 12:00 PM, Stefan Weil wrote: For new C code (and maybe also for existing code), a code formatter like Artistic Style is helpful because it can fix tabs, indentation and other style issues. This option file tries to set astyle options w

Re: [Qemu-devel] [PATCH 0/2] omap_intc: convert to MemoryRegion, qdev

2011-09-16 Thread Peter Maydell
On 16 September 2011 14:05, Anthony Liguori wrote: > On 09/09/2011 11:48 AM, Peter Maydell wrote: >> Ping? > > Is anyone actively maintaining the omap device model? Whoops, Andrzej's email got dropped from the cc (some odd interaction between my mail server and the listserver as far as I can tell

[Qemu-devel] [PATCH v2 08/15] block: add bdrv_co_discard and bdrv_aio_discard support

2011-09-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block.c | 140 - block.h |3 + block_int.h |9 +++- trace-events |1 + 4 files changed, 148 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index f4b9089..7853982 100644

[Qemu-devel] [PATCH v2 2/5] dma-helpers: allow including from target-independent code

2011-09-16 Thread Paolo Bonzini
Target-independent code cannot construct sglists, but it can take them from the outside as a black box. Allow this. Signed-off-by: Paolo Bonzini --- dma.h |8 ++-- qemu-common.h |1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dma.h b/dma.h index b222346.

[Qemu-devel] [PATCH v2 0/5] block: preparatory patches for scatter/gather support

2011-09-16 Thread Paolo Bonzini
These patches are preparatory work for supporting scatter/gather in the SCSI subsystem. Since there would be no HBA actually using it, I am just posting the cleanups, and the fix for CVE-2011-3346 (buffer overflow in the handling of READ CAPACITY 16) that comes for free with the last patch. v1->v

[Qemu-devel] [PATCH v2 5/5] scsi-disk: lazily allocate bounce buffer

2011-09-16 Thread Paolo Bonzini
It will not be needed for reads and writes if the HBA provides a sglist. In addition, this lets scsi-disk refuse commands with an excessive allocation length, as well as limit memory on usual well-behaved guests. Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c | 44

Re: [Qemu-devel] [PATCH v2] hw/integratorcp: Fix bugs in writes to CM_CTRL system register

2011-09-16 Thread Peter Maydell
On 16 September 2011 15:08, Anthony Liguori wrote: > On 09/12/2011 09:43 AM, Peter Maydell wrote: >> >> Fix a number of bugs in the implementation of writes to the CM_CTRL >> system register: >>  * write to cm_ctrl, not cm_init ! >>  * an '&' vs '^' typo meant we would write the inverse of the bit

Re: [Qemu-devel] blobstore disk format (was Re: Design of the blobstore)

2011-09-16 Thread Michael S. Tsirkin
On Thu, Sep 15, 2011 at 10:33:13AM -0400, Stefan Berger wrote: > On 09/15/2011 08:28 AM, Michael S. Tsirkin wrote: > >So the below is a proposal for a directory scheme > >for storing (optionally multiple) nvram images, > >along with any metadata. > >Data is encoded using BER: > >http://en.wikipedia

Re: [Qemu-devel] [PATCH] bswap.h: build fix

2011-09-16 Thread Anthony Liguori
On 09/13/2011 08:12 AM, Christoph Egger wrote: qemu build fails when CONFIG_MACHINE_BSWAP_H is defined because float32, float64, etc. are not defined. This makes qemu build. Signed-off-by: Christoph Egger Applied. Thanks. Regards, Anthony Liguori diff --git a/bswap.h b/bswap.h index

Re: [Qemu-devel] [PATCH] Remove blanks before \n in output strings

2011-09-16 Thread Anthony Liguori
On 09/12/2011 03:33 PM, Stefan Weil wrote: Those blanks violate the coding conventions, see scripts/checkpatch.pl. Blanks missing after colons in the changed lines were added. This patch does not try to fix tabs, long lines and other problems in the changed lines, therefore checkpatch.pl report

Re: [Qemu-devel] [PATCH 1/2] build: Always have 'BUILD_DIR' variable pointing to the root of the build tree

2011-09-16 Thread Anthony Liguori
On 09/15/2011 03:45 PM, Lluís Vilanova wrote: Signed-off-by: Lluís Vilanova Applied all. Thanks. Regards, Anthony Liguori --- Makefile |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 7e9382f..57cc399 100644 --- a/Makefile +++ b/Make

Re: [Qemu-devel] [RFC] Plan for moving forward with QOM

2011-09-16 Thread John Williams
On Thu, Sep 15, 2011 at 11:17 PM, Anthony Liguori wrote: > On 09/15/2011 01:31 AM, Gleb Natapov wrote: >> >> On Wed, Sep 14, 2011 at 01:04:00PM -0500, Anthony Liguori wrote: >>> >>> All device relationships are identified as named properties.  A QOM >>> path name >>> consists of a named device, fo

[Qemu-devel] [PATCH v2 09/15] nbd: fix error handling in the server

2011-09-16 Thread Paolo Bonzini
bdrv_read and bdrv_write return negative errno values, not -1. Signed-off-by: Paolo Bonzini --- nbd.c | 21 - 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/nbd.c b/nbd.c index 595f4d8..a7fa507 100644 --- a/nbd.c +++ b/nbd.c @@ -580,6 +580,7 @@ int nbd_trip

[Qemu-devel] [PATCH v2 14/15] nbd: split requests

2011-09-16 Thread Paolo Bonzini
qemu-nbd has a limit of slightly less than 1M per request. Work around this in the nbd block driver. Signed-off-by: Paolo Bonzini --- block/nbd.c | 52 ++-- 1 files changed, 46 insertions(+), 6 deletions(-) diff --git a/block/nbd.c b/block/nbd.

[Qemu-devel] [PATCH v2 4/5] scsi-disk: commonize iovec creation between reads and writes

2011-09-16 Thread Paolo Bonzini
Also, consistently use qiov.size instead of iov.iov_len. Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c | 42 ++ 1 files changed, 18 insertions(+), 24 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 8f33249..7654349 100644 --- a/hw/scsi

[Qemu-devel] [RFC PATCH 00/14] allow tools to use the QEMU main loop

2011-09-16 Thread Paolo Bonzini
This patch series makes the QEMU main loop usable out of the executable, and especially in tools and possibly unit tests. The series already starts using the refactored main loop in qemu-nbd. This is cleaner because it avoids introducing partial transitions to GIOChannel. Interfacing with the gl

[Qemu-devel] [RFC PATCH 02/14] qemu-timer: remove active_timers array

2011-09-16 Thread Paolo Bonzini
Embed the list in the QEMUClock instead. Signed-off-by: Paolo Bonzini --- qemu-timer.c | 59 +++-- 1 files changed, 28 insertions(+), 31 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 46dd483..e84e444 100644 --- a/qemu-timer.c +

[Qemu-devel] [RFC PATCH 06/14] qemu-timer: do not refer to vm_running

2011-09-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- cpus.c |1 + qemu-timer.c |5 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cpus.c b/cpus.c index 31d450c..f8799f5 100644 --- a/cpus.c +++ b/cpus.c @@ -1065,6 +1065,7 @@ void pause_all_vcpus(void) { CPUState *penv = first

[Qemu-devel] [RFC PATCH 09/14] create main-loop.c

2011-09-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- Makefile.objs|2 +- cpus.c | 193 +- cpus.h |1 + main-loop.c | 499 ++ os-win32.c | 123 - qemu-os-posix.h |4 - qemu-os-win32.h

Re: [Qemu-devel] [PATCH] vga: Fix text mode screendumps

2011-09-16 Thread Andriy Gapon
on 16/09/2011 01:47 Jan Kiszka said the following: > From: Jan Kiszka > > In text mode, even a full refresh of the screen takes multiple updates. > As we reset the dump file pointer after the first call, we only wrote > the first line. Thank you very much! I can confirm that with the patch I get

Re: [Qemu-devel] [PATCH] console: Properly switch consoles for screen dumps

2011-09-16 Thread Andriy Gapon
on 16/09/2011 01:48 Jan Kiszka said the following: > From: Jan Kiszka > > Do not mess with active_console, use console_select instead. This fixes > corrupt virtual monitor consoles after issuing the screendump command. > > Signed-off-by: Jan Kiszka > --- > > Looks still weird - we should enabl

[Qemu-devel] [RFC PATCH 04/14] qemu-timer: more clock functions

2011-09-16 Thread Paolo Bonzini
These will be used when moving icount accounting to cpus.c. Signed-off-by: Paolo Bonzini --- qemu-timer.c | 25 + qemu-timer.h |3 +++ 2 files changed, 28 insertions(+), 0 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 548b349..f665000 100644 --- a/qem

[Qemu-devel] [PATCH v2 15/15] nbd: allow multiple in-flight requests

2011-09-16 Thread Paolo Bonzini
Allow sending up to 16 requests, and drive the replies to the coroutine that did the request. The code is written to be exactly the same as before this patch when MAX_NBD_REQUESTS == 1 (modulo the extra mutex and state). Signed-off-by: Paolo Bonzini --- block/nbd.c | 69 ++

[Qemu-devel] [PATCH v2 06/15] block: group together the plugging of synchronous IO emulation

2011-09-16 Thread Paolo Bonzini
This is duplicated twice for read/write operations. Unify it, and move it close to the code that adds bdrv_flush. Signed-off-by: Paolo Bonzini --- block.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/block.c b/block.c index ce35dce..394ecaf 100644 ---

[Qemu-devel] [PATCH] target-i386: Fix several SSE3 instructions.

2011-09-16 Thread Max Reitz
haddp[sd], hsubp[sd] and addsubp[sd] operate on floats, thus it is necessary to use the appropriate floating point calculation functions. If this is not done, those functions operate merely on integers, which is not correct. Signed-off-by: Max Reitz --- target-i386/ops_sse.h | 36 +

[Qemu-devel] [RFC PATCH 12/14] makefile: extract tools-obj-y

2011-09-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- Makefile |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 7e9382f..f00afc2 100644 --- a/Makefile +++ b/Makefile @@ -142,11 +142,12 @@ endif qemu-img.o: qemu-img-cmds.h qemu-img.o qemu-tool.o qemu-nbd.o qe

[Qemu-devel] [RFC PATCH 10/14] Revert to a hand-made select loop

2011-09-16 Thread Paolo Bonzini
This reverts commit c82dc29a9112f34e0a51cad9a412cf6d9d05dfb2 and 4d88a2ac8643265108ef1fb47ceee5d7b28e19f2. Signed-off-by: Paolo Bonzini --- iohandler.c | 54 +- 1 files changed, 1 insertions(+), 53 deletions(-) diff --git a/iohandler.c b/ioh

[Qemu-devel] [RFC PATCH 07/14] qemu-timer: move more stuff out of qemu-timer.c

2011-09-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- qemu-timer.c | 37 + qemu-timer.h |3 ++- savevm.c | 25 + vl.c |2 +- 4 files changed, 33 insertions(+), 34 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 0c7cfd2..3

[Qemu-devel] [RFC PATCH 01/14] remove unused function

2011-09-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/mac_dbdma.c |5 - hw/mac_dbdma.h |1 - 2 files changed, 0 insertions(+), 6 deletions(-) diff --git a/hw/mac_dbdma.c b/hw/mac_dbdma.c index 5affdd1..1791ec1 100644 --- a/hw/mac_dbdma.c +++ b/hw/mac_dbdma.c @@ -661,11 +661,6 @@ void DBDMA_register_ch

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/58] spapr: proper qdevification

2011-09-16 Thread Benjamin Herrenschmidt
> I've done some readings about this problem today, and I think I've got > an idea what might be wrong here - seems like a bug in SLOF to me. > > First, according to the SLOF source code, it seems to me that its > intention is to to scan target IDs, not channels (but as I haven't > written that p

[Qemu-devel] [PATCH] Makefile: Remove 'tarbin' target

2011-09-16 Thread Peter Maydell
Remove the 'tarbin' target -- it isn't used as part of the official QEMU release process, and it's out of date (various new bios files were never added to its list of files). It's better not to provide it at all than to have a broken makefile target we never use or test. (Creating a tarball by jus

Re: [Qemu-devel] [PATCH] This patch adds a new block driver : iSCSI

2011-09-16 Thread Christoph Hellwig
On Wed, Sep 14, 2011 at 04:50:25PM +0100, Stefan Hajnoczi wrote: > I think in this case it will not make the code nicer. Since the > external iSCSI library is based on callbacks it would be necessary to > write the coroutines<->callbacks adapter functions. So for example, > the READ10 command wou

[Qemu-devel] [RFC PATCH 05/14] qemu-timer: move icount to cpus.c

2011-09-16 Thread Paolo Bonzini
None of this is needed by tools, and most of it can even be made static inside cpus.c. Signed-off-by: Paolo Bonzini --- cpus.c| 296 + exec-all.h| 14 +++ exec.c|7 -- qemu-common.h |4 + qemu-timer.c | 279

[Qemu-devel] [RFC PATCH 08/14] create main-loop.h

2011-09-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- async.c |1 + cpus.c|7 + cpus.h|1 - main-loop.h | 80 + qemu-char.h | 12 + qemu-common.h | 11 sysemu.h | 10 +-- vl.c |

[Qemu-devel] [PATCH v2 00/15] nbd improvements

2011-09-16 Thread Paolo Bonzini
Here is v2 of the nbd improvements series. It is based on Kevin's block branch, currently at 2168851. Compared to v1, I reordered the patches in more logical blocks. Patches 1-4 touch sheepdog, patches 5-8 (including Stefan bdrv_flush patch, rebased) touch the generic block layer, patches 9-15 to

[Qemu-devel] [RFC PATCH 11/14] simplify main loop functions

2011-09-16 Thread Paolo Bonzini
Provide a clean example of how to use the main loop in the tools. Signed-off-by: Paolo Bonzini --- cpus.c |5 cpus.h |1 - vl.c | 72 +-- 3 files changed, 38 insertions(+), 40 deletions(-) diff --git a/cpus.c b/cpus.c

[Qemu-devel] [RFC PATCH 14/14] qemu-nbd: use common main loop

2011-09-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- qemu-nbd.c | 127 +--- 1 files changed, 61 insertions(+), 66 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 3a39145..a45dd4b 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -37,6 +37,13 @@ #define NBD

[Qemu-devel] [PATCH v2 12/15] nbd: add support for NBD_CMD_TRIM

2011-09-16 Thread Paolo Bonzini
Map it to bdrv_discard. The server can also expose NBD_FLAG_SEND_TRIM. Signed-off-by: Paolo Bonzini --- block/nbd.c | 31 +++ nbd.c | 13 - 2 files changed, 43 insertions(+), 1 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 23f83d4..

Re: [Qemu-devel] [RFC] Plan for moving forward with QOM

2011-09-16 Thread Anthony Liguori
On 09/16/2011 09:46 AM, John Williams wrote: On Thu, Sep 15, 2011 at 11:17 PM, Anthony Liguori wrote: On 09/15/2011 01:31 AM, Gleb Natapov wrote: On Wed, Sep 14, 2011 at 01:04:00PM -0500, Anthony Liguori wrote: All device relationships are identified as named properties. A QOM path name co

[Qemu-devel] [PATCH 05/14] qdev: remove opts pointer tracking

2011-09-16 Thread Anthony Liguori
This was only used because id's memory was stored in opts. Signed-off-by: Anthony Liguori --- hw/qdev.c |5 ++--- hw/qdev.h |1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 41ed872..3096667 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -281,7 +

[Qemu-devel] [PATCH 01/14] apic: rename apic.id -> apic.index

2011-09-16 Thread Anthony Liguori
This clashes with the qdev name property. This shouldn't affect compatibility since the apic is a no_user device. Signed-off-by: Anthony Liguori --- hw/apic.c |2 +- hw/pc.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index d8f56c8..e92b

[Qemu-devel] [PATCH 12/14] pci: give pci devices a default name.

2011-09-16 Thread Anthony Liguori
Bus names are derived from names so now that PCI devices have a name, they also have different bus names. pc_piix relies on the bus name (*sigh*) so we need to update it. Signed-off-by: Anthony Liguori --- hw/pc_piix.c |6 -- hw/pci.c |3 ++- 2 files changed, 6 insertions(+), 3

[Qemu-devel] [PATCH 02/14] qdev: enforce that no devices overload the id property

2011-09-16 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/qdev.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index a223d41..0e267a7 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -47,9 +47,17 @@ static BusState *qbus_find(const char *path); /* Register a new devi

[Qemu-devel] [PATCH 06/14] qdev: add ability to do QOM-style derived naming

2011-09-16 Thread Anthony Liguori
By using a prefix of "::" in the name, we can safely derive the composed device name from the parent device and busses name. For instance, if the "::i440fx" device created a device named "piix3", it would look like this: static void i440fx_initfn(...) { s->piix3 = qdev_create("PIIX3", "::pi

[Qemu-devel] [PATCH 10/14] isa: add name parameter to device creation

2011-09-16 Thread Anthony Liguori
This is mostly mechanical minus the changes to isa_simple_create() Signed-off-by: Anthony Liguori --- hw/cs4231a.c |2 +- hw/fdc.h |2 +- hw/gus.c |2 +- hw/ide/isa.c |2 +- hw/isa-bus.c | 30 -- hw/isa.h

[Qemu-devel] [PATCH 07/14] sysbus: add an id argument to sysbus_create_simple()

2011-09-16 Thread Anthony Liguori
This is mechanical. Signed-off-by: Anthony Liguori --- hw/arm11mpcore.c |2 +- hw/axis_dev88.c |2 +- hw/collie.c |2 +- hw/integratorcp.c | 14 +++--- hw/kvmclock.c |2 +- hw/lm32_boards.c

[Qemu-devel] [RFC PATCH 03/14] qemu-timer: move common code to qemu_rearm_alarm_timer

2011-09-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- qemu-timer.c | 129 -- roms/seabios |2 +- 2 files changed, 54 insertions(+), 77 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index e84e444..548b349 100644 --- a/qemu-timer.c +++ b/qemu-timer.c

[Qemu-devel] [PATCH v2 1/5] dma-helpers: rename is_write to to_dev

2011-09-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- dma-helpers.c | 14 +++--- dma.h |2 +- hw/ide/core.c |2 +- hw/ide/macio.c |2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dma-helpers.c b/dma-helpers.c index 4610ea0..717e384 100644 --- a/dma-helpers.c +++

[Qemu-devel] [PATCH 14/14] pc: assign names to machine created devices

2011-09-16 Thread Anthony Liguori
This gives names to all of the devices created by the PC machine. This need to be unique to the pc, but not necessarily unique to the device. Signed-off-by: Anthony Liguori --- hw/fdc.h |2 +- hw/kvmclock.c |2 +- hw/pc.c | 11 ++- hw/pc.h |

[Qemu-devel] [PATCH 11/14] pci: obtain devfn before initializing the device

2011-09-16 Thread Anthony Liguori
We need devfn to be allocated before the device is initialized in order to derive the name from the devfn. Signed-off-by: Anthony Liguori --- hw/pci.c | 30 ++ 1 files changed, 22 insertions(+), 8 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 67efbb2..abad900

Re: [Qemu-devel] [PATCH 00/14] qdev: assign unique names to all devices (part 1)

2011-09-16 Thread Anthony Liguori
On 09/16/2011 11:00 AM, Anthony Liguori wrote: This series introduces an infrastructure to remove anonymous devices from qdev. Anonymous devices are one of the big gaps between qdev and QOM so removing is a prerequisite to incrementally merging QOM. Besides the infrastructure, I also converted a

[Qemu-devel] [PATCH 13/14] ide: give IDE drives a default name in qdev

2011-09-16 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/ide/qdev.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 8c868b5..760314c 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -102,7 +102,8 @@ IDEDevice *ide_create_drive(IDEBus *bus, int unit, D

[Qemu-devel] [PATCH 00/14] qdev: assign unique names to all devices (part 1)

2011-09-16 Thread Anthony Liguori
This series introduces an infrastructure to remove anonymous devices from qdev. Anonymous devices are one of the big gaps between qdev and QOM so removing is a prerequisite to incrementally merging QOM. Besides the infrastructure, I also converted almost all of the possible PC devices to have uniq

[Qemu-devel] [PATCH v2 13/15] nbd: switch to asynchronous operation

2011-09-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/nbd.c | 217 +++ nbd.c |8 ++ 2 files changed, 151 insertions(+), 74 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 35c15c8..f6efd7b 100644 --- a/block/nbd.c +++ b/block/nbd.c @@

[Qemu-devel] [PATCH v2 05/15] block: emulate .bdrv_flush() using .bdrv_aio_flush()

2011-09-16 Thread Paolo Bonzini
From: Stefan Hajnoczi Block drivers typically have two copies of the flush operation: a synchronous .bdrv_flush() and an asynchronous .bdrv_aio_flush(). This patch applies the same emulation that we already do for .bdrv_read()/.bdrv_write() to .bdrv_flush(). Now block drivers only need to provi

[Qemu-devel] [PATCH 09/14] fw_cfg: add name to global fw_cfg device

2011-09-16 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/fw_cfg.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c index e2193d5..e37a427 100644 --- a/hw/fw_cfg.c +++ b/hw/fw_cfg.c @@ -484,7 +484,7 @@ FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,

[Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer

2011-09-16 Thread Anthony Liguori
qdev has this quirk that it owns a seemingly arbitrary QemuOpts pointer. That's because qdev expects a static string for the id (which really makes no sense since ids are supposed to be provided by the user). Instead of managing just the id pointer, we currently take ownership of the entire QemuO

[Qemu-devel] [PATCH v2 3/5] dma-helpers: rewrite completion/cancellation

2011-09-16 Thread Paolo Bonzini
This fixes various problems with completion/cancellation: * if the io_func fails to get an AIOCB, the callback wasn't called * If DMA encounters a bounce buffer conflict, and the DMA operation is canceled before the bottom half fires, bad things happen. * memory is not unmapped after cancellatio

[Qemu-devel] [PATCH v2 11/15] nbd: add support for NBD_CMD_FLAG_FUA

2011-09-16 Thread Paolo Bonzini
The server can use it to issue a flush automatically after a write. The client can also use it to mimic a write-through cache. Signed-off-by: Paolo Bonzini --- block/nbd.c |8 nbd.c | 13 +++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/block/nb

[Qemu-devel] [PATCH v2 10/15] nbd: add support for NBD_CMD_FLUSH

2011-09-16 Thread Paolo Bonzini
Note for the brace police: the style in this commit and the following is consistent with the rest of the file. It is then fixed together with the introduction of coroutines. Signed-off-by: Paolo Bonzini --- block/nbd.c | 31 +++ nbd.c | 15 ++-

[Qemu-devel] [PATCH 08/14] sysbus: make create_varargs take an id

2011-09-16 Thread Anthony Liguori
This is mostly mechanical but also changes sysbus_create_simple() in order to call into the new create_varargs. Signed-off-by: Anthony Liguori --- hw/axis_dev88.c|4 +- hw/integratorcp.c |5 ++- hw/musicpal.c |3 +- hw/pc.c|2 +- hw/ppce500_m

[Qemu-devel] [RFC PATCH 13/14] link the main loop and its dependencies into the tools

2011-09-16 Thread Paolo Bonzini
This completes the refactoring and lets the tools use the main loop code from QEMU. This enables tools to operate fully asynchronously. Advantages include better Windows portability (for some definition of portability) over glib's. Signed-off-by: Paolo Bonzini --- Makefile |4 +++- os-

  1   2   >