[Qemu-devel] Watching Resource consumption of guest from Qemu ?

2013-10-17 Thread Sunil Agham
Hello List, I am a graduate student trying to learn about virtualization. I wanted to understand if there is any way to tell about resource consumption of guest through Qemu ? e.g. if guest starts doing something cpu intensive, would qemu be aware of that ? or is there a way to detect that from

Re: [Qemu-devel] PPC: Timer issues with git master

2013-10-17 Thread Mark Cave-Ayland
On 11/10/13 09:44, Paolo Bonzini wrote: I've just upgraded my git repository from around the 1.6 release timeframe to git master and I'm seeing some strange timing issues running through my OpenBIOS test suite which weren't there before my git update. The two most noticeable changes are in

[Qemu-devel] [PATCH uq/master] KVM: x86: fix typo in KVM_GET_XCRS

2013-10-17 Thread Paolo Bonzini
Only the first item of the array was ever looked at. No practical effect, but still worth fixing. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- target-i386/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index

Re: [Qemu-devel] [PATCH v7 0/3] hw/arm: Add 'virt' platform

2013-10-17 Thread Tom Sutcliffe
On 17 Oct 2013, at 15:30, Peter Maydell peter.mayd...@linaro.org wrote: On 15 October 2013 16:14, Tom Sutcliffe tom.sutcli...@bromium.com wrote: On 15 Oct 2013, at 16:00, Peter Maydell peter.mayd...@linaro.org wrote: On 15 October 2013 15:58, Tom Sutcliffe tom.sutcli...@bromium.com wrote:

Re: [Qemu-devel] PPC: Timer issues with git master

2013-10-17 Thread Paolo Bonzini
Il 17/10/2013 16:40, Mark Cave-Ayland ha scritto: Hi Paolo, I've just attempted a bisection testing HelenOS, but I'm struggling to get a consistent result. Even with the same binary across multiple runs then sometimes I see the issue with frequent timer pauses, and sometimes I don't which

Re: [Qemu-devel] [PATCH v14 2/8] make.rule: fix $(obj) to a real relative path

2013-10-17 Thread Paolo Bonzini
Il 16/10/2013 05:26, Fam Zheng ha scritto: Makefile.target includes rule.mak and unnested common-obj-y, then prefix them with '../', this will ignore object specific QEMU_CFLAGS in subdir Makefile.objs: $(obj)/curl.o: QEMU_CFLAGS += $(CURL_CFLAGS) Because $(obj) here is './block',

Re: [Qemu-devel] [PATCH v7 0/3] hw/arm: Add 'virt' platform

2013-10-17 Thread Peter Maydell
On 17 October 2013 15:49, Tom Sutcliffe tom.sutcli...@bromium.com wrote: On 17 Oct 2013, at 15:30, Peter Maydell peter.mayd...@linaro.org wrote: On 15 October 2013 16:14, Tom Sutcliffe tom.sutcli...@bromium.com wrote: On 15 Oct 2013, at 16:00, Peter Maydell peter.mayd...@linaro.org wrote: Oh

[Qemu-devel] [PATCH] net: disallow to specify multicast MAC address

2013-10-17 Thread Dmitry Krivenok
Added explicit check of MAC address specified via macaddr option. Multicast MAC addresses are no longer allowed. This fixes bug #495566. Signed-off-by: Dmitry V. Krivenok krivenok.dmi...@gmail.com --- net/net.c | 5 + net/util.c | 5 + net/util.h | 2 ++ 3 files changed, 12

Re: [Qemu-devel] PPC: Timer issues with git master

2013-10-17 Thread Mark Cave-Ayland
On 17/10/13 15:53, Paolo Bonzini wrote: Hi Paolo, I've just attempted a bisection testing HelenOS, but I'm struggling to get a consistent result. Even with the same binary across multiple runs then sometimes I see the issue with frequent timer pauses, and sometimes I don't which makes tracking

Re: [Qemu-devel] [PATCH] net: disallow to specify multicast MAC address

2013-10-17 Thread Eric Blake
On 10/17/2013 09:06 AM, Dmitry Krivenok wrote: Added explicit check of MAC address specified via macaddr option. Multicast MAC addresses are no longer allowed. This fixes bug #495566. Signed-off-by: Dmitry V. Krivenok krivenok.dmi...@gmail.com --- } + +bool

[Qemu-devel] [PATCH v3 2/6] tcg-ppc64: Use qemu_getauxval

2013-10-17 Thread Richard Henderson
Allow host detection on linux systems without glibc 2.16 or later. Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Richard Henderson r...@twiddle.net --- include/elf.h | 34 ++ tcg/ppc64/tcg-target.c | 11 ++- 2 files changed,

[Qemu-devel] [PATCH v3 1/6] osdep: Create qemu_getauxval and qemu_init_auxval

