[Qemu-devel] Fwd: Qemu-ga for Windows

2012-10-26 Thread Abbas
Qemu-qa port for Windows domains does not seem to support fs-freeze-* calls. I compiled the latest qemu-ga.exe with mingw32 from git, installed it as a service on a VM but snapshotting with quiesce is failing. error: internal error unable to execute QEMU command 'guest-fsfreeze-freeze': this feat

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

2012-10-26 Thread Edgar E. Iglesias
On Fri, Oct 26, 2012 at 05:03:04PM +1000, Peter Crosthwaite wrote: > 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 a

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

2012-10-26 Thread Peter Crosthwaite
Hi Johan, On Sat, Oct 27, 2012 at 5:03 AM, johan marx wrote: > Hi, > I have been trying to get the spi working on an emulated omap3 with qemu but > so far I wasn't able to complete the cycle. I decided to use spidev in order > to ease things. Here is what I currently did: > What tree are you bui

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

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

2012-10-26 Thread Peter Crosthwaite
On Fri, Oct 26, 2012 at 10:24 PM, Gerd Hoffmann wrote: > 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

Re: [Qemu-devel] [PATCH v7 1/1] target-i386: Add missing kvm bits.

2012-10-26 Thread Marcelo Tosatti
On Fri, Oct 12, 2012 at 03:43:23PM -0400, Don Slutz wrote: > Currently "-cpu host,-kvmclock,-kvm_nopiodelay,-kvm_mmu" does not > turn off all bits in CPUID 0x4001 EAX. > > The missing ones are KVM_FEATURE_STEAL_TIME and > KVM_FEATURE_CLOCKSOURCE_STABLE_BIT. > > This adds the names kvm_steal_t

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

2012-10-26 Thread H. Peter Anvin
On 10/26/2012 12:51 PM, Paolo Bonzini wrote: > Il 26/10/2012 21:07, H. Peter Anvin ha scritto: >> This is surreal. Output from /dev/hwrng turns into output for >> /dev/random... it us guaranteed worse; period, end of story. > > Isn't that exactly what happens in bare-metal? hwrng -> rngd -> ran

Re: [Qemu-devel] q35: usb keyboard trouble

2012-10-26 Thread Jason Baron
On Wed, Oct 24, 2012 at 10:55:28AM -0400, Gabriel L. Somlo wrote: > Jason, > > Commit d8b0dbdba325773469733222a167b54aca74de55 in the q35 tree breaks > '-usbdevice keyboard' for me. Instead of being able to type at the VM, > none of the keypresses make it through, and qemu stderr soon starts > log

Re: [Qemu-devel] [PATCH 2/4] virtio-rng-pci: create a default backend if none exists

2012-10-26 Thread Paolo Bonzini
Il 26/10/2012 22:16, Anthony Liguori ha scritto: > So it's still a failure, just a different message. > > But this does suggest that we shouldn't add it to the default machine on > !Linux because we don't want the default machine failing. We need to add it to all machines, because the machine sig

Re: [Qemu-devel] [PATCH 2/4] virtio-rng-pci: create a default backend if none exists

2012-10-26 Thread Paolo Bonzini
Il 26/10/2012 21:51, Anthony Liguori ha scritto: >> > If you make the default /dev/hwrng, however, that would be ok. > /dev/hwrng may be (and stay) empty which seems unfortunate. Unfortunate, but at least not wrong. > I was thinking /dev/urandom would be a good pragmatic choice though. No. /dev

Re: [Qemu-devel] [PATCH 2/4] virtio-rng-pci: create a default backend if none exists

2012-10-26 Thread Anthony Liguori
Paolo Bonzini writes: > Il 26/10/2012 20:59, Paolo Bonzini ha scritto: >> Il 26/10/2012 19:21, Anthony Liguori ha scritto: >>> This allows you to specify: >>> >>> $ qemu -device virtio-rng-pci >>> >>> And things will Just Work with a reasonable default. >>> >>> Signed-off-by: Anthony Liguori >

[Qemu-devel] spidev with omap3 running on qemu

2012-10-26 Thread johan marx
Hi, I have been trying to get the spi working on an emulated omap3 with qemu but so far I wasn't able to complete the cycle. I decided to use spidev in order to ease things. Here is what I currently did: I changed the kernel so everything is working on the real overo board. So it is definitely

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

