Re: [Qemu-devel] [PATCH v3 04/29] build: move *-user/ objects to nested Makefile.objs

2012-06-25 Thread Alex Barcelo
I'm the only one whom this patch breaks compilation? Is a cross-compiled qemu, but the make had run smoothly until now, and a git bisect has driven me here. My configuration is a bit strange: configure: PKG_CONFIG_PATH=/usr/powerpc-linux-gnu/lib/pkgconfig ./configure --prefix=/mnt/DATA/DARCO/alie

Re: [Qemu-devel] [PATCH v6 08/16] target-or32: Add instruction tanslation

2012-06-25 Thread Max Filippov
On Tue, Jun 26, 2012 at 5:37 AM, Jia Liu wrote: > Hi Max, > > On Mon, Jun 25, 2012 at 5:00 PM, Max Filippov wrote: >> On Mon, Jun 25, 2012 at 6:50 AM, Jia Liu wrote: >>> Hi Max, >>> >>> On Thu, Jun 21, 2012 at 6:24 PM, Max Filippov wrote: On Thu, Jun 21, 2012 at 6:58 AM, Jia Liu wrote: >>

Re: [Qemu-devel] [RFC 1/3] memory: add -disable-mem-merge command-line option

2012-06-25 Thread Jan Kiszka
On 2012-06-26 00:02, Anthony Liguori wrote: > On 06/25/2012 03:26 PM, Jan Kiszka wrote: >> On 2012-06-25 18:55, Luiz Capitulino wrote: >>> Allow for disabling memory merge support (KSM on Linux), which is >>> enabled by default otherwise. >> >> -machine mem_merge=on|off? > > Ack. > > But any reas

Re: [Qemu-devel] [net-next RFC V4 PATCH 3/4] virtio: introduce a method to get the irq of a specific virtqueue

2012-06-25 Thread Jason Wang
On 06/25/2012 06:14 PM, Michael S. Tsirkin wrote: On Mon, Jun 25, 2012 at 05:41:17PM +0800, Jason Wang wrote: Device specific irq optimizations such as irq affinity may be used by virtio drivers. So this patch introduce a new method to get the irq of a specific virtqueue. After this patch, virt

[Qemu-devel] [PULL] Standard SD host controller model

2012-06-25 Thread Peter A. G. Crosthwaite
target-ppc: Fix 2nd parameter for tcg_gen_shri_tl (2012-06-24 22:52:11 +0200) are available in the git repository at: git://developer.petalogix.com/public/qemu.git third-party/igor-sdhci.next Igor Mitsyanko (2): hw: introduce standard SD host controller exynos4210: Added SD host c

[Qemu-devel] Request VFIO inclusion in linux-next

2012-06-25 Thread Alex Williamson
Hi, VFIO has been kicking around for well over a year now and has been posted numerous times for review. The pre-requirements are finally available in linux-next (or will be in the 20120626 build) so I'd like to request a new branch be included in linux-next with a goal of being accepted into v3.

[Qemu-devel] [PATCH v2 2/3] MAINTAINERS: Added Xilinx EDK devices

2012-06-25 Thread Peter A. G. Crosthwaite
Signed-off-by: Peter A. G. Crosthwaite --- MAINTAINERS | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index d544a9c..e19f491 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -482,6 +482,17 @@ S: Supported F: hw/virtio-serial* F: hw/vir

[Qemu-devel] [PATCH v2 3/3] MAINTAINERS: Added device tree

2012-06-25 Thread Peter A. G. Crosthwaite
Agreed between myself and Alex: http://lists.nongnu.org/archive/html/qemu-devel/2012-06/msg03561.html Signed-off-by: Peter A. G. Crosthwaite Acked-by: Alexander Graf --- MAINTAINERS |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index e19

[Qemu-devel] [PATCH v2 1/3] MAINTAINERS: Add Petalogix ml605 machine model

2012-06-25 Thread Peter A. G. Crosthwaite
Signed-off-by: Peter A. G. Crosthwaite --- MAINTAINERS |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index b45f075..d544a9c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -311,6 +311,11 @@ M: Edgar E. Iglesias S: Maintained F: hw/petalogi

[Qemu-devel] [PATCH v2 0/3] Microblaze and Device Tree Maintainerships

2012-06-25 Thread Peter A. G. Crosthwaite
Set some missing maintainer ships. Patch 1 is the Petalogix ML605 machine model (me). Patch 2 is the Xilinx EDK device suite (me + Edgar). Patch 3 is the device tree subsystem (me + Alex). Changed since v1: Added Alexs ack for p3. Peter A. G. Crosthwaite (3): MAINTAINERS: Add Petalogix ml605

Re: [Qemu-devel] [PATCH] linux-user: fix segmentation fault passing with g2h(x) != x

2012-06-25 Thread Alexander Graf
On 26.06.2012, at 04:24, 陳韋任 (Wei-Ren Chen) wrote: > On Mon, Jun 25, 2012 at 07:32:39PM +0200, Alexander Graf wrote: >> When forwarding a segmentation fault into the guest process, we were passing >> the host's address directly into the guest process's signal descriptor. >> >> That obviously con

Re: [Qemu-devel] [PATCH] Exynos4: added RTC device

