[Qemu-devel] [RFC PATCH 4/4] qcow2: Add full image preallocation option

2013-11-11 Thread Hu Tao
This adds a preallocation=full mode to qcow2 image creation, which creates a non-sparse image file. Signed-off-by: Hu Tao --- block/qcow2.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 359030f..d3ca6cf 10064

[Qemu-devel] [RFC PATCH 0/4] qcow2: Add preallocation=full option

2013-11-11 Thread Hu Tao
This series impelments preallocation=full, using posix_fallocate() based on Kevin's original patch at: http://lists.gnu.org/archive/html/qemu-devel/2011-01/msg03017.html Hu Tao (4): block: add BlockDriver.bdrv_zero_init. block/raw-posix: implement bdrv_zero_init qcow2: implement bdrv_zero_in

[Qemu-devel] [RFC PATCH 2/4] block/raw-posix: implement bdrv_zero_init

2013-11-11 Thread Hu Tao
Implement bdrv_zero_init using posix_fallocate. Signed-off-by: Hu Tao --- block/raw-posix.c | 13 + 1 file changed, 13 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index f6d48bb..8798599 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -1190,6 +1190,18 @

[Qemu-devel] [RFC PATCH 3/4] qcow2: implement bdrv_zero_init

2013-11-11 Thread Hu Tao
Signed-off-by: Hu Tao --- block/qcow2.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 6e5d98d..359030f 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2180,6 +2180,12 @@ static int qcow2_amend_options(BlockDriverState *bs, return 0; } +s

[Qemu-devel] [RFC PATCH 1/4] block: add BlockDriver.bdrv_zero_init.

2013-11-11 Thread Hu Tao
This field is used to zero-initialize block device. It can be used to preallocate space for the block device. Signed-off-by: Hu Tao --- block.c | 13 + include/block/block.h | 1 + include/block/block_int.h | 2 ++ 3 files changed, 16 insertions(+) diff --git

[Qemu-devel] tracing branch in ARM

2013-11-11 Thread Xin Tong
I am writing code to trace all the branches in ARM, i would like to confirm with people whether I am doing this correctly. I put in code in gen_jmp to trace all the branches that are taken, afaik, the gen_jmp gets called when an unconditional branch is JITed or in the s->condlabel of conditional

Re: [Qemu-devel] [PATCH v2] target-ppc: move POWER7+ to a separate family

2013-11-11 Thread Alexey Kardashevskiy
On 11/09/2013 11:20 AM, Alexey Kardashevskiy wrote: > On 11/09/2013 03:59 AM, Andreas Färber wrote: >> Am 08.11.2013 15:54, schrieb Alexey Kardashevskiy: >>> On 11/09/2013 12:44 AM, Andreas Färber wrote: Am 08.11.2013 03:37, schrieb Alexey Kardashevskiy: > So far POWER7+ was a part of POWE

Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()

2013-11-11 Thread Paolo Bonzini
Il 12/11/2013 00:21, Anthony Liguori ha scritto: > FWIW, I'd rather just add -O1 for debug builds than add more stub functions. That can do, too. clang works fine with -O1. Paolo

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

2013-11-11 Thread Fam Zheng
On 2013年10月17日 22: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 += $(CURL_CFLAGS)

Re: [Qemu-devel] [PATCH] qemu-img create: set nocow flag by default

2013-11-11 Thread Fam Zheng
On 2013年11月07日 16:08, Chunyan Liu wrote: Set NOCOW flag to newly created images to solve performance issues on btrfs. Btrfs has terrible performance when hosting VM images, even more when the guest in those VM are also using btrfs as file system. One way to mitigate this bad performance is to tu

Re: [Qemu-devel] segmentation fault in ARM TCG

2013-11-11 Thread Xin Tong
you are right richard. it turns out i am generating too many tcg opcode in the frontend, such that OPC_BUF_SIZE is too small. Thank you Xin On Mon, Nov 4, 2013 at 8:18 AM, Richard Henderson wrote: > On 11/03/2013 05:22 AM, Xin Tong wrote: > > I am running QEMU user mode, but i hit a SIGSEV. I

