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

2012-10-26 Thread Peter Crosthwaite
In my recent USB series Avi mentioned he wanted to do some work with the memory API and encourage devices to use the memory API to do fine-grained register decoding, i.e. each register is its own MemoryRegion. This has the advantage of getting rid of the symmetric switch statements in the read and

[Qemu-devel] [PATCH] uhci: dynamic type generation

2012-10-26 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.c | 196 +++-- 1 files changed, 70 insertions(+), 126 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index b6b972f..925c738 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@

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

2012-10-26 Thread Gerd Hoffmann
Hi, > For actually writing into the device registers, its just uses an array > index, no need to switch (ret = s->regs[addr]). However for my side > effects I will need to populate that switch. If we convert to fine > grained memory regions then the switch goes away and my side effect > become p

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

2012-10-26 Thread Paolo Bonzini
Il 25/10/2012 20:48, Anthony Liguori ha scritto: >>> >> >> No, but I rebased it on top of AioContext in my branch. If you're >> interested I can resubmit it. > > What was the conclusion with 12/12? > > I'm pretty happy with the series. If no one is unhappy about 12/12 then > I think we should a

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

2012-10-26 Thread Kevin Wolf
Am 25.10.2012 19:09, schrieb 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

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 of the pflash w

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

2012-10-26 Thread Kevin Wolf
Am 26.10.2012 04:54, schrieb 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: >>> + >>> +64 - 79:image file format >>> +Format of image file. It must be non-empty. It is >>> coded >>> +

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 reading and > writin

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

2012-10-26 Thread Stefan Hajnoczi
On Thu, Oct 25, 2012 at 01:48:35PM -0500, Anthony Liguori wrote: > 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 > >>>fo

[Qemu-devel] [PATCH 3/5] replace rom_add_file* with image_file_reset

2012-10-26 Thread Olivia Yin
Signed-off-by: Olivia Yin --- hw/cirrus_vga.c |6 +- hw/pc.c |6 +- hw/pc_sysfw.c | 14 +++--- hw/pci.c| 10 -- hw/sga.c|6 +- hw/vga-isa.c|6 +- 6 files changed, 35 insertions(+), 13 deletions(-) diff --git a/hw/c

Re: [Qemu-devel] [PATCH] uhci: dynamic type generation

2012-10-26 Thread Stefan Hajnoczi
On Fri, Oct 26, 2012 at 09:02:59AM +0200, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > hw/usb/hcd-uhci.c | 196 > +++-- > 1 files changed, 70 insertions(+), 126 deletions(-) Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PATCH 4/5] replaece rom_add_blob* with image_blob_reset

2012-10-26 Thread Olivia Yin
Signed-off-by: Olivia Yin --- hw/arm_boot.c | 20 hw/elf_ops.h |9 - hw/exynos4210.c| 10 -- hw/highbank.c |9 - hw/lm32_hwsetup.h |9 - hw/loader.c| 23 +++ hw/mips_fulong2e.c

[Qemu-devel] [PATCH 2/5] use reset handlers to reload kernel and initrd

2012-10-26 Thread Olivia Yin
Signed-off-by: Olivia Yin --- hw/loader.c | 64 ++ 1 files changed, 42 insertions(+), 22 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index 726c0e7..4a20ed2 100644 --- a/hw/loader.c +++ b/hw/loader.c @@ -151,7 +151,12 @@ int load_i

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 0x00d0 >>> +#define INITRD_LOAD_ADDR 0x01d0

[Qemu-devel] [PATCH 1/5] define image_file_reset and image_blob_reset

2012-10-26 Thread Olivia Yin
Signed-off-by: Olivia Yin --- hw/loader.c | 39 +++ hw/loader.h | 18 ++ 2 files changed, 57 insertions(+), 0 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index 33acc2f..726c0e7 100644 --- a/hw/loader.c +++ b/hw/loader.c @@ -86,6 +86

[Qemu-devel] [PATCH 0/5] register reset handlers to reload image

2012-10-26 Thread Olivia Yin
Register reset handlers image_blob_reset and image_file_reset to reload images when virtual machine reset. This way could optimize footprint of QEMU. This is the first part of the patches which remove rom related functions in loader.c The second part will optimize memory regions which use rom_ptr

[Qemu-devel] [PATCH 5/5] remove rom related functions in loader

