[Qemu-devel] QEMU Target CPU support for PowerPC MPC8270

2009-10-19 Thread Johnny Giacomoni
Hi everybody ! I currently work on Linux (Open SUSE) to emulate a CPU (MC8270, FreeScale). I know that QEMU is designed to simulate Operating Systems, but I just want to emulate a CPU. It seem to be possible with QEMU. So, by seeing on http://www.qemu.org/status.html that PowerPC target is testi

Re: [Qemu-devel] [PATCH 00/18] target-arm cleanup

2009-10-19 Thread Juha.Riihimaki
On Oct 19, 2009, at 16:23, ext Aurelien Jarno wrote: >> I think I have a couple of other fixes and patches on top of that as >> well, but I'd rather wait until you get this bunch committed and then >> format the patches against the new mainline so that they apply. > > Thanks I have seen your patc

Re: [Qemu-devel] [PATCH 0/9] S390x KVM support

2009-10-19 Thread Avi Kivity
On 10/19/2009 11:37 PM, Alexander Graf wrote: While S390x was one of the first targets that were supported by KVM it always lacked qemu system emulation support. In order to change that sad fact, I figured I'd just take on the task myself, taking kuli (http://www.ibm.com/developerworks/linux/lin

Re: [Qemu-devel] [PATCH] new SDL keyboard shortcuts to start and stop VM

2009-10-19 Thread Mulyadi Santosa
Hi Anthony... On Tue, Oct 20, 2009 at 5:20 AM, Anthony Liguori wrote: > Mulyadi Santosa wrote: >> >> IMO, it would be faster if we provide keyboard shortcuts that will >> stop and resume VM execution right from SDL guest interface, rather >> than switching to console monitor first and type "s" or

Re: [Qemu-devel] [PATCH 2/2] vmstate: add VMSTATE_ARRAY_UNSAFE

2009-10-19 Thread Glauber Costa
On Mon, Oct 19, 2009 at 5:07 PM, Juan Quintela wrote: > Use offset given as an array of type given, without doing typechecking. > > +#define VMSTATE_ARRAY_UNSAFE(_field, _state, _num, _version, _info, _type) {\ > +    .name       = (stringify(_field)),                               \ > +    .versi

Re: [Qemu-devel] [PATCH 1/2] vmstate: u64 support

2009-10-19 Thread Glauber Costa
On Mon, Oct 19, 2009 at 5:07 PM, Juan Quintela wrote: > This is needed due to the difference betewen 'unsigned long' and 'unsigned > long long' types.  They don't typecheck. > > This allows to use directly linux kernel structures. > For the reference, it was included today in qemu-kvm.git as a de

Re: [Qemu-devel] [PATCH] new SDL keyboard shortcuts to start and stop VM

2009-10-19 Thread Anthony Liguori
Mulyadi Santosa wrote: IMO, it would be faster if we provide keyboard shortcuts that will stop and resume VM execution right from SDL guest interface, rather than switching to console monitor first and type "s" or "c" respectively. Is this really common of an operation that you would need an

[Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error

2009-10-19 Thread Paolo Bonzini
On 10/19/2009 06:50 PM, Hollis Blanchard wrote: On Sun, 2009-10-18 at 14:17 +0200, Paolo Bonzini wrote: On 10/18/2009 06:25 AM, Jamie Lokier wrote: The manual for GNU gettext explains quite well why gettext takes a message string as argument, instead of a "message code". Imho, a similar case c

[Qemu-devel] Re: [PATCH 00/25] VMState cleanups and conversion of network drivers

2009-10-19 Thread Jamie Lokier
Juan Quintela wrote: > I have good error messages, I don't have good ideas about how to trick > the compiler. Error messages are clear. > > Example: > > struct FOO { >unt16_t foo[0]; > } > #define vmstate_offset_pointer(_state, _field, _type)\ > (offsetof(_state, _fie

[Qemu-devel] Re: [PATCH 00/25] VMState cleanups and conversion of network drivers

2009-10-19 Thread Juan Quintela
Jamie Lokier wrote: > Juan Quintela wrote: >> * add VARRAY_UINT16_UNSAFE: unsafe here means that type checking is off >>(a.k.a. as a cast in C). In this case the problem is that the last >>element of one struct is int foo[0], and we allocate the right size >>for the array we want. P

Re: [Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus

2009-10-19 Thread Gerd Hoffmann
Hi, Also I'd suggest to add a sysbus -> s390-virtio bus bridge device, so your bus gets properly hooked up in the device tree. Have a look at the (quite simple) "isabus-bridge" device in isa-bus.c, which is used with 'qemu -M isapc'. You'll see the s390-virtio bus and all virtio devices attach

Re: [Qemu-devel] [PATCH 8/9] Set default console to virtio on S390x

2009-10-19 Thread Gerd Hoffmann
On 10/19/09 16:37, Alexander Graf wrote: All "normal" system emulation targets in qemu I'm aware of display output on either VGA or serial output. Our S390x virtio machine doesn't have such kind of legacy hardware. So instead we need to default to a virtio console. I'm not particularly proud of

Re: [Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus

2009-10-19 Thread Alexander Graf
On 19.10.2009, at 21:34, Gerd Hoffmann wrote: +VirtIOS390Bus *s390_virtio_bus_init(ram_addr_t *ram_size) +{ +VirtIOS390Bus *bus; + +bus = (VirtIOS390Bus *)qbus_create(&s390_virtio_bus_info, NULL, "s390-virtio"); While a cast works the political correct way to do this is using DO_U

Re: [Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus

2009-10-19 Thread Gerd Hoffmann
+VirtIOS390Bus *s390_virtio_bus_init(ram_addr_t *ram_size) +{ +VirtIOS390Bus *bus; + +bus = (VirtIOS390Bus *)qbus_create(&s390_virtio_bus_info, NULL, "s390-virtio"); While a cast works the political correct way to do this is using DO_UPCAST. Also I'd suggest to add a sysbus -> s390-vir

Re: [Qemu-devel] [PATCH 0/9] S390x KVM support

2009-10-19 Thread Alexander Graf
On 19.10.2009, at 21:24, Gerd Hoffmann wrote: Hi, So now you can run Linux VMs on Linux on z/VM on LPAR on zSeries! Cool. Don't have a zSeries though ... I always thought that's commodity hardware .. oh well :-) The patchset is based on Uli's S390x userspace emulation patches. There'

Re: [Qemu-devel] [PATCH 0/9] S390x KVM support

2009-10-19 Thread Gerd Hoffmann
Hi, So now you can run Linux VMs on Linux on z/VM on LPAR on zSeries! Cool. Don't have a zSeries though ... The patchset is based on Uli's S390x userspace emulation patches. There's not really that much shared functionality, but I didn't want to reimplement the configure wheels. So make s

Re: [Qemu-devel] [PATCH 00/25] VMState cleanups and conversion of network drivers

2009-10-19 Thread Jamie Lokier
Juan Quintela wrote: > * add VARRAY_UINT16_UNSAFE: unsafe here means that type checking is off >(a.k.a. as a cast in C). In this case the problem is that the last >element of one struct is int foo[0], and we allocate the right size >for the array we want. Problem? I haven't been abl

[Qemu-devel] [PATCH 2/2] vmstate: add VMSTATE_ARRAY_UNSAFE

2009-10-19 Thread Juan Quintela
Use offset given as an array of type given, without doing typechecking. Signed-off-by: Juan Quintela --- hw/hw.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 422cf18..9218905 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -382,6 +382,16 @@ ext

[Qemu-devel] [PATCH 1/2] vmstate: u64 support

2009-10-19 Thread Juan Quintela
This is needed due to the difference betewen 'unsigned long' and 'unsigned long long' types. They don't typecheck. This allows to use directly linux kernel structures. Signed-off-by: Juan Quintela --- hw/hw.h | 13 + savevm.c | 23 +++ 2 files changed, 36 i

[Qemu-devel] [PATCH 0/2] vmstate: u64 support

2009-10-19 Thread Juan Quintela
This two patch serie introduces support for linux u64 type. It is needed for Glauber, that is porting code forth and back between qemu.git and qemu-kvm.git, and need it in both places. Later, Juan. Juan Quintela (2): vmstate: u64 support vmstate: add VMSTATE_ARRAY_UNSAFE hw/hw.h | 23 ++

[Qemu-devel] [PATCH] eepro100: Restructure code

2009-10-19 Thread Stefan Weil
This patch only moves about 150 lines of code from function eepro100_cu_command to a new function action_command. A goto statement was replaced by a for loop. There are no functional changes. Nor did I change comments starting with // (they will be removed by future patches). Signed-off-by: Stef

Re: [Qemu-devel] qemu-0.11.50 build breaks at monitor.c

2009-10-19 Thread Marcelo Tosatti
On Mon, Oct 19, 2009 at 01:51:02PM +0530, Kamalesh Babulal wrote: > > >+monitor_printf(mon, " thread_id=%ld", (int long)qdict_get_int(cpu, > > >"thread_id")); > > > > You should use %PRId64 instead of %ld. > > Hi Laurent, > > Thanks for the review. > > Resending the patch with

[Qemu-devel] [PATCH 25/25] e1000: port to vmstate

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/e1000.c | 244 1 files changed, 81 insertions(+), 163 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index e5541c7..4d74ca1 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -879,169 +879,88 @@ e1000_

[Qemu-devel] [PATCH 23/25] e1000: unfold mac_reg_tosave array

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/e1000.c | 87 +++- 1 files changed, 74 insertions(+), 13 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index f123bda..0d40fbe 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -879,15 +879,6 @@ e1000_mmi

[Qemu-devel] [PATCH 20/25] eepro100: port to vmstate

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/eepro100.c | 195 ++--- 1 files changed, 60 insertions(+), 135 deletions(-) diff --git a/hw/eepro100.c b/hw/eepro100.c index 62207da..965de32 100644 --- a/hw/eepro100.c +++ b/hw/eepro100.c @@ -220,6 +220,8

[Qemu-devel] [PATCH 24/25] e1000: unfold mac_regarraystosave array

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/e1000.c | 30 ++ 1 files changed, 14 insertions(+), 16 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index 0d40fbe..e5541c7 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -879,17 +879,11 @@ e1000_mmio_readw(void *opaque, target_

[Qemu-devel] [PATCH 22/25] ne2000: port to vmstate

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/ne2000-isa.c |4 +- hw/ne2000.c | 133 --- hw/ne2000.h |3 +- 3 files changed, 51 insertions(+), 89 deletions(-) diff --git a/hw/ne2000-isa.c b/hw/ne2000-isa.c index e346731..0948b82 100644

[Qemu-devel] [PATCH 21/25] pcnet: port to vmstate

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/pcnet.c | 110 +-- 1 files changed, 39 insertions(+), 71 deletions(-) diff --git a/hw/pcnet.c b/hw/pcnet.c index fecbff7..bd69735 100644 --- a/hw/pcnet.c +++ b/hw/pcnet.c @@ -1878,83 +1878,49 @@ static

[Qemu-devel] [PATCH 18/25] rtl8139: port to vmstate

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/rtl8139.c | 301 - 1 files changed, 85 insertions(+), 216 deletions(-) diff --git a/hw/rtl8139.c b/hw/rtl8139.c index 7efa119..ab3f398 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -416,12 +416,6 @@ s

[Qemu-devel] [PATCH 19/25] eeprom93xx: port to vmstate

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/eeprom93xx.c | 102 ++ 1 files changed, 49 insertions(+), 53 deletions(-) diff --git a/hw/eeprom93xx.c b/hw/eeprom93xx.c index 66dfc43..43244e7 100644 --- a/hw/eeprom93xx.c +++ b/hw/eeprom93xx.c @@ -89,66 +

[Qemu-devel] [PATCH 16/25] vmstate: Introduce the concept of sub-arrays

2009-10-19 Thread Juan Quintela
VMSTATE_SUB_ARRAY(..., start, num, ...) saves the num elems starting at position start of the array Signed-off-by: Juan Quintela --- hw/hw.h | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index d3bf0a7..b98f0c9 100644 --- a/hw/hw.h +

[Qemu-devel] [PATCH 14/25] vmstate: Add version arg to VMSTATE_SINGLE_TEST()

2009-10-19 Thread Juan Quintela
This allows to define VMSTATE_SINGLE with VMSTATE_SINGLE_TEST Signed-off-by: Juan Quintela --- hw/hw.h | 17 ++--- target-i386/machine.c |2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index eb199fb..3feb9df 100644 --- a/hw

[Qemu-devel] [PATCH 17/25] rtl8139: port TallyCounters to vmstate

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/rtl8139.c | 50 -- 1 files changed, 24 insertions(+), 26 deletions(-) diff --git a/hw/rtl8139.c b/hw/rtl8139.c index 10daeb2..7efa119 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -1327,39 +1327,37 @@ static

[Qemu-devel] [PATCH 15/25] vmstate: Add VMSTATE_BUFFER_UNUSED

2009-10-19 Thread Juan Quintela
It allows to have 'things' in savevm format not backed in the device state Signed-off-by: Juan Quintela --- hw/hw.h | 18 ++ savevm.c | 20 2 files changed, 38 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 3feb9df..d3bf0a7 100644 --

[Qemu-devel] [PATCH 13/25] vmstate: add VMS_VARRAY_UINT16_UNSAFE (varrays with uint16 indexes)

2009-10-19 Thread Juan Quintela
It don't check types. Signed-off-by: Juan Quintela --- hw/hw.h | 13 - savevm.c |4 2 files changed, 16 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 5edfff7..eb199fb 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -285,9 +285,10 @@ enum VMStateFlags { VM

[Qemu-devel] [PATCH 12/25] vmstate: Unfold VMSTATE_INT32_VARRAY() only use and remove it

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/hw.h |6 -- hw/pci.c |2 +- 2 files changed, 1 insertions(+), 7 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index dd065c8..5edfff7 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -599,12 +599,6 @@ extern const VMStateDescription vmstate_i2c_slave; #define

[Qemu-devel] [PATCH 11/25] vmstate: factor VMSTATE_*BUFFER* definitions

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/hw.h | 32 +++- 1 files changed, 11 insertions(+), 21 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index aea50a6..dd065c8 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -458,29 +458,13 @@ extern const VMStateInfo vmstate_info_buffer;

[Qemu-devel] [PATCH 10/25] vmstate: factor vmstate_offset_buffer

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/hw.h | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index d669755..aea50a6 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -350,6 +350,10 @@ extern const VMStateInfo vmstate_info_buffer; (offsetof(_state, _fie

[Qemu-devel] [PATCH 09/25] vmstate: factor vmstate_offset_array

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/hw.h | 19 +-- 1 files changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index a331844..d669755 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -346,6 +346,10 @@ extern const VMStateInfo vmstate_info_buffer; (offsetof(_stat

[Qemu-devel] [PATCH 08/25] vmstate: factor vmstate_offset_pointer

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/hw.h |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index d1395e9..a331844 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -342,6 +342,10 @@ extern const VMStateInfo vmstate_info_buffer; (offsetof(_state, _field) +

[Qemu-devel] [PATCH 07/25] vmstate: factor vmstate_offset_value

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/hw.h | 31 +-- 1 files changed, 13 insertions(+), 18 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index cd42f74..d1395e9 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -338,14 +338,17 @@ extern const VMStateInfo vmstate_info_buffer; #defi

[Qemu-devel] [PATCH 06/25] vmstate: fix indentation

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/hw.h | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 89c138d..cd42f74 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -281,12 +281,12 @@ struct VMStateInfo { }; enum VMStateFlags { -VMS_SINGLE = 0x001,

[Qemu-devel] [PATCH 05/25] vmstate: Rename VMS_VARRAY to VMS_VARRAY_INT32

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/fdc.c |2 +- hw/hw.h |8 savevm.c |8 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/fdc.c b/hw/fdc.c index a21e05f..df0532a 100644 --- a/hw/fdc.c +++ b/hw/fdc.c @@ -679,7 +679,7 @@ static const VMStateDescript

[Qemu-devel] [PATCH 04/25] vmstate: add VMSTATE_UINT16_EQUAL[_V]

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/hw.h |7 +++ savevm.c | 20 2 files changed, 27 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 5f48ef8..9a40b43 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -322,6 +322,7 @@ extern const VMStateInfo vmstate_info_in

[Qemu-devel] [PATCH 03/25] vnmstate: fix name for uint8_equal

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c index 27a7686..3d91202 100644 --- a/savevm.c +++ b/savevm.c @@ -863,7 +863,7 @@ static int get_uint8_equal(QEMUFile *f, void *pv, size_t size) } const VMSta

[Qemu-devel] [PATCH 02/25] serial: use post_load version_id field and remove pre_load function

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/serial.c | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/hw/serial.c b/hw/serial.c index eb14f11..ea4154f 100644 --- a/hw/serial.c +++ b/hw/serial.c @@ -648,17 +648,13 @@ static void serial_pre_save(void *opaque) s->fcr_

[Qemu-devel] [PATCH 01/25] vmstate: Add support for partial buffers transmission

2009-10-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/hw.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 8c223f8..5f48ef8 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -464,6 +464,15 @@ extern const VMStateInfo vmstate_info_buffer; + type_check_array(uin

[Qemu-devel] [PATCH 00/25] VMState cleanups and conversion of network drivers

2009-10-19 Thread Juan Quintela
Hi This series cleans VMState internals and port all the pc network devices to VMState (except virtio-net). - Cleanups: * we can send partial buffers, and clean how we do it * refactor all the buffer code. * refactor all the offset code * add VARRAY_UINT16_UNSAFE: unsafe here means that type c

Re: [Qemu-devel] [PATCH 1/9] TCG "sync" op

2009-10-19 Thread Ulrich Hecht
On Saturday 17 October 2009, Edgar E. Iglesias wrote: > I looked at the s390 patches and was also unsure about this sync op. > I'm not convinced it's bad but my first feeling was as Aurelien points > out that the translator shoud take care of it. Indeed. I would have expected it to, in fact. But i

Re: [Qemu-devel] [PATCH 1/9] TCG "sync" op

2009-10-19 Thread Ulrich Hecht
On Friday 16 October 2009, Aurelien Jarno wrote: > This example is a bit biased, as registers are only saved, and never > reused. Let's comment on it though. Yeah, well, I searched from the top for the first case where it makes a difference. If it's of any help, I can upload a complete dump of bo

Re: [Qemu-devel] [PATCH 2/9] S/390 CPU emulation

2009-10-19 Thread Ulrich Hecht
On Saturday 17 October 2009, Aurelien Jarno wrote: > On Fri, Oct 16, 2009 at 02:38:48PM +0200, Ulrich Hecht wrote: > First of all a few general comments. Note that I know very few things > about S390/S390X, so I may have dumb comments/questions. Also as the > patch is very long, I probably have mis

[Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error

2009-10-19 Thread Hollis Blanchard
On Sun, 2009-10-18 at 14:17 +0200, Paolo Bonzini wrote: > On 10/18/2009 06:25 AM, Jamie Lokier wrote: > > The manual for GNU gettext explains quite well why gettext takes a > > message string as argument, instead of a "message code". Imho, a > > similar case can be made for error messages at call

Re: [Qemu-devel] [PATCH 7/9] qdev: Use QError for not found error

2009-10-19 Thread Daniel P. Berrange
On Mon, Oct 19, 2009 at 10:27:51AM -0500, Anthony Liguori wrote: > Daniel P. Berrange wrote: > >Having a named "exception" instead of an error code is fine, but I think > >it is overkill to include fully-structured data fields like 'errno' instead > >of just a string. The libvirt application API ha

Re: [Qemu-devel] [PATCH 7/9] qdev: Use QError for not found error

2009-10-19 Thread Anthony Liguori
Daniel P. Berrange wrote: Having a named "exception" instead of an error code is fine, but I think it is overkill to include fully-structured data fields like 'errno' instead of just a string. The libvirt application API has a insanely detailed error object allowing for passing of structured dat

Re: [Qemu-devel] [PATCH 7/9] qdev: Use QError for not found error

2009-10-19 Thread Daniel P. Berrange
On Mon, Oct 19, 2009 at 09:00:33AM -0500, Anthony Liguori wrote: > Daniel P. Berrange wrote: > >hink just returning error codes to the client is far too little > >information. I don't think we need the fully normalized structure > >that Luiz originally proposed with bus/dev addresses split out, but

[Qemu-devel] [PATCH 1/9] Export function for VA defined ram allocation

2009-10-19 Thread Alexander Graf
S390 requires vmas for guests to be < 256 GB. So we need to directly export mmaps "try to use this vma as start address" feature to not accidently get over that limit. Signed-off-by: Alexander Graf --- cpu-common.h |1 + exec.c | 15 +-- 2 files changed, 14 insertions(+),

[Qemu-devel] [PATCH 6/9] S390 GDB stub

2009-10-19 Thread Alexander Graf
In order to debug funny kernel breakages it's always good to have a working gdb stub around. While Uli's patches don't include one one, I needed one that's at least good enough for 'bt' and some variable examinations during early bootup. So here it is - the absolute basics to get the qemu gdb stu

[Qemu-devel] [PATCH 9/9] Move mp_state to CPU_COMMON

2009-10-19 Thread Alexander Graf
MP State is implemented in the generic code, so let's move the variable it accesses to generic code as well. Still unbreaks PPC and now even S390x w/ KVM. Signed-off-by: Alexander Graf --- cpu-defs.h|1 + target-i386/cpu.h |1 - 2 files changed, 1 insertions(+), 1 deletions(-)

[Qemu-devel] [PATCH 7/9] Implement early printk in virtio-console

2009-10-19 Thread Alexander Graf
On our S390x Virtio machine we don't have anywhere to display early printks on, because we don't know about VGA or serial ports. So instead we just forward everything to the virtio console that we created anyways. Signed-off-by: Alexander Graf --- hw/virtio-console.c |7 +++ hw/virtio-c

[Qemu-devel] [PATCH 8/9] Set default console to virtio on S390x

2009-10-19 Thread Alexander Graf
All "normal" system emulation targets in qemu I'm aware of display output on either VGA or serial output. Our S390x virtio machine doesn't have such kind of legacy hardware. So instead we need to default to a virtio console. I'm not particularly proud of this patch. It would be a lot better to ha

[Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus

2009-10-19 Thread Alexander Graf
On S390x we don't want to go through the hassle of emulating real existing hardware, because we don't need to for running Linux. So let's instead implement a machine that is 100% based on VirtIO which we fortunately implement already. This patch implements the bus that is the groundwork for such

[Qemu-devel] [PATCH 3/9] Add support for S390x system emulation

2009-10-19 Thread Alexander Graf
Right now only S390x Linux userspace emulation is supported. Let's enable the basics for system emulation so we can run virtual machines with KVM! Signed-off-by: Alexander Graf --- target-s390x/cpu.h | 86 - target-s390x/exec.h |5 +++

[Qemu-devel] [PATCH 5/9] Add S390x virtio machine description

2009-10-19 Thread Alexander Graf
In order to use the new S390x virtio bus we just introduced, we also need a machine description that sets up the machine according to our PV specification. Let's add that machine description and be happy! Signed-off-by: Alexander Graf --- Makefile.target |2 +- hw/s390-virtio.c | 244

[Qemu-devel] [PATCH 2/9] Add KVM support for S390x

2009-10-19 Thread Alexander Graf
S390x was one of the first platforms that received support for KVM back in the day. Unfortunately until now there hasn't been a qemu implementation that would enable users to actually run guests. So let's include support for KVM S390x in qemu! Signed-off-by: Alexander Graf --- configure

[Qemu-devel] [PATCH 0/9] S390x KVM support

2009-10-19 Thread Alexander Graf
While S390x was one of the first targets that were supported by KVM it always lacked qemu system emulation support. In order to change that sad fact, I figured I'd just take on the task myself, taking kuli (http://www.ibm.com/developerworks/linux/linux390/kuli.html), Documentation/s390/kvm.txt and

Re: [Qemu-devel] [PATCH 06/11] qobject: add QBool type

2009-10-19 Thread Luiz Capitulino
On Mon, 19 Oct 2009 09:17:38 -0500 Anthony Liguori wrote: > Luiz Capitulino wrote: > > On Sat, 17 Oct 2009 08:36:06 -0500 > > Anthony Liguori wrote: > > > > > >> We currently model as json bool as an int. This works fine on the server > >> side > >> but it means we cannot send back proper b

Re: [Qemu-devel] [PATCH 02/11] Add support for qfloat

2009-10-19 Thread Anthony Liguori
Luiz Capitulino wrote: On Sat, 17 Oct 2009 08:36:02 -0500 Anthony Liguori wrote: qfloat is a qobject wrapper for double precision floating points Signed-off-by: Anthony Liguori --- Makefile |3 +- qfloat.c | 76 + qfloat

Re: [Qemu-devel] [PATCH 06/11] qobject: add QBool type

2009-10-19 Thread Anthony Liguori
Luiz Capitulino wrote: On Sat, 17 Oct 2009 08:36:06 -0500 Anthony Liguori wrote: We currently model as json bool as an int. This works fine on the server side but it means we cannot send back proper bools to the client. Introducing a proper QBool type fixes that. As we talked earl

Re: [Qemu-devel] [PATCH v0 0/9] QError

2009-10-19 Thread Anthony Liguori
Markus Armbruster wrote: I just caught up with this topic, and since there's no obvious one message to reply to, I just reply here. I agree with Anthony we better get the error reporting protocol approximately right the first time, and rushing it could lead to tears later on. Mind, I said "appr

Re: [Qemu-devel] [PATCH 7/9] qdev: Use QError for not found error

2009-10-19 Thread Anthony Liguori
Daniel P. Berrange wrote: hink just returning error codes to the client is far too little information. I don't think we need the fully normalized structure that Luiz originally proposed with bus/dev addresses split out, but we certainly need to include a string description giving as much detail a

Re: [Qemu-devel] [PATCH 00/18] target-arm cleanup

2009-10-19 Thread Aurelien Jarno
On Mon, Oct 19, 2009 at 08:23:11AM +0200, juha.riihim...@nokia.com wrote: > >> Apart from the points you have raised about specific patches there > >> were few more minor bugs in the series spotted by Juha Riihimäki > >> . A fix is available at > >> http://repo.or.cz/w/qemu/navara.git?a=commit;h=2c

Re: [Qemu-devel] [PATCH v0 0/9] QError

2009-10-19 Thread Markus Armbruster
I just caught up with this topic, and since there's no obvious one message to reply to, I just reply here. I agree with Anthony we better get the error reporting protocol approximately right the first time, and rushing it could lead to tears later on. Mind, I said "approximately right", not "perf

Re: [Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error

2009-10-19 Thread Daniel P. Berrange
On Mon, Oct 19, 2009 at 10:28:17AM -0200, Luiz Capitulino wrote: > On Mon, 19 Oct 2009 11:25:19 +0100 > "Daniel P. Berrange" wrote: > > > On Fri, Oct 16, 2009 at 10:05:44AM -0300, Luiz Capitulino wrote: > > > On Fri, 16 Oct 2009 10:06:10 +0200 > > > Paolo Bonzini wrote: > > > > > > > On 10/16/2

Re: [Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error

2009-10-19 Thread Luiz Capitulino
On Mon, 19 Oct 2009 11:25:19 +0100 "Daniel P. Berrange" wrote: > On Fri, Oct 16, 2009 at 10:05:44AM -0300, Luiz Capitulino wrote: > > On Fri, 16 Oct 2009 10:06:10 +0200 > > Paolo Bonzini wrote: > > > > > On 10/16/2009 12:44 AM, Hollis Blanchard wrote: > > > > How about this (basically what Paol

[Qemu-devel] [PATCH] target-arm: cleanup internal resource leaks

2009-10-19 Thread Juha.Riihimaki
Current ARM translator code has several places where it leaves temporary TCG variables alive. This patch removes all such instances I have found so far. Sorry for the mangled inlined patch, the mailserver I use doesn't like patches so I've also included it as an attachment that hopefully status cor

[Qemu-devel] Re: [PATCH 7/9] qdev: Use QError for not found error

2009-10-19 Thread Paolo Bonzini
On 10/19/2009 12:40 PM, Gerd Hoffmann wrote: 'could not open device: permission denied' 'could not open device: no such file or directory' 'could not open device: device or resource busy' Which makes me wonder whenever it makes sense to re-use errno for the error codes instead of inventing our

Re: [Qemu-devel] [PATCH 7/9] qdev: Use QError for not found error

2009-10-19 Thread Daniel P. Berrange
On Mon, Oct 19, 2009 at 12:40:08PM +0200, Gerd Hoffmann wrote: > >I think just returning error codes to the client is far too little > >information. I don't think we need the fully normalized structure > >that Luiz originally proposed with bus/dev addresses split out, but > >we certainly need to in

Re: [Qemu-devel] [PATCH 7/9] qdev: Use QError for not found error

2009-10-19 Thread Gerd Hoffmann
I think just returning error codes to the client is far too little information. I don't think we need the fully normalized structure that Luiz originally proposed with bus/dev addresses split out, but we certainly need to include a string description giving as much detail as possible. If attachin

Re: [Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error

2009-10-19 Thread Daniel P. Berrange
On Fri, Oct 16, 2009 at 10:05:44AM -0300, Luiz Capitulino wrote: > On Fri, 16 Oct 2009 10:06:10 +0200 > Paolo Bonzini wrote: > > > On 10/16/2009 12:44 AM, Hollis Blanchard wrote: > > > How about this (basically what Paolo suggested): > > > > > > { "error": { "code": 12, > > > "desc"

Re: [Qemu-devel] [PATCH 7/9] qdev: Use QError for not found error

2009-10-19 Thread Daniel P. Berrange
On Wed, Oct 14, 2009 at 12:34:21AM +0200, Markus Armbruster wrote: > Luiz Capitulino writes: > > > Signed-off-by: Luiz Capitulino > > --- > > hw/qdev.c |4 ++-- > > 1 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/hw/qdev.c b/hw/qdev.c > > index 906e897..3ce48f7 100644

[Qemu-devel] [PATCH v3 1/4] rom loader: use qemu_strdup.

2009-10-19 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/loader.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index 7aa1a67..6baafa8 100644 --- a/hw/loader.c +++ b/hw/loader.c @@ -559,7 +559,7 @@ int rom_add_file(const char *file, rom->name = qemu_strdup(f

[Qemu-devel] [PATCH v3 2/4] rom loader: make vga+rom loading target specific

2009-10-19 Thread Gerd Hoffmann
This patch adds a loader-target.c file for target-specific rom loading functions. The rom_add_vga() and rom_add_option() macros are transformed into functions and sticked in there. They load the bios on TARGET_I386 and no nothing on other targets. With this in place we can move the rom loading c

[Qemu-devel] [PATCH v3 3/4] vga roms: move loading from pc.c to vga drivers.

2009-10-19 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/cirrus_vga.c |6 +- hw/pc.c | 12 hw/vga-isa.c|3 +++ hw/vga-pci.c|4 hw/vga_int.h|2 ++ 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index 9dfe76

[Qemu-devel] [PATCH v3 0/4] more rom loader patches.

2009-10-19 Thread Gerd Hoffmann
Hi, A collection of rom loader bits, check individual patches for details. v3: back to square one after figuring that having target-specific object files in libhw isn't going to fly ... cheers, Gerd

[Qemu-devel] [PATCH v3 4/4] use rom loader for pc bios.

2009-10-19 Thread Gerd Hoffmann
The pc bios shows up in 'info roms' now. Note that the BIOS is mapped to two places: The complete rom at the top of the memory, and the first 128k at 0xe. Only the first place is listed in 'info roms'. Signed-off-by: Gerd Hoffmann --- hw/pc.c |4 ++-- 1 files changed, 2 insertions(+),

Re: [Qemu-devel] [RfC PATCH v3 00/10] qdev-ify network cards

2009-10-19 Thread Mark McLoughlin
On Fri, 2009-10-16 at 15:41 +0200, Gerd Hoffmann wrote: > Hi, > > Short RfC patch series to get the discussion rolling. We really need to > get the nic drivers qdev-ified properly, so qemu stops segfaulting on > '-device $any_nic_here'. > > New in v3: > * renamed macaddr_t to MACAddr and made

Re: [Qemu-devel] [PATCH 2/2] multiboot: Limit number of multiboot modules

2009-10-19 Thread Kevin Wolf
Am 14.10.2009 18:11, schrieb Adam Lackorzynski: > Hi, > > On Mon Oct 12, 2009 at 12:43:38 +0200, Kevin Wolf wrote: >> Am 11.10.2009 15:48, schrieb a...@os.inf.tu-dresden.de: >>> From: Adam Lackorzynski >>> >>> Add size checks to avoid overwriting the multiboot structure >>> when too many modules

Re: [Qemu-devel] qemu-0.11.50 build breaks at monitor.c

2009-10-19 Thread Kamalesh Babulal
* Laurent Vivier [2009-10-19 09:50:21]: > >Hi Marcelo, > > > > qemu-0.11.50 build breaks with > > > >CCx86_64-softmmu/monitor.o > >cc1: warnings being treated as errors > >/other/srcs/qemu-kvm/monitor.c: In function 'print_cpu_iter': > >/other/srcs/qemu-kvm/monitor.c:450: error: format '

[Qemu-devel] Re: [PATCH 2/4] rom loader: make vga+rom loading target specific

2009-10-19 Thread Gerd Hoffmann
On 10/17/09 11:23, Juan Quintela wrote: +ifdef TARGET_I386 +obj-y += loader-i386.o +else +obj-y += loader-dummy.o +endif + This is wrong (tm). a- TARGET_I386 on Makefiles is only defined for 32bits, not for 64bits (don't blame me, I just did a direct conversion of what was there). Oh. Jo

RE: [Qemu-devel] qemu-0.11.50 build breaks at monitor.c

2009-10-19 Thread Laurent Vivier
>Hi Marcelo, > > qemu-0.11.50 build breaks with > >CCx86_64-softmmu/monitor.o >cc1: warnings being treated as errors >/other/srcs/qemu-kvm/monitor.c: In function 'print_cpu_iter': >/other/srcs/qemu-kvm/monitor.c:450: error: format '%ld' expects type 'long >int', but argument 3 has type

[Qemu-devel] qemu-0.11.50 build breaks at monitor.c

2009-10-19 Thread Kamalesh Babulal
Hi Marcelo, qemu-0.11.50 build breaks with CCx86_64-softmmu/monitor.o cc1: warnings being treated as errors /other/srcs/qemu-kvm/monitor.c: In function 'print_cpu_iter': /other/srcs/qemu-kvm/monitor.c:450: error: format '%ld' expects type 'long int', but argument 3 has type 'int64_t