2013-10-17 Thread Richard Henderson
Abstract away dependence on a system implementation of getauxval. Signed-off-by: Richard Henderson r...@twiddle.net --- include/qemu/osdep.h | 25 ++ linux-user/main.c| 1 + util/Makefile.objs | 1 + util/getauxval.c | 74

[Qemu-devel] [PATCH v3 4/6] tcg-s390: Use qemu_getauxval in query_facilities

2013-10-17 Thread Richard Henderson
No need to set up a SIGILL signal handler for detection anymore. Remove a ton of sanity checks that must be true, given that we're requiring a 64-bit build (the note about 31-bit KVM is satisfied by configuring with TCI). Signed-off-by: Richard Henderson r...@twiddle.net --- include/elf.h

[Qemu-devel] [PATCH v3 5/6] util: Use qemu_getauxval in linux qemu_cache_utils_init

2013-10-17 Thread Richard Henderson
With this we no longer pass down envp, and thus all systems can have the same void prototype. So also eliminate a useless thunk. Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Richard Henderson r...@twiddle.net --- include/qemu/cache-utils.h | 4 ++-- linux-user/main.c

[Qemu-devel] [PATCH v3 3/6] tcg-arm: Use qemu_getauxval

2013-10-17 Thread Richard Henderson
Allow host detection on linux systems without glibc 2.16 or later. Signed-off-by: Richard Henderson r...@twiddle.net --- include/elf.h| 25 + tcg/arm/tcg-target.c | 14 +- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/include/elf.h

Re: [Qemu-devel] PPC: Timer issues with git master

2013-10-17 Thread Alex Bligh
Mark, On 17 Oct 2013, at 16:16, Mark Cave-Ayland wrote: I've tried it with FreeBSD and it doesn't make any difference; the fix doesn't matter for the HelenOS regression as that timer is only setup for -M mac99. To summarise what I've found today with HelenOS: I see failures with both 1.6

Re: [Qemu-devel] [PATCH v3 6/6] linux-user: Use qemu_getauxval for AT_EXECFD

2013-10-17 Thread Peter Maydell
On 17 October 2013 16:29, Richard Henderson r...@twiddle.net wrote: Signed-off-by: Richard Henderson r...@twiddle.net Reviewed-by: Peter Maydell peter.mayd...@linaro.org -- PMM

Re: [Qemu-devel] [PATCH v3 1/6] osdep: Create qemu_getauxval and qemu_init_auxval

2013-10-17 Thread Peter Maydell
On 17 October 2013 16:29, Richard Henderson r...@twiddle.net wrote: Abstract away dependence on a system implementation of getauxval. Signed-off-by: Richard Henderson r...@twiddle.net Reviewed-by: Peter Maydell peter.mayd...@linaro.org -- PMM

[Qemu-devel] [PULL 0/5] Configury/build system patches for 1.7

2013-10-17 Thread Paolo Bonzini
Anthony, The following changes since commit 39c153b80f890dc5f02465dc59992e195abd5f40: Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging (2013-10-10 13:16:25 -0700) are available in the git repository at: git://github.com/bonzini/qemu.git configure for you to

[Qemu-devel] [PULL 4/5] default-configs/: CONFIG_GDBSTUB_XML removed

2013-10-17 Thread Paolo Bonzini
From: Ákos Kovács akoskov...@gmx.com Makefile.target: Build gdbstub-xml.o only when TARGET_XML_FILES is not empty. Signed-off-by: Ákos Kovács akoskov...@gmx.com Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- Makefile.target

[Qemu-devel] [PULL 1/5] rules.mak: New logical functions for handling y/n values

2013-10-17 Thread Paolo Bonzini
From: Peter Maydell peter.mayd...@linaro.org Add new logical functions for handling y/n values like those we use in CONFIG_FOO variables: lnot : logical NOT land : logical AND lor : logical OR lxor : logical XOR leqv : logical equality, inverse of lxor lif : like Make's $(if) but with an

[Qemu-devel] [PULL 5/5] ui/Makefile.objs: delete unnecessary cocoa.o dependency

2013-10-17 Thread Paolo Bonzini
From: Peter Maydell peter.mayd...@linaro.org Delete an unnecessary dependency for cocoa.o; we already have a general rule that tells Make that we can build a .o file from a .m source using an ObjC compiler, so this specific rule is unnecessary. Further, it is using the dubious construct

[Qemu-devel] [PULL 2/5] rules.mak: New string testing functions

2013-10-17 Thread Paolo Bonzini
From: Peter Maydell peter.mayd...@linaro.org Add new string testing functions which return a y/n result: eq : are two strings equal (ignoring leading/trailing space)? ne : are two strings unequal? isempty : is a string empty? notempty : is a string non-empty? Based on an idea by Ákos Kovács

[Qemu-devel] [PULL 3/5] Makefile.target: CONFIG_NO_* variables removed