Re: [Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus

2013-11-11 Thread 赵小强
于 11/12/2013 11:02 AM, Chen Fan 写道: On Tue, 2013-11-12 at 09:54 +0800, 赵小强 wrote: 于 11/12/2013 09:28 AM, Chen Fan 写道: On Mon, 2013-11-11 at 11:58 +0800, 赵小强 wrote: 于 11/05/2013 04:51 PM, 赵小强 写道: 于 2013年11月05日 16:25, Chen Fan 写道: On Tue, 2013-11-05 at 15:55 +0800, xiaoqiang zhao wrote: chan

Re: [Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus

2013-11-11 Thread Chen Fan
On Tue, 2013-11-12 at 09:54 +0800, 赵小强 wrote: > 于 11/12/2013 09:28 AM, Chen Fan 写道: > > > On Mon, 2013-11-11 at 11:58 +0800, 赵小强 wrote: > > > 于 11/05/2013 04:51 PM, 赵小强 写道: > > > > 于 2013年11月05日 16:25, Chen Fan 写道: > > > > > On Tue, 2013-11-05 at 15:55 +0800, xiaoqiang zhao wrote: > > > > > > chan

Re: [Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus

2013-11-11 Thread 赵小强
于 11/12/2013 09:28 AM, Chen Fan 写道: On Mon, 2013-11-11 at 11:58 +0800, 赵小强 wrote: 于 11/05/2013 04:51 PM, 赵小强 写道: 于 2013年11月05日 16:25, Chen Fan 写道: On Tue, 2013-11-05 at 15:55 +0800, xiaoqiang zhao wrote: changes includes: 1. use type constant for apic and kvm_apic 2. convert function 'init' t

Re: [Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus

2013-11-11 Thread Chen Fan
On Mon, 2013-11-11 at 11:58 +0800, 赵小强 wrote: > 于 11/05/2013 04:51 PM, 赵小强 写道: > > 于 2013年11月05日 16:25, Chen Fan 写道: > >> On Tue, 2013-11-05 at 15:55 +0800, xiaoqiang zhao wrote: > >>> changes includes: > >>> 1. use type constant for apic and kvm_apic > >>> 2. convert function 'init' to QOM's 'real

[Qemu-devel] [PATCH for-1.7] target-i386: Fix addr32 prefix in gen_lea_modrm

2013-11-11 Thread Richard Henderson
Fix the following run-test-x86_64 testsuite failures: -lea (%%eax) = 0001 -lea (%%ebx) = 0002 -lea (%%ecx) = 0004 -lea (%%edx) = 0008 -lea (%%esi) = 0010 -lea (%%edi) = 0020 +lea (%%eax) = abcc0001 +lea (%%ebx) = a

Re: [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments

2013-11-11 Thread Alexey Kardashevskiy
On 11/12/2013 01:25 AM, Igor Mammedov wrote: > On Mon, 11 Nov 2013 13:41:05 +0100 > Andreas Färber wrote: > >> Am 11.11.2013 08:44, schrieb Alexey Kardashevskiy: >>> This converts +foo/-foo to "foo=on"/"foo=off" respectively when >>> QEMU parser is used for the command line options. >>> >>> "-cpu

Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()

2013-11-11 Thread Peter Maydell
On 11 November 2013 23:11, Paolo Bonzini wrote: > Il 11/11/2013 23:38, Peter Maydell ha scritto: >> If we have other places where we're relying on dead code elimination >> to not provide a function definition, please point them out, because >> they're bugs we need to fix, ideally before they cause

Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()

2013-11-11 Thread Anthony Liguori
On Mon, Nov 11, 2013 at 3:11 PM, Paolo Bonzini wrote: > Il 11/11/2013 23:38, Peter Maydell ha scritto: >> If we have other places where we're relying on dead code elimination >> to not provide a function definition, please point them out, because >> they're bugs we need to fix, ideally before they

Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()

2013-11-11 Thread Paolo Bonzini
Il 11/11/2013 23:38, Peter Maydell ha scritto: > If we have other places where we're relying on dead code elimination > to not provide a function definition, please point them out, because > they're bugs we need to fix, ideally before they cause compilation > failures. I'm not sure, there are prob

Re: [Qemu-devel] [PATCH] vfio-pci: Fix Nvidia MSI ACK through 0x88000 quirk

2013-11-11 Thread Dave Airlie
On Tue, Nov 12, 2013 at 8:32 AM, Alex Williamson wrote: > On Tue, 2013-11-12 at 07:55 +1000, Dave Airlie wrote: >> On Tue, Nov 12, 2013 at 7:43 AM, Alex Williamson >> wrote: >> > When MSI is enabled on Nvidia GeForce cards the driver seems to >> > acknowledge the interrupt by writing a 0xff byte

Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()

2013-11-11 Thread Peter Maydell
On 11 November 2013 22:19, Paolo Bonzini wrote: > Il 11/11/2013 22:22, Peter Maydell ha scritto: >> Fix build failures with clang when KVM is not enabled by >> providing a stub version of kvm_arch_get_supported_cpuid(). >> >> Signed-off-by: Peter Maydell > > No, please don't. We are already rely

Re: [Qemu-devel] [PATCH] vfio-pci: Fix Nvidia MSI ACK through 0x88000 quirk

2013-11-11 Thread Alex Williamson
On Tue, 2013-11-12 at 07:55 +1000, Dave Airlie wrote: > On Tue, Nov 12, 2013 at 7:43 AM, Alex Williamson > wrote: > > When MSI is enabled on Nvidia GeForce cards the driver seems to > > acknowledge the interrupt by writing a 0xff byte to the MSI capability > > ID register using the PCI config spac

Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()

2013-11-11 Thread Paolo Bonzini
Il 11/11/2013 22:22, Peter Maydell ha scritto: > Fix build failures with clang when KVM is not enabled by > providing a stub version of kvm_arch_get_supported_cpuid(). > > Signed-off-by: Peter Maydell No, please don't. We are already relying on dead code elimination for KVM code (I didn't intro

Re: [Qemu-devel] [PATCH] vfio-pci: Fix Nvidia MSI ACK through 0x88000 quirk

2013-11-11 Thread Dave Airlie
On Tue, Nov 12, 2013 at 7:43 AM, Alex Williamson wrote: > When MSI is enabled on Nvidia GeForce cards the driver seems to > acknowledge the interrupt by writing a 0xff byte to the MSI capability > ID register using the PCI config space mirror at offset 0x88000 from > BAR0. Without this, the devic

[Qemu-devel] [PATCH] vfio-pci: Add debug config options to disable MSI/X KVM support

2013-11-11 Thread Alex Williamson
It's sometimes useful to be able to verify interrupts are passing through correctly. Signed-off-by: Alex Williamson --- hw/misc/vfio.c | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index 3f50872..13f916b 100644 ---

[Qemu-devel] [PATCH] vfio-pci: Fix Nvidia MSI ACK through 0x88000 quirk

2013-11-11 Thread Alex Williamson
When MSI is enabled on Nvidia GeForce cards the driver seems to acknowledge the interrupt by writing a 0xff byte to the MSI capability ID register using the PCI config space mirror at offset 0x88000 from BAR0. Without this, the device will only fire a single interrupt. VFIO handles the PCI capabil

Re: [Qemu-devel] Windows 8 installation fails with qemu-1.6.1

2013-11-11 Thread Stefan Weil
Am 11.11.2013 22:25, schrieb Erik Rull: > Hi all, > > I tried qemu-kvm 1.2.0 there all Windows XP, 7 and 8 were able to be > installed and booted. > On 1.6.1 only Windows XP still runs - 7 and 8 either get killed at > installation or at bootup (after having installed them with 1.2.0). > > Should I

Re: [Qemu-devel] dump-guest-memory enhancement.

2013-11-11 Thread Peter Maydell
On 11 November 2013 03:28, Phi Debian wrote: > The Align fot the PT_LOAD is ZERO, then the offset is 0x114, having an > Align set to TARGET_PAGE_BITS, (or at least 4Kb) would provide a > chance for any debugger to do page align copy (either lseek/read, or > mmap) as they trip on the core, marginal

Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()

2013-11-11 Thread Andreas Tobler
On 11.11.13 22:22, Peter Maydell wrote: > Fix build failures with clang when KVM is not enabled by > providing a stub version of kvm_arch_get_supported_cpuid(). > > Signed-off-by: Peter Maydell > --- > I wouldn't be surprised if this also affected debug gcc > builds with KVM disabled, but I haven

Re: [Qemu-devel] Windows 8 installation fails with qemu-1.6.1

2013-11-11 Thread Erik Rull
Hi all, I tried qemu-kvm 1.2.0 there all Windows XP, 7 and 8 were able to be installed and booted. On 1.6.1 only Windows XP still runs - 7 and 8 either get killed at installation or at bootup (after having installed them with 1.2.0). Should I open a ticket for that? Best regards, Erik Eri

[Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()

2013-11-11 Thread Peter Maydell
Fix build failures with clang when KVM is not enabled by providing a stub version of kvm_arch_get_supported_cpuid(). Signed-off-by: Peter Maydell --- I wouldn't be surprised if this also affected debug gcc builds with KVM disabled, but I haven't checked. Incidentally, since this is an x86 specif

Re: [Qemu-devel] [PATCH] fix compilation/link with clang, target-i386/cpu.c

2013-11-11 Thread Peter Maydell
On 11 November 2013 21:12, Andreas Tobler wrote: > On 11.11.13 22:02, Peter Maydell wrote: >> I think I would agree with the commenter in the bug report you >> reference (http://llvm.org/bugs/show_bug.cgi?id=17882) >> that this is not a clang bug. We shouldn't be relying on the >> compiler's dead

Re: [Qemu-devel] [PATCH] fix compilation/link with clang, target-i386/cpu.c

2013-11-11 Thread Andreas Tobler
On 11.11.13 22:02, Peter Maydell wrote: > On 11 November 2013 20:10, Andreas Tobler wrote: >> Paolo asked me to test and submit the below patch to fix compilation and >> link with clang. >> >> Paolo reduced the issue to a clang bug where dead code is not properly >> eliminated before linktime. (th

Re: [Qemu-devel] [PATCH] fix compilation/link with clang, target-i386/cpu.c

2013-11-11 Thread Peter Maydell
On 11 November 2013 20:10, Andreas Tobler wrote: > Paolo asked me to test and submit the below patch to fix compilation and > link with clang. > > Paolo reduced the issue to a clang bug where dead code is not properly > eliminated before linktime. (the clang bug ID: 17882) Thanks for the patch. H

Re: [Qemu-devel] [PATCH] ui/sdl2 : initial port to SDL 2.0

2013-11-11 Thread Dave Airlie
On Tue, Nov 12, 2013 at 12:07 AM, Anthony Liguori wrote: > > On Nov 11, 2013 1:10 AM, "Dave Airlie" wrote: >> >> On Mon, Nov 11, 2013 at 2:02 PM, Anthony Liguori >> wrote: >> > On Sun, Nov 10, 2013 at 3:15 PM, Dave Airlie wrote: >> >> From: Dave Airlie >> >> >> >> I've ported the SDL1.2 code o

[Qemu-devel] [PATCH] fix compilation/link with clang, target-i386/cpu.c

2013-11-11 Thread Andreas Tobler
Hello, Paolo asked me to test and submit the below patch to fix compilation and link with clang. Paolo reduced the issue to a clang bug where dead code is not properly eliminated before linktime. (the clang bug ID: 17882) Thanks, Andreas Signed-off-by: Andreas Tobler diff --git a/target-i38

Re: [Qemu-devel] [PATCH] A hexdump function that also displays UTF-8 strings contained in the dumped buffer.

2013-11-11 Thread Anthony Liguori
On Mon, Nov 11, 2013 at 10:29 AM, Mike Day wrote: > This function is used by a forthcomingQemu monitor command that dumps > contents of OpenFirmware Device Trees. It dumps contents of a buffer > as hex in the same format as the existing function but also also > appends any UTF-8 strings in human-r

Re: [Qemu-devel] dump-guest-memory enhancement.

2013-11-11 Thread Phi Debian
Hi Laszlo, On Mon, Nov 11, 2013 at 8:38 PM, Laszlo Ersek wrote: > > But first, I think you meant TARGET_PAGE_SIZE, not TARGET_PAGE_BITS, for > the p_align field. > > So, the specs say for p_align: > >> As ``Program Loading'' describes in this chapter of the processor >> supplement, loadable pro

Re: [Qemu-devel] dump-guest-memory enhancement.

2013-11-11 Thread Laszlo Ersek
On 11/11/13 04:28, Phi Debian wrote: > CU82$ /usr/bin/readelf -a vmcore > Program Headers: > Type Offset VirtAddrPhysAddr FileSizMemSiz Flg Align > NOTE 0x74 0x 0x 0x000a0 0x000a0 0 > LOAD 0x000114 0x6000 0x6000 0x4000 0x40

Re: [Qemu-devel] [PATCH 1/7] usb: remove old usb-host code

2013-11-11 Thread Hans de Goede
Hi, On 11/11/2013 09:47 AM, Gerd Hoffmann wrote: On Fr, 2013-11-08 at 17:51 +0100, Jan Kiszka wrote: On 2013-11-08 16:39, Gerd Hoffmann wrote: Hi, OK, then here is the first issue I ran into while trying libusbx (git head, i.e. 1.0.17+: The new stack causes significant latency issues that

Re: [Qemu-devel] [RFC] target-arm: provide skeleton for a64 insn decoding

2013-11-11 Thread Richard Henderson
On 11/12/2013 01:13 AM, Claudio Fontana wrote: > +/* C3.2 Branches, exception generating and system instructions */ > +static void disas_b_exc_sys(DisasContext *s, uint32_t insn) > +{ > +switch (extract32(insn, 25, 7)) { > +case 0x0a: case 0x4a: /* Unconditional branch (immediate) */ > +

Re: [Qemu-devel] [PATCH v2 0/3] Make thread pool implementation modular

2013-11-11 Thread Paolo Bonzini
Il 11/11/2013 19:32, Alex Bligh ha scritto: > > On 11 Nov 2013, at 18:01, Paolo Bonzini wrote: > >> Il 11/11/2013 18:59, Alex Bligh ha scritto: Why is it necessary to push this task down into the host? I don't understand the advantage of this approach except that maybe it works ar

Re: [Qemu-devel] [PATCH v2 0/3] Make thread pool implementation modular

2013-11-11 Thread Alex Bligh
On 11 Nov 2013, at 18:01, Paolo Bonzini wrote: > Il 11/11/2013 18:59, Alex Bligh ha scritto: >>> Why is it necessary to push this task down into the host? I don't >>> understand the advantage of this approach except that maybe it works >>> around certain misconfigurations, I/O scheduler quirks,

[Qemu-devel] [PATCH] A hexdump function that also displays UTF-8 strings contained in the dumped buffer.

2013-11-11 Thread Mike Day
This function is used by a forthcomingQemu monitor command that dumps contents of OpenFirmware Device Trees. It dumps contents of a buffer as hex in the same format as the existing function but also also appends any UTF-8 strings in human-readable format. Like the existing hexdump function, this f

Re: [Qemu-devel] audit needed for signal handlers

2013-11-11 Thread Max Filippov
On Mon, Nov 11, 2013 at 8:50 PM, Eric Blake wrote: > Quick - identify the bug in this code (from ui/curses.c): > > static void curses_winch_handler(int signum) > { > struct winsize { > unsigned short ws_row; > unsigned short ws_col; > unsigned short ws_xpixel; /* unus

Re: [Qemu-devel] [PATCH v2 0/3] Make thread pool implementation modular

2013-11-11 Thread Paolo Bonzini
Il 11/11/2013 18:59, Alex Bligh ha scritto: > > Why is it necessary to push this task down into the host? I don't > > understand the advantage of this approach except that maybe it works > > around certain misconfigurations, I/O scheduler quirks, or plain old > > bugs - all of which should be inve

Re: [Qemu-devel] [PATCH v2 0/3] Make thread pool implementation modular

2013-11-11 Thread Alex Bligh
On 11 Nov 2013, at 12:43, Stefan Hajnoczi wrote: > Why is it necessary to push this task down into the host? I don't > understand the advantage of this approach except that maybe it works > around certain misconfigurations, I/O scheduler quirks, or plain old > bugs - all of which should be inves

Re: [Qemu-devel] [PATCH RFC 5/5] exec: memory radix tree page level compression

2013-11-11 Thread Eric Blake
On 11/11/2013 09:41 AM, Michael S. Tsirkin wrote: > At the moment, memory radix tree is already variable width, but it can > only skip the low bits of address. > > This is efficient if we have huge memory regions but inefficient if we > are only using a tiny portion of the address space. > > Afte

Re: [Qemu-devel] audit needed for signal handlers

2013-11-11 Thread Eric Blake
On 11/11/2013 10:05 AM, Paolo Bonzini wrote: > > That said, aren't all signals in QEMU (except SIG_IPI) caught with > signalfd and the handlers run synchronously in the iothread? signalfd is currently a Linux-only concept - what happens on BSD? -- Eric Blake eblake redhat com+1-919-301-3

[Qemu-devel] [PATCH RFC 0/5] making address spaces 64 bit wide

2013-11-11 Thread Michael S. Tsirkin
At the moment, exec ignores high bits in each address, for efficiency. This is incorrect: devices can do full 64 bit DMA, it's only the CPU that is limited by target address space. Using full 64 bit addresses was clocked at 12% performance hit on a microbenchmark. To solve, teach pagetables to skip

Re: [Qemu-devel] audit needed for signal handlers

2013-11-11 Thread Paolo Bonzini
Il 11/11/2013 18:13, Peter Maydell ha scritto: >> > That said, aren't all signals in QEMU (except SIG_IPI) caught with >> > signalfd and the handlers run synchronously in the iothread? > Eric specifically points out one which is not. > (I'm pretty sure that 'reinstall signal handler at > end of sig

Re: [Qemu-devel] audit needed for signal handlers

2013-11-11 Thread Eric Blake
On 11/11/2013 10:13 AM, Peter Maydell wrote: > On 11 November 2013 17:05, Paolo Bonzini wrote: >> That said, aren't all signals in QEMU (except SIG_IPI) caught with >> signalfd and the handlers run synchronously in the iothread? > > Eric specifically points out one which is not. > (I'm pretty sur

Re: [Qemu-devel] audit needed for signal handlers

2013-11-11 Thread Peter Maydell
On 11 November 2013 16:56, Anthony Liguori wrote: > On Mon, Nov 11, 2013 at 8:50 AM, Eric Blake wrote: >> Here's a hint: ioctl() can clobber errno. But if a signal handler is >> called in the middle of other code that is using errno, then the handler >> MUST restore the value of errno before ret

[Qemu-devel] [PATCH v2 18/19] bsd-user: add arm, mips and mips64 options to configure target-list

2013-11-11 Thread Stacey Son
This change adds arm-bsd-user, mips-bsd-user, mips64-bsd-user, mips64el-bsd-user, and mipsel-bsd-user as --target-list options to configure. Signed-off-by: Stacey Son --- default-configs/arm-bsd-user.mak |3 +++ default-configs/mips-bsd-user.mak |1 + default-configs/mips64-bsd-

[Qemu-devel] DMA Engine Support

2013-11-11 Thread Forrest Franks
I am working with two DMA engines at the moment. I want to be able to provide guest access to a Crystal Beach DMA engine and a PLX 87xx DMA engine. Are there any current efforts to provide support for these DMA engines? What I have looked at so far indicates that they will need to have a QEMU

Re: [Qemu-devel] audit needed for signal handlers

2013-11-11 Thread Peter Maydell
On 11 November 2013 17:05, Paolo Bonzini wrote: > That said, aren't all signals in QEMU (except SIG_IPI) caught with > signalfd and the handlers run synchronously in the iothread? Eric specifically points out one which is not. (I'm pretty sure that 'reinstall signal handler at end of signal handl

Re: [Qemu-devel] audit needed for signal handlers

2013-11-11 Thread Eric Blake
On 11/11/2013 09:56 AM, Anthony Liguori wrote: >> Here's a hint: ioctl() can clobber errno. But if a signal handler is >> called in the middle of other code that is using errno, then the handler >> MUST restore the value of errno before returning, if it is to guarantee >> that the interrupted con

[Qemu-devel] [PATCH v2 12/19] bsd-user: add support for memory management related system calls

2013-11-11 Thread Stacey Son
This change adds support or stubs for memory management related system calls including mmap(2), munmap(2), mprotect(2), msync(2), mlock(2), munlock(2), mlockall(2), munlockall(2), madvise(2), minherit(2), mincore(2), shm_open(2), shm_unlink(2), shmget(2), shmctl(2), shmat(2), shmdt(2), vadvise(), s

Re: [Qemu-devel] audit needed for signal handlers

2013-11-11 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 11/11/2013 18:08, Eric Blake ha scritto: >>> That said, aren't all signals in QEMU (except SIG_IPI) caught >>> with signalfd and the handlers run synchronously in the >>> iothread? > signalfd is currently a Linux-only concept - what happens on BSD?

[Qemu-devel] [PATCH v2 05/19] bsd-user: move target arch and host OS dependent code out of syscall.c

2013-11-11 Thread Stacey Son
This change moves the system call handler for sysctl(2) and sysarch(2) from syscall.c to the OS and arch dependent directories. This eliminates many of the #ifdef's in syscall.c. These system call handlers are now located in the host os and target arch directories. Signed-off-by: Stacey Son ---

[Qemu-devel] [PATCH v2 19/19] bsd-user: fix linking conflicts with FreeBSD libcrypto

2013-11-11 Thread Stacey Son
FreeBSD has it's own AES_set_decrypt_key, etc. in libcrypto. This change fixes these conflicts and allows statically linking BSD user mode qemu. Signed-off-by: Stacey Son --- include/qemu/aes.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/include/qemu/aes.h b

[Qemu-devel] [PATCH v2 16/19] bsd-user: add support for extended attribute and ACL related syscalls

2013-11-11 Thread Stacey Son
This change add support for extended attribute and Access Control List (ACL) related system calls including extattrctl(), extattr_set_file(2), extattr_delete_file(2), extattr_set_fd(2), extattr_get_fd(2), extattr_delete_fd(2), extattr_get_link(2), extattr_set_link(2), extattr_delete_link(2), extatt

[Qemu-devel] [PATCH v2 03/19] bsd-user: move OS/arch dependent code for strace into separate directories

2013-11-11 Thread Stacey Son
This change moves host OS and arch dependent code for the sysarch system call related to the -strace functionality into the appropriate HOST_ABI_DIR and TARGET_ABI_DIR directories. Signed-off-by: Stacey Son --- bsd-user/arm/syscall.h | 36 +++ bsd-user/arm/target_arch_sysar

Re: [Qemu-devel] audit needed for signal handlers

2013-11-11 Thread Paolo Bonzini
Il 11/11/2013 17:56, Anthony Liguori ha scritto: > On Mon, Nov 11, 2013 at 8:50 AM, Eric Blake wrote: >> Quick - identify the bug in this code (from ui/curses.c): >> >> static void curses_winch_handler(int signum) >> { >> struct winsize { >> unsigned short ws_row; >> unsigned s

[Qemu-devel] [PATCH v2 13/19] bsd-user: add support for socket related system calls

2013-11-11 Thread Stacey Son
This change adds support or stubs for socket related system calls including accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), setsockopt(2), listen(2), recvfrom(2), recvmsg(2), sendmsg(2), sendto(2), socket(2), socketpair(2), shutdown(2), setfib(2), sctp_peeloff(2), sct

[Qemu-devel] [PATCH v2 01/19] bsd-user: refresh freebsd system call numbers

2013-11-11 Thread Stacey Son
Update FreeBSD system call numbers in freebsd/syscall_nr.h. Reviewed-by: Ed Maste Signed-off-by: Stacey Son --- bsd-user/freebsd/syscall_nr.h | 813 ++--- 1 files changed, 445 insertions(+), 368 deletions(-) diff --git a/bsd-user/freebsd/syscall_nr.h b/bsd-

[Qemu-devel] [PATCH v2 11/19] bsd-user: add support for stat, directory, and file control related system calls

2013-11-11 Thread Stacey Son
This change adds support or stubs for stat, directory, and file control related system calls including stat(2), lstat(2), fstat(2), fstatat(2), nstat(), nfstat(), nlstat(), getfh(2), lgetfh(2), fhopen(2), fhstat(2), fhstatfs(2), statfs(2), fstatfs(2), getfsstat(2), getdents(2), getdirentries(2), a

[Qemu-devel] [PATCH v2 00/19] bsd-user: Add system call and mips/arm support.

2013-11-11 Thread Stacey Son
[v2] - Rebases to 1.7.0-rc0. (Requires, however, Andreas Tobler's patch to build: see http://lists.nongnu.org/archive/html/qemu-devel/2013-11/msg0.html) - Fixes deadlock in the _umtx_op() system call handler. - Fixes race condition in mmap() system call handler. - Makes qemu-mips (o32) usa

[Qemu-devel] [PATCH v2 10/19] bsd-user: add support for file system related system calls

2013-11-11 Thread Stacey Son
This change adds support or stubs for file system (except stat) related system calls including read(2), pread(2), readv(2), write(2), pwrite(2), writev(2), pwritev(2), open(2), openat(2), close(2), closefrom(2), revoke(2), access(2), eaccess(2), faccessat(2), chdir(2), fchdir(2), rename(2), rename

Re: [Qemu-devel] [PATCH 0/2] exec: alternative fix for master abort woes

2013-11-11 Thread Paolo Bonzini
Il 11/11/2013 17:43, Michael S. Tsirkin ha scritto: > On Thu, Nov 07, 2013 at 06:29:40PM +0100, Paolo Bonzini wrote: >> Il 07/11/2013 17:47, Michael S. Tsirkin ha scritto: >>> That's on kvm with 52 bit address. >>> But where I would be concerned is systems with e.g. 36 bit address >>> space where w

Re: [Qemu-devel] audit needed for signal handlers

2013-11-11 Thread Anthony Liguori
On Mon, Nov 11, 2013 at 8:50 AM, Eric Blake wrote: > Quick - identify the bug in this code (from ui/curses.c): > > static void curses_winch_handler(int signum) > { > struct winsize { > unsigned short ws_row; > unsigned short ws_col; > unsigned short ws_xpixel; /* unus

Re: [Qemu-devel] xsave instruction not passed through correctly on AMD hardware

2013-11-11 Thread Paolo Bonzini
Il 11/11/2013 16:43, Owen Tuz ha scritto: > Thanks, Paolo. We will test and let you know. > I'm not familiar with LWP (some reading to do there) - are there any > plans to support this in future, or is this just something that we're > not interested in emulating? Given Linux does not support LWP,

[Qemu-devel] [PATCH v2 02/19] bsd-user: add HOST_ABI_DIR for the various *BSD dependent code.

2013-11-11 Thread Stacey Son
This change adds HOST_ABI_DIR (similar to TARGET_ABI_DIR) so the various BSD OS dependent code can be seperated into its own directories rather than using #ifdef's. Signed-off-by: Stacey Son --- Makefile.target |3 ++- configure | 11 +++ 2 files changed, 13 insertions(+), 1

Re: [Qemu-devel] [PATCH RFC 0/5] making address spaces 64 bit wide

2013-11-11 Thread Paolo Bonzini
Il 11/11/2013 17:40, Michael S. Tsirkin ha scritto: > At the moment, exec ignores high bits in each address, > for efficiency. > This is incorrect: devices can do full 64 bit DMA, it's > only the CPU that is limited by target address space. > Using full 64 bit addresses was clocked at 12% performan

[Qemu-devel] audit needed for signal handlers

2013-11-11 Thread Eric Blake
Quick - identify the bug in this code (from ui/curses.c): static void curses_winch_handler(int signum) { struct winsize { unsigned short ws_row; unsigned short ws_col; unsigned short ws_xpixel; /* unused */ unsigned short ws_ypixel; /* unused */ } ws;

Re: [Qemu-devel] [PATCH 0/2] exec: alternative fix for master abort woes

2013-11-11 Thread Michael S. Tsirkin
On Thu, Nov 07, 2013 at 06:29:40PM +0100, Paolo Bonzini wrote: > Il 07/11/2013 17:47, Michael S. Tsirkin ha scritto: > > That's on kvm with 52 bit address. > > But where I would be concerned is systems with e.g. 36 bit address > > space where we are doubling the cost of the lookup. > > E.g. try i38

Re: [Qemu-devel] [PATCH v3 0/2] COW: Speed up writes

2013-11-11 Thread Kevin Wolf
Am 06.11.2013 um 16:59 hat Charlie Shepherd geschrieben: > v3: > - Refix cow_update_bitmap and squash patches 1 & 3 together to ensuring > that we only flush if > necessary, patch 1 on its own would change this causing a regression. > v2: > - Fix bit position calculations in cow_update_bit

[Qemu-devel] [PATCH RFC 5/5] exec: memory radix tree page level compression

2013-11-11 Thread Michael S. Tsirkin
At the moment, memory radix tree is already variable width, but it can only skip the low bits of address. This is efficient if we have huge memory regions but inefficient if we are only using a tiny portion of the address space. After we have built up the map, it's a simple matter to detect confi

[Qemu-devel] [PATCH RFC 1/5] split definitions for exec.c and translate-all.c radix trees

2013-11-11 Thread Michael S. Tsirkin
From: Paolo Bonzini The exec.c and translate-all.c radix trees are quite different, and the exec.c one in particular is not limited to the CPU---it can be used also by devices that do DMA, and in that case the address space is not limited to TARGET_PHYS_ADDR_SPACE_BITS bits. We want to make exec

[Qemu-devel] [PATCH RFC 3/5] exec: relace leaf with skip

2013-11-11 Thread Michael S. Tsirkin
In preparation for dynamic page support, rename is_leaf field to skip, telling us how many bits to skip to next level. Set to 0 for leaf. Signed-off-by: Michael S. Tsirkin --- exec.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/exec.c b/exec.c index d5ce3

[Qemu-devel] [PATCH RFC 2/5] exec: make address spaces 64-bit wide

2013-11-11 Thread Michael S. Tsirkin
From: Paolo Bonzini As an alternative to commit 818f86b (exec: limit system memory size, 2013-11-04) let's just make all address spaces 64-bit wide. This eliminates problems with phys_page_find ignoring bits above TARGET_PHYS_ADDR_SPACE_BITS and address_space_translate_internal consequently messi

[Qemu-devel] [PATCH RFC 4/5] exec: extend skip field to 3 bits

2013-11-11 Thread Michael S. Tsirkin
13 bits left for pointer, which seems enough. Signed-off-by: Michael S. Tsirkin --- exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exec.c b/exec.c index 7e512db..39f76ee 100644 --- a/exec.c +++ b/exec.c @@ -84,9 +84,9 @@ typedef struct PhysPageEntry PhysPageEntr

Re: [Qemu-devel] [PATCH] MAINTAINERS: add block tree repo URLs

2013-11-11 Thread Kevin Wolf
Am 06.11.2013 um 16:06 hat Stefan Hajnoczi geschrieben: > Signed-off-by: Stefan Hajnoczi > --- > MAINTAINERS | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 77edacf..6c63548 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -639,6 +639,8 @@ S: Suppo

[Qemu-devel] [PULL 2/6] virtio-net: only delete bh that existed

2013-11-11 Thread Michael S. Tsirkin
From: Jason Wang We delete without check whether it existed during exit. This will lead NULL pointer deference since it was created conditionally depends on guest driver status and features. So add a check of existence before trying to delete it. Cc: qemu-sta...@nongnu.org Signed-off-by: Jason W

[Qemu-devel] [PULL 4/6] loader: drop return value for rom_add_blob_fixed

2013-11-11 Thread Michael S. Tsirkin
rom_add_blob never fails, and neither does rom_add_blob_fixed, so there's no need to return value from it. In fact, rom_add_blob_fixed was erroneously returning -1 unconditionally which made the only system that checked the return value -M bamboo fail to start. Drop the return value and drop chec

Re: [Qemu-devel] [PATCH] qapi-schema: Update description for NewImageMode

2013-11-11 Thread Kevin Wolf
Am 07.11.2013 um 19:47 hat Max Reitz geschrieben: > If the NewImageMode is "absolute-paths" but no backing file is available > (e.g., when mirroring a device with an unbacked image), the target image > will not be backed either. This patch updates the documentation in > qapi-schema.json accordingly

[Qemu-devel] [PULL 3/6] acpi-build: disable with -no-acpi

2013-11-11 Thread Michael S. Tsirkin
QEMU will currently crash if started with -no-acpi flag since acpi build code probes the PM device which isn't present in this configuration. To fix, don't expose ACPI tables to guest when acpi has been disabled from command line. Fixes LP# 1248854 https://bugs.launchpad.net/qemu/+bug/1248854 Re

Re: [Qemu-devel] [PATCH v3 0/2] block/drive-mirror: Check for NULL backing_hd

2013-11-11 Thread Kevin Wolf
Am 06.11.2013 um 19:50 hat Max Reitz geschrieben: > It should be possible to execute the QMP "drive-mirror" command in > "none" sync mode and "absolute-paths" mode even for block devices > lacking a backing file. > > "absolute-paths" does in fact not require a backing file to be present, > as can

[Qemu-devel] [PULL 6/6] Revert "exec: limit system memory size"

2013-11-11 Thread Michael S. Tsirkin
This reverts commit 818f86b88394b7b2b59d313e51043fe15a8004db. This was a work-around for bugs elsewhere in the system, exposed by commit a53ae8e934cd54686875b5bcfc2f434244ee55d6: "hw/pci: partially handle pci master abort" since that's reverted now, the work-around is not required for 1.7 anym

[Qemu-devel] [PULL 0/6] pci, pc, virtio bug fixes for 1.7

2013-11-11 Thread Michael S. Tsirkin
The following changes since commit c2d30667760e3d7b81290d801e567d4f758825ca: rtc: remove dead SQW IRQ code (2013-11-05 20:04:03 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_anthony for you to fetch changes up to ef9e455d645bed6d2

[Qemu-devel] [PULL 5/6] Revert "hw/pci: partially handle pci master abort"

2013-11-11 Thread Michael S. Tsirkin
From: Marcel Apfelbaum This reverts commit a53ae8e934cd54686875b5bcfc2f434244ee55d6. The patch being reverted introduced a low-priority memory region covering all 64 bit pci address space. This exposed the following bugs elsewhere in the code: 1. Some memory regions have INT64_MAX size, where

[Qemu-devel] [PULL 1/6] Fix pc migration from qemu <= 1.5

2013-11-11 Thread Michael S. Tsirkin
From: Cole Robinson The following commit introduced a migration incompatibility: commit 568f0690fd9aa4d39d84b04c1a5dbb53a915c3fe Author: David Gibson Date: Thu Jun 6 18:48:49 2013 +1000 pci: Replace pci_find_domain() with more general pci_root_bus_path() The issue is that i440fx savevm

[Qemu-devel] [Bug 1243287] Re: [KVM/QEMU][ARM][SAUCY] fails to boot cloud-image due to host kvm fail

2013-11-11 Thread Peter Maydell
dmidecode itself should probably be checking at runtime what cpu architecture it is running on so it can refuse to read /dev/mem on systems which it doesn't know it understands. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://

Re: [Qemu-devel] xsave instruction not passed through correctly on AMD hardware

2013-11-11 Thread Owen Tuz
Thanks, Paolo. We will test and let you know. I'm not familiar with LWP (some reading to do there) - are there any plans to support this in future, or is this just something that we're not interested in emulating? Best regards, Owen On Mon, Nov 11, 2013 at 3:25 PM, Paolo Bonzini wrote: > Il 1

Re: [Qemu-devel] xsave instruction not passed through correctly on AMD hardware

2013-11-11 Thread Paolo Bonzini
Il 11/11/2013 15:30, Owen Tuz ha scritto: > Hi all, > > We've been seeing a problem lately running FreeBSD 9.1 and 9.2 (latest > stable) which causes the guest to crash during boot when QEMU is run on > an AMD processor with the 'xsave' flag set. > > To reproduce this behaviour: > > - Boot a Fr

[Qemu-devel] [RFC] target-arm: provide skeleton for a64 insn decoding

2013-11-11 Thread Claudio Fontana
provide a skeleton for a64 instruction decoding in translate-a64.c, by dividing instructions into the classes defined by the ARM Architecture Reference Manual(DDI0487A_a) C3 Signed-off-by: Claudio Fontana --- The following patch has been started during Linaro Connect by me and Alex Bennee. The go

Re: [Qemu-devel] Questions about Spice pv domUs

2013-11-11 Thread Stefano Stabellini
On Thu, 7 Nov 2013, Fabio Fantoni wrote: > > The xenfb code is here: > > > > hw/display/xenfb.c > > > > It is registered here: > > > > hw/i386/xen_machine_pv.c:xen_init_pv > > Thanks, then I must search on qemu code what xenstore parameters enable xenfb > and after search on xen, right? Yes, o

Re: [Qemu-devel] [PATCH v2] flatload: fix non-GOT relocations

2013-11-11 Thread Corey Boyle
Ping http://patchwork.ozlabs.org/patch/280764/ On Sat, Oct 5, 2013 at 7:46 AM, Corey J. Boyle wrote: > From: "Corey J. Boyle" > > Use target address rather than host address when performing > non-GOT relocations > > Signed-off-by: Corey J. Boyle > --- > linux-user/flatload.c |2 +- > 1

Re: [Qemu-devel] [PATCH for-1.7 v2] block: Print its file name if backing file opening failed

2013-11-11 Thread Kevin Wolf
Am 08.11.2013 um 04:26 hat Fam Zheng geschrieben: > If backing file doesn't exist, the error message is confusing and > misleading: > > $ qemu /tmp/a.qcow2 > qemu: could not open disk image /tmp/a.qcow2: Could not open file: No > such file or directory > > But... > > $ ls /tmp/a.

  1   2   >