Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices

2011-06-13 Thread Avi Kivity
On 06/12/2011 10:21 PM, Anthony Liguori wrote: It's perfectly fine to have a type called PCIBus that I440FX extends, but qdev shouldn't have explicit knowledge of something called a bus IMHO. Doing this forces a limited mechanism of connecting devices because it creates an artificial tree (by

Re: [Qemu-devel] HDD problem with Xilinx virtex-ml507 board

2011-06-13 Thread Lê Đức Tài
Hi, I have a new question about QEMU for virtex-ml507. Can QEMU display X11 on this board? Because I don't see any VGA output when remove -nographic option. QEMU just display monitor console and serial console. Tai Từ: Lê Đức Tài letai_d...@yahoo.com.vn

Re: [Qemu-devel] HDD problem with Xilinx virtex-ml507 board

2011-06-13 Thread Edgar E. Iglesias
On Mon, Jun 13, 2011 at 04:05:59PM +0800, Lê ?c Tài wrote: Hi, I have a new question about QEMU for virtex-ml507. Can QEMU display X11 on this board? Because I don't see any VGA output when remove -nographic option. QEMU just display monitor console and serial console.

Re: [Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated()

2011-06-13 Thread Stefan Hajnoczi
On Wed, Jun 08, 2011 at 06:50:25PM +0400, Dmitry Konishchev wrote: This patch optimizes 'qemu-img convert' operation for volumes which are almost fully unallocated. Here are the results of simple tests: The optimization is to check allocation metadata instead of unconditionally reading and then

Re: [Qemu-devel] HDD problem with Xilinx virtex-ml507 board

2011-06-13 Thread Lê Đức Tài
There is no VGA controller. OK, but virtex-ml507 have a DVI controler. Does QEMU support DVI output? Từ: Edgar E. Iglesias edgar.igles...@gmail.com Đến: Lê ?c Tài letai_d...@yahoo.com.vn Cc: Alexander Graf ag...@suse.de; qemu-devel@nongnu.orgDevelopers

Re: [Qemu-devel] [PATCH][uq/master] kvm: x86: Save/restore FPU OP, IP and DP

2011-06-13 Thread Avi Kivity
On 06/11/2011 12:23 PM, Jan Kiszka wrote: From: Jan Kiszkajan.kis...@siemens.com These FPU states are properly maintained by KVM but not yet by TCG. So far we unconditionally set them to 0 in the guest which may cause state corruptions - not only during migration. -#define CPU_SAVE_VERSION 12

Re: [Qemu-devel] HDD problem with Xilinx virtex-ml507 board

2011-06-13 Thread Edgar E. Iglesias
On Mon, Jun 13, 2011 at 04:29:10PM +0800, Lê ?c Tài wrote: There is no VGA controller. OK, but virtex-ml507 have a DVI controler. Does QEMU support DVI output? Hi, It's not so much about what you can do with the virtex (I bet you can do lot's of stuff with it) but more limited

[Qemu-devel] [Bug 796480] [NEW] Addresses with 4GB differences are consider as one single address in QEMU

2011-06-13 Thread Khansa Butt
Public bug reported: THIS IS THE ISSUE OF USER MODE EMULATION Information about guest and host ** guest: 64 bit x86 user mode binary host: 32 bit Linux OS uname -a :Linux KICS-HPCNL-32blue 2.6.33.3-85.fc13.i686.PAE #1 SMP architecture: intel64 Bug Description

Re: [Qemu-devel] QEMU suitable for mission critical applications?

2011-06-13 Thread Felix Oxley
Thank you all for your responses. It appears that it would be wise to continue to maintain Sun hardware. On 12 June 2011 22:51, Blue Swirl blauwir...@gmail.com wrote: On Wed, Jun 8, 2011 at 2:19 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Wed, Jun 8, 2011 at 11:08 AM, Felix Oxley

Re: [Qemu-devel] [Bug 796480] [NEW] Addresses with 4GB differences are consider as one single address in QEMU

2011-06-13 Thread malc
On Mon, 13 Jun 2011, Khansa Butt wrote: Public bug reported: THIS IS THE ISSUE OF USER MODE EMULATION Information about guest and host ** guest: 64 bit x86 user mode binary host: 32 bit Linux OS uname -a :Linux KICS-HPCNL-32blue 2.6.33.3-85.fc13.i686.PAE

Re: [Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated()

2011-06-13 Thread Dmitry Konishchev
On Mon, Jun 13, 2011 at 12:26 PM, Stefan Hajnoczi stefa...@gmail.com wrote: The optimization is to check allocation metadata instead of unconditionally reading and then checking for all zeroes? Yeah, exactly. On Mon, Jun 13, 2011 at 12:26 PM, Stefan Hajnoczi stefa...@gmail.com wrote: Why

Re: [Qemu-devel] HDD problem with Xilinx virtex-ml507 board

2011-06-13 Thread Lê Đức Tài
Can you give me any suggestion for create a face vga controler for my virtex board. I just want display a system with X support. Can I reference to the vga of PowerMac emulator? Thank Từ: Edgar E. Iglesias edgar.igles...@gmail.com Đến: Lê ?c Tài

Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices

2011-06-13 Thread Gleb Natapov
On Fri, Jun 10, 2011 at 04:59:08PM +0200, Markus Armbruster wrote: Anthony Liguori aligu...@us.ibm.com writes: On 06/10/2011 03:13 AM, Markus Armbruster wrote: Jan Kiszkajan.kis...@siemens.com writes: Resource management, e.g. IRQs. That will be useful for other types of buses as well.

[Qemu-devel] [PATCH RFC] target-ppc: Correctly handle translation address when bus unit ID = 0x07F

2011-06-13 Thread Andreas Färber
From: Hervé Poussineau hpous...@reactos.org In that case, we want to access memory space instead of I/O controller interface address space. Signed-off-by: Hervé Poussineau hpous...@reactos.org Simplify by avoiding reindentation of existing code. Cc: Alexander Graf ag...@suse.de Signed-off-by:

Re: [Qemu-devel] [PATCH2] ppc64: fix mtmsr behavior on 64-bit targets

2011-06-13 Thread Alexander Graf
Am 12.06.2011 um 17:49 schrieb Nathan Whitehorn nwhiteh...@freebsd.org: The mtmsr instruction is required not to modify the upper 32-bits of the machine state register, but checks the current value of MSR[SF] to decide whether to do this. This has the effect of zeroing the upper 32 bits

[Qemu-devel] [Bug 796480] Re: Addresses with 4GB differences are consider as one single address in QEMU

2011-06-13 Thread Khansa Butt
** Description changed: THIS IS THE ISSUE OF USER MODE EMULATION Information about guest and host ** guest: 64 bit x86 user mode binary host: 32 bit Linux OS uname -a :Linux KICS-HPCNL-32blue 2.6.33.3-85.fc13.i686.PAE #1 SMP architecture: intel64

[Qemu-devel] usb-musb: calls usb_packet_complete() on packets with no owner

2011-06-13 Thread Peter Maydell
The function usb_packet_complete() in hw/usb.c says: /* Notify the controller that an async packet is complete. This should only be called for packets previously deferred by returning USB_RET_ASYNC from handle_packet. */ and this is checked by means of an assert(p-owner != NULL). However,

Re: [Qemu-devel] [PATCH] linux-user: Define AT_RANDOM to support target dynamic linkers that do ASLR

2011-06-13 Thread Laurent Alfonsi
unsigned char k_rand_bytes[16]; elf_addr_t __user *u_rand_bytes; ... /* * Generate 16 random bytes for userspace PRNG seeding. */ get_random_bytes(k_rand_bytes, sizeof(k_rand_bytes)); u_rand_bytes = (elf_addr_t __user *)

[Qemu-devel] KVM call agenda for June 14

2011-06-13 Thread Juan Quintela
Please send in any agenda items you are interested in covering. thanks, -juan

Re: [Qemu-devel] [PATCH2] ppc64: fix mtmsr behavior on 64-bit targets

2011-06-13 Thread Nathan Whitehorn
On 06/13/11 05:20, Alexander Graf wrote: Am 12.06.2011 um 17:49 schrieb Nathan Whitehornnwhiteh...@freebsd.org: The mtmsr instruction is required not to modify the upper 32-bits of the machine state register, but checks the current value of MSR[SF] to decide whether to do this. This has

Re: [Qemu-devel] [PATCH] XBRLE page delta compression for live migration of large memory apps

2011-06-13 Thread Shribman, Aidan
The proposed patch slipped by with no apparent response - kindly provide feedback, Aidan -Original Message- From: qemu-devel-bounces+aidan.shribman=sap@nongnu.org [mailto:qemu-devel-bounces+aidan.shribman=sap@nongnu.org] On Behalf Of Shribman, Aidan Sent: Sunday, May 22,

Re: [Qemu-devel] [PATCH2] ppc64: fix mtmsr behavior on 64-bit targets

2011-06-13 Thread Alexander Graf
On 13.06.2011, at 14:52, Nathan Whitehorn wrote: On 06/13/11 05:20, Alexander Graf wrote: Am 12.06.2011 um 17:49 schrieb Nathan Whitehornnwhiteh...@freebsd.org: The mtmsr instruction is required not to modify the upper 32-bits of the machine state register, but checks the current

Re: [Qemu-devel] [PATCH RFC] target-ppc: Correctly handle translation address when bus unit ID = 0x07F

2011-06-13 Thread Alexander Graf
On 13.06.2011, at 12:13, Andreas Färber wrote: From: Hervé Poussineau hpous...@reactos.org In that case, we want to access memory space instead of I/O controller interface address space. Signed-off-by: Hervé Poussineau hpous...@reactos.org Simplify by avoiding reindentation of

Re: [Qemu-devel] [PATCH] linux-user: Define AT_RANDOM to support target dynamic linkers that do ASLR

2011-06-13 Thread Richard Henderson
On 06/13/2011 05:03 AM, Laurent Alfonsi wrote: And this now brings me to another point : In that case, it might have sense to also add the auxv AT_RANDOM_SIZE. http://sources.redhat.com/ml/libc-alpha/2008-10/msg00016.html That never made it into the upstream kernel though. r~

[Qemu-devel] Participation Requested: Survey about Open-Source Software Development

2011-06-13 Thread Jeffrey Carver
Hi, Drs. Jeffrey Carver, Rosanna Guadagno, Debra McCallum, and Mr. Amiangshu Bosu, University of Alabama, and Dr. Lorin Hochstein, University of Southern California, are conducting a survey of open-source software developers. This survey seeks to understand how developers on distributed, virtual

Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices

2011-06-13 Thread Anthony Liguori
On 06/13/2011 03:05 AM, Avi Kivity wrote: On 06/12/2011 10:21 PM, Anthony Liguori wrote: It's perfectly fine to have a type called PCIBus that I440FX extends, but qdev shouldn't have explicit knowledge of something called a bus IMHO. Doing this forces a limited mechanism of connecting devices

Re: [Qemu-devel] [PATCH v2] block/rbd: Remove unused local variable

2011-06-13 Thread Josh Durgin
On 06/10/2011 01:05 PM, Stefan Weil wrote: Variable 'snap' is assigned a value that is never used. Remove snap and the related code. v2: The unused variable which was in function rbd_open is now in function qemu_rbd_create, so the patch needed an update. Cc: Christian Brunnerc...@muc.de

Re: [Qemu-devel] [PATCH v2][ 10/21] qapi: add QMP input visiter

2011-06-13 Thread Luiz Capitulino
On Fri, 3 Jun 2011 17:33:08 -0500 Michael Roth mdr...@linux.vnet.ibm.com wrote: +static void qmp_input_type_int(Visiter *v, int64_t *obj, const char *name, Error **errp) +{ +QmpInputVisiter *qiv = to_qiv(v); +QObject *qobj = qmp_input_get_object(qiv, name); + +if (!qobj ||

Re: [Qemu-devel] [PATCH] Changelog: Add explanatory note that this file is no longer updated

2011-06-13 Thread Edgar E. Iglesias
On Thu, Jun 09, 2011 at 11:43:12AM +0100, Peter Maydell wrote: Add an explanatory note to the top of Changelog pointing at the wiki and git history for changelogs for more recent releases. I've applied this, thanks. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- Changelog |

Re: [Qemu-devel] [PATCH] configure: Detect and don't try to use older libcurl

2011-06-13 Thread Edgar E. Iglesias
On Thu, Jun 09, 2011 at 10:54:29PM +0100, Peter Maydell wrote: Older versions of libcurl don't have some of the features we try to use, in particular curl_multi_setopt(). Check for this in the 'is libcurl available?' configure test so we disable curl support if the library is too old.

Re: [Qemu-devel] [RFC v4 00/12] ISA reconfigurability v4

2011-06-13 Thread Blue Swirl
On Wed, Jun 8, 2011 at 9:55 PM, Andreas Färber andreas.faer...@web.de wrote: Hey, I've refined the series to track the state in ISADevice and to expose it as VMState. Error handling has been improved, and setting the state multiple times is no-op now. To read the state, I'm introducing

Re: [Qemu-devel] [RFC] ppc: qdev-ify CPU creation

2011-06-13 Thread Blue Swirl
On Thu, Jun 9, 2011 at 12:13 AM, Andreas Färber andreas.faer...@web.de wrote: Am 21.12.2010 um 21:01 schrieb Andreas Färber: From: Hervé Poussineau hpous...@reactos.org v1: * Coding style fixes. Signed-off-by: Hervé Poussineau hpous...@reactos.org Cc: Alexander Graf ag...@suse.de

Re: [Qemu-devel] [PATCH v2] Darwin: Fix compilation warning regarding the deprecated daemon() function

2011-06-13 Thread Blue Swirl
On Thu, Jun 9, 2011 at 9:47 PM, Andreas Färber andreas.faer...@web.de wrote: Am 07.06.2011 um 05:34 schrieb Alexandre Raymond: Changes since v1: create a wrapper function named qemu_daemon() in oslib-posix.c instead of putting the OS specific workaround in qemu-nbd.c directly. On OSX =

Re: [Qemu-devel] [Bug 796202] [NEW] Doing a 64 bit load from a 32 bit local APIC register is allowed

2011-06-13 Thread Blue Swirl
On Sun, Jun 12, 2011 at 4:03 PM, Robert Uhl 796...@bugs.launchpad.net wrote: Public bug reported: Doing u64 lapic_idregister = (u64) fix_to_virt(FIX_APIC_BASE) + 0x20; and later in an interrupt handler movq (lapic_idregister), %rcx movq (%rcx), %rcx in a linux kernel module works in

Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices

2011-06-13 Thread Blue Swirl
On Sun, Jun 12, 2011 at 10:21 PM, Anthony Liguori aligu...@us.ibm.com wrote: On 06/12/2011 12:12 PM, Avi Kivity wrote: On 06/10/2011 06:43 PM, Anthony Liguori wrote: What exactly is so very wrong about buses that they need to die? They force a device tree. The device model shouldn't be a

[Qemu-devel] [PATCH] error framework: Fix compilation for w32/w64

2011-06-13 Thread Stefan Weil
The declaration of function error_set() should use macro GCC_FMT_ATTR instead of gcc's format printf attribute. For w32/w64, both declarations are different and GCC_FMT_ATTR is needed. Compilation for w64 even failed with the original code because mingw64 defines a macro for printf. GCC_FMT_ATTR

Re: [Qemu-devel] [RFC v4 00/12] ISA reconfigurability v4

2011-06-13 Thread Andreas Färber
Am 13.06.2011 um 22:08 schrieb Blue Swirl: On Wed, Jun 8, 2011 at 9:55 PM, Andreas Färber andreas.faer...@web.de wrote: I've refined the series to track the state in ISADevice and to expose it as VMState. Error handling has been improved, and setting the state multiple times is no-op now.

Re: [Qemu-devel] [PATCH] hw/9118.c: Implement active-low interrupt support

2011-06-13 Thread Peter Maydell
Ping? On 26 May 2011 17:34, Peter Maydell peter.mayd...@linaro.org wrote: The 9118 ethernet controller interrupt line is active low unless the IRQ config register is programmed to set both the IRQ_POL (polarity: active-high) and IRQ_TYPE (type: push-pull) bits: implement support for inverting

[Qemu-devel] [PATCH 01/10] cocoa: do not create a spurious window for -version

2011-06-13 Thread Andreas Färber
From: Tristan Gingold ging...@adacore.com When invoked with -version, qemu will exit just after displaying the version, so there is no need to create a window. Also handles --XXX options. Signed-off-by: Tristan Gingold ging...@adacore.com Signed-off-by: Andreas Färber andreas.faer...@web.de ---

[Qemu-devel] [PATCH 04/10] Remove warning in printf due to type mismatch

2011-06-13 Thread Andreas Färber
From: Alexandre Raymond cerb...@gmail.com 8 qemu/target-lm32/translate.c: In function ‘gen_intermediate_code_internal’: qemu/target-lm32/translate.c:1135: warning: format ‘%zd’ expects type ‘signed size_t’, but argument 4 has type ‘int’ 8 Both gen_opc_ptr and gen_opc_buf are

[Qemu-devel] [PATCH 05/10] configure: Fix check for fdatasync()

2011-06-13 Thread Andreas Färber
From: Alexandre Raymond cerb...@gmail.com Under Darwin, a symbol exists for the fdatasync() function, so that our link test succeeds. However _POSIX_SYNCHRONIZED_IO is set to '-1'. According to POSIX:2008, a value of -1 means the feature is not supported. A value of 0 means supported at

[Qemu-devel] [PULL 00/10] Fixes for Cocoa backend

2011-06-13 Thread Andreas Färber
Hello, I've collected a number of warning and usability fixes for the Cocoa frontend and Darwin host. Please pull. Cc: Blue Swirl blauwir...@gmail.com The following changes since commit 0b862cedf36d927818c50584ddd611b0370673df: configure: Detect and don't try to use older libcurl (2011-06-13

[Qemu-devel] [PATCH 09/10] cocoa: Avoid warning related to multiple handleEvent: definitions

2011-06-13 Thread Andreas Färber
Avoid compiler confusion as to which method signature to use for the handleEvent: selector on OSX = 10.6 by making the variable type-safe as opposed to generic 'id' type. Requires moving the variable definition to after the class definition. 8 ui/cocoa.m: In function ‘cocoa_refresh’:

[Qemu-devel] [PATCH 02/10] Fix compilation warning due to incorrectly specified type

2011-06-13 Thread Andreas Färber
From: Alexandre Raymond cerb...@gmail.com In audio/coreaudio.c, a variable named str was assigned const char values, which resulted in the following warnings: -8- audio/coreaudio.c: In function ‘coreaudio_logstatus’: audio/coreaudio.c:59: warning: initialization discards qualifiers from

[Qemu-devel] [PATCH 06/10] Fix libfdt warnings on Darwin

2011-06-13 Thread Andreas Färber
Building with libfdt results in the following warnings on Mac OS X: CCppc-softmmu/device_tree.o In file included from /Users/andreas/QEMU/latest64/include/libfdt.h:54, from /Users/andreas/QEMU/qemu/device_tree.c:26: /Users/andreas/QEMU/qemu/libfdt_env.h:25:20: warning:

[Qemu-devel] [PATCH 08/10] cocoa: Revert dependency on VNC

2011-06-13 Thread Andreas Färber
In 821601ea5b02a68ada479731a4d3d07a9876632a (Make VNC support optional) cocoa.o was moved from ui-obj-$(CONFIG_COCOA) to vnc-obj-$(CONFIG_COCOA), adding a dependency on $(CONFIG_VNC). That must've been unintentional. Cc: Jes Sorensen jes.soren...@redhat.com Cc: Anthony Liguori aligu...@us.ibm.com

[Qemu-devel] [PATCH 03/10] Cocoa: avoid displaying window when command-line contains '-h' or '-help'

2011-06-13 Thread Andreas Färber
From: Alexandre Raymond cerb...@gmail.com There was already a check in place to avoid displaying a window in certain modes such as vnc, nographic or curses. Add a check for '-h' and '-help' to avoid displaying a window for a split- second before showing the usage information. Signed-off-by:

[Qemu-devel] [PATCH 10/10] Darwin: Fix compilation warning regarding the deprecated daemon() function

2011-06-13 Thread Andreas Färber
From: Alexandre Raymond cerb...@gmail.com Changes since v1: create a wrapper function named qemu_daemon() in oslib-posix.c instead of putting the OS specific workaround in qemu-nbd.c directly. On OSX = 10.5, daemon() is deprecated, resulting in the following warning: 8 qemu-nbd.c: In

Re: [Qemu-devel] [PATCH v2] Darwin: Fix compilation warning regarding the deprecated daemon() function

2011-06-13 Thread Andreas Färber
Am 13.06.2011 um 22:20 schrieb Blue Swirl: On Thu, Jun 9, 2011 at 9:47 PM, Andreas Färber andreas.faer...@web.de wrote: Am 07.06.2011 um 05:34 schrieb Alexandre Raymond: Changes since v1: create a wrapper function named qemu_daemon() in oslib-posix.c instead of putting the OS specific

[Qemu-devel] [PATCH 07/10] cocoa: Provide central qemu_main() prototype

2011-06-13 Thread Andreas Färber
This fixes a missing prototype warning in vl.c and obsoletes the prototype in cocoa.m. Adjust callers in cocoa.m to supply third argument, which is currently only used on Linux/ppc. The prototype is designed so that it could be shared with SDL and other frontends, if desired. Cc: Alexandre

[Qemu-devel] [PATCH] Fix typo in cpus.c

2011-06-13 Thread Alexandre Raymond
filed - failed Signed-off-by: Alexandre Raymond cerb...@gmail.com --- cpus.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpus.c b/cpus.c index 1fc34b7..4ab76f0 100644 --- a/cpus.c +++ b/cpus.c @@ -297,7 +297,7 @@ static void qemu_event_increment(void) /*

[Qemu-devel] [QAPI+QGA 2/3] QAPI code generation infrastructure v3

2011-06-13 Thread Michael Roth
This is Set 2/3 of the QAPI+QGA patchsets. These patches apply on top of master (set1 merged), and can also be obtained from: git://repo.or.cz/qemu/mdroth.git qapi-backport-set2-v3 (Set1+2 are a backport of some of the QAPI-related work from Anthony's glib tree. The main goal is to get the basic

[Qemu-devel] [PATCH v3 02/21] qlist: add qlist_first()/qlist_next()

2011-06-13 Thread Michael Roth
Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- qlist.h | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/qlist.h b/qlist.h index dbe7b92..d426bd4 100644 --- a/qlist.h +++ b/qlist.h @@ -16,6 +16,7 @@ #include qobject.h #include qemu-queue.h #include

[Qemu-devel] [PATCH v3 01/21] Add hard build dependency on glib

2011-06-13 Thread Michael Roth
From: Anthony Liguori aligu...@us.ibm.com GLib is an extremely common library that has a portable thread implementation along with tons of other goodies. GLib and GObject have a fantastic amount of infrastructure we can leverage in QEMU including an object oriented programming infrastructure.

[Qemu-devel] [PATCH v3 06/21] qapi: add QMP output visitor

2011-06-13 Thread Michael Roth
Type of Visiter class that serves as the inverse of the input visitor: it takes a series of native C types and uses their values to construct a corresponding QObject. The command marshaling/dispatcher functions will use this to convert the output of QMP functions into a QObject that can be sent

[Qemu-devel] [PATCH v3 07/21] qapi: add QAPI dealloc visitor

2011-06-13 Thread Michael Roth
Type of Visitor class that can be passed into a qapi-generated C type's visitor function to free() any heap-allocated data types. Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- Makefile.objs |2 +- qapi/qapi-dealloc-visitor.c | 127

[Qemu-devel] [PATCH v3 04/21] qapi: add QAPI visitor core

2011-06-13 Thread Michael Roth
Base definitions/includes for Visiter interface used by generated visiter/marshalling code. Includes a GenericList type. Our lists require an embedded element. Since these types are generated, if you want to use them in a different type of data structure, there's no easy way to add another

[Qemu-devel] [PATCH v3 03/21] qapi: add module init types for qapi

2011-06-13 Thread Michael Roth
Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- module.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/module.h b/module.h index 9263f1c..ef66730 100644 --- a/module.h +++ b/module.h @@ -24,12 +24,14 @@ typedef enum { MODULE_INIT_BLOCK,

[Qemu-devel] [PATCH v3 08/21] qapi: add QMP command registration/lookup functions

2011-06-13 Thread Michael Roth
Registration/lookup functions for that provide a lookup table for dispatching QMP commands. Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- Makefile.objs |1 + qapi/qmp-core.h | 40 qapi/qmp-registry.c | 26

[Qemu-devel] [PATCH v3 10/21] qapi: add ordereddict.py helper library

2011-06-13 Thread Michael Roth
We need this to parse dictionaries with schema ordering intact so that C prototypes can be generated deterministically. Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- scripts/ordereddict.py | 128 1 files changed, 128 insertions(+), 0

[Qemu-devel] [PATCH v3 05/21] qapi: add QMP input visitor

2011-06-13 Thread Michael Roth
A type of Visiter class that is used to walk a qobject's structure and assign each entry to the corresponding native C type. Command marshaling function will use this to pull out QMP command parameters recieved over the wire and pass them as native arguments to the corresponding C functions.

[Qemu-devel] [PATCH v3 19/21] qapi: add test-qmp-commands, tests for gen. marshalling/dispatch code

2011-06-13 Thread Michael Roth
Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- test-qmp-commands.c | 113 +++ 1 files changed, 113 insertions(+), 0 deletions(-) create mode 100644 test-qmp-commands.c diff --git a/test-qmp-commands.c b/test-qmp-commands.c new file

[Qemu-devel] [PATCH v3 12/21] qapi: add qapi-types.py code generator

2011-06-13 Thread Michael Roth
This is the code generator for qapi types. It will generation the following files: $(prefix)qapi-types.h - C types corresponding to types defined in the schema you pass in $(prefix)qapi-types.c - Cleanup functions for the above C types The $(prefix) is used to as a

[Qemu-devel] [PATCH v3 13/21] qapi: add qapi-visit.py code generator

2011-06-13 Thread Michael Roth
This is the code generator for qapi visiter functions used to marshal/unmarshal/dealloc qapi types. It generates the following 2 files: $(prefix)qapi-visit.c: visiter function for a particular c type, used to automagically convert qobjects into the

[Qemu-devel] [RFC 03/23] prep: Prepare emulation of an IBM RS/6000 6015 / 7020 (40p)

2011-06-13 Thread Andreas Färber
Signed-off-by: Hervé Poussineau hpous...@reactos.org Signed-off-by: Andreas Färber andreas.faer...@web.de --- hw/ppc_prep.c | 62 + 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c index

[Qemu-devel] [PATCH v3 09/21] qapi: add QMP dispatch functions

2011-06-13 Thread Michael Roth
Given an object recieved via QMP, this code uses the dispatch table provided by qmp_registry.c to call the corresponding marshalling/dispatch function and format return values/errors for delivery to the QMP. Currently only synchronous QMP functions are supported, but this will also be used for

[Qemu-devel] [RFC 07/23] 40p: Add a PCI to ISA bridge (i82378)

2011-06-13 Thread Andreas Färber
Signed-off-by: Hervé Poussineau hpous...@reactos.org Don't create an ISA bus at machine level, the i82378 does that. Cc: Markus Armbruster arm...@redhat.com Signed-off-by: Andreas Färber andreas.faer...@web.de --- hw/ppc_prep.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-)

[Qemu-devel] [PATCH RFC 01/23] prep: Refactor CPU initialization

2011-06-13 Thread Andreas Färber
To cope with upcoming PReP machines and as a first step towards pending qdev'ification of the ppc CPU, move CPU initialization to a helper function, similar to pc_new_cpu(). Cc: Hervé Poussineau hpous...@reactos.org Signed-off-by: Andreas Färber andreas.faer...@web.de --- hw/ppc_prep.c | 47

[Qemu-devel] [PATCH v3 11/21] qapi: add qapi.py helper libraries

2011-06-13 Thread Michael Roth
Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- scripts/qapi.py | 203 +++ 1 files changed, 203 insertions(+), 0 deletions(-) create mode 100644 scripts/qapi.py diff --git a/scripts/qapi.py b/scripts/qapi.py new file mode 100644

[Qemu-devel] [PATCH v3 20/21] qapi: Makefile changes to build test-qmp-commands

2011-06-13 Thread Michael Roth
Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- Makefile |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 6083085..6adf1a9 100644 --- a/Makefile +++ b/Makefile @@ -146,7 +146,7 @@ check-qfloat: check-qfloat.o qfloat.o

[Qemu-devel] [RFC 00/23] PReP 40P emulation

2011-06-13 Thread Andreas Färber
Hi, Based mostly on earlier work by Hervé Poussineau, this RFC series adds emulation of a real '40p' IBM PReP machine as an addition to the existing 'prep' machine. It does some general cleanups and qdev'ification that will benefit further PReP machines, such as the BeBox. This series supersedes

[Qemu-devel] [RFC v5 10/23] isa: Provide enable and disable callbacks

2011-06-13 Thread Andreas Färber
To allow enabling/disabling present ISA devices without hotplug, keep track of state and add a helper to avoid enabling twice. Since the properties to be configured are defined at device level, delegate the actual work to callback functions. Use separate ones for enable and disable, otherwise the

[Qemu-devel] [PATCH v3 14/21] qapi: add qapi-commands.py code generator

2011-06-13 Thread Michael Roth
This is the code generator for qapi command marshaling/dispatch. Currently only generators for synchronous qapi/qmp functions are supported. This script generates the following files: $(prefix)qmp-marshal.c: command marshal/dispatch functions for each QMP command

[Qemu-devel] [RFC 05/23] prep: Add i82374 DMA emulation

2011-06-13 Thread Andreas Färber
Signed-off-by: Hervé Poussineau hpous...@reactos.org Confine to CONFIG_I82374. Signed-off-by: Andreas Färber andreas.faer...@web.de --- Makefile.objs |1 + default-configs/ppc-softmmu.mak |1 + hw/i82374.c | 133

[Qemu-devel] [RFC v5 18/23] ide: Implement ISA state callbacks

2011-06-13 Thread Andreas Färber
Add enabled qdev property, and implement enable and disable callbacks. Incorporate ISA VMState as well as I/O bases and IRQ as subsection, and implement pre_load and post_load callbacks. Cc: Gerd Hoffmann kra...@redhat.com Cc: Markus Armbruster arm...@redhat.com Cc: Juan Quintela

[Qemu-devel] [PATCH v5 15/23] fdc: Parametrize ISA base, IRQ and DMA

2011-06-13 Thread Andreas Färber
From: Hervé Poussineau hpous...@reactos.org Keep the PC values as defaults but allow to override them for PReP. Signed-off-by: Hervé Poussineau hpous...@reactos.org Cc: Markus Armbruster arm...@redhat.com Signed-off-by: Andreas Färber andreas.faer...@web.de --- hw/fdc.c | 27

[Qemu-devel] [PATCH v3 15/21] qapi: test schema used for unit tests

2011-06-13 Thread Michael Roth
This is how QMP commands/parameters/types would be defined. We use a subset of that functionality here to implement functions/types for unit testing. Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- qapi-schema-test.json | 22 ++ 1 files changed, 22 insertions(+),

[Qemu-devel] [PATCH v5 09/23] qdev: Add helpers for reading properties

2011-06-13 Thread Andreas Färber
Add helpers qdev_prop_get_*() to access all integer qdev properties as well as string properties. This effectively turns qdev properties from write-only to read/write, allowing to inspect a private DeviceState. Signed-off-by: Andreas Färber andreas.faer...@web.de --- hw/qdev-properties.c | 53

[Qemu-devel] [RFC v5 17/23] ide: Allow to discard I/O ports

2011-06-13 Thread Andreas Färber
Signed-off-by: Andreas Färber andreas.faer...@web.de --- hw/ide/core.c |8 hw/ide/internal.h |1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 95beb17..8fa2201 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1761,6

[Qemu-devel] [PATCH v3 17/21] qapi: configure, Fix build issue when using seperate build dir

2011-06-13 Thread Michael Roth
Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- configure |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure b/configure index d3a3a96..3d73780 100755 --- a/configure +++ b/configure @@ -3549,6 +3549,7 @@ DIRS=tests tests/cris slirp audio block net

[Qemu-devel] [RFC v5 19/23] prep: Add pc87312 Super I/O emulation

2011-06-13 Thread Andreas Färber
This provides floppy and IDE controllers as well as serial and parallel ports. Signed-off-by: Hervé Poussineau hpous...@reactos.org Create all devices ahead of time and enable/disable as needed. Check the qdev properties for whether a change is necessary. Signed-off-by: Andreas Färber

[Qemu-devel] [RFC v5 11/23] isa: Allow to un-assign I/O ports

2011-06-13 Thread Andreas Färber
Signed-off-by: Andreas Färber andreas.faer...@web.de --- hw/isa-bus.c | 15 +++ hw/isa.h |1 + 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/hw/isa-bus.c b/hw/isa-bus.c index bbafb75..6e33d80 100644 --- a/hw/isa-bus.c +++ b/hw/isa-bus.c @@ -105,6 +105,21 @@

[Qemu-devel] [RFC 22/23] prep: qdev'ify System I/O (WIP)

2011-06-13 Thread Andreas Färber
PReP defines a number of 1-byte registers Signed-off-by: Hervé Poussineau hpous...@reactos.org v1: * Rebased: Fix I/O port types for ppc64 compatibility. Use Little Endian for parity error register. * Drop iobase property. It was not being set to another value, ignored for reads and writes,

[Qemu-devel] [PATCH v3 18/21] qapi: Makefile changes to build test-visitor

2011-06-13 Thread Michael Roth
Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- Makefile | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 306cd9b..6083085 100644 --- a/Makefile +++ b/Makefile @@ -145,6 +145,19 @@ check-qlist: check-qlist.o qlist.o

[Qemu-devel] [RFC 04/23] 40p: Add PCI host

2011-06-13 Thread Andreas Färber
Signed-off-by: Hervé Poussineau hpous...@reactos.org Avoid global variable for PCIBus. Inline PCI bus creation. Suppress potential gcc 4.6 write-only variable warning. Signed-off-by: Andreas Färber andreas.faer...@web.de --- hw/ppc_prep.c |8 1 files changed, 8 insertions(+), 0

[Qemu-devel] [RFC 20/23] 40p: Add the Super I/O chip (pc87312)

2011-06-13 Thread Andreas Färber
Signed-off-by: Hervé Poussineau hpous...@reactos.org Set the floppy properties with raw qdev_prop_set() for now because qdev_prop_set_drive() also calls bdrv_attach(), which can't be called twice for a drive. Having it attached to the isa-fdc seems nicer. Signed-off-by: Andreas Färber

[Qemu-devel] [PATCH v3 21/21] qapi: add QAPI code generation documentation

2011-06-13 Thread Michael Roth
Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- docs/qapi-code-gen.txt | 316 1 files changed, 316 insertions(+), 0 deletions(-) create mode 100644 docs/qapi-code-gen.txt diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt

[Qemu-devel] [RFC 02/23] prep: qdev'ify PCI

2011-06-13 Thread Andreas Färber
Don't always keep pointer to PIC, but keep only references to required IRQs. Add a PCI host. Signed-off-by: Hervé Poussineau hpous...@reactos.org Avoid adding qemu_irq state by reusing SysBus facilities. This allows to qdev'ify the PCIDevice, too, by banning hardcoded IRQ numbers into

[Qemu-devel] [RFC v5 13/23] parallel: Implement ISA state callbacks

2011-06-13 Thread Andreas Färber
Add enabled qdev property, and implement enable and disable callbacks. Cc: Gerd Hoffmann kra...@redhat.com Cc: Markus Armbruster arm...@redhat.com Signed-off-by: Andreas Färber andreas.faer...@web.de --- hw/parallel.c | 75 + 1 files

[Qemu-devel] [PATCH v5 08/23] qdev: Add support for property type bool

2011-06-13 Thread Andreas Färber
VMState supports the type bool but qdev instead supports bit, backed by uint32_t. Therefore let's add DEFINE_PROP_BOOL() and qdev_prop_set_bool(). Since, e.g., enabled=on does not look nice, parse/print yes and no. Also support on/off as secondary values and vice versa. Cc: Juan Quintela

[Qemu-devel] [RFC 06/23] prep: Add i82378 PCI-to-ISA bridge emulation

2011-06-13 Thread Andreas Färber
Signed-off-by: Hervé Poussineau hpous...@reactos.org Inverse endianness in order to work on x86 and ppc host. Create ISA bus in this device (suggested by Markus). Cc: Markus Armbruster arm...@redhat.com Signed-off-by: Andreas Färber andreas.faer...@web.de --- Makefile.objs |

[Qemu-devel] [RFC v5 12/23] isa: Allow to un-associate an IRQ

2011-06-13 Thread Andreas Färber
ISADevices keep a list of numeric IRQs. Remove one from that list. Also optionally NULL the qemu_irq, calling it uninit for symmetry. Cc: Gerd Hoffmann kra...@redhat.com Cc: Markus Armbruster arm...@redhat.com Signed-off-by: Andreas Färber andreas.faer...@web.de --- hw/isa-bus.c | 17

[Qemu-devel] [RFC 21/23] 40p: Add an audio card and a keyboard

2011-06-13 Thread Andreas Färber
From: Hervé Poussineau hpous...@reactos.org Signed-off-by: Hervé Poussineau hpous...@reactos.org Signed-off-by: Andreas Färber andreas.faer...@web.de --- default-configs/ppc-softmmu.mak |1 + hw/ppc_prep.c |8 2 files changed, 9 insertions(+), 0 deletions(-)

[Qemu-devel] [RFC v5 14/23] serial: Implement ISA state callbacks

2011-06-13 Thread Andreas Färber
Add enabled qdev property, and implement enable and disable callbacks. Incorporate ISA VMState as well as I/O base and IRQ as subsection, and implement pre_load and post_load callbacks. Cc: Gerd Hoffmann kra...@redhat.com Cc: Markus Armbruster arm...@redhat.com Cc: Juan Quintela

[Qemu-devel] [RFC 23/23] 40p: Add an 8514/A graphics card

2011-06-13 Thread Andreas Färber
The IBM E15 is equivalent to an S3 Vision864. Lacking S3 SDAC (86C716) support, the DAC indizes are translated to greyscale colors. This works sufficiently to observe firmware boot progress. Cc: Hervé Poussineau hpous...@reactos.org Fixed off-by-one drawing issue. Replaced hardcoded color for

[Qemu-devel] [PATCH] Fix signal handling when io-thread is disabled

2011-06-13 Thread Alexandre Raymond
This fix effectively blocks, in the main thread, the signals handled by signalfd or the compatibility signal thread. This way, such signals are received synchronously in the main thread through sigfd_handler() instead of triggering the signal handler directly, asynchronously. Signed-off-by:

[Qemu-devel] [RFC v5 16/23] fdc: Implement ISA state callbacks

2011-06-13 Thread Andreas Färber
Add enabled qdev property, and implement enable and disable callbacks. Incorporate ISA VMState as well as I/O base and IRQ as subsection, and implement pre_load and post_load callbacks. Cc: Gerd Hoffmann kra...@redhat.com Cc: Markus Armbruster arm...@redhat.com Cc: Juan Quintela