2012-10-26 Thread H. Peter Anvin
That statement is pretty toxic... I wonder where it came from. It is at best horribly misleading and actively encourages dangerous behaviours even for the cases where it isn't actively wrong. Paolo Bonzini wrote: >Il 26/10/2012 21:07, H. Peter Anvin ha scritto: >> This is surreal. Output fro

Re: [Qemu-devel] [PATCH 2/4] virtio-rng-pci: create a default backend if none exists

2012-10-26 Thread Paolo Bonzini
Il 26/10/2012 20:59, Paolo Bonzini ha scritto: > Il 26/10/2012 19:21, Anthony Liguori ha scritto: >> This allows you to specify: >> >> $ qemu -device virtio-rng-pci >> >> And things will Just Work with a reasonable default. >> >> Signed-off-by: Anthony Liguori >> --- >> hw/virtio-pci.c | 13 +++

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

2012-10-26 Thread Paolo Bonzini
Il 26/10/2012 21:07, H. Peter Anvin ha scritto: > This is surreal. Output from /dev/hwrng turns into output for /dev/random... > it us guaranteed worse; period, end of story. Isn't that exactly what happens in bare-metal? hwrng -> rngd -> random. Instead here we'd have, host hwrng -> virtio-r

Re: [Qemu-devel] [PATCH 2/4] virtio-rng-pci: create a default backend if none exists

2012-10-26 Thread Anthony Liguori
Paolo Bonzini writes: > Il 26/10/2012 19:21, Anthony Liguori ha scritto: >> This allows you to specify: >> >> $ qemu -device virtio-rng-pci >> >> And things will Just Work with a reasonable default. >> >> Signed-off-by: Anthony Liguori >> --- >> hw/virtio-pci.c | 13 + >> hw/vi

Re: [Qemu-devel] [QEMU PATCH] i386: cpu: add missing CPUID[EAX=7, ECX=0] flag names

2012-10-26 Thread Marcelo Tosatti
On Tue, Oct 09, 2012 at 12:43:52PM -0400, Don Slutz wrote: > On 10/09/12 10:03, Eduardo Habkost wrote: > >This makes QEMU recognize the following CPU flag names: > > > > Flags| Corresponding KVM kernel commit > > -+ > > FSGSBASE

Re: [Qemu-devel] [PATCH 00/15] QEMU KVM_GET_SUPPORTED_CPUID cleanups and fixes

2012-10-26 Thread Marcelo Tosatti
On Thu, Oct 04, 2012 at 05:48:52PM -0300, Eduardo Habkost wrote: > Most of this series are just cleanups that will help when making -cpu > check/enforce work properly, with some fixes. > > In addition to code movements, the main changes are: > - x2apic won't be enabled if in-kernel irqchip is dis

[Qemu-devel] [PATCH 2/2] qemu-iotests: qcow2: Test growing large refcount table

2012-10-26 Thread Kevin Wolf
Actually writing all the content with 512 byte sector size would take forever, therefore build the image file with a Python script and use qemu-io for the last write that actually triggers the refcount table growth. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/044| 117 +

[Qemu-devel] [PATCH 1/2] qcow2: Fix refcount table size calculation

2012-10-26 Thread Kevin Wolf
A missing factor for the refcount table entry size in the calculation could mean that too little memory was allocated for the in-memory representation of the table, resulting in a buffer overflow. Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c |3 ++- 1 files changed, 2 insertions(+),

[Qemu-devel] [PATCH 0/2] qcow2: Fix refcount table size calculation

2012-10-26 Thread Kevin Wolf
Kevin Wolf (2): qcow2: Fix refcount table size calculation qemu-iotests: qcow2: Test growing large refcount table block/qcow2-refcount.c|3 +- tests/qemu-iotests/044| 117 + tests/qemu-iotests/044.out|6 ++ tests/qemu-iotest

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

2012-10-26 Thread H. Peter Anvin
This is surreal. Output from /dev/hwrng turns into output for /dev/random... it us guaranteed worse; period, end of story. I don't know who the "agreement" is with, but it is ridiculous in this case. As far as the need whitening issue, I discussed that with Ted at Kernel Summit and we came up

Re: [Qemu-devel] [PATCH 2/4] virtio-rng-pci: create a default backend if none exists

