[Qemu-devel] [qemu] QEMU NAND support for ARM targets

2012-06-22 Thread jagan
Hi All, Can anyone help, In current qemu source, what is arm target that supports NAND? Regards, Jagan.

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: add guest-fstrim command

2012-06-22 Thread Chris Wedgwood
> I'm not sure I understand, wouldn't the filesystem need to be involved > at some level? How can the block layer differentiate lazilly discarded data > blocks from ones that are still in use without the aid of the > filesystem? It might be me that doesn't understand. Yes, the filesystem is invol

[Qemu-devel] [PATCH stable-1.1 12/26] kvm/apic: correct short memset

2012-06-22 Thread Michael Roth
From: Jim Meyering kvm_put_apic_state's attempt to clear *kapic before setting its bits cleared sizeof(void*) bytes (no more than 8) rather than the intended 1024 (KVM_APIC_REG_SIZE) bytes. Spotted by coverity. Signed-off-by: Jim Meyering Signed-off-by: Avi Kivity --- hw/kvm/apic.c |2 +-

[Qemu-devel] [PATCH stable-1.1 21/26] pci_bridge_dev: fix error path in pci_bridge_dev_initfn()

2012-06-22 Thread Michael Roth
From: Jason Baron Currently, we do not properly cleanup, if pci_bridge_dev_initfn fails to initialize properly. Make sure to call pci_bridge_exitfn() in the error path. Signed-off-by: Jason Baron Signed-off-by: Michael S. Tsirkin --- hw/pci_bridge_dev.c |4 +++- 1 files changed, 3 inserti

[Qemu-devel] [PATCH stable-1.1 06/26] target-xtensa: control page table lookup explicitly

2012-06-22 Thread Michael Roth
From: Max Filippov Hardware pagetable walking may not be nested. Stop guessing and pass explicit flag to the get_physical_addr_mmu function that controls page table lookup. Signed-off-by: Max Filippov Signed-off-by: Blue Swirl --- target-xtensa/helper.c | 10 +- 1 files changed, 5 i

[Qemu-devel] [PATCH stable-1.1 16/26] configure: Fix build for some versions of glibc (9pfs)

2012-06-22 Thread Michael Roth
From: Stefan Weil Some versions declare open_by_handle_at, but don't define AT_EMPTY_PATH. Extend the check in configure to test both preconditions. Signed-off-by: Stefan Weil Acked-by: Stefano Stabellini Acked-by: Serge Hallyn --- configure |4 1 files changed, 4 insertions(+), 0 d

[Qemu-devel] [PATCH stable-1.1 04/26] target-xtensa: extract TLB entry setting method

2012-06-22 Thread Michael Roth
From: Max Filippov Signed-off-by: Max Filippov Signed-off-by: Blue Swirl --- target-xtensa/cpu.h |3 +++ target-xtensa/op_helper.c | 15 +++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/target-xtensa/cpu.h b/target-xtensa/cpu.h index 6d0ea7c..6c590fe

[Qemu-devel] [PATCH stable-1.1 15/26] monitor: Fix memory leak with readline completion

2012-06-22 Thread Michael Roth
From: Stefan Weil Each string which is shown during readline completion in the QEMU monitor is allocated dynamically but currently never deallocated. Add the missing loop which calls g_free for the allocated strings. Signed-off-by: Stefan Weil Reviewed-by: Stefan Hajnoczi --- readline.c |

[Qemu-devel] [PATCH stable-1.1 09/26] target-xtensa: fix CCOUNT for conditional branches

2012-06-22 Thread Michael Roth
From: Max Filippov Taken conditional branches fail to update CCOUNT register because accumulated ccount_delta is reset during translation of non-taken branch. To fix it only update CCOUNT once per conditional branch instruction translation. This fixes guest linux freeze on LTP waitpid06 test. S

[Qemu-devel] [PATCH stable-1.1 26/26] build: install qmp-commands.txt

2012-06-22 Thread Michael Roth
From: Bruce Rogers File is targeted for install, but is never installed. Signed-off-by: Bruce Rogers Signed-off-by: Luiz Capitulino --- Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index 9b7a85e..9707fa0 100644 --- a/Makefile +++ b/Make

[Qemu-devel] [PATCH stable-1.1 05/26] target-xtensa: update autorefill TLB entries conditionally

2012-06-22 Thread Michael Roth
From: Max Filippov This is to avoid interference of internal QEMU helpers (cpu_get_phys_page_debug, tb_invalidate_virtual_addr) with guest-visible TLB state. Signed-off-by: Max Filippov Signed-off-by: Blue Swirl --- target-xtensa/cpu.h |2 +- target-xtensa/helper.c| 56 +++

[Qemu-devel] [PATCH stable-1.1 17/26] rtl8139: honor RxOverflow flag in can_receive method