2013-10-17 Thread Paolo Bonzini
From: Ákos Kovács akoskov...@gmx.com CONFIG_NO_* variables replaced with the lnot logical function Signed-off-by: Ákos Kovács akoskov...@gmx.com [PMM: fixed a few CONFIG_NO_* uses that were missed] Signed-off-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH v3 6/6] linux-user: Use qemu_getauxval for AT_EXECFD

2013-10-17 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- linux-user/main.c | 32 ++-- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 50db755..54f71fe 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@

[Qemu-devel] [PATCH v3 0/6] Improve getauxval support

2013-10-17 Thread Richard Henderson
Changes from v2: * Rebase for trivial conflicts * Fix codingstyle errors * Drop the static fallback code * Use getauxval for AT_EXECFD r~ Richard Henderson (6): osdep: Create qemu_getauxval and qemu_init_auxval tcg-ppc64: Use qemu_getauxval tcg-arm: Use qemu_getauxval

[Qemu-devel] [PULL 05/17] vga: Mark relevant portio lists regions as coalesced MMIO flushing

2013-10-17 Thread Paolo Bonzini
From: Jan Kiszka jan.kis...@siemens.com This allows to remove the explicit qemu_flush_coalesced_mmio_buffer calls. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/display/qxl.c | 1 + hw/display/vga.c | 5 + 2 files changed, 2

[Qemu-devel] [PULL 01/17] memory: fix 128 arithmetic in info mtree

2013-10-17 Thread Paolo Bonzini
From: Alexey Kardashevskiy a...@ozlabs.ru mtree_print_mr() calls int128_get64() in 3 places but only 2 places handle 2^64 correctly. This fixes the third call of int128_get64(). Cc: qemu-sta...@nongnu.org Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Signed-off-by: Paolo Bonzini

[Qemu-devel] [PULL 00/17] Memory/threading changes for 1.7

2013-10-17 Thread Paolo Bonzini
Anthony, The following changes since commit 1680d485777ecf436d724631ea8722cc0c66990e: Merge remote-tracking branch 'rth/tcg-ldst-6' into staging (2013-10-14 09:59:59 -0700) are available in the git repository at: git://github.com/bonzini/qemu.git iommu-for-anthony for you to fetch

[Qemu-devel] [PULL 02/17] compatfd: switch to QemuThread

2013-10-17 Thread Paolo Bonzini
From: Jan Kiszka jan.kis...@siemens.com qemu_thread_create already does signal blocking and detaching for us. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- util/compatfd.c | 16 +++- 1 file changed, 3 insertions(+), 13

[Qemu-devel] [PULL 03/17] portio: Allow to mark portio lists as coalesced MMIO flushing

2013-10-17 Thread Paolo Bonzini
From: Jan Kiszka jan.kis...@siemens.com This will enable us to remove all remaining explicit calls of qemu_flush_coalesced_mmio_buffer in IO handlers. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/exec/ioport.h | 2 ++ ioport.c

[Qemu-devel] [PULL 10/17] timer: extract timer_mod_ns_locked and timerlist_rearm

2013-10-17 Thread Paolo Bonzini
These will be reused in timer_mod_anticipate functions. Reviewed-by: Alex Bligh a...@alex.org.uk Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-timer.c | 51 --- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git

[Qemu-devel] [PULL 06/17] seqlock: introduce read-write seqlock