2012-10-26 Thread Paolo Bonzini
Il 26/10/2012 19:21, Anthony Liguori ha scritto: > This allows you to specify: > > $ qemu -device virtio-rng-pci > > And things will Just Work with a reasonable default. > > Signed-off-by: Anthony Liguori > --- > hw/virtio-pci.c | 13 + > hw/virtio-rng.h | 2 ++ > 2 files change

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

2012-10-26 Thread Paolo Bonzini
Il 26/10/2012 18:09, H. Peter Anvin ha scritto: > a) it means that the guest *has* to run rngd or a similar engine; if you > have control over the guests it might be more efficient to run rngd in > skip-test mode (I don't think that is currently implemented but it > could/should be) and centralize

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

2012-10-26 Thread Paolo Bonzini
Il 26/10/2012 17:42, Anthony Liguori ha scritto: >> Maybe rdrand, but that's just a chardev---so why isn't this enough: >> >> -chardev file,source=on,path=/dev/hwrng,id=chr0 -device >> virtio-rng-pci,file=chr0 >> -chardev rdrand,id=chr0 -device >> virtio-rng-pci,file

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

2012-10-26 Thread H. Peter Anvin
PRNGs don't "create entropy." Period. The guest will run its own PRNG. Anthony Liguori wrote: >"H. Peter Anvin" writes: > >> On 10/26/2012 08:42 AM, Anthony Liguori wrote: Is /dev/random even appropriate to feed rngd? rngd needs _a lot_ of entropy to even start working. I

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

2012-10-26 Thread Anthony Liguori
"H. Peter Anvin" writes: > On 10/26/2012 08:42 AM, Anthony Liguori wrote: >>> >>> Is /dev/random even appropriate to feed rngd? >>> >>> rngd needs _a lot_ of entropy to even start working. Its randomness >>> test works in groups of 2 bits. On a system without an hardware >>> RNG, /dev/random

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

[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 property that already

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

2012-10-26 Thread Luiz Capitulino
On Fri, 26 Oct 2012 19:21:52 +0800 Lei Li wrote: > Signed-off-by: Lei Li I still don't understand how this command, in its current form, is different from memchar-write. One more comment below. > --- > hmp-commands.hx | 25 + > hmp.c | 52 +++

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

2012-10-26 Thread Luiz Capitulino
On Fri, 26 Oct 2012 19:21:51 +0800 Lei Li wrote: > Signed-off-by: Lei Li > --- > hmp-commands.hx | 19 ++ > hmp.c| 19 ++ > hmp.h|1 + > qapi-schema.json | 27 ++ > qemu-char.c | 55 >

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 message was "permissi

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

[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/object.

[Qemu-devel] [PATCH 0/4] Enable virtio-{rng,balloon} by default

2012-10-26 Thread Anthony Liguori
This series depends on my virtio-rng series from earlier but goes quite a bit further. It creates a default backend for the virtio-rng-pci device that will be available if the user doesn't explicitly set one. It also creates a mechanism to provide a simple way to specify default devices via QEMUM

[Qemu-devel] [PATCH 4/4] pc-1.3: add virtio-rng and virtio-balloon to the default machine

2012-10-26 Thread Anthony Liguori
The default machine should be useful so add the virtio-rng and virtio-balloon devices by default to enable these features. These are protected by -nodefaults so they will only be added if you're executing from the command line (not if you're using libvirt). Signed-off-by: Anthony Liguori --- hw

[Qemu-devel] [PATCH 1/4] rng-random: split out header for rng-random

2012-10-26 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- backends/rng-random.c | 8 +++- include/qemu/rng-random.h | 22 ++ 2 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 include/qemu/rng-random.h diff --git a/backends/rng-random.c b/backends/rng-random.c index 6b6e

[Qemu-devel] [PATCH 3/4] machine: add default_devices field to QEMUMachine

2012-10-26 Thread Anthony Liguori
This allows a machine to describe default devices that are only available when -nodefaults is not present. Signed-off-by: Anthony Liguori --- hw/boards.h | 6 ++ vl.c| 13 + 2 files changed, 19 insertions(+) diff --git a/hw/boards.h b/hw/boards.h index 813d0e5..85b2887

[Qemu-devel] [PATCH 2/4] virtio-rng-pci: create a default backend if none exists

2012-10-26 Thread Anthony Liguori
This allows you to specify: $ qemu -device virtio-rng-pci And things will Just Work with a reasonable default. Signed-off-by: Anthony Liguori --- hw/virtio-pci.c | 13 + hw/virtio-rng.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c ind

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

2012-10-26 Thread Luiz Capitulino
On Fri, 26 Oct 2012 19:21:50 +0800 Lei Li wrote: > Signed-off-by: Lei Li > --- > hmp-commands.hx | 17 + > hmp.c| 15 +++ > hmp.h|1 + > qapi-schema.json | 47 +++ > qemu-char.c | 4

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

2012-10-26 Thread Luiz Capitulino
On Fri, 26 Oct 2012 19:21:49 +0800 Lei Li wrote: > 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/q

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

2012-10-26 Thread H. Peter Anvin
On 10/26/2012 08:42 AM, Anthony Liguori wrote: Is /dev/random even appropriate to feed rngd? rngd needs _a lot_ of entropy to even start working. Its randomness test works in groups of 2 bits. On a system without an hardware RNG, /dev/random can hardly produce 4000 bits/minute. This means

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 11/25] aio: make AioContexts GSources

2012-10-26 Thread Paolo Bonzini
This lets AioContexts be used (optionally) with a glib main loop. Signed-off-by: Paolo Bonzini --- aio-posix.c | 4 aio-win32.c | 4 async.c | 65 - qemu-aio.h | 23 ++ 4 file modificati, 95 inserzio

[Qemu-devel] [PATCH 14/25] main-loop: use GSource to poll AIO file descriptors

2012-10-26 Thread Paolo Bonzini
This lets us remove the hooks for the main loop in async.c. Reviewed-by: Anthony Liguori Signed-off-by: Paolo Bonzini --- main-loop.c | 23 ++- main-loop.h | 1 - 2 file modificati, 6 inserzioni(+), 18 rimozioni(-) diff --git a/main-loop.c b/main-loop.c index b290c79..209f

[Qemu-devel] [PATCH 12/25] aio: add aio_notify

2012-10-26 Thread Paolo Bonzini
With this change async.c does not rely anymore on any service from main-loop.c, i.e. it is completely self-contained. Reviewed-by: Anthony Liguori Signed-off-by: Paolo Bonzini --- async.c| 30 ++ qemu-aio.h | 18 ++ 2 file modificati, 44 inserzion

[Qemu-devel] [PATCH 24/25] raw-posix: move linux-aio.c to block/

2012-10-26 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- Makefile.objs| 1 - block/Makefile.objs | 1 + linux-aio.c => block/linux-aio.c | 0 3 file modificati, 1 inserzione(+). 1 rimozione(-) rename linux-aio.c => block/linux-aio.c (100%) diff --git a/Makefile.objs b/Makefile.objs ind

[Qemu-devel] [PATCH 18/25] qemu-thread: add QemuSemaphore

2012-10-26 Thread Paolo Bonzini
The new thread pool will use semaphores instead of condition variables, because QemuCond does not have qemu_cond_timedwait. (I also like it more this way). Signed-off-by: Paolo Bonzini --- qemu-thread-posix.c | 74 + qemu-thread-posix.h | 5 ++

[Qemu-devel] [PATCH 19/25] aio: add generic thread-pool facility

2012-10-26 Thread Paolo Bonzini
Add a generic thread-pool. The code is roughly based on posix-aio-compat.c, with some changes, especially the following: - use QemuSemaphore instead of QemuCond; - separate the state of the thread from the return code of the worker function. The return code is totally opaque for the thread pool

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

2012-10-26 Thread Anthony Liguori
Paolo Bonzini writes: >> 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.

[Qemu-devel] [PATCH v2] xhci: check speed field of the input context of a set address command.

2012-10-26 Thread Sebastian Bauer
If the supplied speed data doesn't match the device speed, return CC_PARAMETER_ERROR. See 6.2.2.1 of the xhci spec. Signed-off-by: Sebastian Bauer --- Changes v1->v2: Added description to the patch hw/usb/hcd-xhci.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/usb/hcd-xh

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

2012-10-26 Thread 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. Signed-off-by: Anthony

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

2012-10-26 Thread Anthony Liguori
Luiz Capitulino writes: > 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 Applied. Thanks. Regards, Anthony Liguori > --- > osdep.

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.

[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

[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

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

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

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

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

[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

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

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

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

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

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

[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

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

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

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

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

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

  1   2   >