2012-06-22 Thread Michael Roth
From: Fernando Luis Vazquez Cao Some drivers (Linux' 8139too among them) rely on the NIC injecting an interrupt in the event of a receive buffer overflow and, accordingly, set the RxOverflow bit in the interrupt mask. Unfortunately rtl8139's can_receive method ignores the RxOverflow flag, which m

[Qemu-devel] [PATCH stable-1.1 22/26] qcow2: fix endianness conversion

2012-06-22 Thread Michael Roth
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 812c93c..443c021 100644 --- a/block/qc

[Qemu-devel] [PATCH stable-1.1 24/26] qcow2: fix autoclear image header update

2012-06-22 Thread Michael Roth
From: Stefan Hajnoczi The autoclear feature bits can be used for qcow2 file format features that are safe to "drop" by old programs that do not understand the feature. Upon opening the image file unknown autoclear feature bits are cleared and the image file header is rewritten, but this was happ

[Qemu-devel] [PATCH stable-1.1 19/26] intel-hda: Fix reset of MSI function

2012-06-22 Thread Michael Roth
From: Jan Kiszka Call msi_reset on device reset as still required by the core. CC: Gerd Hoffmann CC: qemu-sta...@nongnu.org Signed-off-by: Jan Kiszka Signed-off-by: Michael S. Tsirkin --- hw/intel-hda.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/intel-hda.c

[Qemu-devel] [PATCH stable-1.1 11/26] configure: report missing libraries for virtfs

2012-06-22 Thread Michael Roth
From: Harsh Prateek Bora Signed-off-by: Harsh Prateek Bora Signed-off-by: Stefan Hajnoczi --- configure |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/configure b/configure index 1f338f8..268ed21 100755 --- a/configure +++ b/configure @@ -2915,7 +2915,8 @@ if test "

[Qemu-devel] [PATCH stable-1.1 25/26] fdc: fix implied seek while there is no media in drive

2012-06-22 Thread Michael Roth
From: Pavel Hrdina The Windows uses 'READ' command at the start of an instalation without checking the 'dir' register. We have to abort the transfer with an abnormal termination if there is no media in the drive. Signed-off-by: Pavel Hrdina Signed-off-by: Kevin Wolf --- hw/fdc.c |4

[Qemu-devel] [PATCH stable-1.1 20/26] qdev: release parent properties on dc->init failure

2012-06-22 Thread Michael Roth
From: Jason Baron While looking into hot-plugging bridges, I can create a qemu segfault via: $ device_add pci-bridge Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0. ** ERROR:qom/object.c:389:object_delete: assertion failed: (obj->ref == 0) I'm pro

[Qemu-devel] [PATCH stable-1.1 02/26] target-xtensa: flush TLB page for new MMU mapping

2012-06-22 Thread Michael Roth
From: Max Filippov Both old and new mappings need flushing because their VPN may be different in MMU case. Signed-off-by: Max Filippov Signed-off-by: Blue Swirl --- target-xtensa/op_helper.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/target-xtensa/op_helper.c b/t

[Qemu-devel] [PATCH stable-1.1 14/26] qcow2: Silence false warning

2012-06-22 Thread Michael Roth
From: Kevin Wolf Some gcc versions seem not to be able to figure out that the switch statement covers all possible values and that c is therefore always initialised. Add a default branch for them. Reported-by: malc Signed-off-by: Kevin Wolf Signed-off-by: malc --- block/qcow2-cluster.c |

[Qemu-devel] [PATCH stable-1.1 08/26] exec: fix TB invalidation after breakpoint insertion/deletion

2012-06-22 Thread Michael Roth
From: Max Filippov tb_invalidate_phys_addr has to be called with the exact physical address of the breakpoint we add/remove, not just the page's base address. Otherwise we easily fail to flush the right TB. This breakage was introduced by the commit f3705d5329 "memory: make phys_page_find() retu

[Qemu-devel] [PATCH stable-1.1 18/26] ahci: Fix reset of MSI function

2012-06-22 Thread Michael Roth
From: Jan Kiszka Call msi_reset on device reset as still required by the core. CC: Alexander Graf CC: qemu-sta...@nongnu.org Signed-off-by: Jan Kiszka Signed-off-by: Michael S. Tsirkin --- hw/ide/ich.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/id

[Qemu-devel] [PATCH stable-1.1 10/26] trace/simple.c: fix deprecated glib2 interface

2012-06-22 Thread Michael Roth
From: Harsh Prateek Bora Signed-off-by: Harsh Prateek Bora Signed-off-by: Stefan Hajnoczi --- trace/simple.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/trace/simple.c b/trace/simple.c index 33ae486..b4a3c6e 100644 --- a/trace/simple.c +++ b/trace/simple.c @@ -

[Qemu-devel] [PATCH stable-1.1 03/26] target-xtensa: update EXCVADDR in case of page table lookup

2012-06-22 Thread Michael Roth
From: Max Filippov According to ISA, 4.4.2.6, EXCVADDR may be changed by any TLB miss, even if the miss is handled entirely by processor hardware. Signed-off-by: Max Filippov Signed-off-by: Blue Swirl --- target-xtensa/helper.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH stable-1.1 13/26] kvm: i8254: Fix conversion of in-kernel to userspace state