2012-06-25 Thread Evgeny Voevodin
On 25.06.2012 16:00, Andreas Färber wrote: Am 25.06.2012 13:46, schrieb Evgeny Voevodin: On 25.06.2012 13:24, Andreas Färber wrote: Am 25.06.2012 09:55, schrieb Oleg Ogurtsov: Signed-off-by: Oleg Ogurtsov --- hw/arm/Makefile.objs |1 + hw/exynos4210.c |8 + hw/exynos4210_rt

Re: [Qemu-devel] [PATCH] linux-user: fix segmentation fault passing with g2h(x) != x

2012-06-25 Thread Wei-Ren Chen
On Mon, Jun 25, 2012 at 07:32:39PM +0200, Alexander Graf wrote: > When forwarding a segmentation fault into the guest process, we were passing > the host's address directly into the guest process's signal descriptor. > > That obviously confused the guest process, since it didn't know what to make

Re: [Qemu-devel] [RFC] Attaching EHCI to sysbus.

2012-06-25 Thread Anthony Liguori
On 06/25/2012 08:28 PM, Peter Crosthwaite wrote: On Tue, Jun 26, 2012 at 12:25 AM, Anthony Liguori wrote: On 06/25/2012 05:02 AM, Andreas Färber wrote: Hi Peter, Am 25.06.2012 11:34, schrieb Peter Crosthwaite: I have a platform (Xilinx Zynq) that has a USB EHCI controller that attaches dir

Re: [Qemu-devel] [PATCH v6 08/16] target-or32: Add instruction tanslation

2012-06-25 Thread Jia Liu
Hi Max, On Mon, Jun 25, 2012 at 5:00 PM, Max Filippov wrote: > On Mon, Jun 25, 2012 at 6:50 AM, Jia Liu wrote: >> Hi Max, >> >> On Thu, Jun 21, 2012 at 6:24 PM, Max Filippov wrote: >>> On Thu, Jun 21, 2012 at 6:58 AM, Jia Liu wrote: Add OpenRISC instruction tanslation routines.

Re: [Qemu-devel] [RFC] Attaching EHCI to sysbus.

2012-06-25 Thread Peter Crosthwaite
On Tue, Jun 26, 2012 at 12:25 AM, Anthony Liguori wrote: > On 06/25/2012 05:02 AM, Andreas Färber wrote: >> >> Hi Peter, >> >> Am 25.06.2012 11:34, schrieb Peter Crosthwaite: >>> >>> I have a platform (Xilinx Zynq) that has a USB EHCI controller that >>> attaches directly to the system bus and not

Re: [Qemu-devel] [PATCH v2] Fixes related to processing of qemu's -numa option

2012-06-25 Thread Vinod, Chegu
-Original Message- From: Eduardo Habkost [mailto:ehabk...@redhat.com] Sent: Monday, June 25, 2012 1:01 PM To: Vinod, Chegu Cc: Hada, Craig M; Hull, Jim; qemu-devel@nongnu.org; k...@vger.kernel.org Subject: Re: [Qemu-devel] [PATCH v2] Fixes related to processing of qemu's -numa option J

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

2012-06-25 Thread Anthony Liguori
On 06/25/2012 05:46 PM, Anthony Liguori wrote: 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 g

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

2012-06-25 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 1/4] rng: add RndBackend abstract object class

2012-06-25 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] [RFC PATCH 0/4] virtio-rng and RngBackend infrastructure (v2)

2012-06-25 Thread Anthony Liguori
This series depends on my QOM -object series that I just posted. In Amit's thread on virtio-rng, danpb mentioned that we really ought to have a proper RNG backend infrastructure and of course he's correct on that. Now that we have QOM, I wanted to demonstrate how we can use QOM to construct a com

[Qemu-devel] [PATCH 3/4] rng-egd: introduce EGD compliant RNG backend

2012-06-25 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 +- back

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

2012-06-25 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-urandom,id=rng0 -device virtio-rng-pci,rng=rng0 Signed-off-by: Anthony Liguori --- backends/Makefile.objs |2 +- backends/rng-urandom.c | 144

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

2012-06-25 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

[Qemu-devel] [PATCH 0/4] qdev realize, -object, and -object-late

2012-06-25 Thread Anthony Liguori
As part of implementing the virtio-rng backend support, I decided it was best to split off the generic part of the series to make review easier. This series does a few things. It adds a realized property to DeviceState. It does so in the least invasive way possible and I think this is the right w

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

