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

2012-10-25 Thread Peter Crosthwaite
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 like sysbus-ohci which need to do DMA. > > In part

Re: [Qemu-devel] [PATCH v2 2/5] Qemu: update header files

2012-10-25 Thread Peter Maydell
On 25 October 2012 10:21, Xiao Guangrong wrote: > Sync the header files by using scripts/update-linux-headers.sh I think it would be good if this kind of patch included in the commit message the kernel tree/branch and commit hash that the sync was with. thanks -- PMM

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

2012-10-25 Thread Peter Maydell
On 25 October 2012 13:12, Gerd Hoffmann wrote: >> +static inline void zynq_init_usb(uint32_t base_addr, qemu_irq irq) >> +{ >> +DeviceState *dev = qdev_create(NULL, "ehci-sysbus"); > > I'd suggest to have a "ehci-sysbus-zynq" device instead which sets > capsbase & opregbase in ->init() ... > >

Re: [Qemu-devel] [PATCH v1 4/8] usb/ehci: Add usb-ehci-sysbus

2012-10-25 Thread Peter Crosthwaite
On Thu, Oct 25, 2012 at 10:10 PM, Gerd Hoffmann wrote: >> typedef struct EHCIItfState { >> -PCIDevice pcidev; >> +/* FIXME: Figure out a better way to share one Property[] array between >> two >> + * QOM types with different parents >> + */ >> +union { >> +PCIDevice p

Re: [Qemu-devel] [PATCH v1 3/8] usb/ehci: seperate out PCIisms

2012-10-25 Thread Peter Crosthwaite
s as the vmstate wire > format doesn't change then. > Does that work considering you have turned one layer of VMSD into two? Can it equivocate machines saved with the old all-in-one vmsd with this new one that is structured in two layers? Regards, Peter > cheers, > Gerd >

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

2012-10-25 Thread Peter Crosthwaite
On Thu, Oct 25, 2012 at 10:16 PM, Peter Maydell wrote: > On 25 October 2012 13:12, Gerd Hoffmann wrote: >>> +static inline void zynq_init_usb(uint32_t base_addr, qemu_irq irq) >>> +{ >>> +DeviceState *dev = qdev_create(NULL, "ehci-sysbus"); >&

[Qemu-devel] [PATCH 03/12] hw/pl080: Use LOG_GUEST_ERROR and LOG_UNIMP

2012-10-25 Thread Peter Maydell
Use LOG_GUEST_ERROR and LOG_UNIMP in preference to hw_error(). Signed-off-by: Peter Maydell --- hw/pl080.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/pl080.c b/hw/pl080.c index 6abe528..26150af 100644 --- a/hw/pl080.c +++ b/hw/pl080.c @@ -281,7 +281,8

[Qemu-devel] [PATCH 08/12] hw/arm_timer: Use LOG_GUEST_ERROR and LOG_UNIMP

2012-10-25 Thread Peter Maydell
Use LOG_GUEST_ERROR to report guest accesses to bad register offsets, and LOG_UNIMP for access to the unimplemented test registers. Signed-off-by: Peter Maydell --- hw/arm_timer.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/hw/arm_timer.c b/hw

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Crosthwaite
On Thu, Oct 25, 2012 at 10:19 PM, Gerd Hoffmann wrote: > On 10/25/12 11:47, Peter Crosthwaite wrote: >> 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 >&

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

2012-10-25 Thread Peter Maydell
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 changed, 6 insertions(+), 0 deletions(-) > > diff --git a/qemu-opti

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Maydell
On 25 October 2012 14:03, Peter Crosthwaite wrote: > On Thu, Oct 25, 2012 at 10:19 PM, Gerd Hoffmann wrote: >> On 10/25/12 11:47, Peter Crosthwaite wrote: >>> Just put RAM regions in the unimplemented spaces in the MMIO region. These >>> regions have undefined behavio

Re: [Qemu-devel] [PATCH v1 3/8] usb/ehci: seperate out PCIisms

2012-10-25 Thread Peter Crosthwaite
al fields > are written. So moving stuff from the toplevel vmsd into another one > which then gets referenced via VMSTATE_STRUCT doesn't change the format. Nice, Will refactor as you proposed v2 and keep backwards compat. Regards, Peter > > cheers, > Gerd > >

Re: [Qemu-devel] [PATCH 03/12] hw/pl080: Use LOG_GUEST_ERROR and LOG_UNIMP

2012-10-25 Thread Peter Maydell
On 25 October 2012 14:19, malc wrote: > On Thu, 25 Oct 2012, Peter Maydell wrote: > >> Use LOG_GUEST_ERROR and LOG_UNIMP in preference to hw_error(). > > It's weird that printing something + abort is replaced by just printing > a message and the commit message doesn

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

2012-10-25 Thread Peter Crosthwaite
On Thu, Oct 25, 2012 at 11:14 PM, Gerd Hoffmann wrote: > On 10/25/12 14:56, Peter Crosthwaite wrote: >> On Thu, Oct 25, 2012 at 10:16 PM, Peter Maydell >> wrote: >>> On 25 October 2012 13:12, Gerd Hoffmann wrote: >>>>> +static inline void zynq_in

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Maydell
On 25 October 2012 14:21, Avi Kivity wrote: > On 10/25/2012 03:12 PM, Peter Maydell wrote: >> (2) what should the memory system do for accesses where there is >> no memory region? This is really system specific as it depends >> what the bus fabric does. For ARM the us

[Qemu-devel] [PATCH 09/12] hw/armv7m_nvic: Use LOG_GUEST_ERROR and LOG_UNIMP

2012-10-25 Thread Peter Maydell
Use LOG_GUEST_ERROR and LOG_UNIMP rather than hw_error() where appropriate. Signed-off-by: Peter Maydell --- hw/armv7m_nvic.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/hw/armv7m_nvic.c b/hw/armv7m_nvic.c index 35c1aa6..ebf6282 100644

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Maydell
On 25 October 2012 14:41, Avi Kivity wrote: > On 10/25/2012 03:28 PM, Peter Maydell wrote: >> On 25 October 2012 14:21, Avi Kivity wrote: >>> You could easily have the top-level container have ->ops that generate >>> an exception. >> >> Ah, yes, ther

[Qemu-devel] [PATCH 06/12] hw/arm11mpcore: Use LOG_GUEST_ERROR rather than hw_error()

2012-10-25 Thread Peter Maydell
Use LOG_GUEST_ERROR to report guest accesses to bad offsets. Signed-off-by: Peter Maydell --- hw/arm11mpcore.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/arm11mpcore.c b/hw/arm11mpcore.c index 105f158..640ed20 100644 --- a/hw/arm11mpcore.c +++ b/hw

[Qemu-devel] [PATCH 00/12] use LOG_GUEST_ERROR in more ARM devices

2012-10-25 Thread Peter Maydell
ft it at a dozen patches to avoid code reviewer fatigue; More may follow next time I want an easy task :-) Peter Maydell (12): hw/pl050: Use LOG_GUEST_ERROR hw/pl061: Use LOG_GUEST_ERROR hw/pl080: Use LOG_GUEST_ERROR and LOG_UNIMP hw/pl110: Use LOG_GUEST_ERROR rather than hw_error() hw/

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Crosthwaite
On Thu, Oct 25, 2012 at 11:50 PM, Peter Maydell wrote: > On 25 October 2012 14:41, Avi Kivity wrote: >> On 10/25/2012 03:28 PM, Peter Maydell wrote: >>> On 25 October 2012 14:21, Avi Kivity wrote: >>>> You could easily have the top-level container have ->op

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

2012-10-25 Thread Peter Maydell
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/qemu-devel/2012-09/msg01474.html Is there a clear u

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Maydell
On 25 October 2012 14:59, Peter Crosthwaite wrote: > On Thu, Oct 25, 2012 at 11:50 PM, Peter Maydell > wrote: >> On 25 October 2012 14:41, Avi Kivity wrote: >>> wrt decode duplication, I've been thinking of a single ->service() >>> callback that accepts a T

[Qemu-devel] [PATCH 07/12] hw/arm_gic: Use LOG_GUEST_ERROR

2012-10-25 Thread Peter Maydell
Use LOG_GUEST_ERROR to report guest accesses to bad offsets. Signed-off-by: Peter Maydell --- hw/arm_gic.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/arm_gic.c b/hw/arm_gic.c index ce16e83..f9e423f 100644 --- a/hw/arm_gic.c +++ b/hw/arm_gic.c @@ -324,7

[Qemu-devel] [PATCH 10/12] hw/arm_sysctl: Use LOG_GUEST_ERROR

2012-10-25 Thread Peter Maydell
Use LOG_GUEST_ERROR to report bad guest accesses. Signed-off-by: Peter Maydell --- hw/arm_sysctl.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c index 26318e1..58eb982 100644 --- a/hw/arm_sysctl.c +++ b/hw/arm_sysctl.c @@ -184,7

[Qemu-devel] [PATCH 04/12] hw/pl110: Use LOG_GUEST_ERROR rather than hw_error()

2012-10-25 Thread Peter Maydell
Use LOG_GUEST_ERROR to report guest accesses to invalid register offsets. Signed-off-by: Peter Maydell --- hw/pl110.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/pl110.c b/hw/pl110.c index 82486b0..d5472f4 100644 --- a/hw/pl110.c +++ b/hw/pl110.c @@ -349,7

[Qemu-devel] [PATCH 12/12] hw/versatile_i2c: Use LOG_GUEST_ERROR

2012-10-25 Thread Peter Maydell
Use LOG_GUEST_ERROR to report bad guest accesses. Signed-off-by: Peter Maydell --- hw/versatile_i2c.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/versatile_i2c.c b/hw/versatile_i2c.c index 44e7e40..ad71e9d 100644 --- a/hw/versatile_i2c.c +++ b/hw

[Qemu-devel] [PATCH 01/12] hw/pl050: Use LOG_GUEST_ERROR

2012-10-25 Thread Peter Maydell
Use LOG_GUEST_ERROR for reporting guest attempts to access invalid register offsets. Signed-off-by: Peter Maydell --- hw/pl050.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/pl050.c b/hw/pl050.c index 470572e..47032f1 100644 --- a/hw/pl050.c +++ b/hw/pl050.c

[Qemu-devel] [PATCH 11/12] hw/arm_l2x0: Use LOG_GUEST_ERROR

2012-10-25 Thread Peter Maydell
Use LOG_GUEST_ERROR to report bad guest accesses. Signed-off-by: Peter Maydell --- hw/arm_l2x0.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/arm_l2x0.c b/hw/arm_l2x0.c index 8f5921c..6abf0ee 100644 --- a/hw/arm_l2x0.c +++ b/hw/arm_l2x0.c @@ -87,7 +87,8

[Qemu-devel] [PATCH 05/12] hw/pl190: Use LOG_UNIMP rather than hw_error()

2012-10-25 Thread Peter Maydell
Use LOG_UNIMP to report attempts to use the unimplemented test mode. Signed-off-by: Peter Maydell --- hw/pl190.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pl190.c b/hw/pl190.c index 213229b..4019930 100644 --- a/hw/pl190.c +++ b/hw/pl190.c @@ -199,7 +199,7

[Qemu-devel] [PATCH 02/12] hw/pl061: Use LOG_GUEST_ERROR

2012-10-25 Thread Peter Maydell
Use LOG_GUEST_ERROR to report guest attempts to access bad register offsets. Signed-off-by: Peter Maydell --- hw/pl061.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/pl061.c b/hw/pl061.c index 7d182e7..f1ed5ce 100644 --- a/hw/pl061.c +++ b/hw/pl061.c @@ -164,7

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

2012-10-25 Thread Peter Maydell
h better if the wrong thing was the hard thing to do.) Peter Maydell (2): qom: Detect attempts to add a property that already exists hw/qdev: Abort rather than ignoring errors adding device properties hw/qdev.c| 10 +++--- qom/object.c | 13 - 2 files changed, 19 i

[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

[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

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.

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 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 wh

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 ar

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 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

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 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 @@ enu

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 DMACon

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

2012-10-25 Thread Peter Crosthwaite
see individual patch change logs) Peter Crosthwaite (10): usb/ehci: Use class_data to init PCI variations usb/ehci: parameterise the register region offsets usb/ehci: Abstract away PCI DMA API usb/ehci: seperate out PCIisms usb/ehci: Add Sysbus Infrastructure usb/ehci: Add Xilinx ps7 USB

[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

[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

[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 deletion

[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

[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 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

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

2012-10-25 Thread Peter Crosthwaite
V2 to get the non controversial components up and merged. Will resend those patches when they have been reworked. Peter Crosthwaite (4): pflash_cfi0x: remove unused base field pflash_cfi01: remove unused total_len field pflash_cfi0x: QOMified pflash_cfi01: Fix debug mode printfery hw

[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 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

[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 v2 02/11] usb/ehci: Use class_data to init PCI variations

2012-10-25 Thread Peter Crosthwaite
nstance of EHCICLass that forms a template for the class to generate. Signed-off-by: Peter Crosthwaite --- hw/usb/hcd-ehci.c | 81 ++--- 1 files changed, 46 insertions(+), 35 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c ind

[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

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

[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

[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

[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 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: re

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 =

[Qemu-devel] [RFC] Memory API and fine grained Memory Regions

2012-10-26 Thread Peter Crosthwaite
that does the load and store of register data, and a number of secondary handlers for side effects? Regards, Peter

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

2012-10-26 Thread Peter Maydell
On 26 October 2012 07:09, Peter Crosthwaite wrote: > 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 o

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

2012-10-26 Thread Peter Maydell
On 26 October 2012 06:47, Peter Crosthwaite wrote: > 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

Re: [Qemu-devel] [PATCH] hw/arm_boot.c: bump initrd address (again) to accommodate large kernels

2012-10-26 Thread Peter Maydell
On 22 October 2012 22:06, Cole Robinson wrote: > On 10/07/2012 06:36 PM, Peter Maydell wrote: >> On 7 October 2012 23:27, Cole Robinson wrote: >>> #define KERNEL_ARGS_ADDR 0x100 >>> #define KERNEL_LOAD_ADDR 0x0001 >>> -#define INITRD_LOAD_ADDR 0x00

Re: [Qemu-devel] [PATCH] hw/arm_boot.c: bump initrd address (again) to accommodate large kernels

2012-10-26 Thread Peter Maydell
On 26 October 2012 09:48, Peter Maydell wrote: > This patch puts the initrd starting at 29MB (was 13MB). That > would probably break any machines with 32MB memory configurations. > So I need to check if there are any which might plausibly be run > with 32MB (and if so maybe set

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

2012-10-26 Thread Peter Maydell
On 26 October 2012 13:36, Gerd Hoffmann wrote: > On 10/26/12 07:47, Peter Crosthwaite wrote: >> 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 >> wh

[Qemu-devel] [PATCH] arm_boot: Change initrd load address to "halfway through RAM"

2012-10-26 Thread Peter Maydell
fixes in passing a bug where we were passing an overly large max_size to load_image_targphys() for the initrd, which meant that we wouldn't correctly refuse to load an enormous initrd that didn't actually fit into RAM. Signed-off-by: Peter Maydell --- Cole: does this fix the problems you see

Re: [Qemu-devel] [PATCH] arm_boot: Change initrd load address to "halfway through RAM"

2012-10-26 Thread Peter Maydell
On 26 October 2012 15:19, Peter Maydell wrote: > +/* Put the initrd halfway through RAM; this means that on > + * most boards we will not be in danger of overlapping the > + * initrd with the kernel, but will still work OK on models > + * with only small amounts of RA

[Qemu-devel] [PATCH v2] arm_boot: Change initrd load address to "halfway through RAM"

2012-10-26 Thread Peter Maydell
fixes in passing a bug where we were passing an overly large max_size to load_image_targphys() for the initrd, which meant that we wouldn't correctly refuse to load an enormous initrd that didn't actually fit into RAM. Signed-off-by: Peter Maydell --- Changes v1->v2: put initrd at min(1

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

2012-10-26 Thread Peter Maydell
On 26 October 2012 14:09, Paolo Bonzini wrote: > As soon as Avi's iommu patches go in, in fact, dma->as will just be as. > Even if as == NULL were to be outlawed and you'd be forced to write > get_address_space_memory(), taking the pain to create dummy DMAContexts > now is just not worth it. Pers

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

2012-10-26 Thread Peter Maydell
Detect attempts to add a property to an object if one of that name already exists, and report them as errors. Signed-off-by: Peter Maydell Reviewed-by: Anthony Liguori --- qom/object.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qom/object.c b/qom

Re: [Qemu-devel] [PATCH v3] hw/qdev-properties.c: Improve diagnostic for setting property after realize

2012-10-26 Thread Peter Maydell
Ping? (slightly eager ping but softfreeze is not far off...) -- PMM On 19 October 2012 18:57, Peter Maydell wrote: > Now we have error_setg() we can improve the error message emitted if > you attempt to set a property of a device after the device is realized > (the previous me

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

2012-10-26 Thread Peter Maydell
Detect and abort on duplicate properties in a qdev Property array. The only change v4->v5 is I fixed the commit message in the first patch not to talk about "critical errors" any more, and added Anthony's reviewed-by tags. Peter Maydell (2): qom: Detect attempts to add a pro

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

2012-10-26 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 Reviewed

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

2012-10-26 Thread Peter Crosthwaite
prop to serial we have to DEFINE_PROP_FOO it 3 times. Whats the real answer here? Can we get the shared init function to add to properties explicify? Blow away the dc->properties = foo and replace with code that parses to prop array? I just think its a false economy to have to replicate your code

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

2012-10-26 Thread Peter Crosthwaite
On Fri, Oct 26, 2012 at 10:36 PM, Gerd Hoffmann wrote: > On 10/26/12 07:47, Peter Crosthwaite wrote: >> 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 >&

Re: [Qemu-devel] spidev with omap3 running on qemu

2012-10-26 Thread Peter Crosthwaite
omap_spi,c), then Ill be able to give an idea of the effort involved. I may be able to help you contribute here, the biggest obstacle for me however is testing. If you can provide tests that exercise the omap SPI then I may be able to help with a OMAP SPI QOMification effort (and you bug will hope

Re: [Qemu-devel] [PATCH v2] stop using stdio for monitor/serial/etc with -daemonize

2012-10-27 Thread Peter Maydell
On 27 October 2012 12:23, Michael Tokarev wrote: > > I still don't see why > > -nographic -daemonize > > makes no sence while > > -curses -daemonize > > does? My vote is that neither of these combinations makes sense. -- PMM

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

2012-10-27 Thread Peter Crosthwaite
On Fri, Oct 26, 2012 at 10:39 PM, Peter Maydell wrote: > On 26 October 2012 13:36, Gerd Hoffmann wrote: >> On 10/26/12 07:47, Peter Crosthwaite wrote: >>> Just put RAM regions in the unimplemented spaces in the MMIO region. These >>> regions have undefined behaviour, b

Re: [Qemu-devel] [PATCH] configure: Disable (clang) initializer-overrides warnings

2012-10-27 Thread Peter Maydell
On 27 October 2012 21:32, Igor Mitsyanko wrote: > I encountered strange behavior of latest mingw gcc, it ignores unrecognized > -Wno-wombat options only in case if no other warnings are issued (configure > gccflags test doesn't issue any), otherwise I get this: > > cc1.exe: warning: unrecognized c

[Qemu-devel] [PATCH] configure: use -Wwombat to test whether gcc recognizes -Wno-wombat

2012-10-27 Thread Peter Maydell
the option when checking for support for the suppression option. This doesn't have any effect except that it avoids gcc emitting extra messages about unrecognized command line options when it is printing other warning messages. Signed-off-by: Peter Maydell --- configure | 6 +- 1 file ch

Re: [Qemu-devel] [PATCH] configure: Disable (clang) initializer-overrides warnings

2012-10-27 Thread Peter Maydell
On 27 October 2012 22:24, Stefan Weil wrote: > Am 27.10.2012 22:32, schrieb Igor Mitsyanko: >> I encountered strange behavior of latest mingw gcc, it ignores >> unrecognized -Wno-wombat options only in case if no other warnings are >> issued (configure gccflags test doesn't issue any), otherwise I

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

2012-10-28 Thread Peter Crosthwaite
On Sat, Oct 27, 2012 at 10:32 AM, Peter Crosthwaite wrote: > On Fri, Oct 26, 2012 at 10:24 PM, Gerd Hoffmann wrote: >> Hi, >> >>> +typedef struct EHCItfState { >>> +union { >>> +PCIDevice pcidev; >>> +}; >>> +str

[Qemu-devel] [PATCH v3 0/8] Sysbus EHCI + Zynq USB.

2012-10-28 Thread Peter Crosthwaite
. Various Review based fixes (Please see individual patch change logs) Peter Crosthwaite (7): usb/ehci: Use class_data to init PCI variations usb/ehci: parameterise the register region offsets usb/ehci: Abstract away PCI DMA API usb/ehci: seperate out PCIisms usb/ehci: Add Sysbus variant and

[Qemu-devel] [PATCH v3 1/8] dma: Define dma_context_memory and use in sysbus-ohci

2012-10-28 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

[Qemu-devel] [PATCH v3 3/8] usb/ehci: parameterise the register region offsets

2012-10-28 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 v2: Added strcut EHCIInfo to hold these two properties and added struct to class definition. This struct can

[Qemu-devel] [PATCH v3 5/8] usb/ehci: seperate out PCIisms

2012-10-28 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 v2: s/ehci_

[Qemu-devel] [PATCH v3 6/8] usb/ehci: Add Sysbus variant and Xilinx Zynq USB

2012-10-28 Thread Peter Crosthwaite
Add QOM class definition helpers for sysbus attached EHCI implementations and added Xilinx Zynq USB implementation. Signed-off-by: Peter Crosthwaite --- changed from v2: Squashed Xilinx zynq Defintion into this patch. Otherwise complie fails due to werror and unsued ehci_sysbus_class_init fn

[Qemu-devel] [PATCH v3 4/8] usb/ehci: Abstract away PCI DMA API

2012-10-28 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

[Qemu-devel] [PATCH v3 7/8] xilinx_zynq: add USB controllers

2012-10-28 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/xilinx_zynq.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c index

[Qemu-devel] [PATCH v3 8/8] usb/ehci: Guard definition of EHCI_DEBUG

2012-10-28 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 deletion

[Qemu-devel] [PATCH v3 2/8] usb/ehci: Use class_data to init PCI variations

2012-10-28 Thread Peter Crosthwaite
nstance of EHCICLass that forms a template for the class to generate. Signed-off-by: Peter Crosthwaite --- Got rid of union for sharing EHCIClassDefinition - made PCI specific Simplified literal class_data arrays in ehci_info accordingly removed null sentinel from ehci_info and used ARRA

[Qemu-devel] [PATCH v5 0/2] These patches add support for the Primcell PL330 DMA controller and add it to the Xilinx Zynq machine model. Patch 1 is the device model. Patch 2 is the machine model updat

2012-10-28 Thread Peter Crosthwaite
The Device model was originally contributed by Kirill Batuzov / Samsung, as indicated by the (C) notice in hw/pl330.c. changed since v4: s/petalogix/xilinx in my email address. addressed reviewer comments from Igor mitsyanko and Peter Maydell (1/2) changed since v3: rebased against Makefile

[Qemu-devel] [PATCH v5 1/2] pl330: Initial version

2012-10-28 Thread Peter Crosthwaite
Device model for Primecell PL330 dma controller. Signed-off-by: Kirill Batuzov Tested-by: Igor Mitsyanko Signed-off-by: Peter Crosthwaite --- changed from v4: Various cosmetic fixes Some Makefile refactoring updates refactored properties to match primecell options rather than be the config

[Qemu-devel] [PATCH v5 2/2] xilinx_zynq: added pl330 to machine model

2012-10-28 Thread Peter Crosthwaite
Signed-off-by: Peter Crosthwaite --- hw/xilinx_zynq.c | 24 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c index c55dafb..e985e26 100644 --- a/hw/xilinx_zynq.c +++ b/hw/xilinx_zynq.c @@ -33,6 +33,10 @@ #define

[Qemu-devel] [PULL 0/3] Xilinx Zynq QSPI support

2012-10-28 Thread Peter Crosthwaite
The following changes since commit 50cd72148211c5e5f22ea2519d19ce024226e61f: Max Filippov (1): hw/xtensa_sim: get rid of intermediate xtensa_sim_init are available in the git repository at: git://developer.petalogix.com/public/qemu.git qspi.2 Peter Crosthwaite (3): m25p80

[Qemu-devel] [PATCH 1/3] m25p80: Support for Quad SPI

2012-10-28 Thread Peter Crosthwaite
: Peter Crosthwaite --- hw/m25p80.c | 61 +++--- 1 files changed, 57 insertions(+), 4 deletions(-) diff --git a/hw/m25p80.c b/hw/m25p80.c index 9a56de8..3895e73 100644 --- a/hw/m25p80.c +++ b/hw/m25p80.c @@ -72,6 +72,10 @@ typedef struct

[Qemu-devel] [PATCH 2/3] xilinx_spips: Generalised to model QSPI

2012-10-28 Thread Peter Crosthwaite
: Peter Crosthwaite --- hw/xilinx_spips.c | 289 ++-- 1 files changed, 255 insertions(+), 34 deletions(-) diff --git a/hw/xilinx_spips.c b/hw/xilinx_spips.c index 93a4957..ee7656d 100644 --- a/hw/xilinx_spips.c +++ b/hw/xilinx_spips.c @@ -28,6 +28,7

[Qemu-devel] [PATCH 3/3] xilinx_zynq: added QSPI controller

2012-10-28 Thread Peter Crosthwaite
Added the QSPI controller to the Zynq. 4 SPI devices are attached to allow modelling of the different geometries. E.G. Dual parallel and dual stacked mode can both be tested with this one arrangement. Signed-off-by: Peter Crosthwaite --- hw/xilinx_zynq.c | 40

<    3   4   5   6   7   8   9   10   11   12   >