[Qemu-devel] [RFC PATCH v1 3/4] xilinx_spi: initial version

2012-03-29 Thread Peter A. G. Crosthwaite
device model for xilinx XPS SPI controller (v2.0) Signed-off-by: Peter A. G. Crosthwaite --- Makefile.target |1 + hw/xilinx_spi.c | 477 +++ 2 files changed, 478 insertions(+), 0 deletions(-) create mode 100644 hw/xilinx_spi.c diff --gi

[Qemu-devel] RFC: options parsing in vl.c should be module

2012-03-29 Thread Wanpeng Li
Hi all: Consider of the options parsing process in main function of vl.c is too long. It should be module into single function to clear Ideas, strengthen the source code management, and increase code readability. Regards, Wanpeng Li -- LTC China, IBM, Shanghai

[Qemu-devel] [RFC PATCH v1 4/4] petalogix-ml605: added spi controller with m25p80

2012-03-29 Thread Peter A. G. Crosthwaite
Added spi controller to the reference design, with a single cs line and a m25p80 style spi-flash connected Signed-off-by: Peter A. G. Crosthwaite --- hw/petalogix_ml605_mmu.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/hw/petalogix_ml605_mmu.c b/hw

[Qemu-devel] [RFC PATCH v1 0/4] SPI bus support + Xilinx SPI controller

2012-03-29 Thread Peter A. G. Crosthwaite
Add support for Serial Peripheral interface (SPI) as a proper bus standard. Includes an example device (m25p80 SPI flash), an example controller (Xilinx XPS SPI) and adds it to all to a machine model (petalogix_ml605_mmu.c). Patch 1 adds the Serial Peripheral Interface (SPI) protocol as a bus an

Re: [Qemu-devel] [PATCH 1/2] Isolation groups

2012-03-29 Thread David Gibson
On Tue, Mar 27, 2012 at 01:34:43PM -0600, Alex Williamson wrote: [snip] > > > > this case, it gets a bit complex. When the FooBus isolation provider > > > > is active, the FooBus devices would be in their own groups, not the > > > > group of the FooBridge and its sibling. When the FooBus isolatio

[Qemu-devel] I/O in backing file

2012-03-29 Thread PANKAJ RAWAT
Hi all, I am currently using backing file.The question of my concern is regarding the I/O operation Now when we create a external snapshot in qcow2, a new file is created leaving the original file as backing file * Can any one tell,*how the I/O is performed in detail way?. Means when the new snap

[Qemu-devel] [PATCH V4 08/11] Add MIPS DSP Bit/Manipulation instructions Support