2012-10-26 Thread Olivia Yin
Signed-off-by: Olivia Yin --- hw/loader.c | 166 --- hw/loader.h | 14 - vl.c|5 -- 3 files changed, 0 insertions(+), 185 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index 5cf776a..5549568 100644 --- a/hw/loader.c

Re: [Qemu-devel] [PATCH V4 06/10] create new function: qemu_opt_set_number

2012-10-26 Thread Stefan Hajnoczi
On Thu, Oct 25, 2012 at 08:57:24PM +0800, Dong Xu Wang wrote: > diff --git a/qemu-option.c b/qemu-option.c > index d7d5ea9..eeb2c9c 100644 > --- a/qemu-option.c > +++ b/qemu-option.c > @@ -695,6 +695,30 @@ int qemu_opt_set_bool(QemuOpts *opts, const char *name, > bool val) > return 0; > } >

Re: [Qemu-devel] [PATCH 0/5] register reset handlers to reload image

2012-10-26 Thread Wei-Ren Chen
On Fri, Oct 26, 2012 at 04:02:01PM +0800, Olivia Yin wrote: > Register reset handlers image_blob_reset and image_file_reset > to reload images when virtual machine reset. > > This way could optimize footprint of QEMU. > > This is the first part of the patches which remove rom related > functions

Re: [Qemu-devel] [PATCH 1/5] define image_file_reset and image_blob_reset

