Re: [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers

2012-10-25 Thread Peter Crosthwaite
Next version up on list, Ive changed the approach a bit. On Fri, Oct 26, 2012 at 4:49 PM, Gerd Hoffmann wrote: > Hi, > >>> @@ -1312,29 +1320,24 @@ static TypeInfo piix3_uhci_info = { >>> .name = "piix3-usb-uhci", >>> .parent= TYPE_PCI_DEVICE, >>> .instance_size =

Re: [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers

2012-10-25 Thread Gerd Hoffmann
Hi, >> @@ -1312,29 +1320,24 @@ static TypeInfo piix3_uhci_info = { >> .name = "piix3-usb-uhci", >> .parent= TYPE_PCI_DEVICE, >> .instance_size = sizeof(UHCIState), >> -.class_init= piix3_uhci_class_init, >> +.class_init= uhci_class_init, > > There

Re: [Qemu-devel] [PATCH V8 0/4] libqblock qemu block layer library

2012-10-25 Thread Wenchao Xia
Hi, Kevin Could u take a look at this patch to see if anything need to be improved, many thanks. >These patches introduce libqblock API, make libqblock.la and make > check-libqblock could build this library. > Functionalities: > 1 create a new image. > 2 sync access of an image. > 3 ba

Re: [Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up

2012-10-25 Thread Evgeny Voevodin
Today I made more precise testing with usage of --enable-profiler. Here is the test procedure: 1. Boot Linux Kernel 5 times. 2. For each iteration wait while "JIT cycles" is stable for ~10 seconds 3. Write down the "cycles/op" Here are the results: Before clean-up: min: 731.9 max: 735.8 avg: 73

[Qemu-devel] [PATCH v2 05/11] usb/ehci: seperate out PCIisms

2012-10-25 Thread Peter Crosthwaite
Seperate the PCI stuff from the EHCI components. Extracted the PCIDevice out into a new wrapper struct to make EHCIState non-PCI-specific. Seperated tho non PCI init component out into a seperate "common" init function. Signed-off-by: Peter Crosthwaite --- Changed from v1: renamed VMSD defintions

Re: [Qemu-devel] nvram and boot order

2012-10-25 Thread David Gibson
On Tue, Oct 16, 2012 at 03:55:17PM -0500, Anthony Liguori wrote: > Benjamin Herrenschmidt writes: > > > On Tue, 2012-10-16 at 14:55 -0500, Anthony Liguori wrote: > >> > >> 4) If -boot is specified, the parameter should alter the contents of > >>NVRAM to change the boot order to what is speci

Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-10-25 Thread David Gibson
On Fri, Oct 26, 2012 at 12:53:27PM +1000, Peter Crosthwaite wrote: > On Fri, Oct 26, 2012 at 10:48 AM, David Gibson > wrote: > > On Thu, Oct 25, 2012 at 08:33:13PM +1000, Peter Crosthwaite wrote: > >> On Oct 24, 2012 3:27 AM, "Peter Maydell" wrote: > >> > > >> > Define a new global dma_context_me

[Qemu-devel] [PATCH v2 08/11] xilinx_zynq: add USB controllers

2012-10-25 Thread Peter Crosthwaite
Add the two usb controllers in Zynq. Signed-off-by: Peter Crosthwaite --- changed from v1: Simplified to use sysbus_create_simple - dont need prop anymore hw/usb/hcd-ehci.c |2 +- hw/xilinx_zynq.c |3 +++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/usb/hcd-ehci.c

[Qemu-devel] [PATCH v2 06/11] usb/ehci: Add Sysbus Infrastructure

2012-10-25 Thread Peter Crosthwaite
Add QOM class definition helpers for sysbus attached EHCI implementations. Signed-off-by: Peter Crosthwaite --- changed from v1: Dont create a QOM definition for Sysbus EHCI, rather just add all the bits and pieces. (Multiple) sysbus EHCI defs can be created by adding to the type_info[] table. Us

[Qemu-devel] [PATCH v2 03/11] usb/ehci: parameterise the register region offsets

2012-10-25 Thread Peter Crosthwaite
The capabilities register and operational register offsets can vary from one EHCI implementation to the next. Parameterise accordingly. Signed-off-by: Peter Crosthwaite --- changed from v1: Moved opregbase and capregbase to class_data (Gerd Review) Fixed capa regs to 16 bytes in length (Gerd Revi

Re: [Qemu-devel] [PATCH v1 0/3] Xilinx Zynq QSPI support

2012-10-25 Thread Peter Crosthwaite
Ping! Any problems with this one? There is context conflict from the s/target_phys_addr_t/hwaddr/ so it needs a quick rebase but otherwise it is unchanged, ill rebase and [PULL] shortly if no objections. Regards, Peter On Fri, Oct 19, 2012 at 6:29 PM, Peter Crosthwaite wrote: > Support for the

[Qemu-devel] [PATCH v2 02/11] usb/ehci: Use class_data to init PCI variations

2012-10-25 Thread Peter Crosthwaite
Got rid of the duplication of the class init functions for the two PCI EHCI variants. The PCI specifics are passed in as as class_data and set by a common class_init function. Premeptively defined a new Class "EHCICLass" for the upcomming addition of new fields. The class_data is an instance of EH

[Qemu-devel] [PATCH v3 4/4] pflash_cfi01: Fix debug mode printfery

2012-10-25 Thread Peter Crosthwaite
This DPRINTF was throwing a warning due to a missing cast. Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell --- hw/pflash_cfi01.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c index d30d43c..7d040b5 100644 --- a/hw/p

[Qemu-devel] [PATCH v3 3/4] pflash_cfi0x: QOMified

2012-10-25 Thread Peter Crosthwaite
QOMified the pflash_cfi0x so machine models can connect them up in custom ways. Kept the pflash_cfi0x_register functions as is. They can still be used to create a flash straight onto system memory. Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell --- changed from v2: deleted invalid

[Qemu-devel] [PATCH v3 2/4] pflash_cfi01: remove unused total_len field

2012-10-25 Thread Peter Crosthwaite
This field is completely unused. Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell --- hw/pflash_cfi01.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c index 2e29f8a..b532054 100644 --- a/hw/pflash_cfi01.c +++ b/hw/pfla

[Qemu-devel] [PATCH v3 1/4] pflash_cfi0x: remove unused base field

2012-10-25 Thread Peter Crosthwaite
This field is completely unused. The base address should also be abstracted away from the device anyway. Removed. Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell --- hw/pflash_cfi01.c |2 -- hw/pflash_cfi02.c |4 +--- 2 files changed, 1 insertions(+), 5 deletions(-) diff -

[Qemu-devel] [PATCH v3 0/4] QOMify pflash_cfi0x

2012-10-25 Thread Peter Crosthwaite
This series QOMifies the pflash_cfi0x devices to get them working with PL35x in the least hackish way. Regression tested pflash_cfi_01 using petalogix-ml605 and pflash_cfi_02 tested using zynq. Further testing by clients of the pflash would be appreciated. Removed the PL35x and Zynq stuff in V2

[Qemu-devel] [PATCH v2 04/11] usb/ehci: Abstract away PCI DMA API

2012-10-25 Thread Peter Crosthwaite
Pull the DMAContext for the PCI DMA out at device init time and put it into the device state. Use dma_memory_read/write() instead of pci specific versions. Signed-off-by: Peter Crosthwaite --- hw/usb/hcd-ehci.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a

[Qemu-devel] [PATCH v2 10/11] usb/ehci: Debug mode compile fixes

2012-10-25 Thread Peter Crosthwaite
A few debug messages in EHCI must have missed out on updates during incremental developments. Fixed. Signed-off-by: Peter Crosthwaite --- hw/usb/hcd-ehci.c | 21 ++--- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index

[Qemu-devel] [PATCH v2 11/11] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Crosthwaite
Just put RAM regions in the unimplemented spaces in the MMIO region. These regions have undefined behaviour, but this at least stops QEMU from segfaulting when the guest bangs on these registers (and sucessfully fakes reading and writing the registers with no side effects). Signed-off-by: Peter Cr

[Qemu-devel] [PATCH v2 09/11] usb/ehci: Guard definition of EHCI_DEBUG

2012-10-25 Thread Peter Crosthwaite
Guard against re-definition of EHCI_DEBUG. Allows for turning on of debug info from configure (using --qemu-extra-cflags="-DEHCI_DEBUG=1") rather than source code hacking. Signed-off-by: Peter Crosthwaite --- hw/usb/hcd-ehci.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --

[Qemu-devel] [PATCH v2 07/11] usb/ehci: Add Xilinx ps7 USB controller

2012-10-25 Thread Peter Crosthwaite
Definition of the USB controller implemented in Zynq. Signed-off-by: Peter Crosthwaite --- hw/usb/hcd-ehci.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 50a85d5..443038b 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/us

[Qemu-devel] [PATCH v2 01/11] dma: Define dma_context_memory and use in sysbus-ohci

2012-10-25 Thread Peter Crosthwaite
From: Peter Maydell Define a new global dma_context_memory which is a DMAContext corresponding to the global address_space_memory AddressSpace. This can be used by sysbus peripherals like sysbus-ohci which need to do DMA. In particular, use it in the sysbus-ohci device, which fixes a segfault wh

[Qemu-devel] [PATCH v2 00/11] Sysbus EHCI + Zynq USB.

2012-10-25 Thread Peter Crosthwaite
Added Sysbus variant of EHCI and attached it to Xilinx Zynq. The EHCI stuff is going to useful for Tegra too. See http://lists.gnu.org/archive/html/qemu-devel/2012-06/msg04100.html thread for the inital RFC discussion on this development. Regession tested using i386 Debian (dd of=/dev/sdx ...

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread Alexandre DERUMIER
Thanks guys ! I'll try to send a patch next week. Regards, Alexandre - Mail original - De: "ronnie sahlberg" À: "Paolo Bonzini" Cc: "Kevin Wolf" , "Alexandre DERUMIER" , "qemu-devel" Envoyé: Jeudi 25 Octobre 2012 16:00:41 Objet: Re: qemu-img convert with block driver without .bdr

Re: [Qemu-devel] [PATCH 0/4 V5] char: Add CirMemCharDriver and provide QMP interface

2012-10-25 Thread Lei Li
Please ignore this thread and review the other thread also titled V5. Sorry for the mis-sending mostly caused by the unconsciousness at midnight... On 10/26/2012 03:48 AM, Lei Li wrote: This patch series attempts to add new char backend CirMemCharDriver with a circular buffer and expose it to us

Re: [Qemu-devel] [PATCH 1/4] qemu-char: Add new char backend CirMemCharDriver

2012-10-25 Thread Lei Li
On 10/26/2012 04:05 AM, Eric Blake wrote: On 10/25/2012 01:54 PM, Lei Li wrote: Signed-off-by: Lei Li --- qemu-char.c | 136 +++ qemu-config.c |3 + qemu-options.hx | 10 3 files changed, 149 insertions(+), 0 deletions(-

Re: [Qemu-devel] [patch v4 13/16] e1000: add busy flag to anti broken device state

2012-10-25 Thread liu ping fan
On Fri, Oct 26, 2012 at 11:05 AM, liu ping fan wrote: > On Thu, Oct 25, 2012 at 5:04 PM, Avi Kivity wrote: >> On 10/25/2012 11:00 AM, Peter Maydell wrote: >>> On 23 October 2012 10:37, Avi Kivity wrote: On 10/23/2012 11:32 AM, liu ping fan wrote: > On Tue, Oct 23, 2012 at 5:07 PM, Jan K

Re: [Qemu-devel] [patch v4 13/16] e1000: add busy flag to anti broken device state

2012-10-25 Thread liu ping fan
On Thu, Oct 25, 2012 at 5:04 PM, Avi Kivity wrote: > On 10/25/2012 11:00 AM, Peter Maydell wrote: >> On 23 October 2012 10:37, Avi Kivity wrote: >>> On 10/23/2012 11:32 AM, liu ping fan wrote: On Tue, Oct 23, 2012 at 5:07 PM, Jan Kiszka wrote: > On 2012-10-23 07:52, liu ping fan wrote:

Re: [Qemu-devel] [PATCH V14 1/6] docs: document for add-cow file format

2012-10-25 Thread Dong Xu Wang
On Thu, Oct 25, 2012 at 10:56 PM, Eric Blake wrote: > On 10/25/2012 07:36 AM, Dong Xu Wang wrote: >> Document for add-cow format, the usage and spec of add-cow are introduced. >> >> Signed-off-by: Dong Xu Wang >> --- >> +An example usage of add-cow would look like:: >> +(ubuntu.img is a disk imag

Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-10-25 Thread Peter Crosthwaite
On Fri, Oct 26, 2012 at 10:48 AM, David Gibson wrote: > On Thu, Oct 25, 2012 at 08:33:13PM +1000, Peter Crosthwaite wrote: >> On Oct 24, 2012 3:27 AM, "Peter Maydell" wrote: >> > >> > Define a new global dma_context_memory which is a DMAContext corresponding >> > to the global address_space_memor

Re: [Qemu-devel] [PATCH V4 04/10] introduce qemu_opts_create_nofail function

2012-10-25 Thread Dong Xu Wang
On Thu, Oct 25, 2012 at 9:06 PM, Peter Maydell wrote: > On 25 October 2012 13:57, Dong Xu Wang wrote: >> While id is NULL, qemu_opts_create can not fail, so ignore >> errors is fine. >> >> Signed-off-by: Dong Xu Wang >> --- >> qemu-option.c |5 + >> qemu-option.h |1 + >> 2 files ch

Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-10-25 Thread David Gibson
On Thu, Oct 25, 2012 at 08:33:13PM +1000, Peter Crosthwaite wrote: > On Oct 24, 2012 3:27 AM, "Peter Maydell" wrote: > > > > Define a new global dma_context_memory which is a DMAContext corresponding > > to the global address_space_memory AddressSpace. This can be used by > > sysbus peripherals li

Re: [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers

2012-10-25 Thread Peter Crosthwaite
On Fri, Oct 26, 2012 at 9:54 AM, Peter Crosthwaite wrote: > Copying patch inline to make some comments on it > > diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c > index b6b972f..64442a4 100644 > --- a/hw/usb/hcd-uhci.c > +++ b/hw/usb/hcd-uhci.c > @@ -88,6 +88,13 @@ enum { > typedef struct UHCI

Re: [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers

2012-10-25 Thread Peter Crosthwaite
Copying patch inline to make some comments on it diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index b6b972f..64442a4 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -88,6 +88,13 @@ enum { typedef struct UHCIState UHCIState; typedef struct UHCIAsync UHCIAsync; typedef struct UHCI

Re: [Qemu-devel] [PATCH 18/37] target-i386: add stubs for hyperv_(vapic_recommended|relaxed_timing_enabled|get_spinlock_retries)()

2012-10-25 Thread Don Slutz
On 10/22/12 11:03, Igor Mammedov wrote: It's needed for converting hv_* features into properties and to avoid build breakage when qemu is built with --disable-kvm option. Signed-off-by: Igor Mammedov Reported-by: Eduardo Habkost --- target-i386/hyperv.h | 9 ++--- 1 file changed, 6 inse

Re: [Qemu-devel] [PATCH 27/37] target-i386: convert "tsc-frequency" to static property

2012-10-25 Thread Don Slutz
On 10/22/12 11:03, Igor Mammedov wrote: Signed-off-by: Igor Mammedov --- * in addition use error_setg() instead of error_set() --- target-i386/cpu.c | 75 ++- 1 file changed, 41 insertions(+), 34 deletions(-) diff --git a/target-i386/cpu

Re: [Qemu-devel] [PATCH 26/26] qidl: unit tests and build infrastructure

2012-10-25 Thread Michael Roth
On Thu, Oct 25, 2012 at 04:27:50PM -0500, Michael Roth wrote: > On Thu, Oct 18, 2012 at 09:42:20PM -0500, Michael Roth wrote: > > > > Signed-off-by: Michael Roth > > --- > > Makefile |3 + > > configure|1 + > > rules.mak| 27

Re: [Qemu-devel] [PATCH 26/26] qidl: unit tests and build infrastructure

2012-10-25 Thread Michael Roth
On Thu, Oct 18, 2012 at 09:42:20PM -0500, Michael Roth wrote: > > Signed-off-by: Michael Roth > --- > Makefile |3 + > configure|1 + > rules.mak| 27 ++- > tests/Makefile |8 +- > tests/test-qidl-included.h

Re: [Qemu-devel] [PATCH 29/37] target-i386: convert "stepping" to static property

2012-10-25 Thread Don Slutz
On 10/22/12 11:03, Igor Mammedov wrote: Signed-off-by: Igor Mammedov --- - in addition use error_setg() instead of error_set() --- target-i386/cpu.c | 85 ++- 1 file changed, 46 insertions(+), 39 deletions(-) diff --git a/target-i386/cpu.

Re: [Qemu-devel] [PATCH 31/37] target-i386: convert "family" to static property

2012-10-25 Thread Don Slutz
On 10/22/12 11:03, Igor Mammedov wrote: Signed-off-by: Igor Mammedov --- - in addition use error_setg() instead of error_set() --- target-i386/cpu.c | 96 +-- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/target-i386/cp

Re: [Qemu-devel] [PATCH 30/37] target-i386: convert "model" to static property

2012-10-25 Thread Don Slutz
On 10/22/12 11:03, Igor Mammedov wrote: Signed-off-by: Igor Mammedov --- - in addition use error_setg() instead of error_set() --- target-i386/cpu.c | 83 ++- 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/target-i386/cpu

Re: [Qemu-devel] [PATCH v2 1/2] Make default boot order machine specific

2012-10-25 Thread Alexander Graf
On 25.10.2012, at 22:50, Peter Maydell wrote: > On 25 October 2012 21:18, Anthony Liguori wrote: >> The other approach to this would be: >> >> static QEMUMachine pseries_machine = { >>.no_boot_order = 1, >> }; >> >> Which I think is what Peter is suggesting. I'm not a huge fan of this >>

Re: [Qemu-devel] [PATCH v2 1/2] Make default boot order machine specific

2012-10-25 Thread Peter Maydell
On 25 October 2012 21:18, Anthony Liguori wrote: > The other approach to this would be: > > static QEMUMachine pseries_machine = { > .no_boot_order = 1, > }; > > Which I think is what Peter is suggesting. I'm not a huge fan of this > because it's backwards logic but we already do this for a b

Re: [Qemu-devel] slow xbzrle

2012-10-25 Thread Stefan Priebe
Am 25.10.2012 15:15, schrieb Orit Wasserman: Looks like a lot of cache miss, you can try increasing the cache size (migrate_set_cache_size). But you should remember that for an idle guest XBZRLE is wasteful, it is useful for workload that changes the same memory pages frequently. sure here are

Re: [Qemu-devel] [PATCH] win32: fix broken build due to missing QEMU_MADV_HUGEPAGE

2012-10-25 Thread Stefan Weil
Am 24.10.2012 18:12, schrieb Luiz Capitulino: Commit ad0b5321f1f797274603ebbe20108b0750baee94 forgot to add QEMU_MADV_HUGEPAGE macros for when CONFIG_MADVISE is not defined. This broke the build for Windows. Fix it. Signed-off-by: Luiz Capitulino --- osdep.h | 2 ++ 1 file changed, 2 insertio

Re: [Qemu-devel] [PATCH 1/4] qemu-char: Add new char backend CirMemCharDriver

2012-10-25 Thread Eric Blake
On 10/25/2012 01:48 PM, Lei Li wrote: > Signed-off-by: Lei Li > --- > qemu-char.c | 136 > +++ > qemu-config.c |3 + > qemu-options.hx | 10 > 3 files changed, 149 insertions(+), 0 deletions(-) > > diff --git a/qemu-char.c b/

[Qemu-devel] [PATCH 0/4 V5] char: Add CirMemCharDriver and provide QMP interface

2012-10-25 Thread Lei Li
This patch series attempts to add new char backend CirMemCharDriver with a circular buffer and expose it to users by introducing QMP interface memchar-write and memchar-read and via the command line like the other CharDriverStates. Serial ports in qemu always use CharDriverStates as there backends

[Qemu-devel] [PATCH 4/4] HMP: Introduce console command

2012-10-25 Thread Lei Li
Signed-off-by: Lei Li --- hmp-commands.hx | 25 + hmp.c | 52 hmp.h |1 + monitor.c | 15 +++ monitor.h |3 +++ 5 files changed, 96 insertions(+), 0 deletions(-)

Re: [Qemu-devel] [PATCH v2 1/2] Make default boot order machine specific

2012-10-25 Thread Anthony Liguori
Peter Maydell writes: > On 25 October 2012 15:38, Avik Sil wrote: >> @@ -171,6 +171,7 @@ static QEMUMachine clipper_machine = { >> .init = clipper_init, >> .max_cpus = 4, >> .is_default = 1, >> +.default_machine_opts = DEFAULT_BOOT_ORDER, >> }; > >> @@ -86,6 +86,7 @@ static Q

Re: [Qemu-devel] [PATCHv2 3/4] Support for "double whitelist" filters

2012-10-25 Thread Eduardo Otubo
On Tue, Oct 23, 2012 at 11:10:58AM -0400, Corey Bryant wrote: > > > On 10/23/2012 01:55 AM, Eduardo Otubo wrote: > >This patch includes a second whitelist right before the main loop. It's > >a smaller and more restricted whitelist, excluding execve() among many > >others. > > > >v2: * ctx changed

Re: [Qemu-devel] [PATCH 1/4] qemu-char: Add new char backend CirMemCharDriver

2012-10-25 Thread Eric Blake
On 10/25/2012 01:54 PM, Lei Li wrote: > Signed-off-by: Lei Li > --- > qemu-char.c | 136 > +++ > qemu-config.c |3 + > qemu-options.hx | 10 > 3 files changed, 149 insertions(+), 0 deletions(-) > > > +/*

[Qemu-devel] [PATCH 3/4] QAPI: Introduce memchar-read QMP command

2012-10-25 Thread Lei Li
Signed-off-by: Lei Li --- hmp-commands.hx | 19 ++ hmp.c| 19 ++ hmp.h|1 + qapi-schema.json | 27 ++ qemu-char.c | 55 ++ qmp-commands.hx | 40

[Qemu-devel] [PATCH 4/4] HMP: Introduce console command

2012-10-25 Thread Lei Li
Signed-off-by: Lei Li --- hmp-commands.hx | 25 + hmp.c | 52 hmp.h |1 + monitor.c | 15 +++ monitor.h |3 +++ 5 files changed, 96 insertions(+), 0 deletions(-)

[Qemu-devel] [PATCH 2/4] QAPI: Introduce memchar-write QMP command

2012-10-25 Thread Lei Li
Signed-off-by: Lei Li --- hmp-commands.hx | 17 + hmp.c| 15 +++ hmp.h|1 + qapi-schema.json | 47 +++ qemu-char.c | 44 qmp-commands.hx

[Qemu-devel] [PATCH 0/4 V5] char: Add CirMemCharDriver and provide QMP interface

2012-10-25 Thread Lei Li
This patch series attempts to add new char backend CirMemCharDriver with a circular buffer and expose it to users by introducing QMP interface memchar-write and memchar-read and via the command line like the other CharDriverStates. Serial ports in qemu always use CharDriverStates as there backends

[Qemu-devel] [PATCH 1/4] qemu-char: Add new char backend CirMemCharDriver

2012-10-25 Thread Lei Li
Signed-off-by: Lei Li --- qemu-char.c | 136 +++ qemu-config.c |3 + qemu-options.hx | 10 3 files changed, 149 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index b082bae..45d2a86 100644 --- a/qemu-char

[Qemu-devel] [PATCH 3/4] QAPI: Introduce memchar-read QMP command

2012-10-25 Thread Lei Li
Signed-off-by: Lei Li --- hmp-commands.hx | 19 ++ hmp.c| 19 ++ hmp.h|1 + qapi-schema.json | 27 ++ qemu-char.c | 55 ++ qmp-commands.hx | 40

[Qemu-devel] [PATCH 2/4] QAPI: Introduce memchar-write QMP command

2012-10-25 Thread Lei Li
Signed-off-by: Lei Li --- hmp-commands.hx | 17 + hmp.c| 15 +++ hmp.h|1 + qapi-schema.json | 47 +++ qemu-char.c | 44 qmp-commands.hx

[Qemu-devel] [PATCH 1/4] qemu-char: Add new char backend CirMemCharDriver

2012-10-25 Thread Lei Li
Signed-off-by: Lei Li --- qemu-char.c | 136 +++ qemu-config.c |3 + qemu-options.hx | 10 3 files changed, 149 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index b082bae..45d2a86 100644 --- a/qemu-char

Re: [Qemu-devel] [PATCH 5/5] HMP: Introduce console command

2012-10-25 Thread Lei Li
On 10/24/2012 08:55 PM, Luiz Capitulino wrote: On Wed, 24 Oct 2012 15:17:21 +0800 Lei Li wrote: On 10/23/2012 02:59 AM, Luiz Capitulino wrote: On Mon, 22 Oct 2012 00:48:01 +0800 Lei Li wrote: Signed-off-by: Lei Li --- hmp-commands.hx | 23 +++ hmp.c |

[Qemu-devel] [Bug 1071236] [NEW] creating qcow2 image with preallocation fails if size >=4G

2012-10-25 Thread Marek Mrva
Public bug reported: Steps to reproduce: 1. run> qemu-img create -f qcow2 -o cluster_size=512,preallocation=metadata disk.img 4G Reproducible: Always Configuration: Gentoo Linux 3.4.9, 64b latest qemu available from portage (afaik this is pulled from the git repo) Possible workarounds:

Re: [Qemu-devel] [patch v4 00/16] push mmio dispatch out of big lock

2012-10-25 Thread Peter Maydell
On 25 October 2012 20:00, Jan Kiszka wrote: > On 2012-10-25 20:13, Marcelo Tosatti wrote: >> A document should be maintained and updated to reflect ongoing >> agreement of problems and solutions... Jan/Liu, someone steps up >> to do that? > > I can pick this up as I have to anyway. First results w

Re: [Qemu-devel] [patch v4 00/16] push mmio dispatch out of big lock

2012-10-25 Thread Jan Kiszka
On 2012-10-25 20:13, Marcelo Tosatti wrote: > On Thu, Oct 25, 2012 at 06:13:51PM +0100, Peter Maydell wrote: >> On 25 October 2012 18:07, Avi Kivity wrote: >>> On 10/25/2012 04:04 PM, Peter Maydell wrote: Is there a clear up to date description somewhere of the design and locking strateg

Re: [Qemu-devel] [PATCH v2 00/12] Portable thread-pool/AIO, Win32 emulated AIO

2012-10-25 Thread Anthony Liguori
On 10/25/2012 11:23 AM, Paolo Bonzini wrote: Il 25/10/2012 18:01, Stefan Hajnoczi ha scritto: On Tue, Aug 7, 2012 at 1:17 PM, Paolo Bonzini wrote: This patch series is part 2 in my EventNotifier/AIO improvements for QEMU 1.2. It extends use of EventNotifier to the main loop and AIO subsystems

Re: [Qemu-devel] [patch v4 12/16] e1000: apply fine lock on e1000

2012-10-25 Thread Jan Kiszka
On 2012-10-25 19:02, Avi Kivity wrote: > On 10/25/2012 06:39 PM, Jan Kiszka wrote: >>> >>> That doesn't work cross-thread. >>> >>> vcpu A: write to device X, dma-ing to device Y >>> vcpu B: write to device Y, dma-ing to device X >> >> We will deny DMA-ing from device X on behalf of a VCPU, ie. in d

Re: [Qemu-devel] [PATCH V4 00/12] SD save/load support, SD qomification and bug fixes

2012-10-25 Thread Igor Mitsyanko
On 10/25/2012 07:47 PM, Peter Maydell wrote: On 10 August 2012 17:23, Igor Mitsyanko wrote: On 08/10/2012 07:06 PM, Peter Maydell wrote: On 27 July 2012 20:29, Igor Mitsyanko wrote: Igor Mitsyanko (12): hw/sd.c: convert wp_groups in SDState to bitfield hw/sd.c: make sd_wp_addr() acc

Re: [Qemu-devel] [PATCH v4 2/2] hw/qdev: Abort rather than ignoring errors adding device properties

2012-10-25 Thread Anthony Liguori
Peter Maydell writes: > Instead of ignoring any errors that occur when adding properties > to a new device in device_initfn(), check for them and abort if any > occur. The most likely cause is accidentally adding a duplicate > property, which is a programming error by the device author. > > Signe

Re: [Qemu-devel] [PATCH v4 1/2] qom: Detect attempts to add a property that already exists

2012-10-25 Thread Anthony Liguori
Peter Maydell writes: > Detect attempts to add a property to an object if one of > that name already exists, and report them as critical > errors. In particular, for static properties (eg qdev > Property arrays) this will manifest as an abort() with > a useful error message. > > Signed-off-by: Pe

Re: [Qemu-devel] [patch v4 00/16] push mmio dispatch out of big lock

2012-10-25 Thread Marcelo Tosatti
On Thu, Oct 25, 2012 at 06:13:51PM +0100, Peter Maydell wrote: > On 25 October 2012 18:07, Avi Kivity wrote: > > On 10/25/2012 04:04 PM, Peter Maydell wrote: > >> Is there a clear up to date description somewhere of the design and > >> locking strategy here somewhere? I'd rather not have to try to

Re: [Qemu-devel] [PATCH v4 1/2] qom: Detect attempts to add a property that already exists

2012-10-25 Thread Peter Maydell
On 25 October 2012 18:27, Markus Armbruster wrote: > Peter Maydell writes: > >> Detect attempts to add a property to an object if one of >> that name already exists, and report them as critical >> errors. In particular, for static properties (eg qdev >> Property arrays) this will manifest as an a

Re: [Qemu-devel] [PATCH v4 1/2] qom: Detect attempts to add a property that already exists

2012-10-25 Thread Markus Armbruster
Peter Maydell writes: > Detect attempts to add a property to an object if one of > that name already exists, and report them as critical > errors. In particular, for static properties (eg qdev > Property arrays) this will manifest as an abort() with > a useful error message. What's critical abou

Re: [Qemu-devel] [patch v4 00/16] push mmio dispatch out of big lock

2012-10-25 Thread Peter Maydell
On 25 October 2012 18:07, Avi Kivity wrote: > On 10/25/2012 04:04 PM, Peter Maydell wrote: >> Is there a clear up to date description somewhere of the design and >> locking strategy here somewhere? I'd rather not have to try to >> reconstitute it by reading the whole patchset... > > It was describ

Re: [Qemu-devel] [PATCH 1/3] nbd: Only try to send flush/discard commands if connected to the NBD server

2012-10-25 Thread Jamie Lokier
Kevin Wolf wrote: > Am 24.10.2012 16:32, schrieb Jamie Lokier: > > Kevin Wolf wrote: > >> Am 24.10.2012 14:16, schrieb Nicholas Thomas: > >>> On Tue, 2012-10-23 at 16:02 +0100, Jamie Lokier wrote: > Since the I/O _order_ before, and sometimes after, flush, is important > for data integrit

Re: [Qemu-devel] [patch v4 00/16] push mmio dispatch out of big lock

2012-10-25 Thread Avi Kivity
On 10/25/2012 04:04 PM, Peter Maydell wrote: > On 22 October 2012 10:23, Liu Ping Fan wrote: >> v1: >> https://lists.gnu.org/archive/html/qemu-devel/2012-07/msg03312.html >> >> v2: >> http://lists.gnu.org/archive/html/qemu-devel/2012-08/msg01275.html >> >> v3: >> http://lists.nongnu.org/archive/ht

Re: [Qemu-devel] [patch v4 12/16] e1000: apply fine lock on e1000

2012-10-25 Thread Avi Kivity
On 10/25/2012 06:41 PM, Jan Kiszka wrote: > On 2012-10-25 18:23, Avi Kivity wrote: >> On 10/25/2012 03:34 PM, Jan Kiszka wrote: >> > Second, it clearly shows that we need to address lock-less IRQ delivery. > Almost nothing is won if we have to take the global lock again to push > an IR

Re: [Qemu-devel] [patch v4 12/16] e1000: apply fine lock on e1000

2012-10-25 Thread Avi Kivity
On 10/25/2012 06:39 PM, Jan Kiszka wrote: >> >> That doesn't work cross-thread. >> >> vcpu A: write to device X, dma-ing to device Y >> vcpu B: write to device Y, dma-ing to device X > > We will deny DMA-ing from device X on behalf of a VCPU, ie. in dispatch > context, to Y. > > What we do not

Re: [Qemu-devel] [PATCH v2 1/2] Make default boot order machine specific

2012-10-25 Thread Peter Maydell
On 25 October 2012 15:38, Avik Sil wrote: > @@ -171,6 +171,7 @@ static QEMUMachine clipper_machine = { > .init = clipper_init, > .max_cpus = 4, > .is_default = 1, > +.default_machine_opts = DEFAULT_BOOT_ORDER, > }; > @@ -86,6 +86,7 @@ static QEMUMachine an5206_machine = { >

Re: [Qemu-devel] [PATCH v2 0/2] Qemu boot order patch series

2012-10-25 Thread Alexander Graf
On 25.10.2012, at 16:38, Avik Sil wrote: > Hi, > > This patch series implements requirement 1 of the mailing list discussion > [1], i.e., to allow a machine to specify if it wants a default boot order or > not. Looks a lot better now :). I'll leave this on the ML for a few more days to give

Re: [Qemu-devel] [patch v4 00/16] push mmio dispatch out of big lock

2012-10-25 Thread Jan Kiszka
On 2012-10-25 16:04, Peter Maydell wrote: > On 22 October 2012 10:23, Liu Ping Fan wrote: >> v1: >> https://lists.gnu.org/archive/html/qemu-devel/2012-07/msg03312.html >> >> v2: >> http://lists.gnu.org/archive/html/qemu-devel/2012-08/msg01275.html >> >> v3: >> http://lists.nongnu.org/archive/html/

Re: [Qemu-devel] [patch v4 12/16] e1000: apply fine lock on e1000

2012-10-25 Thread Jan Kiszka
On 2012-10-25 18:23, Avi Kivity wrote: > On 10/25/2012 03:34 PM, Jan Kiszka wrote: > Second, it clearly shows that we need to address lock-less IRQ delivery. Almost nothing is won if we have to take the global lock again to push an IRQ event to the guest. I'm repeating myself, but t

Re: [Qemu-devel] [patch v4 12/16] e1000: apply fine lock on e1000

2012-10-25 Thread Jan Kiszka
On 2012-10-25 18:21, Avi Kivity wrote: > On 10/25/2012 11:31 AM, Jan Kiszka wrote: >> On 2012-10-25 11:01, Avi Kivity wrote: >>> On 10/24/2012 09:17 AM, Jan Kiszka wrote: >> >> This is ugly for many reasons. First of all, it is racy as the register >> content may change while dropping t

Re: [Qemu-devel] [patch v4 05/16] memory: introduce ref, unref interface for MemoryRegionOps

2012-10-25 Thread Avi Kivity
On 10/24/2012 09:29 AM, Paolo Bonzini wrote: > Il 23/10/2012 18:09, Avi Kivity ha scritto: >>> But our interfaces had better support asynchronicity, and indeed they >>> do: after you write to the "eject" register, the "up" will show the >>> device as present until after destroy is done. This can b

Re: [Qemu-devel] [patch v4 12/16] e1000: apply fine lock on e1000

2012-10-25 Thread Avi Kivity
On 10/25/2012 03:34 PM, Jan Kiszka wrote: >>> Second, it clearly shows that we need to address lock-less IRQ delivery. >>> Almost nothing is won if we have to take the global lock again to push >>> an IRQ event to the guest. I'm repeating myself, but the problem to be >>> solved here is almost ide

Re: [Qemu-devel] [PATCH v2 00/12] Portable thread-pool/AIO, Win32 emulated AIO

2012-10-25 Thread Paolo Bonzini
Il 25/10/2012 18:01, Stefan Hajnoczi ha scritto: > On Tue, Aug 7, 2012 at 1:17 PM, Paolo Bonzini wrote: >> This patch series is part 2 in my EventNotifier/AIO improvements >> for QEMU 1.2. It extends use of EventNotifier to the main loop >> and AIO subsystems. A new API using EventNotifier is ad

Re: [Qemu-devel] [patch v4 12/16] e1000: apply fine lock on e1000

2012-10-25 Thread Avi Kivity
On 10/25/2012 11:31 AM, Jan Kiszka wrote: > On 2012-10-25 11:01, Avi Kivity wrote: >> On 10/24/2012 09:17 AM, Jan Kiszka wrote: > > This is ugly for many reasons. First of all, it is racy as the register > content may change while dropping the device lock, no? Then you would > raise

Re: [Qemu-devel] [memory] abort with head a8170e5

2012-10-25 Thread Avi Kivity
On 10/25/2012 04:39 PM, Aurelien Jarno wrote: > On Thu, Oct 25, 2012 at 03:47:34PM +0200, Avi Kivity wrote: >> On 10/24/2012 04:00 PM, Aurelien Jarno wrote: >> > >> > mips is also broken but by commit 1c380f9460522f32c8dd2577b2a53d518ec91c6d: >> > >> > | [0.436000] PCI: Enabling device :0

Re: [Qemu-devel] [PATCH v2 00/12] Portable thread-pool/AIO, Win32 emulated AIO

2012-10-25 Thread Stefan Hajnoczi
On Tue, Aug 7, 2012 at 1:17 PM, Paolo Bonzini wrote: > This patch series is part 2 in my EventNotifier/AIO improvements > for QEMU 1.2. It extends use of EventNotifier to the main loop > and AIO subsystems. A new API using EventNotifier is added to aio.c > and a new portable thread pool is intro

Re: [Qemu-devel] [PATCH V4 00/12] SD save/load support, SD qomification and bug fixes

2012-10-25 Thread Peter Maydell
On 10 August 2012 17:23, Igor Mitsyanko wrote: > On 08/10/2012 07:06 PM, Peter Maydell wrote: >> >> On 27 July 2012 20:29, Igor Mitsyanko wrote: >>> >>> Igor Mitsyanko (12): >>>hw/sd.c: convert wp_groups in SDState to bitfield >>>hw/sd.c: make sd_wp_addr() accept 64 bit address argument >

[Qemu-devel] [PATCH 10/36] usb: Rename __usb_packet_complete to usb_packet_complete_one

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede And make it available for use outside of core.c Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb.h |1 + hw/usb/core.c |8 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/usb.h b/hw/usb.h index 48c8926..01dd423 10

[Qemu-devel] [PATCH V14 4/6] rename qcow2-cache.c to block-cache.c

2012-10-25 Thread Dong Xu Wang
We will re-use qcow2-cache as block layer common cache code, so change its name and made some changes, define a struct named BlockTableType, pass BlockTableType and table size parameters to block cache initialization function. Signed-off-by: Dong Xu Wang --- block/Makefile.objs|3 +- blo

[Qemu-devel] [PATCH V14 3/6] qed_read_string to bdrv_read_string

2012-10-25 Thread Dong Xu Wang
Make qed_read_string function to a common interface, so move it to block.c. Signed-off-by: Dong Xu Wang --- block.c | 27 +++ block.h |2 ++ block/qed.c | 34 -- 3 files changed, 33 insertions(+), 30 deletions(-) diff --git

[Qemu-devel] [PATCH 01/36] uhci: Properly unmap packets on cancel / invalid pid

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede Packets with an invalid pid, or which were cancelled have usb_packet_map() called on them on init, but not usb_packet_unmap() before being freed. Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.c |2 ++ 1 files changed, 2 insertions(+), 0

[Qemu-devel] [PATCH v4 1/2] qom: Detect attempts to add a property that already exists

2012-10-25 Thread Peter Maydell
Detect attempts to add a property to an object if one of that name already exists, and report them as critical errors. In particular, for static properties (eg qdev Property arrays) this will manifest as an abort() with a useful error message. Signed-off-by: Peter Maydell --- qom/object.c | 13

[Qemu-devel] [PATCH v4 2/2] hw/qdev: Abort rather than ignoring errors adding device properties

2012-10-25 Thread Peter Maydell
Instead of ignoring any errors that occur when adding properties to a new device in device_initfn(), check for them and abort if any occur. The most likely cause is accidentally adding a duplicate property, which is a programming error by the device author. Signed-off-by: Peter Maydell --- hw/qd

[Qemu-devel] [PATCH v2 1/2] Make default boot order machine specific

2012-10-25 Thread Avik Sil
This patch makes default boot order machine specific instead of set globally. The default boot order can be set per machine in QEMUMachine default_machine_opts, or by the command line using -machine ,boot=, or by standard -boot option. This allows a machine to receive a NULL boot order when -boot i

[Qemu-devel] [PATCH v4 0/2] qdev: Detect duplicate device properties

2012-10-25 Thread Peter Maydell
So, v4 takes a different approach (again). The QOM level patch should be pretty uncontroversial, it just reports the duplicate via the Error**. Then in the qdev device_initfn we check for and report errors via assert_no_error() rather than just throwing them away. (In an ideal world maybe there'd b

[Qemu-devel] [PATCH 23/36] uhci: Make uhci_fill_queue() actually operate on an UHCIQueue

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede And move its calling point to handle_td, this removes the ep_ret ugliness, and prepates the way for further cleanups in the follow-up patches in this patch-set. Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.c | 31 -

[Qemu-devel] [PATCH 31/36] uhci: Use only one queue for ctrl endpoints

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede ctrl endpoints use different pids for different phases of a control transfer, this patch makes us use only one queue for a ctrl ep, rather then 3. Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.c |9 +++-- 1 files changed, 7 insertion

[Qemu-devel] [PATCH 19/36] uhci: Drop unnecessary forward declaration of some static functions

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index eecd291..7dfedef 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@

  1   2   3   >