Re: [Qemu-devel] [PATCH v1 1/1] Submit the codes for QEMU disk I/O limits.

2011-07-24 Thread Zhi Yong Wu
On Mon, Jul 25, 2011 at 1:40 PM, Stefan Hajnoczi wrote: > On Mon, Jul 25, 2011 at 5:25 AM, Zhi Yong Wu wrote: >> On Fri, Jul 22, 2011 at 6:54 PM, Stefan Hajnoczi wrote: >>> On Fri, Jul 22, 2011 at 10:20 AM, Zhi Yong Wu >>> wrote: +static void bdrv_block_timer(void *opaque) +{ +

Re: [Qemu-devel] [PATCH] report serial devices created with -device in the PIIX4 config space

2011-07-24 Thread Paolo Bonzini
On 07/25/2011 03:45 AM, Anthony Liguori wrote: The getters lack type safety though which is unfortunate. That said, I guess it's the best we can do with qdev. You can assert on type mismatch though, just like with setters. Paolo

Re: [Qemu-devel] [V4 Patch 3/4 - Updated]Qemu: Command "block_set" for dynamic block params change

2011-07-24 Thread Stefan Hajnoczi
On Wed, Jul 13, 2011 at 06:37:05PM +0530, Supriya Kannery wrote: > Index: qemu/block.c > === > --- qemu.orig/block.c > +++ qemu/block.c > @@ -651,6 +651,40 @@ unlink_and_fail: > return ret; > } > > +int bdrv_reopen(BlockDriverSt

Re: [Qemu-devel] [PATCH v1 1/1] Submit the codes for QEMU disk I/O limits.

2011-07-24 Thread Stefan Hajnoczi
On Mon, Jul 25, 2011 at 5:25 AM, Zhi Yong Wu wrote: > On Fri, Jul 22, 2011 at 6:54 PM, Stefan Hajnoczi wrote: >> On Fri, Jul 22, 2011 at 10:20 AM, Zhi Yong Wu >> wrote: >>> +static void bdrv_block_timer(void *opaque) >>> +{ >>> +    BlockDriverState *bs = opaque; >>> +    BlockQueue *queue = bs

Re: [Qemu-devel] [PATCH v1 1/1] Submit the codes for QEMU disk I/O limits.

2011-07-24 Thread Zhi Yong Wu
On Fri, Jul 22, 2011 at 6:54 PM, Stefan Hajnoczi wrote: > On Fri, Jul 22, 2011 at 10:20 AM, Zhi Yong Wu > wrote: >> +static void bdrv_block_timer(void *opaque) >> +{ >> +    BlockDriverState *bs = opaque; >> +    BlockQueue *queue = bs->block_queue; >> +    uint64_t intval = 1; >> + >> +    whil

[Qemu-devel] [PATCH 16/21] qom-devices: add a Pin class

2011-07-24 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- devices/Makefile |2 +- devices/pin.c | 69 include/qemu/pin.h | 28 + 3 files changed, 98 insertions(+), 1 deletions(-) create mode 100644 devices/pin.c create mode 100644

[Qemu-devel] [PATCH 01/21] qom: add make infrastructure

2011-07-24 Thread Anthony Liguori
QOM provides a unified model for separating modules into independently buildable components. To fully take advantage of this, we need a bit more make infrastructure that lets us describe these modules and their dependencies. Ultimately this will enable us to support tristate modules that can be de

[Qemu-devel] [PATCH 19/21] qom-chrdrv: add Socket base class

2011-07-24 Thread Anthony Liguori
This introduces two classed, SocketCharDriver and SocketServer. SocketCharDriver implements the generic logic for all socket based transports. SocketServer implements the necessary functionality for server-based socket transports. Unlike the previous socket CharDriverState, there is no magic overl

[Qemu-devel] [PATCH 07/21] plug: add generated property types

2011-07-24 Thread Anthony Liguori
Right now this uses the preprocessor and is vomit inducing. I think a python generator is in the near future. Signed-off-by: Anthony Liguori --- include/qemu/plug-proptypes.h | 29 +- include/qemu/plug.h |4 +- qom/plug-proptypes.c | 119 +++

[Qemu-devel] [PATCH 09/21] qom: add plug_list QMP command

2011-07-24 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- monitor.c | 25 + qmp-commands.hx |9 + 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 8406b5b..f17eb3a 100644 --- a/monitor.c +++ b/monitor.c @@ -1069,6 +1069,31 @@ static

[Qemu-devel] [PATCH 10/21] qom: add plug_get QMP command

2011-07-24 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- monitor.c | 35 +++ qmp-commands.hx |9 + 2 files changed, 44 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index f17eb3a..1937e9f 100644 --- a/monitor.c +++ b/monitor.c @@ -1094,6 +1094,41

Re: [Qemu-devel] [PATCH] report serial devices created with -device in the PIIX4 config space

2011-07-24 Thread Anthony Liguori
On 07/24/2011 04:35 PM, Andreas Färber wrote: Am 24.07.2011 um 20:57 schrieb Anthony Liguori: On 07/24/2011 01:45 PM, Paolo Bonzini wrote: On 07/16/2011 04:39 PM, Anthony Liguori wrote: Instead of checking for a port assignment, couldn't we do a device tree transversal and look for isa-seria

[Qemu-devel] [PATCH 13/21] qom: add plug_destroy command

2011-07-24 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- monitor.c | 20 qmp-commands.hx |9 + 2 files changed, 29 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index e53808a..549251a 100644 --- a/monitor.c +++ b/monitor.c @@ -1069,6 +1069,26 @@ static int d

[Qemu-devel] [PATCH 08/21] qom: add plug_create QMP command

2011-07-24 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- monitor.c | 49 + qmp-commands.hx | 27 +++ 2 files changed, 76 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 718935b..8406b5b 100644 --- a/monitor.c +++

[Qemu-devel] [PATCH 04/21] qom: add Plug class

2011-07-24 Thread Anthony Liguori
The Plug class is the base class for all objects. Plugs implement properties using the existing Visitor framework. This allows for very complex properties to be implemented. Plugs also implement life cycle management by containing a realized state. An object isn't fully constructed until its re

[Qemu-devel] [PATCH 03/21] qom: Add core type system

2011-07-24 Thread Anthony Liguori
This patch implements the basic type system used by QEMU Object Model. This infrastructure supports the registration of classes and instantiation of objects through a generic factory interface. Classes support polymophism and single inheritance. Interfaces can also be used to approximate multipl

[Qemu-devel] [PATCH v1 1/1] Submit the codes for QEMU disk I/O limits.

2011-07-24 Thread Zhi Yong Wu
Signed-off-by: Zhi Yong Wu --- Makefile.objs |2 +- block.c | 248 + block.h |1 - block/blk-queue.c | 99 + block/blk-queue.h | 73 block_int.h | 21 + blockd

[Qemu-devel] [PATCH v1 0/1] The draft of the codes for QEMU disk I/O limits

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

Re: [Qemu-devel] [PATCH 1/7] Export the unassigned_mem read/write functions.

2011-07-24 Thread Richard Henderson
On 07/24/2011 06:47 PM, Anthony Liguori wrote: > On 07/24/2011 02:00 PM, Richard Henderson wrote: >> On 07/24/2011 11:56 AM, Anthony Liguori wrote: >>> What is returned by totally unregistered MMIO is defined by the >>> chipset. What's returned by an empty space in the MMIO space of a >>> device is

[Qemu-devel] [PATCH 05/21] plug: add Plug property type

2011-07-24 Thread Anthony Liguori
Plug properties types allow composition within the object model. A plug is an object that is directly created from the current object, usually using the same memory as the current object. Realize state is propagated to any plugs assocatied with the object. Lifecycle is also propagated such that

[Qemu-devel] [PATCH 17/21] qom: add CharDriver class

2011-07-24 Thread Anthony Liguori
The CharDriver type replaces the CharDriverState in QEMU today. Here's how everything matches up: 1) qemu_chr_open() no longer exists. This function used to act as a factory and used parsing of the filename to determine which type to create. A newer version using QemuOpts was introduce

[Qemu-devel] [RFC][PATCH 0/21] QEMU Object Model

2011-07-24 Thread Anthony Liguori
Hi, This series is the rough beginnings of the QEMU Object Model. This is basically qdev generalized on steroids. This series includes the core infrastructure, a strawman Device type, and the beginnings of the conversion of CharDriverState. This is in a rougher state than I would like it to be

Re: [Qemu-devel] [PATCH 2/3] slirp: fix warning on mingw32

2011-07-24 Thread Anthony Liguori
On 07/24/2011 12:21 PM, Blue Swirl wrote: On Sun, Jul 24, 2011 at 1:23 AM, Anthony Liguori wrote: On 07/23/2011 04:25 PM, Blue Swirl wrote: Avoid this warning: CCslirp/ip_icmp.o /src/qemu/slirp/ip_icmp.c: In function 'icmp_receive': /src/qemu/slirp/ip_icmp.c:418:5: error: passing argum

Re: [Qemu-devel] [PATCH 1/7] Export the unassigned_mem read/write functions.

2011-07-24 Thread Anthony Liguori
On 07/24/2011 02:00 PM, Richard Henderson wrote: On 07/24/2011 11:56 AM, Anthony Liguori wrote: What is returned by totally unregistered MMIO is defined by the chipset. What's returned by an empty space in the MMIO space of a device is device specific. It's one and the same here, it's the chip

[Qemu-devel] [PATCH 14/21] qom: add example qsh command

2011-07-24 Thread Anthony Liguori
This lets you explore the QEMU Object Model with a filesystem like interface. Signed-off-by: Anthony Liguori --- scripts/qsh | 178 +++ 1 files changed, 178 insertions(+), 0 deletions(-) create mode 100755 scripts/qsh diff --git a/script

[Qemu-devel] [PATCH 18/21] qom-chrdrv: add memory character driver

2011-07-24 Thread Anthony Liguori
This is used primarly by QMP. Signed-off-by: Anthony Liguori --- chrdrv/Makefile |1 + chrdrv/Qconfig|7 + chrdrv/memchr.c | 70 + include/qemu/memchr.h | 46 4 files changed, 124

[Qemu-devel] [PATCH 21/21] qom-chrdrv: add UnixServer

2011-07-24 Thread Anthony Liguori
This is roughly equivalent to -chardev socket,path=PATH,server=on Signed-off-by: Anthony Liguori --- chrdrv/Makefile|1 + chrdrv/Qconfig |7 +++ chrdrv/unixsrv.c | 104 include/qemu/unixsrv.h | 24 +++ 4 fi

[Qemu-devel] [PATCH 20/21] qom-chrdrv: add TCPServer class

2011-07-24 Thread Anthony Liguori
This is roughly equivalent to -chardev socket,path=PATH,port=PORT,server=on Signed-off-by: Anthony Liguori --- chrdrv/Makefile |1 + chrdrv/Qconfig|7 ++ chrdrv/tcpsrv.c | 203 + include/qemu/tcpsrv.h | 40 ++

[Qemu-devel] [PATCH 15/21] qom: add Device class

2011-07-24 Thread Anthony Liguori
Device is meant to replace DeviceState as the root class for the device model. This is included here merely as a RFC. Device adds a couple of useful features. 1) Default hard reset. Device will literally call finalize on the object and then reinitialize it in place. This means that most devi

[Qemu-devel] [PATCH 12/21] qom: add plug_list_props QMP command

2011-07-24 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- monitor.c | 35 +++ qmp-commands.hx |9 + 2 files changed, 44 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 47011dd..e53808a 100644 --- a/monitor.c +++ b/monitor.c @@ -1162,6 +1162,41

[Qemu-devel] [PATCH 11/21] qom: add plug_set QMP command

2011-07-24 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- monitor.c | 33 + qmp-commands.hx |9 + 2 files changed, 42 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 1937e9f..47011dd 100644 --- a/monitor.c +++ b/monitor.c @@ -1129,6 +1129,39 @@

[Qemu-devel] [PATCH 06/21] plug: add socket property type

2011-07-24 Thread Anthony Liguori
Sockets form back links in the object graph. From the object's perspective, a socket just looks like a pointer to an object. The socket property type provides a generic mechanism to set those pointers to other objects while providing strong type checking. It's also useful to lock sockets, partic

[Qemu-devel] [PATCH 02/21] qom: convert QAPI to use Qconfig build system

2011-07-24 Thread Anthony Liguori
Plug depends on QAPI and in order to express that dependency, QAPI needs to use the Qconfig build system. Right now, QAPI is only built for guest agent, but this changes the generic build to now include QAPI. Signed-off-by: Anthony Liguori --- Makefile | 10 ++ Makefile.objs |

Re: [Qemu-devel] [PATCH] report serial devices created with -device in the PIIX4 config space

2011-07-24 Thread Andreas Färber
Am 24.07.2011 um 20:57 schrieb Anthony Liguori: On 07/24/2011 01:45 PM, Paolo Bonzini wrote: On 07/16/2011 04:39 PM, Anthony Liguori wrote: Instead of checking for a port assignment, couldn't we do a device tree transversal and look for isa-serial devices? We could then look at the iobas

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

2011-07-24 Thread Hervé Poussineau
Alexander Graf a écrit : On 21.12.2010, at 21:01, Andreas Färber wrote: From: Hervé Poussineau v1: * Coding style fixes. Signed-off-by: Hervé Poussineau Cc: Alexander Graf Signed-off-by: Andreas Färber --- Hello Alex, Seeing the discussions about Leon3, is this the way to go for ppc?

Re: [Qemu-devel] [PATCH 1/7] Export the unassigned_mem read/write functions.

2011-07-24 Thread Richard Henderson
On 07/24/2011 11:56 AM, Anthony Liguori wrote: > What is returned by totally unregistered MMIO is defined by the > chipset. What's returned by an empty space in the MMIO space of a > device is device specific. It's one and the same here, it's the chipset I'm implementing. > What does your device

Re: [Qemu-devel] [PATCH] report serial devices created with -device in the PIIX4 config space

2011-07-24 Thread Anthony Liguori
On 07/24/2011 01:45 PM, Paolo Bonzini wrote: On 07/16/2011 04:39 PM, Anthony Liguori wrote: Instead of checking for a port assignment, couldn't we do a device tree transversal and look for isa-serial devices? We could then look at the iobase property to figure out which serial device is configu

Re: [Qemu-devel] [PATCH 1/7] Export the unassigned_mem read/write functions.

2011-07-24 Thread Anthony Liguori
On 07/24/2011 11:42 AM, Richard Henderson wrote: On 07/24/2011 06:28 AM, Anthony Liguori wrote: On 07/23/2011 02:17 PM, Richard Henderson wrote: Signed-off-by: Richard Henderson Why? So that I can write i/o functions like this: switch (addr) { case 0: ... case 64: ... case 128:

Re: [Qemu-devel] [PATCH] report serial devices created with -device in the PIIX4 config space

2011-07-24 Thread Paolo Bonzini
On 07/16/2011 04:39 PM, Anthony Liguori wrote: Instead of checking for a port assignment, couldn't we do a device tree transversal and look for isa-serial devices? We could then look at the iobase property to figure out which serial device is configured. Thanks for applying it as is---BTW, I

Re: [Qemu-devel] [PATCH] qapi: check for python, allow path to be specified

2011-07-24 Thread Michael Roth
On 07/24/2011 12:28 PM, Blue Swirl wrote: On Sun, Jul 24, 2011 at 2:16 AM, Michael Roth wrote: QAPI requires python to generate code. Check for python during configuration and allow python to be specified manually. Signed-off-by: Michael Roth --- Makefile | 12 ++-- configure |

[Qemu-devel] [PATCH v2 29/31] target-xtensa: implement memory protection options

2011-07-24 Thread Max Filippov
- TLB opcode group; - region protection option (ISA, 4.6.3); - region translation option (ISA, 4.6.4); - MMU option (ISA, 4.6.5). Cache control attribute bits are not used by this implementation. Signed-off-by: Max Filippov --- target-xtensa/cpu.h | 56 - target-xtensa/helper.c

[Qemu-devel] [PATCH v2 19/31] target-xtensa: implement windowed registers

2011-07-24 Thread Max Filippov
See ISA, 4.7.1 for details. Physical registers and currently visible window are separate fields in CPUEnv. Only current window is accessible to TCG. On operations that change window base helpers copy current window to and from physical registers. Window overflow check described in 4.7.1.3 is in s

[Qemu-devel] [PATCH v2 2/2] guest agent: add --enable-guest-agent config option

2011-07-24 Thread Michael Roth
QAPI will require glib/python, but for now the guest agent is the only user. For now, make these dependencies an explicit guest agent one, and give users the option to disable it if need be. Once QAPI is adopted in core QEMU code, we would basically revert this patch. Signed-off-by: Michael Roth

[Qemu-devel] [PATCH v2 1/2] qapi: check for python, allow path to be specified

2011-07-24 Thread Michael Roth
QAPI requires python to generate code. Check for python during configuration and allow python to be specified manually. Signed-off-by: Michael Roth --- Makefile | 12 ++-- configure | 13 + 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefi

[Qemu-devel] [PATCH v2 28/31] target-xtensa: add gdb support

2011-07-24 Thread Max Filippov
Specific xtensa processor overlay for GDB contains register map in the gdb/xtensa-config.c. This description is used by the GDB to e.g. parse 'g' response packets and it may be reused in the qemu's gdbstub (only XTREG definitions for non-pseudoregisters are needed). Currently mainline GDB does not

[Qemu-devel] [PATCH v2 15/31] target-xtensa: implement CACHE group

2011-07-24 Thread Max Filippov
All operations in this group are no-ops, because cache ought to be transparent to applications. However cache may be abused, then we'll need to actually implement these opcodes. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 95 - 1 file

[Qemu-devel] [PATCH v2 06/31] target-xtensa: add sample board

2011-07-24 Thread Max Filippov
Sample board and sample CPU core are used for debug and may be used for development of custom SoC emulators. This board has two fixed size memory regions for DTCM and ITCM and variable length SRAM region. Signed-off-by: Max Filippov --- Makefile.target|1 + hw/xtensa_sample.c | 105 +++

[Qemu-devel] [PATCH v2 16/31] target-xtensa: add PS register and access control

2011-07-24 Thread Max Filippov
Signed-off-by: Max Filippov --- target-xtensa/cpu.h | 53 - target-xtensa/helper.c|1 + target-xtensa/translate.c | 29 3 files changed, 77 insertions(+), 6 deletions(-) diff --git a/target-xtensa/cpu.h b/targ

[Qemu-devel] [PATCH v2 26/31] target-xtensa: implement CPENABLE and PRID SRs

2011-07-24 Thread Max Filippov
Signed-off-by: Max Filippov --- hw/xtensa_sample.c|1 + target-xtensa/cpu.h |2 ++ target-xtensa/translate.c |7 +++ 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/xtensa_sample.c b/hw/xtensa_sample.c index 9f7733b..c2ad48a 100644 --- a/hw/xtensa_

[Qemu-devel] [PATCH v2 17/31] target-xtensa: implement exceptions

2011-07-24 Thread Max Filippov
- mark privileged opcodes with ring check; - make debug exception on exception handler entry. Signed-off-by: Max Filippov --- cpu-exec.c|6 +++ target-xtensa/cpu.h | 67 target-xtensa/helper.c| 37 +++- target-xtensa/help

[Qemu-devel] [PATCH v2 09/31] target-xtensa: add special and user registers

2011-07-24 Thread Max Filippov
Special Registers hold the majority of the state added to the processor by the options. See ISA, 5.3 for details. User Registers hold state added in support of designer's TIE and in some cases of options that Tensilica provides. See ISA, 5.4 for details. Only registers mapped in sregnames or ureg

[Qemu-devel] [PATCH v2 08/31] target-xtensa: implement JX/RET0/CALLX

2011-07-24 Thread Max Filippov
Group SNM0 (indirect jumps and calls). Signed-off-by: Max Filippov --- target-xtensa/translate.c | 43 +++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c index c6ebb3d..400c995 100644

[Qemu-devel] [PATCH v2 12/31] target-xtensa: implement LSAI group

2011-07-24 Thread Max Filippov
- base + offset load/store operations for 1/2/4 byte values; - cache operations (not implemented); - multiprocessor synchronization operations. Signed-off-by: Max Filippov --- target-xtensa/cpu.h |1 + target-xtensa/translate.c | 89 + 2 fi

Re: [Qemu-devel] [PATCH] spice-qemu-char: Generate chardev open/close events (v3)

2011-07-24 Thread Hans de Goede
Hi, On 07/22/2011 02:40 PM, Gerd Hoffmann wrote: ACK. Another option would be to not call the state callback for the vdagent subtype from spice-server, because like you say it ignores the continued communication between the agent and the server. Then you could remove the subtype check. We can

[Qemu-devel] [PATCH v2 10/31] target-xtensa: implement RST3 group

2011-07-24 Thread Max Filippov
- access to Special Registers (wsr, rsr); - access to User Registers (wur, rur); - misc. operations option (value clamp, sign extension, min, max); - conditional moves. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 161 + 1 files changed

[Qemu-devel] [PATCH v2 05/31] target-xtensa: implement RT0 group

2011-07-24 Thread Max Filippov
NEG and ABS are the only members of RT0 group. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c index 2ff5838..dcbc0ae 100644 --- a/target-xt

[Qemu-devel] [PATCH v2 14/31] target-xtensa: implement SYNC group

2011-07-24 Thread Max Filippov
All operations in this group are no-ops, because there are no delayed side effects. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 31 ++- 1 files changed, 30 insertions(+), 1 deletions(-) diff --git a/target-xtensa/translate.c b/target-xtensa/translat

[Qemu-devel] [PATCH v2 11/31] target-xtensa: implement shifts (ST1 and RST1 groups)

2011-07-24 Thread Max Filippov
- ST1: SAR (shift amount special register) manipulation, NSA(U); - RST1: shifts, 16-bit multiplication. Signed-off-by: Max Filippov --- v1 -> v2 changes: - fix nsa helper implementation; --- target-xtensa/cpu.h |4 + target-xtensa/helpers.h |2 + target-xtensa/op_helper.c | 14

[Qemu-devel] [PATCH v2] qdev: Reset hot-plugged devices

2011-07-24 Thread Jan Kiszka
From: Jan Kiszka Device models rely on the core invoking their reset handlers after init. We do this in the cold-plug case, but so far we miss this step after hot-plug. Signed-off-by: Jan Kiszka --- Changes in v2: - move reset to qdev_init in case the device is created by the hot-plugged o

Re: [Qemu-devel] [PATCH] qapi: check for python, allow path to be specified

2011-07-24 Thread Blue Swirl
On Sun, Jul 24, 2011 at 2:16 AM, Michael Roth wrote: > QAPI requires python to generate code. Check for python during > configuration and allow python to be specified manually. > > Signed-off-by: Michael Roth > --- >  Makefile  |   12 ++-- >  configure |   13 + >  2 files chan

Re: [Qemu-devel] [PATCH 2/3] slirp: fix warning on mingw32

2011-07-24 Thread Blue Swirl
On Sun, Jul 24, 2011 at 1:23 AM, Anthony Liguori wrote: > On 07/23/2011 04:25 PM, Blue Swirl wrote: >> >> Avoid this warning: >>   CC    slirp/ip_icmp.o >> /src/qemu/slirp/ip_icmp.c: In function 'icmp_receive': >> /src/qemu/slirp/ip_icmp.c:418:5: error: passing argument 2 of 'recv' >> from incompa

[Qemu-devel] [PATCH v2 31/31] MAINTAINERS: add xtensa maintainer

2011-07-24 Thread Max Filippov
Add myself as target-xtensa and DC232B maintainer. Signed-off-by: Max Filippov --- MAINTAINERS | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 6115e4e..c7395df 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -115,6 +115,12 @@ M:

[Qemu-devel] [PATCH v2 27/31] target-xtensa: implement relocatable vectors

2011-07-24 Thread Max Filippov
See ISA, 4.4.3 for details. Vector addresses recorded in core configuration are absolute values that correspond to default VECBASE value. Signed-off-by: Max Filippov --- target-xtensa/cpu.h |2 ++ target-xtensa/helper.c| 18 -- target-xtensa/translate.c |1 +

[Qemu-devel] [PATCH v2 30/31] target-xtensa: add dc232b core and board

2011-07-24 Thread Max Filippov
This is Diamond 232L Standard Core Rev.B (LE). Signed-off-by: Max Filippov --- Makefile.target |1 + hw/xtensa_dc232b.c| 112 target-xtensa/gdb-config-dc232b.c | 261 + target-xtensa/helper.c

[Qemu-devel] [PATCH v2 22/31] target-xtensa: implement unaligned exception option

2011-07-24 Thread Max Filippov
See ISA, 4.4.4 for details. Correct (aligned as per ISA) address for unaligned access is generated in case this option is not enabled. Signed-off-by: Max Filippov --- v1 -> v2 changes: - use ALIGNED_ONLY to handle unaligned memory access; --- target-xtensa/helper.c|4 ++- target-xtensa/

[Qemu-devel] [PATCH v2 25/31] target-xtensa: implement accurate window check

2011-07-24 Thread Max Filippov
See ISA, 4.7.1.3 for details. Window check is inserted before commands that push "used register watermark" beyond its current level. Used register watermark is reset on instructions that change WINDOW_BASE/WINDOW_START SRs. Signed-off-by: Max Filippov --- v1 -> v2 changes: - dc->used_window is u

[Qemu-devel] [PATCH v2 24/31] target-xtensa: implement interrupt option

2011-07-24 Thread Max Filippov
See ISA, 4.4.6 (interrupt option), 4.4.7 (high priority interrupt option) and 4.4.8 (timer interrupt option) for details. Signed-off-by: Max Filippov --- v1 -> v2 changes: - don't reset env->halted in xtensa_advance_ccount; - clean up cases in the do_interrupt switch; --- hw/xtensa_pic.c

[Qemu-devel] [PATCH v2 20/31] target-xtensa: implement loop option

2011-07-24 Thread Max Filippov
See ISA, 4.3.2 for details. Operations that change LEND SR value invalidate TBs at the old and at the new LEND. LEND value at TB compilation time is considered constant and loop instruction is generated based on this value. Invalidation may be avoided for the TB at the old LEND address, since loo

[Qemu-devel] [PATCH v2 23/31] target-xtensa: implement SIMCALL

2011-07-24 Thread Max Filippov
Tensilica iss provides support for applications running in freestanding environment through SIMCALL command. It is used by Tensilica libc to access argc/argv, for file I/O, etc. Note that simcalls that accept buffer addresses expect virtual addresses. Signed-off-by: Max Filippov --- Makefile.ta

[Qemu-devel] [PATCH v2 21/31] target-xtensa: implement extended L32R

2011-07-24 Thread Max Filippov
See ISA, 4.3.3 for details. TB flag XTENSA_TBFLAG_LITBASE is used to track enable bit of LITBASE SR. Signed-off-by: Max Filippov --- v1 -> v2 changes: - do not encode LITBASE value into TB; --- target-xtensa/cpu.h |6 ++ target-xtensa/helper.c|1 + target-xtensa/translate.

[Qemu-devel] [PATCH v2 18/31] target-xtensa: implement RST2 group (32 bit mul/div/rem)

2011-07-24 Thread Max Filippov
Signed-off-by: Max Filippov --- target-xtensa/translate.c | 60 - 1 files changed, 59 insertions(+), 1 deletions(-) diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c index 1fe212d..52a76e1 100644 --- a/target-xtensa/translate.c +++ b

[Qemu-devel] [PATCH v2 13/31] target-xtensa: mark reserved and TBD opcodes

2011-07-24 Thread Max Filippov
Reserved opcodes must generate illegal instruction exception. Usually they signal emulation quality problems. Not implemented opcodes are good to see. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 110 - 1 files changed, 109 insertions(+

[Qemu-devel] [PATCH v2 07/31] target-xtensa: implement conditional jumps

2011-07-24 Thread Max Filippov
- BZ (comparison to zero); - BI0 (comparison to signed immediate); - BI1 (comparison to unsigned immediate); - B (two registers comparison, bit sets comparison); - BEQZ.N/BNEZ.N (narrow comparison to zero). Signed-off-by: Max Filippov --- target-xtensa/translate.c | 164

[Qemu-devel] [PATCH v2 04/31] target-xtensa: implement narrow instructions

2011-07-24 Thread Max Filippov
Instructions with op0 >= 8 are 2 bytes long, others are 3 bytes long. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 54 + 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/target-xtensa/translate.c b/target-xtensa/translat

[Qemu-devel] [PATCH v2 03/31] target-xtensa: implement disas_xtensa_insn

2011-07-24 Thread Max Filippov
Set up disas_xtensa_insn switch structure, mark required options on high level groups. Implement arithmetic/bit logic/jump/call0. Implement code generation loop with single step/breakpoint checking. Signed-off-by: Max Filippov --- target-xtensa/cpu.h | 67 +++ target-xtensa/helper.c

[Qemu-devel] [PATCH v2 02/31] target-xtensa: add target to the configure script

2011-07-24 Thread Max Filippov
Signed-off-by: Max Filippov --- configure| 12 +++- default-configs/xtensa-softmmu.mak |1 + default-configs/xtensaeb-softmmu.mak |1 + 3 files changed, 13 insertions(+), 1 deletions(-) create mode 100644 default-configs/xtensa-softmmu.mak create

[Qemu-devel] [PATCH v2 01/31] target-xtensa: add target stubs

2011-07-24 Thread Max Filippov
Signed-off-by: Max Filippov --- Makefile.target |2 + arch_init.c |2 + arch_init.h |1 + cpu-exec.c|2 + elf.h |2 + hw/xtensa_pic.c | 38 ++ target-xtensa/cpu.h | 95

[Qemu-devel] [PATCH v2 00/31] target-xtensa: new target architecture

2011-07-24 Thread Max Filippov
This series adds support for Tensilica Xtensa target. Port status: Linux for DC232B works in the qemu. Not implemented xtensa options: MAC16, floating point coprocessor, boolean option, cache option, debug option. v1 -> v2 changes: - extract PS register and access control into separate patch;

[Qemu-devel] [PATCH] qdev: Reset hot-plugged devices

2011-07-24 Thread Jan Kiszka
From: Jan Kiszka Device models rely on the core invoking their reset handlers after init. We do this in the cold-plug case, but so far we miss this step after hot-plug. Signed-off-by: Jan Kiszka --- This is also one piece in the puzzle of getting CPU hot-plug work. hw/qdev.c |3 +++ 1 fi

Re: [Qemu-devel] [PATCH 1/7] Export the unassigned_mem read/write functions.

2011-07-24 Thread Richard Henderson
On 07/24/2011 06:28 AM, Anthony Liguori wrote: > On 07/23/2011 02:17 PM, Richard Henderson wrote: >> Signed-off-by: Richard Henderson > > Why? So that I can write i/o functions like this: switch (addr) { case 0: ... case 64: ... case 128: ... ... default: unassigned_mem_readl(...

Re: [Qemu-devel] [PATCH v2] multiboot: Fix bss segment support

2011-07-24 Thread malc
On Sun, 24 Jul 2011, G?ran Weinholt wrote: > Multiboot images can specify a bss segment. The boot loader must clear > the memory of the bss and ensure that no modules or structures are > allocated inside it. Several fields are provided in the Multiboot > header that were previously not used proper

[Qemu-devel] [PATCH v2] multiboot: Fix bss segment support

2011-07-24 Thread Göran Weinholt
Multiboot images can specify a bss segment. The boot loader must clear the memory of the bss and ensure that no modules or structures are allocated inside it. Several fields are provided in the Multiboot header that were previously not used properly. The header is now used to determine how much dat

Re: [Qemu-devel] [PATCH] multiboot: Fix bss segment support

2011-07-24 Thread Göran Weinholt
Alexander Graf writes: > On 24.07.2011, at 12:14, Göran Weinholt wrote: > >> Multiboot images can specify a bss segment. The boot loader must clear >> the memory of the bss and ensure that no modules or structures are >> allocated inside it. Several fields are provided in the Multiboot >> header

Re: [Qemu-devel] [PATCH 1/7] Export the unassigned_mem read/write functions.

2011-07-24 Thread Anthony Liguori
On 07/23/2011 02:17 PM, Richard Henderson wrote: Signed-off-by: Richard Henderson Why? Regards, Anthony Liguori --- cpu-common.h |7 +++ exec.c | 12 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/cpu-common.h b/cpu-common.h index 44b04b3..7

Re: [Qemu-devel] [PATCH V2] Add "tee" option to qemu char device

2011-07-24 Thread Anthony Liguori
On 07/24/2011 04:47 AM, Alexander Graf wrote: These arguments all apply to any possible option. Why not a grep target? Why not a cut or less target? Because they don't make sense. Neither does tee :-) As long as the tee target is reasonably isolated, I don't think it'd clutter the cha

Re: [Qemu-devel] Guest agent does not build on OpenBSD

2011-07-24 Thread Stefan Hajnoczi
On Fri, Jul 22, 2011 at 8:00 PM, Brad wrote: > *sigh* This was some pretty sloppy work that was commited with very little > testing. The QAPI stuff that was commited also needs Python > to build and no appropriate checks were added to the configure script > to check for its presence and to allow t

Re: [Qemu-devel] [PATCH] multiboot: Fix bss segment support

2011-07-24 Thread Alexander Graf
On 24.07.2011, at 12:14, Göran Weinholt wrote: > Multiboot images can specify a bss segment. The boot loader must clear > the memory of the bss and ensure that no modules or structures are > allocated inside it. Several fields are provided in the Multiboot > header that were previously not used p

Re: [Qemu-devel] [PATCH] mingw32: Only link against libiberty if required

2011-07-24 Thread Jan Kiszka
On 2011-07-24 13:04, Stefan Weil wrote: > Am 24.07.2011 12:12, schrieb Jan Kiszka: >> From: Jan Kiszka >> >> Not all (didn't find any) mingw32 cross-toolchains ship a binutils-devel >> package, thus lack libiberty.a. According to 08f3896a, -liberty is only >> needed for getopt when building for 64

[Qemu-devel] [Bug 739785] Re: qemu-i386 user mode on ARMv5 host fails (bash: fork: Invalid argument)

2011-07-24 Thread Artyom
I have the same exact problem on MIPSel host as well. Tried Qemu 0.14.1 and git from 110724. Trying to run something from bash gives fork: Invalid argument. strace gives clone(18874385,0,0,0,1084164376,1082144312) = -1 errno=22 (Invalid argument) There is no alignment switches on this CPU. So, i

Re: [Qemu-devel] [PATCH] mingw32: Only link against libiberty if required

2011-07-24 Thread Stefan Weil
Am 24.07.2011 12:12, schrieb Jan Kiszka: From: Jan Kiszka Not all (didn't find any) mingw32 cross-toolchains ship a binutils-devel package, thus lack libiberty.a. According to 08f3896a, -liberty is only needed for getopt when building for 64 bit. Test for the availability of a getopt implementa

[Qemu-devel] [PATCH] multiboot: Fix bss segment support

2011-07-24 Thread Göran Weinholt
Multiboot images can specify a bss segment. The boot loader must clear the memory of the bss and ensure that no modules or structures are allocated inside it. Several fields are provided in the Multiboot header that were previously not used properly. The header is now used to determine how much dat

[Qemu-devel] [PATCH] mingw32: Only link against libiberty if required

2011-07-24 Thread Jan Kiszka
From: Jan Kiszka Not all (didn't find any) mingw32 cross-toolchains ship a binutils-devel package, thus lack libiberty.a. According to 08f3896a, -liberty is only needed for getopt when building for 64 bit. Test for the availability of a getopt implementation and only pull in libiberty when linkin

Re: [Qemu-devel] [PATCH V2] Add "tee" option to qemu char device

2011-07-24 Thread Alexander Graf
On 23.07.2011, at 21:11, Anthony Liguori wrote: > On 07/23/2011 01:31 PM, Alexander Graf wrote: >> >> On 23.07.2011, at 17:23, Anthony Liguori wrote: >> >>> On 07/14/2011 03:58 AM, Chunyan Liu wrote: Add "tee" backend to char device. It could be used as follows: -serial tee:filepa

Re: [Qemu-devel] [PATCH V2] Add "tee" option to qemu char device

2011-07-24 Thread Alexander Graf
On 14.07.2011, at 10:58, Chunyan Liu wrote: > Add "tee" backend to char device. It could be used as follows: >-serial tee:filepath,pty >-chardev tee,tee_fpath=path,tee_backend=pty,,path=path,,[mux=on|off] > With "tee" option, "pty" output would be duplicated to filepath. > Related thread:

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

2011-07-24 Thread Alexander Graf
On 21.12.2010, at 21:01, Andreas Färber wrote: > From: Hervé Poussineau > > v1: > * Coding style fixes. > > Signed-off-by: Hervé Poussineau > Cc: Alexander Graf > Signed-off-by: Andreas Färber > --- > > Hello Alex, > > Seeing the discussions about Leon3, is this the way to go for ppc? Is

[Qemu-devel] A new Atari project

2011-07-24 Thread Anders Lindström
Hi! I am a 38 year old man from Sweden making a new Atari project called EarthOS. The project is not yet started, and I am looking around for people to work with me, and program doing work at their spare time so to speak. This is meant to be a new operating system with similarities to mint multito