2012-03-29 Thread Jia Liu
Add MIPS DSP Bit/Manipulation instructions Support. Signed-off-by: Jia Liu --- target-mips/dsp_helper.c | 42 +++ target-mips/helper.h |4 ++ target-mips/translate.c | 103 ++ 3 files changed, 149 insertions(+), 0 deletions(

[Qemu-devel] [PATCH V4 09/11] Add MIPS DSP Compare-Pick instructions Support

2012-03-29 Thread Jia Liu
Add MIPS DSP Compare-Pick instructions Support. Signed-off-by: Jia Liu --- target-mips/dsp_helper.c | 341 ++ target-mips/helper.h | 17 +++ target-mips/translate.c | 135 ++ 3 files changed, 493 insertions(+), 0 deletions(-)

[Qemu-devel] [PATCH V4 10/11] Add MIPS DSP Accumulator and DSPControl Access instructions Support

2012-03-29 Thread Jia Liu
Add MIPS DSP Accumulator and DSPControl Access instructions Support. Signed-off-by: Jia Liu --- target-mips/dsp_helper.c | 465 ++ target-mips/helper.h | 19 ++ target-mips/translate.c | 175 + 3 files changed, 659 insertions(+

[Qemu-devel] [PATCH V4 06/11] Add MIPS DSP GPR-Based Shift instructions Support

2012-03-29 Thread Jia Liu
Add MIPS DSP GPR-Based Shift instructions Support. Signed-off-by: Jia Liu --- target-mips/dsp_helper.c | 411 ++ target-mips/helper.h | 24 +++ target-mips/translate.c | 114 + 3 files changed, 549 insertions(+), 0 deletions(-) di

[Qemu-devel] [PATCH V4 07/11] Add MIPS DSP Multiply instructions Support

2012-03-29 Thread Jia Liu
Add MIPS DSP Multiply instructions Support. Signed-off-by: Jia Liu --- target-mips/dsp_helper.c | 729 ++ target-mips/helper.h | 34 +++ target-mips/translate.c | 264 + 3 files changed, 1027 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH V4 05/11] Add MIPS DSP Arithmetic instructions Support

2012-03-29 Thread Jia Liu
Add MIPS DSP Arithmetic instructions Support. Signed-off-by: Jia Liu --- target-mips/dsp_helper.c | 876 ++ target-mips/helper.h | 55 +++ target-mips/translate.c | 288 +++- 3 files changed, 1218 insertions(+), 1 deletions(-) dif

[Qemu-devel] [PATCH V4 04/11] Add MIPS DSP Load instructions Support

2012-03-29 Thread Jia Liu
Add MIPS DSP Load instructions Support. Signed-off-by: Jia Liu --- target-mips/translate.c | 47 +++ 1 files changed, 47 insertions(+), 0 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index 8f8daf2..608f6de 100644 --- a

[Qemu-devel] [PATCH V4 03/11] Add MIPS DSP Branch instruction Support

2012-03-29 Thread Jia Liu
Add MIPS DSP Branch instruction Support. Signed-off-by: Jia Liu --- target-mips/translate.c | 21 +++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index f869146..8f8daf2 100644 --- a/target-mips/translate.c

[Qemu-devel] [PATCH V4 02/11] Use correct acc value to index cpu_HI/cpu_LO rather than using a fix number

2012-03-29 Thread Jia Liu
There are 4 accumulator registers (acc) used by MIPS ASE DSP instructions. Each accumulator register is composed of by HIGH and LOW part. Use correct acc value to index cpu_HI/cpu_LO rather than using a fix number (i.e. zero). Signed-off-by: Jia Liu --- target-mips/translate.c | 56 +++

[Qemu-devel] [PATCH V4 01/11] Add MIPS DSP internal functions

2012-03-29 Thread Jia Liu
Add internal functions used by MIPS DSP helper functions. Signed-off-by: Jia Liu --- Makefile.target |3 + target-mips/dsp_helper.c | 973 ++ 2 files changed, 976 insertions(+), 0 deletions(-) create mode 100644 target-mips/dsp_helper.c

[Qemu-devel] [PATCH V4 00/11] Qemu MIPS ASE DSP Support

2012-03-29 Thread Jia Liu
This is MIPS ASE DSP instructions support for QEMU. These instructions are grouped according to "Chapter 4. MIPS DSP ASE Instruction Summary" in MIPS ASE DSP manual [1]. [1] MIPS32® Architecture for Programmers VolumeIV-e: The MIPS® DSP Application-Specific Extension to the MIPS32®Architecture

Re: [Qemu-devel] [PATCH] pci: Factor out bounds checking on config space accesses

2012-03-29 Thread David Gibson
On Thu, Mar 29, 2012 at 11:28:19AM +0200, Michael S. Tsirkin wrote: > On Thu, Mar 29, 2012 at 02:53:52PM +1100, David Gibson wrote: > > On Wed, Mar 28, 2012 at 11:30:56AM +0200, Michael S. Tsirkin wrote: > > > On Wed, Mar 28, 2012 at 12:11:52PM +1100, David Gibson wrote: > > > > Michael, > > > > >

Re: [Qemu-devel] [PATCH] Better support for dma_addr_t variables

2012-03-29 Thread David Gibson
Uh.. please apply? Anyone? On Tue, Mar 27, 2012 at 01:43:21PM +1100, David Gibson wrote: > A while back, we introduced the dma_addr_t type, which is supposed to > be used for bus visible memory addresses. At present, this is an > alias for target_phys_addr_t, but this will change when we eventua

Re: [Qemu-devel] [PATCH v1 1/2] pl330: initial version

2012-03-29 Thread Peter Crosthwaite
On Fri, Mar 30, 2012 at 12:29 AM, Kirill Batuzov wrote: > > > On Thu, 29 Mar 2012, Peter A. G. Crosthwaite wrote: > >> Device model for Primecell PL330 dma controller. >> >> Signed-off-by: Peter A. G. Crosthwaite >> --- > > Signed-off-by: Kirill Batuzov > Thanks Kirill >> +static int PL330Fifo

Re: [Qemu-devel] memory ordering emulation in qemu

2012-03-29 Thread 陳韋任
On Thu, Mar 29, 2012 at 04:49:02PM -0400, Xin Tong wrote: > I am wondering what the solution in qemu is if the guest architecture > has a stronger memory ordering requirement than the host archiecture ? > memory fences ? There was a thread has a similar discussion. See http://lists.gnu.org/arc

Re: [Qemu-devel] [PATCH 12/13] qapi: support for keyworded variable-length argument list

2012-03-29 Thread Michael Roth
On Thu, Mar 29, 2012 at 05:39:10PM -0500, Michael Roth wrote: > On Thu, Mar 29, 2012 at 03:01:16PM -0500, Anthony Liguori wrote: > > On 03/29/2012 02:28 PM, Michael Roth wrote: > > >On Thu, Mar 29, 2012 at 01:26:34PM -0500, Anthony Liguori wrote: > > >>On 03/29/2012 12:26 PM, Luiz Capitulino wrote:

Re: [Qemu-devel] [PATCH 12/13] qapi: support for keyworded variable-length argument list

2012-03-29 Thread Michael Roth
On Thu, Mar 29, 2012 at 03:01:16PM -0500, Anthony Liguori wrote: > On 03/29/2012 02:28 PM, Michael Roth wrote: > >On Thu, Mar 29, 2012 at 01:26:34PM -0500, Anthony Liguori wrote: > >>On 03/29/2012 12:26 PM, Luiz Capitulino wrote: > >>>This allows for QAPI functions to receive a variable-length argu

[Qemu-devel] [PATCH v3] spice_info: add mouse_mode

2012-03-29 Thread Alon Levy
Add mouse_mode, either server or mouse, to qmp and hmp commands, based on spice_server_is_server_mouse added in spice-server 0.10.3. Signed-off-by: Alon Levy --- hmp.c|2 ++ qapi-schema.json | 27 ++- ui/spice-core.c |7 +++ 3 files changed, 35

[Qemu-devel] [RFC] qxl: don't panic on phys2virt

2012-03-29 Thread Alon Levy
Issues a qxl_guest_bug from qxl_phys2virt. Everywhere else will fail. qxl_phys2virt requires an additional argument because all it's possible return values are legit (well, I could use the fact it returns a pointer so it should be word aligned but I don't want to go there, this is totally internal)