2012-06-22 Thread Michael Roth
From: Jan Kiszka Due to a offset between the clock used to generate the in-kernel count_load_time (CLOCK_MONOTONIC) and the clock used for processing this in userspace (vm_clock), reading back the output of PIT channel 2 via port 0x61 was broken. One use cases that suffered from it was the CPU fr

[Qemu-devel] [PATCH stable-1.1 07/26] target-xtensa: add MMU pagewalking tests

2012-06-22 Thread Michael Roth
From: Max Filippov Signed-off-by: Max Filippov Signed-off-by: Blue Swirl --- tests/tcg/xtensa/test_mmu.S | 221 --- 1 files changed, 207 insertions(+), 14 deletions(-) diff --git a/tests/tcg/xtensa/test_mmu.S b/tests/tcg/xtensa/test_mmu.S index 52d5774

Re: [Qemu-devel] [PATCH v2 01/11] dt: make setprop argument static

2012-06-22 Thread Peter Crosthwaite
On Thu, Jun 21, 2012 at 11:33 PM, Alexander Graf wrote: > Whatever we pass in to qemu_devtree_setprop to put into the device tree > will not get modified by that function, so it can easily be declared const. > > Signed-off-by: Alexander Graf Reviewed-by: Peter A. G. Crosthwaite > --- >  device

Re: [Qemu-devel] [PATCH v1] device_tree: load_device_tree(): Allow NULL sizep

2012-06-22 Thread Peter Crosthwaite
On Sat, Jun 23, 2012 at 7:14 AM, Alexander Graf wrote: > > On 22.06.2012, at 15:17, Peter Crosthwaite wrote: > >> CC device-tree.c original contributors. (Jerome Young and Hollis Blanchard). >> >> I cant find a maintainer for device-tree, and Stefan wants a review. >> This patch seem ok? > > Hrm,

[Qemu-devel] [PATCH stable-1.1 23/26] Prevent disk data loss when closing qemu

2012-06-22 Thread Michael Roth
From: Pavel Dovgaluk Prevent disk data loss when closing qemu console window under Windows 7. v3. Comment for Sleep() parameter was updated. Signed-off-by: Pavel Dovgalyuk Signed-off-by: Kevin Wolf --- os-win32.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/

[Qemu-devel] [PATCH stable-1.1 01/26] virtio-blk: Fix geometry sector calculation

2012-06-22 Thread Michael Roth
From: Christian Borntraeger Currently the sector value for the geometry is masked, even if the user usesa command line parameter that explicitely gives a number. This breaks dasd devices on s390. A dasd device can have a physical block size of 4096 (== same for logical block size) and a typcial g

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

2012-06-22 Thread 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 initial commit for v1.1.0 I've set up a staging tree for the first batch of commits at: git://github.com/mdroth/qemu.git stable-1.1-staging This should capture everything explicit

Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop

2012-06-22 Thread Marcelo Tosatti
On Sat, Jun 23, 2012 at 12:55:49AM +0200, Jan Kiszka wrote: > Should have declared this [RFC] in the subject and CC'ed kvm... > > On 2012-06-23 00:45, Jan Kiszka wrote: > > This sketches a possible path to get rid of the iothread lock on vmexits > > in KVM mode. On x86, the the in-kernel irqchips

Re: [Qemu-devel] [RFC] migration next tree

2012-06-22 Thread Vinod Chegu
On Fri, Jun 22, 2012 at 6:59 AM, Juan Quintela wrote: > > Hi > > As discussed on this week kvm call, here are the migration tree with > XBRLE + huge memory fixes integrated. There were a bug on huge memory > (corrected on the v3 version just sent) and another on XZBRLE patches. > Orit is going t

[Qemu-devel] [PATCH] PPC: e500: set has-idle in guest device tree

2012-06-22 Thread Stuart Yoder
From: Stuart Yoder If the host kernel supports the idle hcall, then advertise that to the guest kernel via the device tree. Signed-off-by: Stuart Yoder --- hw/ppce500_mpc8544ds.c |5 + target-ppc/kvm.c | 26 +++--- target-ppc/kvm_ppc.h |1 + 3 files ch

Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop

2012-06-22 Thread Anthony Liguori
On 06/22/2012 05:45 PM, Jan Kiszka wrote: This sketches a possible path to get rid of the iothread lock on vmexits in KVM mode. On x86, the the in-kernel irqchips has to be used because we otherwise need to synchronize APIC and other per-cpu state accesses that could be changed concurrently. Not

Re: [Qemu-devel] [RFC] use little granularity lock to substitue qemu_mutex_lock_iothread

2012-06-22 Thread Anthony Liguori
On 06/22/2012 05:27 PM, Jan Kiszka wrote: On 2012-06-22 23:44, Anthony Liguori wrote: 1) unlock iothread before entering the do {} look in kvm_cpu_exec() a) reacquire the lock after the loop b) reacquire the lock in kvm_handle_io() c) introduce an unlocked memory accessor that for no

Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop

2012-06-22 Thread Jan Kiszka
Should have declared this [RFC] in the subject and CC'ed kvm... On 2012-06-23 00:45, Jan Kiszka wrote: > This sketches a possible path to get rid of the iothread lock on vmexits > in KVM mode. On x86, the the in-kernel irqchips has to be used because > we otherwise need to synchronize APIC and oth

[Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop

2012-06-22 Thread Jan Kiszka
This sketches a possible path to get rid of the iothread lock on vmexits in KVM mode. On x86, the the in-kernel irqchips has to be used because we otherwise need to synchronize APIC and other per-cpu state accesses that could be changed concurrently. Not yet fully analyzed is the NMI injection path

Re: [Qemu-devel] [RFC] use little granularity lock to substitue qemu_mutex_lock_iothread

2012-06-22 Thread Jan Kiszka
On 2012-06-22 23:44, Anthony Liguori wrote: > On 06/22/2012 04:14 PM, Jan Kiszka wrote: >> On 2012-06-22 22:11, Anthony Liguori wrote: >>> On 06/22/2012 05:37 AM, Jan Kiszka wrote: On 2012-06-22 12:24, liu ping fan wrote: > On Thu, Jun 21, 2012 at 11:23 PM, Jan Kiszka > wrote: >> O

Re: [Qemu-devel] [RFC] use little granularity lock to substitue qemu_mutex_lock_iothread

2012-06-22 Thread Anthony Liguori
On 06/22/2012 04:14 PM, Jan Kiszka wrote: On 2012-06-22 22:11, Anthony Liguori wrote: On 06/22/2012 05:37 AM, Jan Kiszka wrote: On 2012-06-22 12:24, liu ping fan wrote: On Thu, Jun 21, 2012 at 11:23 PM, Jan Kiszka wrote: On 2012-06-21 16:49, Liu Ping Fan wrote: Nowadays, we use qemu_mutex_lo

Re: [Qemu-devel] [RFC] use little granularity lock to substitue qemu_mutex_lock_iothread

2012-06-22 Thread Jan Kiszka
On 2012-06-22 22:11, Anthony Liguori wrote: > On 06/22/2012 05:37 AM, Jan Kiszka wrote: >> On 2012-06-22 12:24, liu ping fan wrote: >>> On Thu, Jun 21, 2012 at 11:23 PM, Jan Kiszka >>> wrote: On 2012-06-21 16:49, Liu Ping Fan wrote: > Nowadays, we use > qemu_mutex_lock_iothread()/qemu

Re: [Qemu-devel] [PATCH v1] device_tree: load_device_tree(): Allow NULL sizep

2012-06-22 Thread Alexander Graf
On 22.06.2012, at 15:17, Peter Crosthwaite wrote: > CC device-tree.c original contributors. (Jerome Young and Hollis Blanchard). > > I cant find a maintainer for device-tree, and Stefan wants a review. > This patch seem ok? Hrm, guess I should file a patch to declare myself maintainer for the t

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: add guest-fstrim command

2012-06-22 Thread Michael Roth
On Fri, Jun 22, 2012 at 10:48:56AM -0700, Chris Wedgwood wrote: > > FITRIM is a mounted filesystem feature to discard (or "trim") blocks which > > are not in use by the filesystem. This is useful for solid-state drives > > (SSDs) and thinly-provisioned storage. Provide access to the feature > > fr

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

2012-06-22 Thread Eric Blake
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 returns the received file descriptor, wh

Re: [Qemu-devel] [RFC] use little granularity lock to substitue qemu_mutex_lock_iothread

2012-06-22 Thread Anthony Liguori
On 06/22/2012 05:37 AM, Jan Kiszka wrote: On 2012-06-22 12:24, liu ping fan wrote: On Thu, Jun 21, 2012 at 11:23 PM, Jan Kiszka wrote: On 2012-06-21 16:49, Liu Ping Fan wrote: Nowadays, we use qemu_mutex_lock_iothread()/qemu_mutex_unlock_iothread() to protect the race to access the emulated d

Re: [Qemu-devel] [PATCH 2/2] kvm: use per-cpu lock to free vcpu thread out of the big lock

2012-06-22 Thread Anthony Liguori
On 06/21/2012 09:49 AM, Liu Ping Fan wrote: In order to break the big lock, using per-cpu_lock in kvm_cpu_exec() to protect the race from other cpu's access to env->apic_state& related field in env. Also, we need to protect agaist run_on_cpu(). Race condition can be like this: 1. vcpu-1 IPI vc

Re: [Qemu-devel] [PATCH 1/2] CPUArchState: introduce per-cpu lock

2012-06-22 Thread Anthony Liguori
On 06/21/2012 09:49 AM, Liu Ping Fan wrote: introduce a lock for per-cpu to protect agaist accesing from other vcpu thread. Signed-off-by: Liu Ping Fan --- cpu-defs.h |2 ++ cpus.c | 17 + main-loop.h |3 +++ 3 files changed, 22 insertions(+), 0 deletions(-)

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

2012-06-22 Thread Anthony Liguori
On 06/22/2012 01:50 PM, Amit Shah wrote: On (Fri) 22 Jun 2012 [08:44:52], Anthony Liguori wrote: On 06/22/2012 08:34 AM, Daniel P. Berrange wrote: Oh, that's a good point. But easily fixed. Of course, except that now we have to maintain compatibility so some hideous hack goes in. This i

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

2012-06-22 Thread Eric Blake
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 application opens files on QEMU's behalf. >

[Qemu-devel] [PATCH 2/2] cpu: for cpu-user and cpu-softmmu and make cpu-softmmu a child of DeviceState

2012-06-22 Thread Anthony Liguori
The line between linux-user and softmmu is not very well defined right now. linux-user really don't want to include devices and making CpuState a child of DeviceState would require pulling lots of stuff into linux-user. To solve this, we simply fork cpu-user and cpu-softmmu letting them evolve ind

[Qemu-devel] [PATCH 1/2] qdev: split up header so it can be used in cpu.h

2012-06-22 Thread Anthony Liguori
Header file dependency is a frickin' nightmare right now. cpu.h tends to get included in our 'include everything' header files but qdev also needs to include those headers mainly for qdev-properties since it knows about CharDriverState and friends. We can solve this for now by splitting out qdev.

Re: [Qemu-devel] [PATCH v4 1/7] qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsg

2012-06-22 Thread Eric Blake
On 06/22/2012 12:36 PM, Corey Bryant wrote: > This sets the close-on-exec flag for the file descriptor received > via SCM_RIGHTS. > > Signed-off-by: Corey Bryant > --- > v4 > -This patch is new in v4 (ebl...@redhat.com) > > qemu-char.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

[Qemu-devel] [PATCH v4 0/7] file descriptor passing using pass-fd

2012-06-22 Thread Corey Bryant
libvirt's sVirt security driver provides SELinux MAC isolation for Qemu guest processes and their corresponding image files. In other words, sVirt uses SELinux to prevent a QEMU process from opening files that do not belong to it. sVirt provides this support by labeling guests and resources with

[Qemu-devel] [PATCH v4 5/7] block: Prevent /dev/fd/X filename from being detected as floppy

2012-06-22 Thread Corey Bryant
Reported-by: Kevin Wolf Reviewed-by: Paolo Bonzini Signed-off-by: Corey Bryant --- v3: -This patch is new in v3. It was previously submitted on its own, and is now being included in this series. v4 -Moved patch to be earlier in series (lcapitul...@redhat.com) block/raw-posix.c |4 +++

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

2012-06-22 Thread Corey Bryant
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 application opens files on QEMU's behalf. If the fd was passed to the monitor with the pass-fd c

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

2012-06-22 Thread Corey Bryant
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 returns the received file descriptor, which is a difference in behavior from the getfd comma

[Qemu-devel] [PATCH v4 6/7] block: Convert open calls to qemu_open

2012-06-22 Thread Corey Bryant
This patch converts all block layer open calls to qemu_open. This enables all block layer open paths to dup(X) a pre-opened file descriptor if the filename is of the format /dev/fd/X. This is useful if QEMU is restricted from opening certain files. Note that this adds the O_CLOEXEC flag to the c

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

2012-06-22 Thread Amit Shah
On (Fri) 22 Jun 2012 [08:44:52], Anthony Liguori wrote: > On 06/22/2012 08:34 AM, Daniel P. Berrange wrote: > >On Fri, Jun 22, 2012 at 07:58:53AM -0500, Anthony Liguori wrote: > >>On 06/22/2012 07:31 AM, Daniel P. Berrange wrote: > >>>On Fri, Jun 22, 2012 at 07:22:51AM -0500, Anthony Liguori wrote:

[Qemu-devel] [PATCH v4 4/7] qapi: Re-arrange monitor.c functions

2012-06-22 Thread Corey Bryant
Signed-off-by: Corey Bryant --- v4: -This patch is new in v4. monitor.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/monitor.c b/monitor.c index 3433c06..153e949 100644 --- a/monitor.c +++ b/monitor.c @@ -2239,26 +2239,6 @@ sta

[Qemu-devel] [PATCH v4 1/7] qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsg

2012-06-22 Thread Corey Bryant
This sets the close-on-exec flag for the file descriptor received via SCM_RIGHTS. Signed-off-by: Corey Bryant --- v4 -This patch is new in v4 (ebl...@redhat.com) qemu-char.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index c2aaaee..f890113

[Qemu-devel] [PATCH v4 2/7] qapi: Convert getfd and closefd

2012-06-22 Thread Corey Bryant
Signed-off-by: Corey Bryant --- v2: -Convert getfd and closefd to QAPI (lcapitul...@redhat.com) -Remove changes that returned fd from getfd (lcapitul...@redhat.com) -Wrap hmp_* functions around qmp_* functions (kw...@redhat.com) -Move hmp_* functions to hmp.c (lcapitul...@redhat.com) -Drop .u

[Qemu-devel] [Bug 1014681] Re: BSOD with newer host kernels (x64) and W2k8S guest (x64)

2012-06-22 Thread vrozenfe
Could you try booting in safe mode with and without networking? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1014681 Title: BSOD with newer host kernels (x64) and W2k8S guest (x64) Status in QEMU

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: add guest-fstrim command

2012-06-22 Thread Chris Wedgwood
> FITRIM is a mounted filesystem feature to discard (or "trim") blocks which > are not in use by the filesystem. This is useful for solid-state drives > (SSDs) and thinly-provisioned storage. Provide access to the feature > from the host so that filesystems can be trimmed periodically or before >

[Qemu-devel] usb_packet_complete: Assertion ... failed

2012-06-22 Thread Jan Kiszka
Hi Gerd, I'm getting qemu/hw/usb/core.c:410: usb_packet_complete: Assertion `((&ep->queue)->tqh_first) == p' failed. with a passed-through USB headset (UHCI controller). This was with current QEMU git head. Known issues? Anything I can do to debug it? Jan -- Siemens AG, Corporate Technology,

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

2012-06-22 Thread Stefan Hajnoczi
This series aims to improve qcow2 performance with cache=writethrough and cache=directsync. In particular it reduces the impact of metadata updates for allocating writes. Allocating writes are expensive because they involve updating L2 tables and refcount blocks. In addition they can also cause

Re: [Qemu-devel] qemu -numa option and non-contiguous CPU ranges

2012-06-22 Thread Eduardo Habkost
On Fri, Jun 22, 2012 at 11:00:57AM +0100, Daniel P. Berrange wrote: > On Thu, Jun 21, 2012 at 11:39:46PM +0200, Andre Przywara wrote: > > On 06/21/2012 07:51 PM, Eduardo Habkost wrote: > > >Hi, > > > > > >I just noticed libvirt tries to use the -numa option in a way that qemu > > >never understood:

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

2012-06-22 Thread 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 deletion(-) diff --git a/docs/specs/qcow2.txt b/docs/specs/q

[Qemu-devel] [RFC 4/7] qemu-iotests: ignore qemu-img create lazy_refcounts output

2012-06-22 Thread Stefan Hajnoczi
Hide the default lazy_refcounts=off output from qemu-img like we do with other image creation options. This ensures that existing golden outputs continue to pass despite the new option that has been added. Note that this patch applies before the one that actually introduces the lazy_refcounts=on|

[Qemu-devel] [RFC 1/7] docs: add dirty bit to qcow2 specification

2012-06-22 Thread Stefan Hajnoczi
The dirty bit will make it possible to perform lazy refcount updates, where the image file is not kept consistent all the time. Upon opening a dirty image file, it is necessary to perform a consistency check and repair any incorrect refcounts. Therefore the dirty bit must be an incompatible featu

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

2012-06-22 Thread 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 it is marked dirty. a. Written data can be read back su

[Qemu-devel] [RFC 6/7] qemu-io: add "abort" command to simulate program crash

2012-06-22 Thread Stefan Hajnoczi
Avoiding data loss and corruption is the top requirement for image file formats. The qemu-io "abort" command makes it possible to simulate program crashes and does not give the image format a chance to cleanly shut down. This command is useful for data integrity test cases. Signed-off-by: Stefan

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

2012-06-22 Thread 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 ++-- block/qcow2.h |3

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

2012-06-22 Thread 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. Reducing metadata I/O is important for cache=writet

[Qemu-devel] [PATCH v3 0/8] Huge memory fixes

2012-06-22 Thread Juan Quintela
Hi The following changes since commit 47ecbdf07ed2c37bdfd2d77137d01bb319ce13da: libcacard: build fixes (2012-06-21 20:04:24 +) are available in the git repository at: http://repo.or.cz/r/qemu/quintela.git huge_memory-v2 for you to fetch changes up to 565b6c96250305553c21714f3c482d7d408

Re: [Qemu-devel] [PATCH 8/9] alpha-linux-user: Properly handle the non-rt sigprocmask syscall.

2012-06-22 Thread Peter Maydell
On 7 June 2012 23:24, Richard Henderson wrote: > @@ -5880,12 +5880,13 @@ abi_long do_syscall(void *cpu_env, int num, abi_long > arg1, >             mask = arg2; >             target_to_host_old_sigset(&set, &mask); > > -            ret = get_errno(sigprocmask(how, &set, &oldset)); > - > -        

[Qemu-devel] [PATCH 6/8] Exit loop if we have been there too long

2012-06-22 Thread Juan Quintela
Checking each 64 pages is a random magic number as good as any other. We don't want to test too many times, but on the other hand, qemu_get_clock_ns() is not so expensive either. We want to be sure that we spent less than 50ms (half of buffered_file timer), if we spent more than 100ms, all the acc

[Qemu-devel] [PATCH 1/8] Add spent time for migration

2012-06-22 Thread Juan Quintela
We add time spent for migration to the output of "info migrate" command. 'total_time' means time since the start fo migration if migration is 'active', and total time of migration if migration is completed. As we are also interested in transferred ram when migration completes, adding all ram stat

[Qemu-devel] [PATCH 4/8] Only TCG needs TLB handling

2012-06-22 Thread Juan Quintela
Refactor the code that is only needed for tcg to an static function. Call that only when tcg is enabled. We can't refactor to a dummy function in the kvm case, as qemu can be compiled at the same time with tcg and kvm. Signed-off-by: Juan Quintela --- exec.c | 31 +

Re: [Qemu-devel] [PATCH 6/9] linux-user: Translate pipe2 flags; add to strace

2012-06-22 Thread Peter Maydell
On 7 June 2012 23:24, Richard Henderson wrote: > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell -- PMM

[Qemu-devel] [PATCH 3/8] No need to iterate if we already are over the limit

2012-06-22 Thread Juan Quintela
If buffers are full, don't iterate, just exit. Signed-off-by: Juan Quintela --- savevm.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/savevm.c b/savevm.c index 40320be..9101bfb 100644 --- a/savevm.c +++ b/savevm.c @@ -1625,6 +1625,9 @@ int qemu_savevm_state_iterate(QEMUFile *f)

Re: [Qemu-devel] [PATCH 4/9] linux-user: Handle O_SYNC, O_NOATIME, O_CLOEXEC, O_PATH

2012-06-22 Thread Peter Maydell
On 7 June 2012 23:24, Richard Henderson wrote: > And tidy up syscall_defs.h a little bit.  For each target, only > define the bits in arch/target/include/asm/fcntl.h, leaving the > others to a new asm-generic section below. This patch is doing two things at once -- could you separate the refactor

Re: [Qemu-devel] [PATCH 1/9] alpha-linux-user: Fix signal handling

2012-06-22 Thread Peter Maydell
On 7 June 2012 23:24, Richard Henderson wrote: > Proper signal numbers were not defined, and EXCP_INTERRUPT > was unhandled, leading to all sorts of subtle confusion. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell -- PMM

[Qemu-devel] [RFC] migration next tree

2012-06-22 Thread Juan Quintela
Hi As discussed on this week kvm call, here are the migration tree with XBRLE + huge memory fixes integrated. There were a bug on huge memory (corrected on the v3 version just sent) and another on XZBRLE patches. Orit is going to resend patches addressing comments, but here the fix is integrated

[Qemu-devel] [PATCH 7/8] dirty bitmap: abstract its use

2012-06-22 Thread Juan Quintela
Always use accessors to read/set the dirty bitmap. Signed-off-by: Juan Quintela --- exec-obsolete.h | 40 exec.c |3 +-- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/exec-obsolete.h b/exec-obsolete.h index 792c831..f8ffc

Re: [Qemu-devel] [PATCH v2 1/2] arm_boot: Assume Linux boot flow when -dtb given

2012-06-22 Thread Peter Crosthwaite
On Fri, Jun 22, 2012 at 11:36 PM, Peter Maydell wrote: > On 22 June 2012 14:27, Peter Crosthwaite > wrote: >> Ping! >> >> Any thoughts Peter? > > Still sounds too specific to your odd use case and hardware to me. > > I'd accept some reasonable way of saying "this ELF file is a Linux kernel", > bu

[Qemu-devel] [PATCH 8/8] Maintain the number of dirty pages

2012-06-22 Thread Juan Quintela
Calculate the number of dirty pages takes a lot on hosts with lots of memory. Just maintain how many pages are dirty. Signed-off-by: Juan Quintela --- arch_init.c | 15 +-- cpu-all.h |1 + exec-obsolete.h | 10 ++ 3 files changed, 12 insertions(+), 14 delet

[Qemu-devel] [PATCH 5/8] Only calculate expected_time for stage 2

2012-06-22 Thread Juan Quintela
ram_save_remaining() is an expensive operation when there is a lot of memory. So we only call the function when we need it. Signed-off-by: Juan Quintela --- arch_init.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch_init.c b/arch_init.c index a9e8b74..424ef

[Qemu-devel] [PATCH 2/8] Add tracepoints for savevm section start/end

2012-06-22 Thread Juan Quintela
This allows to know how long each section takes to save. An awk script like this tells us sections that takes more that 10ms $1 ~ /savevm_state_iterate_end/ { /* Print savevm_section_end line when > 10ms duration */ if ($2 > 1) { printf("%s times_missing=%u\n",

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

2012-06-22 Thread Anthony Liguori
On 06/22/2012 08:34 AM, Daniel P. Berrange wrote: On Fri, Jun 22, 2012 at 07:58:53AM -0500, Anthony Liguori wrote: On 06/22/2012 07:31 AM, Daniel P. Berrange wrote: On Fri, Jun 22, 2012 at 07:22:51AM -0500, Anthony Liguori wrote: On 06/22/2012 07:12 AM, Markus Armbruster wrote: Anthony Liguor

Re: [Qemu-devel] [PATCH v2 1/2] arm_boot: Assume Linux boot flow when -dtb given

2012-06-22 Thread Peter Crosthwaite
On Fri, Jun 22, 2012 at 11:36 PM, Peter Maydell wrote: > On 22 June 2012 14:27, Peter Crosthwaite > wrote: >> Ping! >> >> Any thoughts Peter? > > Still sounds too specific to your odd use case and hardware to me. > > I'd accept some reasonable way of saying "this ELF file is a Linux kernel", > bu

Re: [Qemu-devel] [RFC] block: Removed coroutine ownership assumption

2012-06-22 Thread Markus Armbruster
Peter Maydell writes: > On 22 June 2012 13:04, Markus Armbruster wrote: >> Peter Maydell writes: >> >>> On 22 June 2012 09:48, Markus Armbruster wrote: In my opinion, coroutines have been useful for us so far.  Whether they remain useful, or serve us just as a stepping stone towards

Re: [Qemu-devel] [PATCH v2 1/2] arm_boot: Assume Linux boot flow when -dtb given

2012-06-22 Thread Peter Maydell
On 22 June 2012 14:27, Peter Crosthwaite wrote: > Ping! > > Any thoughts Peter? Still sounds too specific to your odd use case and hardware to me. I'd accept some reasonable way of saying "this ELF file is a Linux kernel", but magically doing it if you also said -dtb isn't it. I also care about

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

2012-06-22 Thread Daniel P. Berrange
On Fri, Jun 22, 2012 at 07:58:53AM -0500, Anthony Liguori wrote: > On 06/22/2012 07:31 AM, Daniel P. Berrange wrote: > >On Fri, Jun 22, 2012 at 07:22:51AM -0500, Anthony Liguori wrote: > >>On 06/22/2012 07:12 AM, Markus Armbruster wrote: > >>>Anthony Liguori writes: > Nack. > > Use a

Re: [Qemu-devel] [PATCH v2 1/2] arm_boot: Assume Linux boot flow when -dtb given

2012-06-22 Thread Peter Crosthwaite
Ping! Any thoughts Peter? Regards, Peter On Wed, Jun 20, 2012 at 11:45 AM, Peter Crosthwaite wrote: > It matches my flow in the real hardware. > > Heres the scenario where we need this (FYI applies to both microblaze and > arm): > > User creates a Linux elf that includes a built in dtb. Slave

Re: [Qemu-devel] [PATCH v1] device_tree: load_device_tree(): Allow NULL sizep

2012-06-22 Thread Peter Crosthwaite
CC device-tree.c original contributors. (Jerome Young and Hollis Blanchard). I cant find a maintainer for device-tree, and Stefan wants a review. This patch seem ok? On Thu, Jun 21, 2012 at 2:51 PM, Peter A. G. Crosthwaite wrote: > The sizep arg is populated with the size of the loaded device tr

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

2012-06-22 Thread Anthony Liguori
On 06/22/2012 07:31 AM, Daniel P. Berrange wrote: On Fri, Jun 22, 2012 at 07:22:51AM -0500, Anthony Liguori wrote: On 06/22/2012 07:12 AM, Markus Armbruster wrote: Anthony Liguori writes: Nack. Use a protocol. This is not what QMP events are designed for! No human is going to launch nc to

Re: [Qemu-devel] [PATCH 1/2] CPUArchState: introduce per-cpu lock

2012-06-22 Thread Andreas Färber
Am 21.06.2012 17:06, schrieb Liu Ping Fan: > introduce a lock for per-cpu to protect agaist accesing from > other vcpu thread. > > Signed-off-by: Liu Ping Fan > --- > cpu-defs.h |2 ++ > cpus.c | 17 + > main-loop.h |3 +++ > 3 files changed, 22 insertions(+), 0 d

Re: [Qemu-devel] [PATCH 6/7] Exit loop if we have been there too long

2012-06-22 Thread Juan Quintela
"(Wei-Ren Chen)" wrote: >> >> +if ((i & 63) == 0) { >> >> +uint64_t t1 = (qemu_get_clock_ns(rt_clock) - bwidth) / >> >> 100; >> >> +if (t1 > 50) { /* 50ms, half buffered_file limit */ >> > can't we use a constant ? >> >> 50 is a constant already, no? Or what

Re: [Qemu-devel] [PATCH 1/2] CPUArchState: introduce per-cpu lock

2012-06-22 Thread Stefan Hajnoczi
On Thu, Jun 21, 2012 at 4:06 PM, Liu Ping Fan wrote: > diff --git a/cpu-defs.h b/cpu-defs.h > index f49e950..7305822 100644 > --- a/cpu-defs.h > +++ b/cpu-defs.h > @@ -30,6 +30,7 @@ >  #include "osdep.h" >  #include "qemu-queue.h" >  #include "targphys.h" > +#include "qemu-thread-posix.h" This br

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

2012-06-22 Thread Daniel P. Berrange
On Fri, Jun 22, 2012 at 07:22:51AM -0500, Anthony Liguori wrote: > On 06/22/2012 07:12 AM, Markus Armbruster wrote: > >Anthony Liguori writes: > >>Nack. > >> > >>Use a protocol. This is not what QMP events are designed for! > >> > >>No human is going to launch nc to a unix domain socket to launch

  1   2   >