2013-10-17 Thread Paolo Bonzini
Seqlock implementation for QEMU. Usage idiom reader: do { start = seqlock_read_begin(sl); ... } while (seqlock_read_retry(sl, start)); writer: seqlock_write_lock(sl); ... seqlock_write_unlock(sl); initialization: seqlock_init(QemuSeqLock *sl, QemuMutex

[Qemu-devel] [PULL 11/17] timer: add timer_mod_anticipate and timer_mod_anticipate_ns

2013-10-17 Thread Paolo Bonzini
These let a user anticipate the deadline of a timer, atomically with other sites that call the function. This helps avoiding complicated lock hierarchies. Reviewed-by: Alex Bligh a...@alex.org.uk Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/qemu/timer.h | 26

[Qemu-devel] [PULL 12/17] icount: use cpu_get_icount() directly

2013-10-17 Thread Paolo Bonzini
This will help later when we will have to place these calls in a critical section, and thus call a version of cpu_get_icount() that does not take the lock. Reviewed-by: Alex Bligh a...@alex.org.uk Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c | 7 +-- 1 file changed, 5

[Qemu-devel] [PULL 08/17] qemu-thread: add QemuEvent

2013-10-17 Thread Paolo Bonzini
This emulates Win32 manual-reset events using futexes or conditional variables. Typical ways to use them are with multi-producer, single-consumer data structures, to test for a complex condition whose elements come from different threads: for (;;) { qemu_event_reset(ev); ...

[Qemu-devel] [PULL 17/17] exec: remove qemu_safe_ram_ptr

2013-10-17 Thread Paolo Bonzini
This is not needed since the RAM list is not modified anymore by qemu_get_ram_ptr. Replace it with qemu_get_ram_block. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c | 97 +++--- 1 file changed, 28 insertions(+), 69

[Qemu-devel] [PULL 09/17] timer: make qemu_clock_enable sync between disable and timer's cb

2013-10-17 Thread Paolo Bonzini
From: Liu Ping Fan qemul...@gmail.com After disabling the QemuClock, we should make sure that no QemuTimers are still in flight. To implement that with light overhead, we resort to QemuEvent. The caller of disabling will wait on QemuEvent of each timerlist. Note, qemu_clock_enable(foo,false) can

[Qemu-devel] [PULL 16/17] icount: make it thread-safe

2013-10-17 Thread Paolo Bonzini
This lets threads other than the I/O thread use vm_clock even in -icount mode. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c | 37 +++-- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/cpus.c b/cpus.c index 6203d98..398229e 100644 ---

[Qemu-devel] [PULL 14/17] icount: prepare the code for future races in calling qemu_clock_warp

2013-10-17 Thread Paolo Bonzini
Computing the deadline of all vm_clocks is somewhat expensive and calls out to qemu-timer.c; two reasons not to do it in the seqlock's write-side critical section. This however opens the door for races in setting and reading vm_clock_warp_start. To plug them, we need to cover the case where a

[Qemu-devel] [PULL 13/17] icount: reorganize icount_warp_rt

2013-10-17 Thread Paolo Bonzini
To prepare for future code changes, move the increment of qemu_icount_bias outside the if statement. Also, hoist outside the if the check for timers that expired due to the warping. The check is redundant when !runstate_is_running(), but doing it this way helps because the code that increments

[Qemu-devel] [PULL 07/17] timer: protect timers_state's clock with seqlock

2013-10-17 Thread Paolo Bonzini
From: Liu Ping Fan qemul...@gmail.com QEMU_CLOCK_VIRTUAL may be read outside BQL. This will make its foundation, i.e. cpu_clock_offset exposed to race condition. Using private lock to protect it. After this patch, reading QEMU_CLOCK_VIRTUAL is thread safe unless use_icount is true, in which case

[Qemu-devel] [RESEND PULL v5 0/0] .travis.yml: basic compile and check recipies

2013-10-17 Thread Alex Bennée
From alex.ben...@linaro.org # This line is ignored. Hi Anthony, Here is a resend of my first pull request as for some reason I sent it to an amazon.com address which is not in MAINTAINERS. Not sure where I got that from so excuse the brain-fart. It adds a simple .travis.yml profile to the code

[Qemu-devel] [PATCH] integrator: fix Linux boot failure by emulating dbg

2013-10-17 Thread Alex Bennée
From: Alex Bennée a...@bennee.com Commit 9b8c69243 broke the ability to boot the kernel as the value returned by unassigned_mem_read returned non-zero and left the kernel looping forever waiting for it to change (see integrator_led_set in the kernel code). Relying on a varying implementation

Re: [Qemu-devel] [PATCH 1/1] e820: pass high memory too.

2013-10-17 Thread Andrea Arcangeli
On Thu, Oct 17, 2013 at 04:30:27PM +0200, Gerd Hoffmann wrote: On Do, 2013-10-17 at 15:00 +0200, Andrea Arcangeli wrote: Hi, On Thu, Oct 17, 2013 at 01:09:38PM +0200, Gerd Hoffmann wrote: We have a fw_cfg entry to pass e820 entries from qemu to the firmware. Today it's used to pass

Re: [Qemu-devel] [PATCH] integrator: fix Linux boot failure by emulating dbg

2013-10-17 Thread Peter Maydell
On 17 October 2013 17:12, Alex Bennée alex.ben...@linaro.org wrote: From: Alex Bennée a...@bennee.com Commit 9b8c69243 broke the ability to boot the kernel as the value returned by unassigned_mem_read returned non-zero and left the kernel looping forever waiting for it to change (see

[Qemu-devel] [PULL 04/17] cirrus: Mark vga io region as coalesced MMIO flushing

2013-10-17 Thread Paolo Bonzini
From: Jan Kiszka jan.kis...@siemens.com This allows to remove the explicit qemu_flush_coalesced_mmio_buffer calls - the memory core will invoke them now. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/display/cirrus_vga.c | 3 +-- 1 file

[Qemu-devel] [PULL 15/17] icount: document (future) locking rules for icount

2013-10-17 Thread Paolo Bonzini
Reviewed-by: Alex Bligh a...@alex.org.uk Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/cpus.c b/cpus.c index 34d5e04..6203d98 100644 --- a/cpus.c +++ b/cpus.c @@ -98,17 +98,22 @@ static bool

Re: [Qemu-devel] [Qemu-ppc] [PATCH V2] Fix float64_to_uint64

2013-10-17 Thread Stefan Weil
Am 17.10.2013 11:40, schrieb Alexander Graf: On 16.10.2013, at 23:10, Tom Musta tommu...@gmail.com wrote: The comment preceding the float64_to_uint64 routine suggests that the implementation is broken. And this is, indeed, the case. This patch properly implements the conversion of a 64-bit

[Qemu-devel] [PATCH v8 1/3] device_tree.c: Terminate the empty reservemap in create_device_tree()

2013-10-17 Thread Peter Maydell
Device trees created with create_device_tree() may not have any entries in their reservemap, because the FDT API requires that the reservemap is completed before any FDT nodes are added, and create_device_tree() itself creates a node. However we were not calling fdt_finish_reservemap(), which

Re: [Qemu-devel] [PATCH] integrator: fix Linux boot failure by emulating dbg

2013-10-17 Thread Alex Bennée
peter.mayd...@linaro.org writes: On 17 October 2013 17:12, Alex Bennée alex.ben...@linaro.org wrote: From: Alex Bennée a...@bennee.com Commit 9b8c69243 broke the ability to boot the kernel as the value snip Commit message, comment, overlength lines, lack of Copyright line still all

Re: [Qemu-devel] [PATCH v8 0/3] hw/arm: Add 'virt' platform

2013-10-17 Thread Christoffer Dall
On Thu, Oct 17, 2013 at 05:48:43PM +0100, Peter Maydell wrote: This patch series adds a 'virt' platform which uses the kernel's mach-virt (fully device-tree driven) support to create a simple minimalist platform intended for use for KVM VM guests. v6-v7 change is just flipping the order we

Re: [Qemu-devel] [PATCH v8 0/3] hw/arm: Add 'virt' platform

2013-10-17 Thread Peter Maydell
On 17 October 2013 18:05, Christoffer Dall christoffer.d...@linaro.org wrote: On Thu, Oct 17, 2013 at 05:48:43PM +0100, Peter Maydell wrote: This patch series adds a 'virt' platform which uses the kernel's mach-virt (fully device-tree driven) support to create a simple minimalist platform

Re: [Qemu-devel] [Nbd] Hibernate and qemu-nbd

2013-10-17 Thread Mark Trumpold
-Original Message- From: Stefan Hajnoczi [mailto:stefa...@gmail.com] Sent: Tuesday, October 15, 2013 08:17 AM To: 'Mark Trumpold' Cc: 'Wouter Verhelst', nbd-gene...@lists.sourceforge.net, 'Paul Clements', qemu-devel@nongnu.org, 'Paolo Bonzini' Subject: Re: [Nbd] [Qemu-devel] Hibernate and

[Qemu-devel] [PATCH v8 2/3] hw/arm/boot: Allow boards to provide an fdt blob

2013-10-17 Thread Peter Maydell
From: John Rigby john.ri...@linaro.org If no fdt is provided on command line and the new field get_dtb in struct arm_boot_info is set then call it to get a device tree blob. Signed-off-by: John Rigby john.ri...@linaro.org [PMM: minor tweaks and cleanup] Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH v8 0/3] hw/arm: Add 'virt' platform

2013-10-17 Thread Peter Maydell
This patch series adds a 'virt' platform which uses the kernel's mach-virt (fully device-tree driven) support to create a simple minimalist platform intended for use for KVM VM guests. v6-v7 change is just flipping the order we put the virtio nodes into the device tree, to match vexpress and ppc

[Qemu-devel] [PATCH v8 3/3] hw/arm: Add 'virt' platform

2013-10-17 Thread Peter Maydell
Add 'virt' platform support corresponding to arch/arm/mach-virt in the Linux kernel tree. This has no platform-specific code but can use any device whose kernel driver is is able to work purely from a device tree node. We use this to instantiate a minimal set of devices: a GIC and some virtio-mmio

Re: [Qemu-devel] [RFC v5 3/5] hw/arm/digic: add timer support

2013-10-17 Thread Peter Maydell
On 7 September 2013 08:04, Antony Pavlov antonynpav...@gmail.com wrote: +static const TypeInfo digic_timer_info = { +.name = TYPE_DIGIC_TIMER, +.parent = TYPE_SYS_BUS_DEVICE, +.instance_size = sizeof(DigicTimerState), +.instance_init = digic_timer_init, +}; This needs a

Re: [Qemu-devel] [RFC v5 5/5] hw/arm/digic: add NOR ROM support

2013-10-17 Thread Peter Maydell
On 7 September 2013 08:04, Antony Pavlov antonynpav...@gmail.com wrote: Signed-off-by: Antony Pavlov antonynpav...@gmail.com --- hw/arm/digic_boards.c | 64 +++ 1 file changed, 64 insertions(+) diff --git a/hw/arm/digic_boards.c

Re: [Qemu-devel] [RFC v5 2/5] hw/arm/digic: prepare DIGIC-based boards support

2013-10-17 Thread Peter Maydell
On 7 September 2013 08:04, Antony Pavlov antonynpav...@gmail.com wrote: + +static void digic4_board_init(DigicBoard *board) +{ +Error *err = NULL; + +DigicBoardState *s = g_new(DigicBoardState, 1); + +s-digic = DIGIC(object_new(TYPE_DIGIC)); +

Re: [Qemu-devel] [RFC v5 4/5] hw/arm/digic: add UART support

2013-10-17 Thread Peter Maydell
On 7 September 2013 08:04, Antony Pavlov antonynpav...@gmail.com wrote: Signed-off-by: Antony Pavlov antonynpav...@gmail.com --- a/hw/arm/digic_boards.c +++ b/hw/arm/digic_boards.c @@ -26,6 +26,13 @@ #include hw/boards.h #include exec/address-spaces.h #include hw/arm/digic.h +#include

Re: [Qemu-devel] [Qemu-ppc] [PATCH V2] Fix float64_to_uint64

2013-10-17 Thread Tom Musta
On 10/17/2013 11:31 AM, Stefan Weil wrote: Am 17.10.2013 11:40, schrieb Alexander Graf: Missing a SoB line. Alex There is already a mix of coding styles in fpu/softfloat.c, and your patch adds large regions of new code. Therefore I expect that such contributions should respect the QEMU

Re: [Qemu-devel] [PATCH] net: disallow to specify multicast MAC address

2013-10-17 Thread Dmitry Krivenok
Personally, I find 'expr ? true : false' rather verbose; why not just: return macaddr[0] % 2; I agree, your variant is shorter and easier to read.

[Qemu-devel] virtio-blk wierd memcpy

2013-10-17 Thread Dave Airlie
In my failing attempts to valgrind qemu (how to people live like this?), I spotted this in the logs ==19521== Source and destination overlap in memcpy(0x31d38938, 0x31d38938, 64) ==19521==at 0x4A0A343: memcpy@@GLIBC_2.14 (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==19521==

Re: [Qemu-devel] [RFC v5 2/5] hw/arm/digic: prepare DIGIC-based boards support

2013-10-17 Thread Georg Hofstetter
Hello, just for the record. flash (ROM1) on these cameras starts at 0xF800 and is either 0x0080, 0x0100 ox 0x0200 large. just like with every chip-selected memory, where the CS/EN line is selected by address masks, addressing beyond the size memory repeats the content over and

Re: [Qemu-devel] [PATCH 04/18] bsd-user: move target arch and host OSdependent code out of main.cc

2013-10-17 Thread Stacey Son
On Oct 16, 2013, at 11:32 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 16 October 2013 16:46, Stacey Son s...@freebsd.org wrote: The arm code came from another source as noted in the cover letter. It could use a lot more work. Possibly better to leave it out of this initial patch

Re: [Qemu-devel] [RFC v5 2/5] hw/arm/digic: prepare DIGIC-based boards support

2013-10-17 Thread Peter Maydell
On 17 October 2013 19:51, Georg Hofstetter q...@g3gg0.de wrote: flash (ROM1) on these cameras starts at 0xF800 and is either 0x0080, 0x0100 ox 0x0200 large. just like with every chip-selected memory, where the CS/EN line is selected by address masks, addressing beyond the size

[Qemu-devel] [PATCH] virtio: Remove unneeded memcpy

2013-10-17 Thread Stefan Weil
Report from valgrind: ==19521== Source and destination overlap in memcpy(0x31d38938, 0x31d38938, 64) ==19521==at 0x4A0A343: memcpy@@GLIBC_2.14 (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==19521==by 0x42774E: virtio_blk_device_init (virtio-blk.c:686) ==19521==by

Re: [Qemu-devel] virtio-blk wierd memcpy

2013-10-17 Thread Stefan Weil
Am 17.10.2013 20:49, schrieb Dave Airlie: In my failing attempts to valgrind qemu (how to people live like this?), I spotted this in the logs ==19521== Source and destination overlap in memcpy(0x31d38938, 0x31d38938, 64) ==19521==at 0x4A0A343: memcpy@@GLIBC_2.14 (in

Re: [Qemu-devel] [PATCH] virtio: Remove unneeded memcpy

2013-10-17 Thread Peter Maydell
On 17 October 2013 20:23, Stefan Weil s...@weilnetz.de wrote: Report from valgrind: ==19521== Source and destination overlap in memcpy(0x31d38938, 0x31d38938, 64) ==19521==at 0x4A0A343: memcpy@@GLIBC_2.14 (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==19521==by

[Qemu-devel] KVM Forum 2013 presentations on Google+ (Hangouts on-air)

2013-10-17 Thread Ademar de Souza Reis Jr.
Hi there. We're going to broadcast the KVM Forum 2013 presentations and keynotes using Google+ Hangouts On-air. We also plan to have etherpads available for live discussions and notes. We're doing our best to make sure the audio/video/internet quality is good. We can't promise anything at this

[Qemu-devel] [Bug 1174654] Re: qemu-system-x86_64 takes 100% CPU after host machine resumed from suspend to ram

2013-10-17 Thread tobias
hi, tried your option but it does not help. (cpu usage is still high) below my command line syntax: qemu-system-x86_64 -global mc146818rtc.lost_tick_policy=slew -machine accel=kvm:tcg -name win7 -S -machine pc-i440fx-1.4,accel=kvm,usb=off -m 2048 -realtime mlock=off -smp

[Qemu-devel] [PATCH 2/2] acpi-test: basic acpi unit-test

2013-10-17 Thread Michael S. Tsirkin
We run bios, and boot a minimal boot sector that immediately halts. Then poke at memory to find ACPI tables. This only checks that RSDP is there. More will be added later. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- tests/acpi-test.c | 129

[Qemu-devel] [PATCH 1/2] qtest: don't configure icount if qtest not allowed

2013-10-17 Thread Michael S. Tsirkin
This makes it possible to run bios under qtest Signed-off-by: Michael S. Tsirkin m...@redhat.com --- qtest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qtest.c b/qtest.c index 584c707..48e3288 100644 --- a/qtest.c +++ b/qtest.c @@ -508,7 +508,9 @@ int qtest_init(void)

Re: [Qemu-devel] [ANNOUNCE] Key Signing Party at KVM Forum 2013

2013-10-17 Thread Scott Wood
On Wed, 2013-07-24 at 07:50 -0500, Anthony Liguori wrote: I will be hosting a key signing party at this year's KVM Forum. http://wiki.qemu.org/KeySigningParty2013 Starting for the 1.7 release (begins in December), I will only accepted signed pull requests so please try to attend this event

[Qemu-devel] [PATCH] net: disallow to specify multicast MAC address

2013-10-17 Thread Dmitry Krivenok
Added explicit check of MAC address specified via macaddr option. Multicast MAC addresses are no longer allowed. This fixes bug #495566. Signed-off-by: Dmitry V. Krivenok krivenok.dmi...@gmail.com --- net/net.c | 5 + net/util.c | 5 + net/util.h | 2 ++ 3 files changed, 12

Re: [Qemu-devel] [Nbd] Hibernate and qemu-nbd

2013-10-17 Thread Paul Clements
Hi Mark, On Thu, Oct 17, 2013 at 1:07 PM, Mark Trumpold ma...@netqa.com wrote: 165 strace -p 2488 -o /var/tmp/qemu.nbd.strace.v2 166 strace -p 2492 -o /var/tmp/nbd-client.strace.v2 You'll need to include the -f option to strace to get the full child trace (at least for nbd-client).

[Qemu-devel] Watching Resource consumption of guest from Qemu ?

2013-10-17 Thread Sunil
Hello List, I am a graduate student trying to learn about virtualization. I wanted to understand if there is any way to tell about resource consumption of guest through Qemu ? e.g. if guest starts doing something cpu intensive, would qemu be aware of that ? or is there a way to detect that from

Re: [Qemu-devel] qemu-system-or32 is not working on OS X, ask for help.

2013-10-17 Thread Jia Liu
Hi Peter, On Thu, Oct 17, 2013 at 5:15 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 17 October 2013 04:17, Jia Liu pro...@gmail.com wrote: On Fri, Oct 11, 2013 at 10:41 AM, Jia Liu pro...@gmail.com wrote: I'm not sure about why qemu-system-or32 is not working on OS X, is it a AREG0

Re: [Qemu-devel] [PATCH v14 2/8] make.rule: fix $(obj) to a real relative path

2013-10-17 Thread Fam Zheng
On Thu, 10/17 16:57, Paolo Bonzini wrote: Il 16/10/2013 05:26, Fam Zheng ha scritto: Makefile.target includes rule.mak and unnested common-obj-y, then prefix them with '../', this will ignore object specific QEMU_CFLAGS in subdir Makefile.objs: $(obj)/curl.o: QEMU_CFLAGS +=

[Qemu-devel] [PATCH] block: mask NOR flash buffered write length

2013-10-17 Thread Roy Franz
For buffered writes, mask the length with the maximum supported length. This is required for block writes to work on the ARM vexpress platform, where the flash interface is 32 bits wide. For buffered writes to the 2 16 bit flashes on the interface, the length is repeated in each 16 bit word, and

Re: [Qemu-devel] [Bug 1174654] Re: qemu-system-x86_64 takes 100% CPU after host machine resumed from suspend to ram

2013-10-17 Thread mike
On 10/18/2013 04:29 AM, tobias wrote: hi, tried your option but it does not help. (cpu usage is still high) below my command line syntax: qemu-system-x86_64 -global mc146818rtc.lost_tick_policy=slew -machine accel=kvm:tcg -name win7 -S -machine pc-i440fx-1.4,accel=kvm,usb=off -m 2048

Re: [Qemu-devel] [PATCH v2] net/net: Change the default mac address of nic

2013-10-17 Thread mike
On 10/17/2013 08:30 PM, Stefan Hajnoczi wrote: On Tue, Oct 15, 2013 at 09:33:06PM +0800, mike wrote: On 10/15/2013 08:36 PM, Eric Blake wrote: On 10/14/2013 11:07 PM, Stefan Weil wrote: Is it reasonable to get a random mac address in your guest? I don't think so. It would no longer be

[Qemu-devel] [PATCH v4 0/2] vmdk: Implement bdrv_get_specific_info

2013-10-17 Thread Fam Zheng
The new information looks like: image: /tmp/foo.vmdk file format: vmdk virtual size: 100G (107374182400 bytes) disk size: 4.0K Format specific information: cid: 0 create_type: twoGbMaxExtentFlat parent cid: 0 extents: [0]:

[Qemu-devel] [PATCH v4 1/2] qapi: Add optional field 'compressed' to ImageInfo

2013-10-17 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- qapi-schema.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qapi-schema.json b/qapi-schema.json index 60f3fd1..add97e2 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -256,6 +256,8 @@ # # @encrypted: #optional true

[Qemu-devel] [PATCH v4 2/2] vmdk: Implment bdrv_get_specific_info

2013-10-17 Thread Fam Zheng
Implement .bdrv_get_specific_info to return the extent information. Signed-off-by: Fam Zheng f...@redhat.com --- block/vmdk.c | 64 +- qapi-schema.json | 24 - tests/qemu-iotests/059 | 2 +-

[Qemu-devel] [PATCH v8 0/2] bugs fix for hpet

2013-10-17 Thread Liu Ping Fan
v8: make piix/q35 compat diverge simplify the code, use hpet_irqs to pass intcap value v7: use macro to define intcap in pc.h (as to 3/4 and 4/4, I am not sure about whether to merge them or not, so keep them separate) v6: move the setting of intcap to board, and keep the init value

[Qemu-devel] [PATCH v8 1/2] hpet: inverse polarity when pin above ISA_NUM_IRQS

2013-10-17 Thread Liu Ping Fan
According to hpet spec, hpet irq is high active. But according to ICH spec, there is inversion before the input of ioapic. So the OS will expect low active on this IRQ line. (On bare metal, if OS driver claims high active on this line, spurious irq is generated) We fold the emulation of this

[Qemu-devel] [PATCH v8 2/2] hpet: enable to entitle more irq pins for hpet

2013-10-17 Thread Liu Ping Fan
Owning to some different hardware design, piix and q35 need different compat. So making them diverge. On q35, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 can be assigned to hpet as guest chooses. So we introduce intcap property to do that. Consider the compat and piix/q35, we

Re: [Qemu-devel] virtio-blk-pci: how to tell if it is CD or HDD?

2013-10-17 Thread Nikunj A Dadhania
Alexey Kardashevskiy a...@ozlabs.ru writes: channel@0 - ? This is a generic scsi bus, cannot change this. disk@3,2 - disk@8302? This is a generic scsi-cd, cannot change this either On top of this, fix the remaining QEMU-OF differences using a callback in QEMUMachine. This

[Qemu-devel] [PATCH v2] vmdk: Only read cid from image file when opening

2013-10-17 Thread Fam Zheng
Previously cid of parent is parsed from image file for every IO request. We already have L1/L2 cache and don't have assumption that parent image can be updated behind us, so remove this to get more efficiency. The parent CID is checked only for once after opening. Signed-off-by: Fam Zheng

Re: [Qemu-devel] [PATCH 2/2] acpi-test: basic acpi unit-test

2013-10-17 Thread Markus Armbruster
Michael S. Tsirkin m...@redhat.com writes: We run bios, and boot a minimal boot sector that immediately halts. Then poke at memory to find ACPI tables. This only checks that RSDP is there. More will be added later. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- tests/acpi-test.c

Re: [Qemu-devel] [PATCH] spapr: add vio-bus devices to categories

2013-10-17 Thread Alexey Kardashevskiy
On 10/11/2013 02:08 PM, Alexey Kardashevskiy wrote: In order to get devices appear in output of ./qemu-system-ppc64 -device ?, they must be assigned to one of DEVICE_CATEGORY_. This puts VIO devices classes to corresponding categories. Signed-off-by: Alexey Kardashevskiy

Re: [Qemu-devel] [RFC PATCH] spapr: add ibmveth to the supported network adapters list

2013-10-17 Thread Alexey Kardashevskiy
On 10/11/2013 02:09 PM, Alexey Kardashevskiy wrote: The problem is that -net nic,model=? does not print ibmveth in the list while it is actually supported. Most of the QEMU emulated network devices are PCI but ibmveth (a.k.a. spapr-vlan) is not. However with -net nic,model=?, QEMU prints

<    1   2