Re: [Qemu-devel] memory ordering emulation in qemu

2012-03-29 Thread Peter Maydell
On 29 March 2012 21:49, Xin Tong wrote: > I am wondering what the solution in qemu is if the guest architecture > has a stronger memory ordering requirement than the host archiecture ? > memory fences ? In system mode all guest CPUs run in a single host thread so there aren't any ordering issues

Re: [Qemu-devel] [PATCH v2] spice_info: add mouse_mode

2012-03-29 Thread Alon Levy
On Thu, Mar 29, 2012 at 03:19:16PM -0500, Anthony Liguori wrote: > On 03/26/2012 09:15 AM, Alon Levy wrote: > >Add mouse_mode, either server or mouse, to qmp and hmp commands, based > >on spice_server_is_server_mouse added in spice-server 0.10.3. > > > >Signed-off-by: Alon Levy > >--- > >v1->v2: >

[Qemu-devel] memory ordering emulation in qemu

2012-03-29 Thread Xin Tong
I am wondering what the solution in qemu is if the guest architecture has a stronger memory ordering requirement than the host archiecture ? memory fences ? Thanks Xin

Re: [Qemu-devel] [PATCH v2 1/2] w64: Fix data type of tb_next and other variables used for host addresses

2012-03-29 Thread Blue Swirl
On Sat, Mar 24, 2012 at 21:25, Stefan Weil wrote: > QEMU host addresses must use uintptr_t to be portable for hosts with > an unusual size of long (w64). > > tb_jmp_offset is an uint16_t value, therefore the local variable offset > in function tb_set_jmp_target was changed from unsigned long to ui

[Qemu-devel] [PATCH] qxl: set default values of vram*_size_mb to -1

2012-03-29 Thread Alon Levy
The addition of those values caused a regression where not specifying any value for the vram bar size would result in a 4096 _byte_ surface area. This is ok for the windows driver but causes the X driver to be unusable. Also, it's a regression. This patch returns the default behavior of having a 64

Re: [Qemu-devel] [PATCH v2] spice_info: add mouse_mode

2012-03-29 Thread Anthony Liguori
On 03/26/2012 09:15 AM, Alon Levy wrote: Add mouse_mode, either server or mouse, to qmp and hmp commands, based on spice_server_is_server_mouse added in spice-server 0.10.3. Signed-off-by: Alon Levy --- v1->v2: report mouse mode "unknown" for qmp too (Gerd Hoffman request) hmp.c

Re: [Qemu-devel] [PATCH] w32: Undefine error constants before their redefinition

2012-03-29 Thread Stefan Weil
Am 28.03.2012 20:56, schrieb Jan Kiszka: Avoids lots of warnings. Signed-off-by: Jan Kiszka --- qemu_socket.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu_socket.h b/qemu_socket.h index fe4cf6c..51ad210 100644 --- a/qemu_socket.h +++ b/qemu_socket.h @@ -8,7 +8,9 @@

Re: [Qemu-devel] [PATCH v2] spice_info: add mouse_mode

2012-03-29 Thread Alon Levy
On Thu, Mar 29, 2012 at 11:08:20AM +0200, Gerd Hoffmann wrote: > On 03/26/12 16:15, Alon Levy wrote: > > Add mouse_mode, either server or mouse, to qmp and hmp commands, based > > on spice_server_is_server_mouse added in spice-server 0.10.3. > > Looks good. What is the status of the spice-server

Re: [Qemu-devel] [PATCHv2] piix: fix up/down races + document

2012-03-29 Thread Michael S. Tsirkin
On Thu, Mar 29, 2012 at 10:53:38AM -0600, Alex Williamson wrote: > On Thu, 2012-03-29 at 14:51 +0200, Michael S. Tsirkin wrote: > > piix acpi interface suffers from the following 2 issues: > > > > 1. > > - delete device a > > - quickly add device b in another slot > > > > if we do this before gue

Re: [Qemu-devel] [PATCH 12/13] qapi: support for keyworded variable-length argument list

2012-03-29 Thread Paolo Bonzini
Il 29/03/2012 21:28, Michael Roth ha scritto: > Since currently we explicitly point qmp to the marshaller anyway, we > could also just treat '**' as an indicator to not generate a marshaller. > Then, we open-code the marshaller to process the QDict, rather than embedding > it in the script or passi

Re: [Qemu-devel] [PATCH 12/13] qapi: support for keyworded variable-length argument list

2012-03-29 Thread Anthony Liguori
On 03/29/2012 02:28 PM, Michael Roth wrote: On Thu, Mar 29, 2012 at 01:26:34PM -0500, Anthony Liguori wrote: On 03/29/2012 12:26 PM, Luiz Capitulino wrote: This allows for QAPI functions to receive a variable-length argument list. This is going to be used by device_add and netdev_add commands.

Re: [Qemu-devel] [PATCHv2] piix: fix up/down races + document

2012-03-29 Thread Alex Williamson
On Thu, 2012-03-29 at 21:38 +0200, Michael S. Tsirkin wrote: > On Thu, Mar 29, 2012 at 10:53:38AM -0600, Alex Williamson wrote: > > On Thu, 2012-03-29 at 14:51 +0200, Michael S. Tsirkin wrote: > > > piix acpi interface suffers from the following 2 issues: > > > > > > 1. > > > - delete device a > >

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/2] PPC: Fix interrupt MSR value within the PPC interrupt handler.