2012-10-26 Thread Wei-Ren Chen
> +typedef struct ImageFile ImageFile; > +struct ImageFile { > +char *name; > +char *dir; > +target_phys_addr_t addr; target_phys_addr_t has been replaced with hwaddr, see [1]. > +}; > + > +typedef struct ImageBlob ImageBlob; > +struct ImageBlob { > +char *name; > +target_p

Re: [Qemu-devel] [PATCH 2/5] use reset handlers to reload kernel and initrd

2012-10-26 Thread Wei-Ren Chen
> -/* Load a U-Boot image. */ > -int load_uimage(const char *filename, target_phys_addr_t *ep, > -target_phys_addr_t *loadaddr, int *is_linux) > +/* write uimage into memory */ > +static int uimage_physical_loader(const char *filename, uint8_t **data, > +

Re: [Qemu-devel] [PATCH V4 07/10] add def_value and use it in qemu_opts_print.

2012-10-26 Thread Stefan Hajnoczi
On Thu, Oct 25, 2012 at 08:57:25PM +0800, Dong Xu Wang wrote: > qemu_opts_print has no user now, so I re-write it and use it in > qemu-img.c. > > qemu_opts_print will be used while using "qemu-img create", it will > produce the same output as previous code. > > Signed-off-by: Dong Xu Wang > ---

[Qemu-devel] [Bug 611142] Re: seabios should have native scsi support

2012-10-26 Thread Michael Tokarev
FWIW, this is implemented and works in seabios 0.7.1 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/611142 Title: seabios should have native scsi support Status in QEMU: New Status in “qemu-kvm”

[Qemu-devel] [PATCH 2/2] Respond a set address command with CC_PARAMETER_ERROR, if the speed field of the input context is not valid.

2012-10-26 Thread Sebastian Bauer
--- hw/usb/hcd-xhci.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 4c81dcc..b556b6e 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -1841,6 +1841,7 @@ static TRBCCode xhci_address_slot(XHCIState *xhci, unsigned int slotid,

Re: [Qemu-devel] [PATCH V4 09/10] Use QemuOpts support in block layer

2012-10-26 Thread Stefan Hajnoczi
On Thu, Oct 25, 2012 at 08:57:27PM +0800, Dong Xu Wang wrote: > @@ -177,9 +177,7 @@ struct BlockDriver { > unsigned long int req, void *buf, > BlockDriverCompletionFunc *cb, void *opaque); > > -/* List of options for creating images, terminated by name == NULL */ > -QEMU

Re: [Qemu-devel] [PATCH v3 01/26] blockdev: Introduce a default machine blockdev interface field, QEMUMachine->mach_if

2012-10-26 Thread Markus Armbruster
Jason Baron writes: > From: Jason Baron > > The current QEMUMachine definition has a 'use_scsi' field to indicate if a > machine type should use scsi by default. However, Q35 wants to use ahci by > default. Thus, introdue a new field in the QEMUMachine defintion, mach_if. > > This field should b

[Qemu-devel] [PATCH 0/2] xhci: Better spec conforming behaviour

2012-10-26 Thread Sebastian Bauer
This tiny patch series fixes some things in the xhci hcd to behave more spec compliant. The first patch ensures the correctness of the csc port status bit as soon as the controller is switched to running mode. The second patch brings in the evaluation of the speed field in the input slot context

[Qemu-devel] [Bug 658610] Re: Check whether images have write permissions

2012-10-26 Thread Michael Tokarev
by default images are expected to be open read-write. I'm against too much "intelligence" here, -- we may be running qemu as wrong user, or with wrong permissions of the image in question, and qemu should fail to start if the image can't be open using specified access flags (which is read-write by

[Qemu-devel] [PATCH 1/2] When the XHCI host controller is switched to the running mode, set the ccs bit for each port, to which a device is already attached.

2012-10-26 Thread Sebastian Bauer
--- hw/usb/hcd-xhci.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 37b3dbb..4c81dcc 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -990,10 +990,29 @@ static void xhci_er_reset(XHCIState *xhci

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

2012-10-26 Thread Jan Kiszka
On 2012-10-26 05:08, liu ping fan wrote: > 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 wrot

Re: [Qemu-devel] [PATCH v3 01/26] blockdev: Introduce a default machine blockdev interface field, QEMUMachine->mach_if

2012-10-26 Thread Markus Armbruster
Jason Baron writes: > On Wed, Oct 24, 2012 at 03:12:36PM +0200, Markus Armbruster wrote: >> Jason Baron writes: >> >> > From: Jason Baron >> > >> > The current QEMUMachine definition has a 'use_scsi' field to indicate if a >> > machine type should use scsi by default. However, Q35 wants to use

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 initrd load address

Re: [Qemu-devel] [PATCH v2 3/5] Qemu: do not mark bios readonly

2012-10-26 Thread Jan Kiszka
On 2012-10-25 11:22, Xiao Guangrong wrote: > In isapc, no i440x device exists in guest that means seabios can not > make 0xc to 0x100 writable > > It works fine in current code since the guest can happily write readonly > memory. In order to support readonly slot in Qemu, we do not make th

[Qemu-devel] [PATCH 0/8] virtio-rng: hardware random number generator device

2012-10-26 Thread Amit Shah
Hello, Reviving this series last sent by Anthony to the list. The differences are minimal from the time Anthony sent, just rebasing to the current tree and fixing a couple of minor bugs. I've not really looked in detail at the object patches -- mostly just concerned about the device itself. Ple

[Qemu-devel] [PATCH 1/8] object: add object_property_add_bool (v2)

2012-10-26 Thread Amit Shah
From: Anthony Liguori Signed-off-by: Anthony Liguori --- include/qemu/object.h | 16 ++ qom/object.c | 56 + 2 files changed, 72 insertions(+), 0 deletions(-) diff --git a/include/qemu/object.h b/include/qemu/object.h ind

[Qemu-devel] [PATCH 2/8] qdev: add realized property and make adding child bus implied by realize

2012-10-26 Thread Amit Shah
From: Anthony Liguori Signed-off-by: Anthony Liguori --- hw/qdev.c | 36 +++- 1 files changed, 35 insertions(+), 1 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 9b9aba3..5e34c22 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -95,7 +95,6 @@ static void bus_a

[Qemu-devel] [PATCH 3/8] vl: add -object option to create QOM objects from the command line

2012-10-26 Thread Amit Shah
From: Anthony Liguori This will create a new QOM object in the '/objects' path. Note that properties are set in order which allows for simple objects to be initialized entirely with this option and then realized. This option is roughly equivalent to -device but for things that are not devices.

[Qemu-devel] [PATCH 7/8] rng-egd: introduce EGD compliant RNG backend

2012-10-26 Thread Amit Shah
From: Anthony Liguori This backend talks EGD to a CharDriverState. A typical way to invoke this would be: qemu -chardev socket,host=localhost,port=1024,id=chr0 \ -object rng-egd,chardev=chr0,id=egd0 \ -device virtio-rng-pci,rng=egd0 Signed-off-by: Anthony Liguori --- backends/Makef

[Qemu-devel] [PATCH 4/8] vl: add -late-object to create QOM objects after machine init

2012-10-26 Thread Amit Shah
From: Anthony Liguori In order to create qdev objects via -late-object, we almost always have to specify the parent_bus which is usually created during machine init. Until we properly support two stage init, introduce a -late-object option that allows for creation of objects post-machine init.

[Qemu-devel] [PATCH 6/8] rng-urandom: add an RNG backend that uses /dev/urandom

2012-10-26 Thread Amit Shah
From: Anthony Liguori The filename can be overridden but it expects a non-blocking source of entropy. A typical invocation would be: qemu -object rng-urandom,id=rng0 -device virtio-rng-pci,rng=rng0 Signed-off-by: Anthony Liguori --- backends/Makefile.objs |2 +- backends/rng-urandom.c |

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

2012-10-26 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-26 Thread Lei Li
Signed-off-by: Lei Li --- qemu-char.c | 140 +++ qemu-config.c |3 + qemu-options.hx | 10 3 files changed, 153 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index b082bae..c3ec43d 100644 --- a/qemu-char

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

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

Re: [Qemu-devel] [PATCH 30/30] ram: optimize migration bitmap walking

2012-10-26 Thread Juan Quintela
Orit Wasserman wrote: > On 10/18/2012 09:30 AM, Juan Quintela wrote: >> Instead of testing each page individually, we search what is the next >> dirty page with a bitmap operation. We have to reorganize the code to >> move from a "for" loop, to a while(dirty) loop. >> >> >> -do { >> +w

Re: [Qemu-devel] [PATCH 21/30] migration: move exit condition to migration thread

2012-10-26 Thread Juan Quintela
Paolo Bonzini wrote: > Il 18/10/2012 09:30, Juan Quintela ha scritto: >> -if (s->migration_state->complete) { >> +qemu_mutex_lock_iothread(); > > So, was it a bug that we were accessing ->complete without the BQL? > >> +if (m->state != MIG_STATE_ACTIVE) { >> +DP

[Qemu-devel] [PATCH 8/8] virtio-rng: hardware random number generator device

2012-10-26 Thread Amit Shah
The Linux kernel already has a virtio-rng driver, this is the device implementation. When the guest asks for entropy from the virtio hwrng, it puts a buffer in the vq. We then put entropy into that buffer, and push it back to the guest. Signed-off-by: Amit Shah Signed-off-by: Anthony Liguori -

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

2012-10-26 Thread Alexander Graf
On 25.10.2012, at 22:57, Alexander Graf wrote: > > 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 thi

[Qemu-devel] [PATCH] trace: allow disabling events in events file

2012-10-26 Thread Gerd Hoffmann
Disable trace events prefixed with a '-'. Useful to enable a group of tracepoints with exceptions, like this: usb_xhci_port_* -usb_xhci_port_read which will enable all xhci port tracepoints except reads. Signed-off-by: Gerd Hoffmann --- trace/control.c |9 - 1 files changed, 8

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

2012-10-26 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 5/8] rng: add RndBackend abstract object class

2012-10-26 Thread Amit Shah
From: Anthony Liguori This is the backend used by devices that need to request entropy. Signed-off-by: Anthony Liguori --- Makefile.objs |2 + backends/Makefile.objs |1 + backends/rng.c | 93 include/qemu/rng.h |

Re: [Qemu-devel] [PATCH 0/2] xhci: Better spec conforming behaviour

2012-10-26 Thread Gerd Hoffmann
On 10/26/12 10:29, Sebastian Bauer wrote: > This tiny patch series fixes some things in the xhci hcd to behave more > spec compliant. > > The first patch ensures the correctness of the csc port status bit as > soon as the controller is switched to running mode. > > The second patch brings in the

Re: [Qemu-devel] [PATCH 1/2] When the XHCI host controller is switched to the running mode, set the ccs bit for each port, to which a device is already attached.

2012-10-26 Thread Gerd Hoffmann
On 10/26/12 10:29, Sebastian Bauer wrote: Wrong fix I think. Just moving "port->portsc |= PORTSC_CSC" out of the "if (running)" should do. usb-next already has a patch which fixes this: http://www.kraxel.org/cgit/qemu/commit/?h=rebase/usb-next&id=84f84686c701731964a515e9bbcfb475cfc1de8c cheers

Re: [Qemu-devel] [PATCH 2/2] Respond a set address command with CC_PARAMETER_ERROR, if the speed field of the input context is not valid.

2012-10-26 Thread Gerd Hoffmann
Looks ok, but please add the description & spec reference from the cover letter to the commit message. thanks, Gerd

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

2012-10-26 Thread Gerd Hoffmann
Hi, > +typedef struct EHCItfState { > +union { > +PCIDevice pcidev; > +}; > +struct EHCIState ehci; > +} EHCIItfState; I still think we should have EHCIPCIState here, then add a EHCISysbusState variant for sysbus. Everybody else does it this way (ohci, esp, serial, ...) and

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

2012-10-26 Thread Gerd Hoffmann
> diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c > index c55dafb..154e397 100644 > --- a/hw/xilinx_zynq.c > +++ b/hw/xilinx_zynq.c > @@ -150,6 +150,9 @@ static void zynq_init(QEMUMachineInitArgs *args) > zynq_init_spi_flashes(0xE0006000, pic[58-IRQ_OFFSET]); > zynq_init_spi_flashes(0xE0

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

2012-10-26 Thread Gerd Hoffmann
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 > when the guest bangs on these registers (and sucessfully fakes reading and > writing the re

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 >> when the guest bangs on these registe

Re: [Qemu-devel] [PATCH v3 02/26] blockdev: Introduce IF_AHCI

2012-10-26 Thread Markus Armbruster
Jason Baron writes: > On Wed, Oct 24, 2012 at 05:50:25PM +0200, Markus Armbruster wrote: >> Jason Baron writes: >> >> > On Mon, Oct 22, 2012 at 01:40:21PM +0200, Kevin Wolf wrote: >> >> >> From: Jason Baron >> >> >> >> >> >> Introduce IF_AHCI so that q35 can differentiate between ide >> >> >>

[Qemu-devel] [PATCH] uhci: stick irq routing info into UHCIInfo too.

2012-10-26 Thread Gerd Hoffmann
Kills the ugly "switch (device_id) { ... }" struct and makes it easier to figure what the differences between the uhci variants are. Need our own DeviceClass struct for that so we can allocate some space to store UHCIInfo. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.c | 32 ++

Re: [Qemu-devel] [PATCH 00/30] Migration thread 20121017 edition

2012-10-26 Thread Paolo Bonzini
Il 18/10/2012 09:29, Juan Quintela ha scritto: > Hi > > This series apply on top of the refactoring that I sent yesterday. > Changes from the last version include: > > - buffered_file.c is gone, its functionality is merged in migration.c > special attention to the megre of buffered_file_thread(

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

2012-10-26 Thread Paolo Bonzini
Il 26/10/2012 05:58, David Gibson ha scritto: >> > static inline int dma_memory_rw_relaxed(DMAContext *dma, dma_addr_t addr, >> > void *buf, dma_addr_t len, >> > DMADirection dir) >> > { >> > if (!dma_has_iommu(dma)

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

2012-10-26 Thread Luiz Capitulino
On Fri, 26 Oct 2012 03:43:10 +0800 Lei Li wrote: > 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

[Qemu-devel] [PATCH 01/25] event_notifier: add Win32 implementation

2012-10-26 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- Makefile.objs | 4 ++- event_notifier.c => event_notifier-posix.c | 0 event_notifier.c => event_notifier-win32.c | 48 +- event_notifier.h | 17 +-- qemu-os-win32.h

[Qemu-devel] [PATCH 05/25] aio: introduce AioContext, move bottom halves there

2012-10-26 Thread Paolo Bonzini
Start introducing AioContext, which will let us remove globals from aio.c/async.c, and introduce multiple I/O threads. The bottom half functions now take an additional AioContext argument. A bottom half is created with a specific AioContext that remains the same throughout the lifetime. qemu_bh_n

[Qemu-devel] [PATCH 04/25] aio: provide platform-independent API

2012-10-26 Thread Paolo Bonzini
This adds to aio.c a platform-independent API based on EventNotifiers, that can be used by both POSIX and Win32. Reviewed-by: Anthony Liguori Signed-off-by: Paolo Bonzini --- Makefile.objs | 4 ++-- aio.c | 9 + qemu-aio.h| 19 ++- 3 file modificati, 29 ins

[Qemu-devel] [PATCH 06/25] aio: add I/O handlers to the AioContext interface

2012-10-26 Thread Paolo Bonzini
With this patch, I/O handlers (including event notifier handlers) can be attached to a single AioContext. Signed-off-by: Paolo Bonzini --- aio.c | 70 - async.c | 6 ++ main-loop.c | 33 + qemu

[Qemu-devel] [PATCH 15/25] main-loop: use aio_notify for qemu_notify_event

2012-10-26 Thread Paolo Bonzini
Reviewed-by: Anthony Liguori Signed-off-by: Paolo Bonzini --- main-loop.c | 110 ++-- 1 file modificato, 10 inserzioni(+), 100 rimozioni(-) diff --git a/main-loop.c b/main-loop.c index 209f699..978050a 100644 --- a/main-loop.c +++ b/main-l

[Qemu-devel] [PATCH 17/25] linux-aio: use event notifiers

2012-10-26 Thread Paolo Bonzini
Since linux-aio already uses an eventfd, converting it to use the EventNotifier-based API simplifies the code even though it is not meant to be portable. Reviewed-by: Anthony Liguori Signed-off-by: Paolo Bonzini --- linux-aio.c | 49 +++-- 1 file modi

[Qemu-devel] [PATCH 25/25] raw-win32: implement native asynchronous I/O

2012-10-26 Thread Paolo Bonzini
With the new support for EventNotifiers in the AIO event loop, we can hook a completion port to every opened file and use asynchronous I/O on them. Wine's support is extremely inefficient, also because it really does the I/O synchronously on regular files. (!) But it works, and it is good to keep

[Qemu-devel] [PATCH 21/25] raw: merge posix-aio-compat.c into block/raw-posix.c

2012-10-26 Thread Paolo Bonzini
Making the qemu_paiocb specific to raw devices will let us access members of the BDRVRawState arbitrarily. Signed-off-by: Paolo Bonzini --- Makefile.objs | 1 - block/raw-posix-aio.h | 8 -- block/raw-posix.c | 294 posix-aio-compat.c

Re: [Qemu-devel] [PATCH 0/8] virtio-rng: hardware random number generator device

2012-10-26 Thread Paolo Bonzini
Il 26/10/2012 13:01, Amit Shah ha scritto: > Amit Shah (1): > virtio-rng: hardware random number generator device > > Anthony Liguori (7): > object: add object_property_add_bool (v2) > qdev: add realized property and make adding child bus implied by > realize > vl: add -object option t

Re: [Qemu-devel] [PATCH 4/4] Warning messages on net devices hotplug

2012-10-26 Thread Corey Bryant
On 10/25/2012 03:40 AM, Paolo Bonzini wrote: Il 24/10/2012 19:30, Corey Bryant ha scritto: On 10/24/2012 11:45 AM, Paolo Bonzini wrote: Il 24/10/2012 17:39, Corey Bryant ha scritto: On 10/24/2012 11:21 AM, Paolo Bonzini wrote: Il 24/10/2012 16:18, Corey Bryant ha scritto: On 10/18/20

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

2012-10-26 Thread Peter Maydell
To avoid continually having to bump the initrd load address to account for larger kernel images, put the initrd halfway through RAM. This allows large kernels on new boards with lots of RAM to work OK, without breaking existing usecases for boards with only 32MB of RAM. Note that this change fixes

[Qemu-devel] [PATCH 00/25] AioContext & threadpool

2012-10-26 Thread Paolo Bonzini
Since half of the patches are in common between the two series, here are both of them together. Under Wine I see a performance regression due to AIO, but I wouldn't be surprised if it is an emulation artifact (especially since attempts to use native AIO are converted by Wine to synchronous I/O + t

[Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support

2012-10-26 Thread Anthony Liguori
Hi, This series implements the backend and frontend infrastructure for virtio-rng. This is similar to previous series sent out by both Amit and myself although it has been trimmed down considerably. In terms of backends, a file and EGD backend are supported. The file defaults to /dev/random base

[Qemu-devel] [PATCH 3/6] rng: add RndBackend abstract object class

2012-10-26 Thread Anthony Liguori
This is the backend used by devices that need to request entropy. Signed-off-by: Anthony Liguori --- Makefile.objs | 2 ++ backends/Makefile.objs | 1 + backends/rng.c | 93 ++ include/qemu/rng.h | 93

[Qemu-devel] [PATCH 2/6] object: add object_property_add_bool (v2)

2012-10-26 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- v1 -> v2 - Fix whitespace (Andreas Faerber) --- include/qemu/object.h | 16 +++ qom/object.c | 56 +++ 2 files changed, 72 insertions(+) diff --git a/include/qemu/object.h b/include/qemu/obje

[Qemu-devel] [PATCH 5/6] rng-egd: introduce EGD compliant RNG backend

2012-10-26 Thread Anthony Liguori
This backend talks EGD to a CharDriverState. A typical way to invoke this would be: qemu -chardev socket,host=localhost,port=1024,id=chr0 \ -object rng-egd,chardev=chr0,id=egd0 \ -device virtio-rng-pci,rng=egd0 Signed-off-by: Anthony Liguori --- backends/Makefile.objs | 2 +- backe

[Qemu-devel] [PATCH 6/6] virtio-rng: hardware random number generator device

2012-10-26 Thread Anthony Liguori
From: Amit Shah The Linux kernel already has a virtio-rng driver, this is the device implementation. When the guest asks for entropy from the virtio hwrng, it puts a buffer in the vq. We then put entropy into that buffer, and push it back to the guest. Signed-off-by: Amit Shah Signed-off-by:

[Qemu-devel] [PATCH 4/6] rng-random: add an RNG backend that uses /dev/random

2012-10-26 Thread Anthony Liguori
The filename can be overridden but it expects a non-blocking source of entropy. A typical invocation would be: qemu -object rng-random,id=rng0 -device virtio-rng-pci,rng=rng0 This can also be used with /dev/urandom by using the command line: qemu -object rng-random,filename=/dev/urandom,id=rng0

[Qemu-devel] [PATCH 23/25] raw-win32: add emulated AIO support

2012-10-26 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/raw-win32.c | 187 -- 1 file modificato, 138 inserzioni(+), 49 rimozioni(-) diff --git a/block/raw-win32.c b/block/raw-win32.c index 78c8306..ffd86e3 100644 --- a/block/raw-win32.c +++ b/block/raw-win32.c

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 RAM (which can b

[Qemu-devel] [PATCH 03/25] aio: change qemu_aio_set_fd_handler to return void

2012-10-26 Thread Paolo Bonzini
Reviewed-by: Anthony Liguori Signed-off-by: Paolo Bonzini --- aio.c | 12 +--- qemu-aio.h | 10 +- 2 file modificati, 10 inserzioni(+), 12 rimozioni(-) diff --git a/aio.c b/aio.c index c738a4e..e062aab 100644 --- a/aio.c +++ b/aio.c @@ -53,11 +53,11 @@ static AioHandler *fi

[Qemu-devel] [PATCH 20/25] block: switch posix-aio-compat to threadpool

2012-10-26 Thread Paolo Bonzini
This is not meant for portability, but to remove code duplication. Signed-off-by: Paolo Bonzini --- block/raw-posix-aio.h | 1 - block/raw-posix.c | 5 - posix-aio-compat.c| 423 +- 3 file modificati, 37 inserzioni(+), 392 rimozioni(-)

[Qemu-devel] [PATCH 13/25] aio: call aio_notify after setting I/O handlers

2012-10-26 Thread Paolo Bonzini
In the current code, this is done by qemu_set_fd_handler2, which is called by qemu_aio_set_fd_handler. We need to keep the same behavior even after removing the call to qemu_set_fd_handler2. Reviewed-by: Anthony Liguori Signed-off-by: Paolo Bonzini --- aio-posix.c | 2 ++ aio-win32.c | 2 ++ 2

[Qemu-devel] [PATCH 07/25] aio: test node->deleted before calling io_flush

2012-10-26 Thread Paolo Bonzini
Otherwise, there could be a case where io_flush accesses freed memory because it should not have been called. Signed-off-by: Paolo Bonzini --- aio.c | 2 +- 1 file modificato, 1 inserzione(+). 1 rimozione(-) diff --git a/aio.c b/aio.c index c89f1e9..734d2cf 100644 --- a/aio.c +++ b/aio.c @@ -12

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

2012-10-26 Thread Paolo Bonzini
- Messaggio originale - > Da: "Avi Kivity" > A: "Paolo Bonzini" > Cc: "Liu Ping Fan" , qemu-devel@nongnu.org, > "Anthony Liguori" , > "Marcelo Tosatti" , "Jan Kiszka" > , "Stefan Hajnoczi" > > Inviato: Giovedì, 25 ottobre 2012 18:28:27 > Oggetto: Re: [patch v4 05/16] memory: introduc

Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support

2012-10-26 Thread Paolo Bonzini
> This series implements the backend and frontend infrastructure for virtio-rng. > This is similar to previous series sent out by both Amit and myself > although it has been trimmed down considerably. > > In terms of backends, a file and EGD backend are supported. The file defaults > to /dev/rand

Re: [Qemu-devel] [PATCH 1/2] When the XHCI host controller is switched to the running mode, set the ccs bit for each port, to which a device is already attached.

2012-10-26 Thread Sebastian Bauer
Hi! Am 26.10.2012 14:00, schrieb Gerd Hoffmann: Wrong fix I think. Just moving "port->portsc |= PORTSC_CSC" out of the "if (running)" should do. usb-next already has a patch which fixes this: I'm not sure about that. According to the spec, when the hc is set to running mode (p.70) "At th

Re: [Qemu-devel] [PATCH 0/8] virtio-rng: hardware random number generator device

2012-10-26 Thread Anthony Liguori
Paolo Bonzini writes: > Il 26/10/2012 13:01, Amit Shah ha scritto: >> Amit Shah (1): >> virtio-rng: hardware random number generator device >> >> Anthony Liguori (7): >> object: add object_property_add_bool (v2) >> qdev: add realized property and make adding child bus implied by >> rea

[Qemu-devel] [PATCH 16/25] aio: clean up now-unused functions

2012-10-26 Thread Paolo Bonzini
Some cleanups can now be made, now that the main loop does not anymore need hooks into the bottom half code. Reviewed-by: Anthony Liguori Signed-off-by: Paolo Bonzini --- async.c | 23 +++ oslib-posix.c | 31 --- qemu-aio.h| 1 - qemu-c

[Qemu-devel] [PATCH 09/25] aio: prepare for introducing GSource-based dispatch

2012-10-26 Thread Paolo Bonzini
This adds a GPollFD to each AioHandler. It will then be possible to attach these GPollFDs to a GSource, and from there to the main loop. aio_wait examines the GPollFDs and avoids calling select() if any is set (similar to what it does if bottom halves are available). Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 08/25] aio: add non-blocking variant of aio_wait

2012-10-26 Thread Paolo Bonzini
This will be used when polling the GSource attached to an AioContext. Reviewed-by: Anthony Liguori Signed-off-by: Paolo Bonzini --- aio.c | 20 +++- async.c | 2 +- main-loop.c | 2 +- qemu-aio.h | 21 +++-- 4 file modificati, 32 inserzioni(+), 13 ri

[Qemu-devel] [PATCH 10/25] aio: add Win32 implementation

2012-10-26 Thread Paolo Bonzini
The Win32 implementation will only accept EventNotifiers, thus a few drivers are disabled under Windows. EventNotifiers are a good match for the GSource implementation, too, because the Win32 port of glib allows to place their HANDLEs in a GPollFD. Signed-off-by: Paolo Bonzini --- Makefile.objs

[Qemu-devel] [PATCH 02/25] event_notifier: enable it to use pipes

2012-10-26 Thread Paolo Bonzini
This takes the eventfd emulation code from the main loop. When the EventNotifier is used for the main loop too, we need this compatibility code. Without CONFIG_EVENTFD, event_notifier_get_fd is only usable for the "read" side of the notifier, for example to set a select() handler. The return val

Re: [Qemu-devel] [PATCH 0/8] virtio-rng: hardware random number generator device

2012-10-26 Thread Paolo Bonzini
Il 26/10/2012 17:14, Anthony Liguori ha scritto: >> > I would instead have the following: >> > >> > - a chardev that can read from a file (e.g. -chardev >> > file,path=/dev/urandom,read=on,id=urandom) > Then your multiplexing lots of logic into the chardev layer. Then call it -chardev filein,path=

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

2012-10-26 Thread Peter Maydell
To avoid continually having to bump the initrd load address to account for larger kernel images, put the initrd halfway through RAM. This allows large kernels on new boards with lots of RAM to work OK, without breaking existing usecases for boards with only 32MB of RAM. Note that this change fixes

[Qemu-devel] [PATCH 22/25] raw-posix: rename raw-posix-aio.h, hide unavailable prototypes

2012-10-26 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/{raw-posix-aio.h => raw-aio.h} | 10 ++ block/raw-posix.c| 2 +- linux-aio.c | 2 +- 3 file modificati, 8 inserzioni(+), 6 rimozioni(-) rename block/{raw-posix-aio.h => raw-aio.h} (86%) diff --git a/bl

Re: [Qemu-devel] [PULL 00/29] qemu-sockets error propagation + NBD server

2012-10-26 Thread Anthony Liguori
Paolo Bonzini writes: > Anthony, > > The following changes since commit b6348f29d033d5a8a26f633d2ee94362595f32a4: > > target-arm/translate: Fix RRX operands (2012-10-17 19:56:46 +0200) > > are available in the git repository at: > > git://github.com/bonzini/qemu.git nbd-next Pulled. Thanks.

  1   2   >