2012-06-25 Thread 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 a6c4c02..d305128 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -101,7 +101,6 @@ static void bus_add_child(BusState *bus

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

2012-06-25 Thread 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. Signed-off-by: Anthony L

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

2012-06-25 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(+), 0 deletions(-) diff --git a/include/qemu/object.h b/

Re: [Qemu-devel] [RFC 3/3] memory/qmp: add set-memory-merge command

2012-06-25 Thread Anthony Liguori
On 06/25/2012 11:55 AM, Luiz Capitulino wrote: Allow to enable/disable memory merging during run-time. This is implemented by extending the qemu_set_mem_merge() function. To test on HMP: (qemu) set_memory_merge on (qemu) set_memory_merge off Signed-off-by: Luiz Capitulino Is there a r

Re: [Qemu-devel] [RFC 1/3] memory: add -disable-mem-merge command-line option

2012-06-25 Thread Anthony Liguori
On 06/25/2012 03:26 PM, Jan Kiszka wrote: On 2012-06-25 18:55, Luiz Capitulino wrote: Allow for disabling memory merge support (KSM on Linux), which is enabled by default otherwise. -machine mem_merge=on|off? Ack. But any reason not to call it ksm=on|off? Regards, Anthony Liguori Jan

Re: [Qemu-devel] [PATCH 1/4] object: add object_property_add_bool

2012-06-25 Thread Anthony Liguori
On 06/25/2012 03:47 PM, Andreas Färber wrote: Am 25.06.2012 20:35, schrieb Anthony Liguori: On 06/25/2012 11:32 AM, Andreas Färber wrote: Am 25.06.2012 18:09, schrieb Anthony Liguori: diff --git a/qom/object.c b/qom/object.c index 00bb3b0..1357397 100644 --- a/qom/object.c +++ b/qom/object.c @

[Qemu-devel] qemu-system-arm I/O problems

2012-06-25 Thread solar
QEMU emulator version 1.1.0, Copyright (c) 2003-2008 Fabrice Bellard parameters used: qemu-system-arm -M versatilepb -m 256 -net nic -net user,hostfwd=tcp::40022-:22 -nographic -hda debian-6-armel.img -kernel vmlinuz-2.6.32-5-versatile -initrd initrd.img-2.6.32-5-versatile -append "root=/dev/s

Re: [Qemu-devel] [PATCH 1/4] object: add object_property_add_bool

2012-06-25 Thread Andreas Färber
Am 25.06.2012 20:35, schrieb Anthony Liguori: > On 06/25/2012 11:32 AM, Andreas Färber wrote: >> Am 25.06.2012 18:09, schrieb Anthony Liguori: >>> diff --git a/qom/object.c b/qom/object.c >>> index 00bb3b0..1357397 100644 >>> --- a/qom/object.c >>> +++ b/qom/object.c >>> @@ -1232,6 +1232,62 @@ void

Re: [Qemu-devel] [RFC 1/3] memory: add -disable-mem-merge command-line option

2012-06-25 Thread Luiz Capitulino
On Mon, 25 Jun 2012 22:26:58 +0200 Jan Kiszka wrote: > On 2012-06-25 18:55, Luiz Capitulino wrote: > > Allow for disabling memory merge support (KSM on Linux), which is > > enabled by default otherwise. > > -machine mem_merge=on|off? That's possible. But if we do this, then I think that the set

Re: [Qemu-devel] [PATCH] bitops.h: Add field32() and field64() functions to extract bitfields

2012-06-25 Thread Peter Maydell
On 25 June 2012 21:26, malc wrote: > The field32 and field64 are inconsistent w.r.t. grouping, while both are > correct, one has to go through precedence list mentally in the latter > case. Yeah, unintentional and I agree that if you have to think about operator precedence there weren't enough br

Re: [Qemu-devel] [PATCH] kvm: Don't abort on kvm_irqchip_add_msi_route()

2012-06-25 Thread Jan Kiszka
On 2012-06-25 17:40, Alex Williamson wrote: > Anyone using these functions has to be prepared that irqchip > support may not be present. It shouldn't be up to the core > code to determine whether this is a fatal error. Currently > code written as: > > virq = kvm_irqchip_add_msi_route(...) > if (

Re: [Qemu-devel] [RFC 1/3] memory: add -disable-mem-merge command-line option

2012-06-25 Thread Jan Kiszka
On 2012-06-25 18:55, Luiz Capitulino wrote: > Allow for disabling memory merge support (KSM on Linux), which is > enabled by default otherwise. -machine mem_merge=on|off? Jan > > Signed-off-by: Luiz Capitulino > --- > cpu-all.h | 1 + > exec-obsolete.h | 1 + > exec.c | 25 ++

Re: [Qemu-devel] [PATCH] bitops.h: Add field32() and field64() functions to extract bitfields

2012-06-25 Thread malc
On Mon, 25 Jun 2012, Peter Maydell wrote: > Add field32() and field64() functions which extract a particular > bit field from a word and return it. Based on an idea by Jia Liu. > > Suggested-by: Jia Liu > Signed-off-by: Peter Maydell > --- [..snip..] > +static inline uint64_t field64(uint64_t

Re: [Qemu-devel] [PATCH v2] Fixes related to processing of qemu's -numa option

2012-06-25 Thread Eduardo Habkost
Just found another issue: On Wed, Jun 20, 2012 at 05:33:29PM -0300, Eduardo Habkost wrote: [...] > > @@ -970,27 +974,24 @@ static void numa_add(const char *optarg) > > } > > node_mem[nodenr] = sval; > > } > > -if (get_param_value(option, 128, "cpus", opta

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-06-25 Thread Luiz Capitulino
On Thu, 21 Jun 2012 13:42:19 +0100 "Daniel P. Berrange" wrote: [...] > > However, we'd change how we use 'desc' and our error classes. 'desc' would > > become a string which is filled by a printf-like function (see section 2) > > and > > Good, using a printf-like string for desc is the big cha

[Qemu-devel] [PATCH] bitops.h: Add field32() and field64() functions to extract bitfields

2012-06-25 Thread Peter Maydell
Add field32() and field64() functions which extract a particular bit field from a word and return it. Based on an idea by Jia Liu. Suggested-by: Jia Liu Signed-off-by: Peter Maydell --- Jia Liu had a function like this in the OpenRISC support patchset; this implementation borrows the API but has

Re: [Qemu-devel] USB passthrough filters - how to deny passing certain devices?

2012-06-25 Thread Erik Rull
Hans de Goede wrote: Hi, On 06/25/2012 06:17 PM, Erik Rull wrote: Hi all, is there a way to deny passing certain devices to the guest? I want to deny two devices to get assigned to the guest, all others on all ports are allowed, ony two each with a defined pid/vid should not get routed. Provid

Re: [Qemu-devel] Add virtual devices to QEMU

2012-06-25 Thread Alberich de megres
Thank you guys for the reply :) One last question, my device is like a physical console with buttons and indicators. I saw the android emulator also draws the keyboard using a modified version of the qemu. Is there some kind of "presentation" layer, or the just modified the window size and add it

Re: [Qemu-devel] [PATCH 1/4] object: add object_property_add_bool

2012-06-25 Thread Anthony Liguori
On 06/25/2012 11:32 AM, Andreas Färber wrote: Am 25.06.2012 18:09, schrieb Anthony Liguori: Signed-off-by: Anthony Liguori --- include/qemu/object.h | 16 ++ qom/object.c | 56 + 2 files changed, 72 insertions(+), 0 del

Re: [Qemu-devel] [PATCH v2 1/4] targphys.h: Define TARGET_PRI*PHYS format specifier macros

2012-06-25 Thread Eric Blake
On 06/25/2012 10:40 AM, Andreas Färber wrote: > Am 25.06.2012 17:52, schrieb Peter Maydell: >> Define a set of TARGET_PRI*PHYS format specifier macros for working >> with target_phys_addr_t types. These follow the standard pattern >> for such macros, and are more flexible than TARGET_FMT_plx, which

Re: [Qemu-devel] USB passthrough filters - how to deny passing certain devices?

2012-06-25 Thread Hans de Goede
Hi, On 06/25/2012 06:17 PM, Erik Rull wrote: Hi all, is there a way to deny passing certain devices to the guest? I want to deny two devices to get assigned to the guest, all others on all ports are allowed, ony two each with a defined pid/vid should not get routed. Providing a positive list

[Qemu-devel] KVM call agenda for Tuesday, June 26

2012-06-25 Thread Juan Quintela
Hi Please send in any agenda items you are interested in covering. jbaron suggested: q35, what are the mergin dependences? Later, Juan.

Re: [Qemu-devel] [PATCH] linux-user: fix segmentation fault passing with g2h(x) != x

2012-06-25 Thread Peter Maydell
On 25 June 2012 18:32, Alexander Graf wrote: > When forwarding a segmentation fault into the guest process, we were passing > the host's address directly into the guest process's signal descriptor. > > That obviously confused the guest process, since it didn't know what to make > of the (usually 3

[Qemu-devel] [PATCH] linux-user: fix segmentation fault passing with g2h(x) != x

2012-06-25 Thread Alexander Graf
When forwarding a segmentation fault into the guest process, we were passing the host's address directly into the guest process's signal descriptor. That obviously confused the guest process, since it didn't know what to make of the (usually 32-bit truncated) address. Passing in g2h(address) makes

Re: [Qemu-devel] [PATCH v4 7/7] osdep: Enable qemu_open to dup pre-opened fd

2012-06-25 Thread Corey Bryant
On 06/25/2012 11:26 AM, Kevin Wolf wrote: Am 25.06.2012 16:34, schrieb Eric Blake: Also, I noticed in the fnctl man page that F_SETFL: "On Linux this command can change only the O_APPEND, O_ASYNC, O_DIRECT, O_NOATIME, and O_NONBLOCK flags." So I'll only set/unset these flags. O_NDELAY is t

[Qemu-devel] [RFC 0/3]: allow to enable/disable KSM per VM

2012-06-25 Thread Luiz Capitulino
Today, QEMU enables KSM by default if the (Linux) host supports it. However, it may be desirable by mngt apps to not enable it by default and also to be able to enable or disable KSM at run-time. This series allows this by adding the -disable-mem-merge command-line option and the set-memory-merge

[Qemu-devel] [RFC 3/3] memory/qmp: add set-memory-merge command

2012-06-25 Thread Luiz Capitulino
Allow to enable/disable memory merging during run-time. This is implemented by extending the qemu_set_mem_merge() function. To test on HMP: (qemu) set_memory_merge on (qemu) set_memory_merge off Signed-off-by: Luiz Capitulino --- exec.c | 15 +++ hmp-commands.hx | 1

[Qemu-devel] [RFC 2/3] memory: add RAM_MERGEABLE flag to RAMBlock

2012-06-25 Thread Luiz Capitulino
Will be used by the next commit. Signed-off-by: Luiz Capitulino --- cpu-all.h | 1 + exec.c| 3 +++ 2 files changed, 4 insertions(+) diff --git a/cpu-all.h b/cpu-all.h index 429c1c3..9a36f7e 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -469,6 +469,7 @@ extern ram_addr_t ram_size; /* RAM is

[Qemu-devel] [RFC 1/3] memory: add -disable-mem-merge command-line option

2012-06-25 Thread Luiz Capitulino
Allow for disabling memory merge support (KSM on Linux), which is enabled by default otherwise. Signed-off-by: Luiz Capitulino --- cpu-all.h | 1 + exec-obsolete.h | 1 + exec.c | 25 + memory.c| 5 + memory.h| 5 + qemu-options.

Re: [Qemu-devel] [PATCH v2 4/4] monitor: Use TARGET_PRI*PHYS to avoid TARGET_PHYS_ADDR_BITS ifdef

2012-06-25 Thread Andreas Färber
Am 25.06.2012 17:52, schrieb Peter Maydell: > Now we have TARGET_PRI*PHYS for printing target_phys_addr_t values, > we can use them in monitor.c rather than having duplicate code > in two arms of a TARGET_PHYS_ADDR_BITS ifdef. > > Signed-off-by: Peter Maydell Reviewed-by: Andreas Färber /-F -

Re: [Qemu-devel] [PATCH v2 3/4] hw/sh_serial: Use TARGET_PRIxPHYS rather than %x for physaddr

2012-06-25 Thread Andreas Färber
Am 25.06.2012 17:52, schrieb Peter Maydell: > Switch a format string from %x to TARGET_PRIxPHYS so that it will > continue to work even if target_phys_addr_t is changed > to 64 bits in the future. > > Signed-off-by: Peter Maydell Reviewed-by: Andreas Färber /-F -- SUSE LINUX Products GmbH, M

[Qemu-devel] [PATCH 3/4] rng: add dev-rng interface for creating a rng backend from /dev/urandom

2012-06-25 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- backends/Makefile.objs |2 +- backends/devrng.c | 139 2 files changed, 140 insertions(+), 1 deletions(-) create mode 100644 backends/devrng.c diff --git a/backends/Makefile.objs b/backends/Makefile.ob

Re: [Qemu-devel] [PATCH v2 2/4] hw/omap.h: Use TARGET_PRIxPHYS to define OMAP_FMT_plx

2012-06-25 Thread Andreas Färber
Am 25.06.2012 17:52, schrieb Peter Maydell: > Use the new TARGET_PRIxPHYS macro to avoid the need to define an > OMAP_FMT_plx macro whose expansion depends directly on > TARGET_PHYS_ADDR_BITS. > > Signed-off-by: Peter Maydell Acked-by: Andreas Färber /-F -- SUSE LINUX Products GmbH, Maxfelds

Re: [Qemu-devel] [PATCH v2 1/4] targphys.h: Define TARGET_PRI*PHYS format specifier macros

2012-06-25 Thread Andreas Färber
Am 25.06.2012 17:52, schrieb Peter Maydell: > Define a set of TARGET_PRI*PHYS format specifier macros for working > with target_phys_addr_t types. These follow the standard pattern > for such macros, and are more flexible than TARGET_FMT_plx, which > does not allow specification of field widths. >

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

2012-06-25 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] [RFC PATCH 0/4] virtio-rng and RngBackend infrastructure

2012-06-25 Thread Anthony Liguori
In Amit's thread on virtio-rng, danpb mentioned that we really ought to have a proper RNG backend infrastructure and of course he's correct on that. Now that we have QOM, I wanted to demonstrate how we can use QOM to construct a complete backend without adding any new infrastructure. For this RFC

Re: [Qemu-devel] [PATCH 1/4] object: add object_property_add_bool

2012-06-25 Thread Andreas Färber
Am 25.06.2012 18:09, schrieb 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/qe

Re: [Qemu-devel] net: RFC New Socket-Based, Switched Network Backend (QDES)

2012-06-25 Thread Mike Lovell
On 06/25/2012 09:33 AM, Mike Lovell wrote: On 06/25/2012 04:40 AM, Stefan Hajnoczi wrote: Have you looked at QEMU's net/vde.c backend? Does VDE (http://vde.sourceforge.net/) already do everything that QDES does? Stefan I have looked at VDE and used it for a few things. I think QDES has an

Re: [Qemu-devel] [PATCH v4 7/7] osdep: Enable qemu_open to dup pre-opened fd

2012-06-25 Thread Corey Bryant
On 06/25/2012 10:34 AM, Eric Blake wrote: On 06/25/2012 08:24 AM, Corey Bryant wrote: +if (fcntl_setfl(ret, O_CLOEXEC, (flags & O_CLOEXEC) ? 1 : 0) < 0) { Broken. O_CLOEXEC _only_ affects open(); to change it on an existing fd, you have to use fcntl(F_GETFD/F_SETFD) (not F_GETF

Re: [Qemu-devel] Add virtual devices to QEMU

2012-06-25 Thread Andreas Färber
Hello, Am 25.06.2012 12:59, schrieb Alberich de megres: > Together with some colleagues, we are developing a USB hardware. But > as the prototype is not ready to be built, and is not cheap, > or idea is to develop at the same time a virtual device for the qemu. > > I searched for documentation ab

[Qemu-devel] USB passthrough filters - how to deny passing certain devices?

2012-06-25 Thread Erik Rull
Hi all, is there a way to deny passing certain devices to the guest? I want to deny two devices to get assigned to the guest, all others on all ports are allowed, ony two each with a defined pid/vid should not get routed. Providing a positive list would exceed the max. command line parameter l

Re: [Qemu-devel] [PATCH v4 3/7] qapi: Add pass-fd QMP command

2012-06-25 Thread Corey Bryant
On 06/25/2012 11:34 AM, Kevin Wolf wrote: Am 25.06.2012 16:51, schrieb Corey Bryant: Thanks for catching this. I'll fix this in v5. In terms of platforms that support dup3 vs dup2, I'm assuming the following preprocessor checks will do what we need: #if defined(__linux__) || defined(__CYGWI

Re: [Qemu-devel] [PATCH v4 7/7] osdep: Enable qemu_open to dup pre-opened fd

2012-06-25 Thread Corey Bryant
On 06/25/2012 10:34 AM, Eric Blake wrote: On 06/25/2012 08:24 AM, Corey Bryant wrote: +if (fcntl_setfl(ret, O_CLOEXEC, (flags & O_CLOEXEC) ? 1 : 0) < 0) { Broken. O_CLOEXEC _only_ affects open(); to change it on an existing fd, you have to use fcntl(F_GETFD/F_SETFD) (not F_GETF

Re: [Qemu-devel] [PATCH v4 3/7] qapi: Add pass-fd QMP command

2012-06-25 Thread Eric Blake
On 06/25/2012 09:34 AM, Kevin Wolf wrote: > Am 25.06.2012 16:51, schrieb Corey Bryant: >> Thanks for catching this. I'll fix this in v5. In terms of platforms >> that support dup3 vs dup2, I'm assuming the following preprocessor >> checks will do what we need: >> >> #if defined(__linux__) || de

[Qemu-devel] [PATCH 1/4] object: add object_property_add_bool

2012-06-25 Thread 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 index 8b17776..3711054 1006

[Qemu-devel] [PATCH 2/4] rng: add RndBackend abstract object class

2012-06-25 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 | 84 include/qemu/rng.h | 83 +++

Re: [Qemu-devel] [PATCH stable-1.1 00/26] Initial tree and candidates for stable-1.1

2012-06-25 Thread Michael Roth
On Mon, Jun 25, 2012 at 05:14:08PM +0200, Kevin Wolf wrote: > Am 25.06.2012 16:14, schrieb Michael Roth: > > On Mon, Jun 25, 2012 at 02:58:40PM +0200, Kevin Wolf wrote: > >> Am 23.06.2012 02:33, schrieb Michael Roth: > >>> Hi everyone, > >>> > >>> I've set up a tree for stable-1.1 at: > >>> > >>> g

[Qemu-devel] [PATCH v2 1/4] targphys.h: Define TARGET_PRI*PHYS format specifier macros

2012-06-25 Thread Peter Maydell
Define a set of TARGET_PRI*PHYS format specifier macros for working with target_phys_addr_t types. These follow the standard pattern for such macros, and are more flexible than TARGET_FMT_plx, which does not allow specification of field widths. Suggested-by: Andreas Färber Signed-off-by: Peter Ma

[Qemu-devel] [PATCH v2 0/4] Define and use TARGET_PRI*PHYS format specifier macros for target_phys_addr_t

2012-06-25 Thread Peter Maydell
This patchset defines a set of macros for use in printf format strings for handling target_phys_addr_t values, as suggested by Andreas Färber (http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg01547.html) We can then use them in some places which were previously either making assumptions abo

[Qemu-devel] [PATCH v2 2/4] hw/omap.h: Use TARGET_PRIxPHYS to define OMAP_FMT_plx

2012-06-25 Thread Peter Maydell
Use the new TARGET_PRIxPHYS macro to avoid the need to define an OMAP_FMT_plx macro whose expansion depends directly on TARGET_PHYS_ADDR_BITS. Signed-off-by: Peter Maydell --- hw/omap.h |8 +--- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/hw/omap.h b/hw/omap.h index 3d

[Qemu-devel] [PATCH v2 3/4] hw/sh_serial: Use TARGET_PRIxPHYS rather than %x for physaddr

2012-06-25 Thread Peter Maydell
Switch a format string from %x to TARGET_PRIxPHYS so that it will continue to work even if target_phys_addr_t is changed to 64 bits in the future. Signed-off-by: Peter Maydell --- hw/sh_serial.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/sh_serial.c b/hw/sh_

Re: [Qemu-devel] [RFC 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test

2012-06-25 Thread Stefan Hajnoczi
On Mon, Jun 25, 2012 at 4:10 PM, Kevin Wolf wrote: > Am 22.06.2012 17:08, schrieb Stefan Hajnoczi: >> +echo >> +echo "== Read-only access must still work ==" >> + >> +$QEMU_IO -r -c "read -P 0x5a 0 512" $TEST_IMG | _filter_qemu_io > > I would add a check here that the dirty bit is still set. > > M

Re: [Qemu-devel] [RFC 3/7] docs: add lazy refcounts bit to qcow2 specification

2012-06-25 Thread Stefan Hajnoczi
On Mon, Jun 25, 2012 at 3:35 PM, Kevin Wolf wrote: > Am 22.06.2012 17:08, schrieb Stefan Hajnoczi: >> The lazy refcounts bit indicates that this image can take advantage of >> the dirty bit and that refcount updates can be postponed. >> >> Signed-off-by: Stefan Hajnoczi >> --- >>  docs/specs/qcow

[Qemu-devel] [PATCH v2 4/4] monitor: Use TARGET_PRI*PHYS to avoid TARGET_PHYS_ADDR_BITS ifdef

2012-06-25 Thread Peter Maydell
Now we have TARGET_PRI*PHYS for printing target_phys_addr_t values, we can use them in monitor.c rather than having duplicate code in two arms of a TARGET_PHYS_ADDR_BITS ifdef. Signed-off-by: Peter Maydell --- monitor.c | 29 - 1 files changed, 4 insertions(+), 25 d

Re: [Qemu-devel] [RFC 2/7] qcow2: introduce dirty bit

2012-06-25 Thread Stefan Hajnoczi
On Mon, Jun 25, 2012 at 3:18 PM, Kevin Wolf wrote: > Am 22.06.2012 17:08, schrieb Stefan Hajnoczi: >> This patch adds an incompatible feature bit to mark images that have not >> been closed cleanly.  When a dirty image file is opened a consistency >> check and repair is performed. >> >> Signed-off

Re: [Qemu-devel] [RFC 0/7] qcow2: implement lazy refcounts optimization

2012-06-25 Thread Stefan Hajnoczi
On Mon, Jun 25, 2012 at 3:06 PM, Zhi Yong Wu wrote: > On Fri, Jun 22, 2012 at 11:08 PM, Stefan Hajnoczi > wrote: >> This series aims to improve qcow2 performance with cache=writethrough and >> cache=directsync.  In particular it reduces the impact of metadata updates >> for > What does cache=dir

Re: [Qemu-devel] Add virtual devices to QEMU

2012-06-25 Thread Stefan Hajnoczi
On Mon, Jun 25, 2012 at 11:59 AM, Alberich de megres wrote: > Together with some colleagues, we are developing a USB hardware. But > as the prototype is not ready to be built, and is not cheap, > or idea is to develop at the same time a virtual device for the qemu. > > I searched for documentation

[Qemu-devel] [PATCH] kvm: Don't abort on kvm_irqchip_add_msi_route()

2012-06-25 Thread Alex Williamson
Anyone using these functions has to be prepared that irqchip support may not be present. It shouldn't be up to the core code to determine whether this is a fatal error. Currently code written as: virq = kvm_irqchip_add_msi_route(...) if (virq < 0) { } else { } works on x86 with and wi

Re: [Qemu-devel] [PATCH v4 3/7] qapi: Add pass-fd QMP command

2012-06-25 Thread Kevin Wolf
Am 25.06.2012 16:51, schrieb Corey Bryant: > Thanks for catching this. I'll fix this in v5. In terms of platforms > that support dup3 vs dup2, I'm assuming the following preprocessor > checks will do what we need: > > #if defined(__linux__) || defined(__CYGWIN__) > dup3(fd, monfd->fd, O_CLOEXE

Re: [Qemu-devel] net: RFC New Socket-Based, Switched Network Backend (QDES)

2012-06-25 Thread Mike Lovell
On 06/25/2012 04:40 AM, Stefan Hajnoczi wrote: On Mon, Jun 25, 2012 at 6:42 AM, Mike Lovell wrote: This is what I've been calling QDES or QEMU Distributed Ethernet Switch. I first had the idea when I was playing with the udp and mcast socket network backends while exploring how to build a VM in

Re: [Qemu-devel] [PATCH v4 3/7] qapi: Add pass-fd QMP command

2012-06-25 Thread Corey Bryant
On 06/22/2012 04:24 PM, Eric Blake wrote: On 06/22/2012 12:36 PM, Corey Bryant wrote: This patch adds the pass-fd QMP command using the QAPI framework. Like the getfd command, it is used to pass a file descriptor via SCM_RIGHTS and associate it with a name. However, the pass-fd command also r

Re: [Qemu-devel] [PATCH v4 7/7] osdep: Enable qemu_open to dup pre-opened fd

2012-06-25 Thread Kevin Wolf
Am 25.06.2012 16:34, schrieb Eric Blake: >> Also, I noticed in the fnctl man page that F_SETFL: "On Linux this >> command can change only the O_APPEND, O_ASYNC, O_DIRECT, O_NOATIME, and >> O_NONBLOCK flags." So I'll only set/unset these flags. > > O_NDELAY is the obsolete spelling of O_NONBLOCK;

[Qemu-devel] Add virtual devices to QEMU

2012-06-25 Thread Alberich de megres
Hello, Together with some colleagues, we are developing a USB hardware. But as the prototype is not ready to be built, and is not cheap, or idea is to develop at the same time a virtual device for the qemu. I searched for documentation about the USB layer on qemu but I could not find a good point

Re: [Qemu-devel] [PATCH stable-1.1 00/26] Initial tree and candidates for stable-1.1

2012-06-25 Thread Kevin Wolf
Am 25.06.2012 16:14, schrieb Michael Roth: > On Mon, Jun 25, 2012 at 02:58:40PM +0200, Kevin Wolf wrote: >> Am 23.06.2012 02:33, schrieb Michael Roth: >>> Hi everyone, >>> >>> I've set up a tree for stable-1.1 at: >>> >>> git://github.com/mdroth/qemu.git stable-1.1 >>> >>> That is simply the initia

Re: [Qemu-devel] [RFC 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test

2012-06-25 Thread Kevin Wolf
Am 22.06.2012 17:08, schrieb Stefan Hajnoczi: > This tests establishes the basic post-conditions of the qcow2 lazy > refcounts features: > > 1. If the image was closed normally, it is marked clean. > > 2. If an allocating write was performed and the image was not close > normally, then i

Re: [Qemu-devel] [PATCH 0/4] Define and use PRI*PLX format specifier macros for target_phys_addr_t

2012-06-25 Thread Andreas Färber
Am 25.06.2012 16:54, schrieb Peter Maydell: > On 25 June 2012 15:43, Andreas Färber wrote: >> Am 25.06.2012 16:10, schrieb Peter Maydell: >>> On 25 June 2012 14:48, Andreas Färber wrote: Thus I would suggest TARGET_PRIdPHYSADDR, also addressing Eric's comment. Judging from patches 2-4 i

Re: [Qemu-devel] [RFC 5/7] qcow2: implement lazy refcounts

2012-06-25 Thread Kevin Wolf
Am 22.06.2012 17:08, schrieb Stefan Hajnoczi: > Lazy refcounts is a performance optimization for qcow2 that postpones > refcount metadata updates and instead marks the image dirty. In the > case of crash or power failure the image will be left in a dirty state > and repaired next time it is opened

[Qemu-devel] [PATCH] disas: Fix printing of addresses in disassembly

2012-06-25 Thread Peter Maydell
In our disassembly code, the bfd_vma type is always 64 bits, even if the target's virtual address width is only 32 bits. This means that when we print out addresses we need to truncate them to 32 bits, to avoid odd output which has incorrectly sign-extended a value to 64 bits, for instance this ARM

Re: [Qemu-devel] [PATCH 0/4] Define and use PRI*PLX format specifier macros for target_phys_addr_t

2012-06-25 Thread Peter Maydell
On 25 June 2012 15:43, Andreas Färber wrote: > Am 25.06.2012 16:10, schrieb Peter Maydell: >> On 25 June 2012 14:48, Andreas Färber wrote: >>> Thus I would suggest TARGET_PRIdPHYSADDR, also addressing Eric's >>> comment. Judging from patches 2-4 it's not used to frequently unlike its >>> user TAR

Re: [Qemu-devel] [PATCH 0/4] Define and use PRI*PLX format specifier macros for target_phys_addr_t

2012-06-25 Thread Andreas Färber
Am 25.06.2012 16:10, schrieb Peter Maydell: > On 25 June 2012 14:48, Andreas Färber wrote: >> Am 25.06.2012 14:45, schrieb Peter Maydell: >>> This patchset defines a set of macros for use in printf format strings >>> for handling target_phys_addr_t values, as suggested by Andreas Färber >>> (http:

Re: [Qemu-devel] [RFC 3/7] docs: add lazy refcounts bit to qcow2 specification

2012-06-25 Thread Kevin Wolf
Am 22.06.2012 17:08, schrieb Stefan Hajnoczi: > The lazy refcounts bit indicates that this image can take advantage of > the dirty bit and that refcount updates can be postponed. > > Signed-off-by: Stefan Hajnoczi > --- > docs/specs/qcow2.txt |6 +- > 1 file changed, 5 insertions(+), 1 d

Re: [Qemu-devel] [PATCH v4 7/7] osdep: Enable qemu_open to dup pre-opened fd

2012-06-25 Thread Eric Blake
On 06/25/2012 08:24 AM, Corey Bryant wrote: >>> +if (fcntl_setfl(ret, O_CLOEXEC, (flags & O_CLOEXEC) ? 1 >>> : 0) < 0) { >> >> Broken. O_CLOEXEC _only_ affects open(); to change it on an existing >> fd, you have to use fcntl(F_GETFD/F_SETFD) (not F_GETFL/F_SETFL). >> >> > > I'll fix

Re: [Qemu-devel] [PATCH v4 7/7] osdep: Enable qemu_open to dup pre-opened fd

2012-06-25 Thread Corey Bryant
On 06/22/2012 03:58 PM, Eric Blake wrote: On 06/22/2012 12:36 PM, Corey Bryant wrote: This patch adds support to qemu_open to dup(fd) a pre-opened file descriptor if the filename is of the format /dev/fd/X. This can be used when QEMU is restricted from opening files, and the management applic

Re: [Qemu-devel] [RFC] Attaching EHCI to sysbus.

2012-06-25 Thread Anthony Liguori
On 06/25/2012 05:02 AM, Andreas Färber wrote: Hi Peter, Am 25.06.2012 11:34, schrieb Peter Crosthwaite: I have a platform (Xilinx Zynq) that has a USB EHCI controller that attaches directly to the system bus and not through PCI. We are looking for a way to disentangle EHCI from PCI - currently

Re: [Qemu-devel] [RFC 2/7] qcow2: introduce dirty bit

2012-06-25 Thread Kevin Wolf
Am 22.06.2012 17:08, schrieb Stefan Hajnoczi: > This patch adds an incompatible feature bit to mark images that have not > been closed cleanly. When a dirty image file is opened a consistency > check and repair is performed. > > Signed-off-by: Stefan Hajnoczi > --- > block/qcow2.c | 44 ++

  1   2   >