2012-03-29 Thread Scott Wood
On 03/29/2012 04:11 AM, Mark Cave-Ayland wrote: >>> What about POWERPC_EXCP_40x? And are all the classic chips OK with the >>> 2.06B implementation? >> >> Hrm, yeah. I think what you ought to do is to use the new logic just >> for the "classic" exception models. Have the default branch remain >>

Re: [Qemu-devel] [PATCH 12/13] qapi: support for keyworded variable-length argument list

2012-03-29 Thread Michael Roth
On Thu, Mar 29, 2012 at 01:26:34PM -0500, Anthony Liguori wrote: > On 03/29/2012 12:26 PM, Luiz Capitulino wrote: > >This allows for QAPI functions to receive a variable-length argument > >list. This is going to be used by device_add and netdev_add commands. > > > >In the schema, the argument list

Re: [Qemu-devel] [PATCH 12/14] tcg-sparc: Use defines for temporaries.

2012-03-29 Thread Richard Henderson
On 03/29/2012 02:56 PM, Blue Swirl wrote: >> > +tcg_out_arithi(s, TCG_REG_T1, rs1, 31, SHIFT_SRA); >> > +tcg_out_sety(s, TCG_REG_T1); > By the way, since we assume V9+, this 32 bit division which uses the > register y could be changed (in some later patch) to use nicer 64 bit > divi

Re: [Qemu-devel] [Bug 965133] [NEW] Sparc64 crash on start

2012-03-29 Thread Blue Swirl
On Mon, Mar 26, 2012 at 10:27, Tiziano Vecchi wrote: > Public bug reported: > > qemu version 1.0.1 compiled on a Ubuntu live on a HP laptop win a x64 > architecture. > > With more than 4G of memory sparc64 machine crash on start. > > command line: qemu-system-sparc64 -m 4G > > output: > VNC server

Re: [Qemu-devel] [PATCH 07/14] Avoid declaring the env variable at all if CONFIG_TCG_PASS_AREG0.

2012-03-29 Thread Blue Swirl
On Wed, Mar 28, 2012 at 00:32, Richard Henderson wrote: > At the same time, remove use of the global ENV from user-exec.c. > > Signed-off-by: Richard Henderson > --- >  Makefile.target |    5 - >  dyngen-exec.h   |    5 + >  user-exec.c     |   17 ++--- >  3 files changed, 11

Re: [Qemu-devel] [PATCH 12/14] tcg-sparc: Use defines for temporaries.

2012-03-29 Thread Blue Swirl
On Wed, Mar 28, 2012 at 00:32, Richard Henderson wrote: > And change from %i4/%i5 to %g1/%o7 to remove a v8plus fixme. > > Signed-off-by: Richard Henderson > --- >  tcg/sparc/tcg-target.c |  114 --- >  1 files changed, 58 insertions(+), 56 deletions(-)

Re: [Qemu-devel] [PATCH 12/13] qapi: support for keyworded variable-length argument list

2012-03-29 Thread Anthony Liguori
On 03/29/2012 01:42 PM, Luiz Capitulino wrote: On Thu, 29 Mar 2012 13:26:34 -0500 Anthony Liguori wrote: On 03/29/2012 12:26 PM, Luiz Capitulino wrote: This allows for QAPI functions to receive a variable-length argument list. This is going to be used by device_add and netdev_add commands. I

Re: [Qemu-devel] [PATCH 03/14] tcg-sparc: Assume v9 cpu always, i.e. force v8plus in 32-bit mode.

2012-03-29 Thread Richard Henderson
On 03/29/2012 02:45 PM, Blue Swirl wrote: >> > #elif defined(TARGET_SPARC) >> > print_insn = print_insn_sparc; >> > -#ifdef TARGET_SPARC64 >> > disasm_info.mach = bfd_mach_sparc_v9b; >> > -#endif > This is not OK, it would change ASI printout for V8 guest code. > Ah, right. Ok, will fix

Re: [Qemu-devel] [PATCH 05/14] tcg-sparc: Simplify qemu_ld/st direct memory paths.

2012-03-29 Thread Blue Swirl
On Wed, Mar 28, 2012 at 00:32, Richard Henderson wrote: > Given that we have an opcode for all sizes, all endianness, > turn the functions into a simple table lookup. > > Signed-off-by: Richard Henderson > --- >  tcg/sparc/tcg-target.c |  384 > +++- >

Re: [Qemu-devel] [PATCH 03/14] tcg-sparc: Assume v9 cpu always, i.e. force v8plus in 32-bit mode.

2012-03-29 Thread Blue Swirl
On Wed, Mar 28, 2012 at 00:32, Richard Henderson wrote: > Current code doesn't actually work in 32-bit mode at all.  Since > no one really noticed, drop the complication of v7 and v8 cpus. > Eliminate the --sparc_cpu configure option and standardize macro > testing on TCG_TARGET_REG_BITS / HOST_LO

Re: [Qemu-devel] [PATCH 12/13] qapi: support for keyworded variable-length argument list

2012-03-29 Thread Luiz Capitulino
On Thu, 29 Mar 2012 13:26:34 -0500 Anthony Liguori wrote: > On 03/29/2012 12:26 PM, Luiz Capitulino wrote: > > This allows for QAPI functions to receive a variable-length argument > > list. This is going to be used by device_add and netdev_add commands. > > > > In the schema, the argument list is

Re: [Qemu-devel] [PATCH] w32: Undefine error constants before their redefinition

2012-03-29 Thread Jan Kiszka
On 2012-03-29 20:02, Stefan Weil wrote: > Am 28.03.2012 20:56, schrieb Jan Kiszka: >> Avoids lots of warnings. >> >> Signed-off-by: Jan Kiszka >> --- >> qemu_socket.h | 2 ++ >> 1 files changed, 2 insertions(+), 0 deletions(-) >> >> diff --git a/qemu_socket.h b/qemu_socket.h >> index fe4cf6c..51ad2

[Qemu-devel] [PATCH 02/13] qemu-option: parse_option_number(): use error_set()

2012-03-29 Thread Luiz Capitulino
Note that qemu_opt_parse() callers still expect automatic error reporting with QError, so qemu_opts_parse() calls qerror_report_err() to keep the same semantics. Signed-off-by: Luiz Capitulino --- qemu-option.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-)

Re: [Qemu-devel] [PATCH 12/13] qapi: support for keyworded variable-length argument list

2012-03-29 Thread Anthony Liguori
On 03/29/2012 12:26 PM, Luiz Capitulino wrote: This allows for QAPI functions to receive a variable-length argument list. This is going to be used by device_add and netdev_add commands. In the schema, the argument list is represented by type name '**', like this example: { 'command': 'foo'

[Qemu-devel] [PATCH v2 1/5] MAINTAINERS: Add entry for UniCore32

2012-03-29 Thread Andreas Färber
Signed-off-by: Andreas Färber Acked-by: Guan Xuetao --- MAINTAINERS |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index f83d07c2..922945c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -112,6 +112,11 @@ M: Blue Swirl S: Maintained F: tar

[Qemu-devel] [PATCH 09/13] qerror: introduce QERR_INVALID_OPTION_GROUP

2012-03-29 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+) diff --git a/qerror.c b/qerror.c index 41c729a..02e3a14 100644 --- a/qerror.c +++ b/qerror.c @@ -156,6 +156,10 @@ static const QErrorStringTable qerror_table[] = { .desc =

[Qemu-devel] [PATCH 13/13] qapi: convert device_add

2012-03-29 Thread Luiz Capitulino
FIXME: HMP's help text (device_add ?) is not implemented. We need a way to export this information in QMP. Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- hmp-commands.hx |3 +-- hmp.c | 24 ++ hmp.h |1 + hw/qdev-moni

[Qemu-devel] [PATCH 11/13] qemu-config: introduce qemu_find_opts_err()

2012-03-29 Thread Luiz Capitulino
This is like qemu_find_opts(), except that it takes an Error argument. This new function allows for a incremental conversion of code using qemu_find_opts(). Signed-off-by: Luiz Capitulino --- qemu-config.c |5 + qemu-config.h |3 +++ 2 files changed, 8 insertions(+) diff --git a/qe

[Qemu-devel] [PATCH 12/13] qapi: support for keyworded variable-length argument list

2012-03-29 Thread Luiz Capitulino
This allows for QAPI functions to receive a variable-length argument list. This is going to be used by device_add and netdev_add commands. In the schema, the argument list is represented by type name '**', like this example: { 'command': 'foo', 'data': { 'arg-list': '**' } } Each argument is

[Qemu-devel] [PATCH 07/13] qemu-option: opts_do_parse(): use error_set()

2012-03-29 Thread Luiz Capitulino
The functions qemu_opts_do_parse() and opts_parse() both call opts_do_parse(), but their callers expect QError semantics. Thus, both functions call qerro_report_err() to keep the expected semantics. Signed-off-by: Luiz Capitulino --- qemu-option.c | 38 -- 1

[Qemu-devel] [PATCH 08/13] qemu-option: introduce qemu_opt_set_err()

2012-03-29 Thread Luiz Capitulino
This is like qemu_opt_set(), except that it takes an Error argument. This new function allows for a incremental conversion of code using qemu_opt_set(). Signed-off-by: Luiz Capitulino --- qemu-option.c |6 ++ qemu-option.h |2 ++ 2 files changed, 8 insertions(+) diff --git a/qemu-o

[Qemu-devel] [PATCH 04/13] qemu-option: parse_option_size(): use error_set()

2012-03-29 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qemu-option.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index a8b50af..61354af 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -203,7 +203,8 @@ static void parse_option_number(cons

Re: [Qemu-devel] [RFC PATCH v3 0/8] Rewrite tracetool using python modules

2012-03-29 Thread Stefan Hajnoczi
On Tue, Mar 27, 2012 at 09:49:12PM +0200, Lluís Vilanova wrote: > A full rewrite of the tracetool script using per-format and per-backend > modules, > so that it's easier to read and extend it in the future. > > Signed-off-by: Lluís Vilanova > --- > NOTE: This series applies in current master, i

[Qemu-devel] [PATCH 06/13] qemu-option: opt_set(): use error_set()

2012-03-29 Thread Luiz Capitulino
The functions qemu_opt_set() and opts_do_parse() both call opt_set(), but their callers expect QError semantics. Thus, both functions call qerro_report_err() to keep the expected semantics. Signed-off-by: Luiz Capitulino --- qemu-option.c | 38 +- 1 file cha

Re: [Qemu-devel] [PATCH 2/2] qapi: convert device_del

2012-03-29 Thread Eric Blake
On 03/29/2012 10:56 AM, Luiz Capitulino wrote: > Signed-off-by: Anthony Liguori > Signed-off-by: Luiz Capitulino > --- > hmp-commands.hx |3 +-- > hmp.c |9 + > hmp.h |1 + > hw/qdev-monitor.c | 18 +- > qapi-schema.json | 20 +++

[Qemu-devel] [PATCH 01/13] qemu-option: qemu_opts_create(): use error_set()

2012-03-29 Thread Luiz Capitulino
This commit converts qemu_opts_create() from qerror_report() to error_set(). This means that qemu_opts_create() now takes an Error argument and callers need to pass it if they're interested in getting error information. Currently, most calls to qemu_opts_create() can't fail, so most callers don't

[Qemu-devel] [PATCH 03/13] qemu-option: parse_option_bool(): use error_set()

2012-03-29 Thread Luiz Capitulino
Note that set_option_parameter() callers still expect automatic error reporting with QError, so set_option_parameter() calls qerror_report_err() to keep the same semantics. Signed-off-by: Luiz Capitulino --- qemu-option.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletio

Re: [Qemu-devel] [PATCH v2] signrom: Rewrite as python script

2012-03-29 Thread Jan Kiszka
On 2012-03-05 15:09, Jan Kiszka wrote: > Now that we have a hard dependency on python anyway, we can replace the > slow shell script to calculate the option ROM checksum with a fast AND > portable python version. Tested both with python 2.7 and 3.1. > > Signed-off-by: Jan Kiszka > --- > > Change

[Qemu-devel] [PATCH 10/13] qemu-config: find_list(): use error_set()

2012-03-29 Thread Luiz Capitulino
Note that qemu_find_opts() callers still expect automatic error reporting with QError, so qemu_find_opts() calls qerror_report_err() to keep the same semantics. Signed-off-by: Luiz Capitulino --- qemu-config.c | 32 +--- 1 file changed, 25 insertions(+), 7 deletions

[Qemu-devel] [PATCH 05/13] qemu-option: qemu_opt_parse(): use error_set()

2012-03-29 Thread Luiz Capitulino
The functions opt_set() and qemu_opts_validate() both call qemu_opt_parse(), but their callers expect QError semantics. Thus, both functions call qerro_report_err() to keep the expected semantics. Signed-off-by: Luiz Capitulino --- qemu-option.c | 54 +--

[Qemu-devel] [RFC 00/13]: convert device_add to the qapi

2012-03-29 Thread Luiz Capitulino
This is an RFC because it's not 100% finished yet and I'm not sure if some of the changes are the way to go. Here's a summary of the series its issues, more details can be found in the patches: o Patches 1 to 11 convert several qemu-option and qemu-config functions from qerror_report() to err

[Qemu-devel] [PATCH v2 2/5] target-unicore32: Relicense to GPLv2+

2012-03-29 Thread Andreas Färber
Adopt the license text suggested by Guan Xue-tao (with a minor simplification) for all target-unicore/ files except helper.c. To helper.c Anthony Liguori contributed a qemu_malloc() -> g_malloc() conversion, still pending IBM relicensing approval, so that remains GPLv2 for now. By relicensing all

[Qemu-devel] [PATCH v2 4/5] target-unicore32: QOM'ify CPU

2012-03-29 Thread Andreas Färber
Embed CPUUniCore32State as first member of UniCore32CPU. Contributed under GPLv2+. Signed-off-by: Andreas Färber --- Makefile.target|1 + target-unicore32/cpu-qom.h | 59 + target-unicore32/cpu.c | 90 ++

[Qemu-devel] [PATCH v2 0/5] QOM'ify UniCore32 CPU

2012-03-29 Thread Andreas Färber
Hello Xuetao, This updated series converts the UniCore32 CPU to QOM. In addition to addressing review comments from v1, a new approach for CPU-dependent values has been adopted: We should keep setting of features imperative and can avoid adding new class fields as storage for default values by mov

[Qemu-devel] [PATCH v2 3/5] target-unicore32: License future contributions under GPLv2+

2012-03-29 Thread Andreas Färber
This is to limit relicensing obstacles to the pending IBM investigation. Signed-off-by: Andreas Färber --- target-unicore32/helper.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/target-unicore32/helper.c b/target-unicore32/helper.c index 6af492d..18a9cbb 100644 ---

[Qemu-devel] [PATCH v2 5/5] target-unicore32: Move CPU-dependent init into initfn

2012-03-29 Thread Andreas Färber
Instead of setting values in a CPUID switch, do so in initfn functions. Signed-off-by: Andreas Färber --- target-unicore32/cpu.c| 14 ++ target-unicore32/helper.c | 23 --- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/target-unicore32/c

[Qemu-devel] [PATCH 2/2] qapi: convert device_del

2012-03-29 Thread Luiz Capitulino
Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- hmp-commands.hx |3 +-- hmp.c |9 + hmp.h |1 + hw/qdev-monitor.c | 18 +- qapi-schema.json | 20 qmp-commands.hx |5 + 6 files chan

[Qemu-devel] [PATCH 1/2] qdev: qdev_unplug(): use error_set()

2012-03-29 Thread Luiz Capitulino
It currently uses qerror_report(), but next commit will convert the drive_del command to the QAPI and this requires using error_set(). One particularity of qerror_report() is that it knows when it's running on monitor context or command-line context and prints the error message accordingly. error_

[Qemu-devel] [PATCH v2 0/2]: convert device_del to the qapi

2012-03-29 Thread Luiz Capitulino
V2: o change qdev_unplug() to return void (this allows some simplifications) o rename pci_device_hot_remove() 'errp' var to 'local_err' o minor changelog fixes hmp-commands.hx |3 +-- hmp.c|9 + hmp.h|1 + hw/pci-hotplug.c | 14 +

Re: [Qemu-devel] [PATCHv2] piix: fix up/down races + document

2012-03-29 Thread Alex Williamson
On Thu, 2012-03-29 at 14:51 +0200, Michael S. Tsirkin wrote: > piix acpi interface suffers from the following 2 issues: > > 1. > - delete device a > - quickly add device b in another slot > > if we do this before guest reads the down register, > the down event is discarded and device will never >

Re: [Qemu-devel] [PATCH v2 0/6] ARM: AREG0 conversion

2012-03-29 Thread Richard Henderson
On 03/29/2012 11:42 AM, Laurent Desnogues wrote: > That will indeed probably make the real problem, which is that > this patch increases the size of generated code, less obvious > on small benchmarks that don't put pressure on instruction > cache. But the fact is that generated code is larger and

Re: [Qemu-devel] [PATCH 0/2] ide: convert pio code path to asynchronous I/O

2012-03-29 Thread Chris Webb
Stefan Hajnoczi writes: > Thanks for trying it out. > > Regarding the guest kernel errors, they may be timeouts. The guest > may consider the IDE controller buggy/dead due to how long requests > take to complete under severe throttling. There's not much that can > be done about that, I think.

[Qemu-devel] [PATCH] block: fix streaming/closing race

2012-03-29 Thread Paolo Bonzini
Streaming can issue I/O while qcow2_close is running. This causes the L2 caches to become very confused or, alternatively, could cause a segfault when the streaming coroutine is reentered after closing its block device. The fix is to cancel streaming jobs when closing their underlying device. Th

Re: [Qemu-devel] [PATCH 1/4 v3] block: add image fragmentation statistics to qemu-img

2012-03-29 Thread Stefan Hajnoczi
On Thu, Mar 15, 2012 at 12:13 PM, Dong Xu Wang wrote: > From: Dong Xu Wang > > Discussion can be found at: > http://patchwork.ozlabs.org/patch/128730/ > > This patch add image fragmentation statistics while using qemu-img check. > > Signed-off-by: Dong Xu Wang > --- >  block.h    |    7 +++

Re: [Qemu-devel] [PATCH 1/4 v3] block: add image fragmentation statistics to qemu-img

2012-03-29 Thread Stefan Hajnoczi
On Thu, Mar 15, 2012 at 12:45 PM, Stefan Hajnoczi wrote: > On Thu, Mar 15, 2012 at 08:13:31PM +0800, Dong Xu Wang wrote: >> From: Dong Xu Wang >> >> Discussion can be found at: >> http://patchwork.ozlabs.org/patch/128730/ >> >> This patch add image fragmentation statistics while using qemu-img ch

Re: [Qemu-devel] live migration between qemu-kvm 1.0 and 0.15

2012-03-29 Thread Jan Kiszka
On 2012-03-29 17:23, Anthony Liguori wrote: > On 03/27/2012 12:42 PM, Jan Kiszka wrote: >> On 2012-03-27 18:49, Anthony Liguori wrote: >>> On 03/27/2012 11:46 AM, Avi Kivity wrote: On 03/27/2012 06:39 PM, Anthony Liguori wrote: > > So, since we're approaching 1.1, we should really disc

Re: [Qemu-devel] [PATCH v2 0/6] ARM: AREG0 conversion

2012-03-29 Thread Laurent Desnogues
On Tue, Mar 27, 2012 at 9:59 PM, Artyom Tarasenko wrote: > On Tue, Mar 27, 2012 at 7:01 PM, Laurent Desnogues > wrote: >> On Tue, Mar 27, 2012 at 6:48 PM, Blue Swirl wrote: >>> On Tue, Mar 27, 2012 at 13:40, Laurent Desnogues >>> wrote: On Mon, Mar 26, 2012 at 7:02 PM, Blue Swirl wrote: >

[Qemu-devel] [PATCH v7 0/2] QOM'ify ARM CPU

2012-03-29 Thread Andreas Färber
Hello Peter, Here's an improved mini-conversion. Please apply to target-arm.next tree. Available at: https://github.com/afaerber/qemu-cpu/commits/qom-cpu-arm.v7 Regards, Andreas Cc: Peter Maydell Cc: Paul Brook Cc: Andrzej Zaborowski Cc: Max Filippov v6 -> v7: * Fix TODO comment and add a

Re: [Qemu-devel] live migration between qemu-kvm 1.0 and 0.15

2012-03-29 Thread Avi Kivity
On 03/29/2012 05:21 PM, Anthony Liguori wrote: >> Option 1: make -M old force an old vmstate to be written out. Sounds >> like a generally useful thing. >> Option 2: ask those consumers to issue updates that bring their code up >> to version 3. Require fully updated qemus on both sides. Easy to

Re: [Qemu-devel] live migration between qemu-kvm 1.0 and 0.15

2012-03-29 Thread Anthony Liguori
On 03/27/2012 12:42 PM, Jan Kiszka wrote: On 2012-03-27 18:49, Anthony Liguori wrote: On 03/27/2012 11:46 AM, Avi Kivity wrote: On 03/27/2012 06:39 PM, Anthony Liguori wrote: So, since we're approaching 1.1, we should really discuss release criteria for 1.1 with respect to live migration. I'

Re: [Qemu-devel] live migration between qemu-kvm 1.0 and 0.15

2012-03-29 Thread Anthony Liguori
On 03/29/2012 10:17 AM, Avi Kivity wrote: On 03/29/2012 01:56 PM, Jan Kiszka wrote: On 2012-03-27 18:39, Anthony Liguori wrote: On 03/27/2012 11:22 AM, Jan Kiszka wrote: On 2012-03-27 17:59, Avi Kivity wrote: On 03/27/2012 11:55 AM, Jan Kiszka wrote: On 2012-03-27 10:55, Vasilis Liaskovitis

[Qemu-devel] [PATCH v7 2/2] target-arm: Minimalistic CPU QOM'ification

2012-03-29 Thread Andreas Färber
Introduce only one non-abstract type TYPE_ARM_CPU and do not touch cp15 registers to not interfere with Peter's ongoing remodelling. Embed CPUARMState as first (additional) field of ARMCPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber --- Makefile.target

Re: [Qemu-devel] live migration between qemu-kvm 1.0 and 0.15

2012-03-29 Thread Avi Kivity
On 03/29/2012 01:56 PM, Jan Kiszka wrote: > On 2012-03-27 18:39, Anthony Liguori wrote: > > On 03/27/2012 11:22 AM, Jan Kiszka wrote: > >> On 2012-03-27 17:59, Avi Kivity wrote: > >>> On 03/27/2012 11:55 AM, Jan Kiszka wrote: > On 2012-03-27 10:55, Vasilis Liaskovitis wrote: > > Hi, >

[Qemu-devel] [PATCH 4/6] usb: use USBDescriptor for interface descriptors.

2012-03-29 Thread Gerd Hoffmann
Add interface descriptor substruct to USBDescriptor, use it in the descriptor generator code. Signed-off-by: Gerd Hoffmann --- hw/usb/desc.c | 20 +++- hw/usb/desc.h |9 + 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/hw/usb/desc.c b/hw/usb/desc.c

[Qemu-devel] [PATCH 2/6] usb: use USBDescriptor for device qualifier descriptors.

2012-03-29 Thread Gerd Hoffmann
Add device qualifier substruct to USBDescriptor, use it in the descriptor generator code. Signed-off-by: Gerd Hoffmann --- hw/usb/desc.c | 23 --- hw/usb/desc.h | 10 ++ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/hw/usb/desc.c b/hw/usb/desc.c

Re: [Qemu-devel] [PATCH v7 0/2] QOM'ify ARM CPU

2012-03-29 Thread Peter Maydell
On 29 March 2012 15:50, Andreas Färber wrote: > Hello Peter, > > Here's an improved mini-conversion. Please apply to target-arm.next tree. Thanks. Both patches Reviewed-by: Peter Maydell and put into target-arm.next for tomorrow's pullreq. -- PMM

[Qemu-devel] [PATCH 6/6] usb-host: rewrite usb_linux_update_endp_table

2012-03-29 Thread Gerd Hoffmann
This patch carries a complete rewrite of the usb descriptor parser. Changes / improvements: * We are using the USBDescriptor struct instead of hard-coded offsets now to access descriptor data. * (debug) printfs are all gone, tracepoints have been added instead. * We don't try (and fail) to s

[Qemu-devel] [PATCH v7 1/2] target-arm: Drop cpu_arm_close()

2012-03-29 Thread Andreas Färber
It's unused, so no need to QOM'ify it later. Signed-off-by: Andreas Färber Reviewed-by: Peter Maydell --- target-arm/cpu.h|1 - target-arm/helper.c |5 - 2 files changed, 0 insertions(+), 6 deletions(-) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 26c114b..69ef142 100

[Qemu-devel] [PATCH 5/6] usb: use USBDescriptor for endpoint descriptors.

2012-03-29 Thread Gerd Hoffmann
Add endpoint descriptor substruct to USBDescriptor, use it in the descriptor generator code. Signed-off-by: Gerd Hoffmann --- hw/usb/desc.c | 20 +++- hw/usb/desc.h |9 + 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/hw/usb/desc.c b/hw/usb/desc.c i

[Qemu-devel] [PATCH 0/6] usb: descriptor rework.

2012-03-29 Thread Gerd Hoffmann
Hi, This patch series reworks the usb descriptor handling in qemu. It adds a struct for the binary representation of usb descriptors. It is put into use for both generating usb descriptors (for emulated devices) and parsing usb descriptors (usb-host driver). Additionally the usb-host parser c

[Qemu-devel] [PATCH 1/6] usb: add USBDescriptor, use for device descriptors.

2012-03-29 Thread Gerd Hoffmann
This patch adds a new type for the binary representation of usb descriptors. It is put into use for the descriptor generator code where the struct replaces the hard-coded offsets. Signed-off-by: Gerd Hoffmann --- hw/usb/desc.c | 37 +++-- hw/usb/desc.h | 26 +

[Qemu-devel] [PATCH 3/6] usb: use USBDescriptor for config descriptors.

2012-03-29 Thread Gerd Hoffmann
Add config descriptor substruct to USBDescriptor, use it in the descriptor generator code. Signed-off-by: Gerd Hoffmann --- hw/usb/desc.c | 22 -- hw/usb/desc.h |9 + 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/hw/usb/desc.c b/hw/usb/desc.c

Re: [Qemu-devel] [PATCH v1 1/2] pl330: initial version

2012-03-29 Thread Kirill Batuzov
On Thu, 29 Mar 2012, Peter A. G. Crosthwaite wrote: > Device model for Primecell PL330 dma controller. > > Signed-off-by: Peter A. G. Crosthwaite > --- Signed-off-by: Kirill Batuzov > +static int PL330Fifo_get(PL330Fifo *s, uint8_t *buf, int len, uint8_t tag) > +{ > +int i, ret; > +

  1   2   >