[Qemu-devel] [Sheepdog Announcement] erasure coding is fully functional, please try test

2013-10-18 Thread Liu Yuan
Hello all, Sheepdog is a distributed storage system that QEMU VM and RESTful services (in progress). Erasure coding is now seamlessly functional with all other features such as snapshot/clone/cluster-wide/multi-disk/auto-healing e.c with following characteristics: 1 Data is erasure coded autom

Re: [Qemu-devel] [PATCH v4 06/12] fix qemu_alloc/qemu_free for slirp subsystem

2013-10-18 Thread Jan Kiszka
On 2009-06-18 22:50, Jean-Christophe DUBOIS wrote: > From: Jean-Christophe Dubois > > Signed-off-by: Jean-Christophe DUBOIS > --- > slirp/socket.c |8 > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/slirp/socket.c b/slirp/socket.c > index 82d026c..e4d84d7 10064

[Qemu-devel] [PATCH 2/2] target-openrisc: Correct wrong epcr register in interrupt handler

2013-10-18 Thread Sebastian Macke
This patch corrects several rare bugs during an interrupt process. Most of the time the pc is already correct and therefore no special treatment of the exception type is necessary. Tested by checking crashing programs which otherwise work in or1ksim. Signed-off-by: Sebastian Macke --- target

[Qemu-devel] [PATCH 1/2] target-openrisc: Remove executable flag for every page

2013-10-18 Thread Sebastian Macke
Pages should be flagged executable only if the tlb executable flag is set or the mmu is off. Signed-off-by: Sebastian Macke --- target-openrisc/mmu.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-openrisc/mmu.c b/target-openrisc/mmu.c index 22d7cbe..dd487bd

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

2013-10-18 Thread Anthony Liguori
On Fri, Oct 18, 2013 at 5:13 PM, Andreas Färber wrote: > Am 17.10.2013 23:52, schrieb Michael S. Tsirkin: >> diff --git a/tests/acpi-test.c b/tests/acpi-test.c >> new file mode 100644 >> index 000..42de248 >> --- /dev/null >> +++ b/tests/acpi-test.c > [...] >> +static void test_acpi_one(const

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

2013-10-18 Thread Andreas Färber
Am 17.10.2013 23:52, schrieb Michael S. Tsirkin: > diff --git a/tests/acpi-test.c b/tests/acpi-test.c > new file mode 100644 > index 000..42de248 > --- /dev/null > +++ b/tests/acpi-test.c [...] > +static void test_acpi_one(const char *params) > +{ > +char *args; > +uint8_t signature_low

[Qemu-devel] [Bug 1042388] Re: qemu: Unsupported syscall: 257 (timer_create)

2013-10-18 Thread Erik de Castro Lopo
Latest version of my patch. Also submitted to the qemu-devel mailing list. ** Attachment added: "posix-timer-patch.tgz" https://bugs.launchpad.net/qemu/+bug/1042388/+attachment/3882940/+files/posix-timer-patch.tgz -- You received this bug notification because you are a member of qemu- devel

[Qemu-devel] [Patch v3 2/2] linux-user: Implement handling of 5 POSIX timer syscalls.

2013-10-18 Thread mle+hs
From: Erik de Castro Lopo Implement timer_create, timer_settime, timer_gettime, timer_getoverrun and timer_delete. Signed-off-by: Erik de Castro Lopo --- linux-user/syscall.c | 174 +++ 1 file changed, 174 insertions(+) diff --git a/linux-user/s

[Qemu-devel] Patch v3 : POSIX timer implementation for linux-user.

2013-10-18 Thread mle+hs
Changes from original: * Call host's libc functions directly rather than _syscall*() (as suggested by Peter Maydell). * Remove un-needed #defines. Launchpad bug is here: https://bugs.launchpad.net/bugs/1042388

[Qemu-devel] [Patch v3 1/2] linux-user: Add target struct defs needed for POSIX timer syscalls.

2013-10-18 Thread mle+hs
From: Erik de Castro Lopo Signed-off-by: Erik de Castro Lopo --- linux-user/syscall_defs.h | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 5f53a28..ca683d1 100644 --- a/linux-user/sysc

Re: [Qemu-devel] [PATCH v1 4/4] target-arm: Add CP15 VBAR support

2013-10-18 Thread Roy Franz
On Fri, Oct 18, 2013 at 7:05 AM, Peter Maydell wrote: > On 17 October 2013 11:38, Peter Maydell wrote: >> On 10 July 2013 05:23, wrote: >>> From: Nathan Rossi >>> >>> Added Vector Base Address remapping on ARM v7. >> >> Apologies for this dropping off my radar for so long. >> I've had a bit of

Re: [Qemu-devel] Build failure with make-4.0

2013-10-18 Thread Ken Moffat
On Fri, Oct 18, 2013 at 11:48:12PM +0100, Ken Moffat wrote: > ar libfdt/libfdt.a libfdt/fdt.o libfdt/fdt_ro.o libfdt/fdt_wip.o > libfdt/fdt_sw.o libfdt/fdt_rw.o libfdt/fdt_strerror.o > ar: two different operation options specified > Makefile:234: recipe for target 'libfdt/libfdt.a' failed > make[

[Qemu-devel] Build failure with make-4.0

2013-10-18 Thread Ken Moffat
Hi, I'm working through the packages in Beyond Linux From Scratch in the expectation that make-4.0 would break something. Got about halfway through and started to doubt that. Then I tried qemu. Initially 1.6.0, which failed, so tried 1.6.1 and that fails the same way. Found some comments in

Re: [Qemu-devel] [PATCH v1 4/4] target-arm: Add CP15 VBAR support

2013-10-18 Thread Peter Crosthwaite
Hi, > -Original Message- > From: Peter Maydell [mailto:peter.mayd...@linaro.org] > Sent: Saturday, October 19, 2013 12:06 AM > To: Peter Crosthwaite > Cc: QEMU Developers > Subject: Re: [PATCH v1 4/4] target-arm: Add CP15 VBAR support > > On 17 October 2013 11:38, Peter Maydell wrote: > >

Re: [Qemu-devel] [PATCH 1/2] linux-user: Add target struct defs needed for POSIX timer syscalls.

2013-10-18 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote: > --- Sorry, this is actually version 2 of this patch. Still working out git send-email. Cheers, Erik

Re: [Qemu-devel] [PULL 4/4] net: disallow to specify multicast MAC address

2013-10-18 Thread Dmitry Krivenok
> Duplicate, we already have is_multicast_ether_addr() in include/net/eth.h I tried to #include "net/eth.h" in net/net.c, but it didn't work: diff --git a/net/net.c b/net/net.c index c330c9a..870d3bb 100644 --- a/net/net.c +++ b/net/net.c @@ -27,6 +27,7 @@ #include "clients.h" #include "hub.h"

[Qemu-devel] [V3 PATCH] Fix float64_to_uint64

2013-10-18 Thread Tom Musta
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 floating point number to an unsigned, 64 bit integer. This contribution can be licensed under either the softf

[Qemu-devel] [PATCH 2/2] target-openrisc: Remove unnecessary code generated by jump instructions

2013-10-18 Thread Sebastian Macke
The sr_f variable is only used for the l.bf and l.bnf instructions. For clarity the code is also rewritten using a switch statement instead of if/else chaining. Signed-off-by: Sebastian Macke --- target-openrisc/translate.c | 46 --- 1 file changed, 2

[Qemu-devel] [PATCH 1/2] target-openrisc: Speed up move instruction

2013-10-18 Thread Sebastian Macke
The OpenRISC architecture does not have its own move register instruction. Instead it uses either "l.addi rd, r0, x", "l.ori rd, rs, 0" or "l.or rd, rx, r0". The l.ori instruction is automatically optimized but not the l.addi instruction. This patch optimizes for this special case. Signed-off-

[Qemu-devel] [PULL] monitor: eliminate monitor_event_state_lock

2013-10-18 Thread Luiz Capitulino
From: Paolo Bonzini This lock does not protect anything that the BQL does not already protect. Furthermore, with -nodefaults and no monitor, the mutex is not initialized but monitor_protocol_event_queue is called anyway, which causes a crash under mingw (and only works by luck. under Linux or ot

Re: [Qemu-devel] [PATCHv4 14/17] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-10-18 Thread Peter Lieven
> Am 18.10.2013 um 15:50 schrieb Paolo Bonzini : > > Il 18/10/2013 15:26, Peter Lieven ha scritto: >>> >>> >>> - bdrv_discard_zeroes for bdrv_has_discard_write_zeroes >> This would conform to the linux ioctl BLKDISCARDZEROES. >> However, we need the write_zeroes operation for a guarantee >> th

[Qemu-devel] [PATCH 2/2 v2] Set proper device-width for vexpress flash

2013-10-18 Thread Roy Franz
Create vexpress specific pflash registration function which properly configures the device-width of 16 bits (2 bytes) for the NOR flash on the vexpress platform. This change is required for buffered flash writes to work properly. Signed-off-by: Roy Franz --- hw/arm/vexpress.c | 38 +++

[Qemu-devel] [PATCH 0/2 v2] block, arm: Fix buffered flash writes on VExpress

2013-10-18 Thread Roy Franz
Here is my updated patch to fix buffered flash writes on the VExpress platform. Buffered writes should now work properly on platforms whose flash interface width is different from the device width. The default is for the device-width to be set to the interface width, so platforms that can benefi

[Qemu-devel] [PATCH 1/2 v2] Add device-width property to pflash_cfi01

2013-10-18 Thread Roy Franz
The width of the devices that make up the flash interface is required to mask certain commands, in particular the write length for buffered writes. This length will be presented to each device on the interface by the program writing the flash, and the flash emulation code needs to be able to deter

[Qemu-devel] [PATCH] Make -kernel command line option optional

2013-10-18 Thread Roy Franz
From: Grant Likely The kernel parameter is not used when booting using firmware such as UEFI. The firmware image is supplied with the -pflash parameter, and the -kernel parameter should not be required since the kernel will be loaded by the firmware. Signed-off-by: Roy Franz Signed-off-by: Gra

[Qemu-devel] [PULL] QMP queue

2013-10-18 Thread Luiz Capitulino
The following changes since commit fc8ead74674b7129e8f31c2595c76658e5622197: Merge remote-tracking branch 'qemu-kvm/uq/master' into staging (2013-10-18 10:03:24 -0700) are available in the git repository at: git://repo.or.cz/qemu/qmp-unstable.git queue/qmp for you to fetch changes up to c

Re: [Qemu-devel] [PATCH] qemu-iotests: fix 030 for faster machines

2013-10-18 Thread Max Reitz
On 2013-10-17 08:28, Fam Zheng wrote: On Wed, 10/16 20:45, Max Reitz wrote: On 2013-10-15 04:41, Fam Zheng wrote: If the block job completes too fast, the test can fail. Change the numbers so the qmp events are more stably captured by the script. A sleep is removed for the same reason. Signed

Re: [Qemu-devel] [PATCH v2] mirror: drop local_err in mirror_complete

2013-10-18 Thread Max Reitz
On 2013-10-18 10:51, Fam Zheng wrote: On Thu, 10/17 15:00, Kevin Wolf wrote: Am 17.10.2013 um 14:49 hat Stefan Hajnoczi geschrieben: On Wed, Oct 16, 2013 at 08:56:49PM +0200, Max Reitz wrote: On 2013-10-15 04:23, Fam Zheng wrote: The reason I object it here is that error_propagate *currently*

[Qemu-devel] [PATCH 2/2] linux-user: Implement handling of 5 POSIX timer syscalls.

2013-10-18 Thread mle+hs
From: Erik de Castro Lopo Implement timer_create, timer_settime, timer_gettime, timer_getoverrun and timer_delete. --- linux-user/syscall.c | 188 +++ 1 file changed, 188 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index

[Qemu-devel] [Bug 1241569] [NEW] qemu-system-alpha console unresponsive

2013-10-18 Thread Paul Hallam
Public bug reported: I have created a virtual machine using the QEMU Alpha emulator (very basic, 1 scsi disc, 1 scsi CDROM, 1gb memory). The machine starts, but entering any system commands at the prompt just echs back the command typed. For example >>> show device got: show device >>> Obviousl

[Qemu-devel] [PATCH 1/2] linux-user: Add target struct defs needed for POSIX timer syscalls.

2013-10-18 Thread mle+hs
From: Erik de Castro Lopo --- linux-user/syscall_defs.h | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 5f53a28..ca683d1 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_

[Qemu-devel] [PATCH 1/2] linux-user: Add target struct defs needed for POSIX timer syscalls.

2013-10-18 Thread Erik de Castro Lopo
--- linux-user/syscall_defs.h | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 5f53a28..ca683d1 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -168,6 +168,11 @@

[Qemu-devel] [PATCH 2/2] linux-user: Implement handling of 5 POSIX timer syscalls.

2013-10-18 Thread Erik de Castro Lopo
Implement timer_create, timer_settime, timer_gettime, timer_getoverrun and timer_delete. --- linux-user/syscall.c | 188 +++ 1 file changed, 188 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 4a14a43..5be400d 100644 ---

Re: [Qemu-devel] [PULL 4/4] net: disallow to specify multicast MAC address

2013-10-18 Thread Dmitry Krivenok
> Scratch what I said about bit 0 and bit 1, this function is using '%' not > '&'. > > But we should still respin to use the existing function in eth.h. This is my first qemu patch, so sorry for inconsistent style and reinventing the wheel. I'll re-use existing function and send new patch. Thanks!

[Qemu-devel] [PULL v2 3/3] net/rtl8139: update network information when macaddr is changed in guest

2013-10-18 Thread Stefan Hajnoczi
From: Amos Kong rtl8139 has same problem as e1000, nic info isn't updated when macaddr is changed in guest. This patch updates the nic info when the last bit of macaddr is written. Signed-off-by: Amos Kong Signed-off-by: Stefan Hajnoczi --- hw/net/rtl8139.c | 6 +- 1 file changed, 5 inse

[Qemu-devel] [PULL v2 2/3] net/e1000: update network information when macaddr is changed in guest

2013-10-18 Thread Stefan Hajnoczi
From: Amos Kong If we change macaddr in guest by 'ifconfig eth0 hw ether 12:12:12:34:35:36', the mac register of e1000 is already updated, but we don't update network information in qemu. Therefor, the information in monitor is wrong. This patch updates nic info when the second part of macaddr i

[Qemu-devel] [PULL v2 1/3] net: update nic info during device reset

2013-10-18 Thread Stefan Hajnoczi
From: Amos Kong macaddr is reset during device reset, but nic info isn't updated, this problem exists in e1000 & rtl8139 Signed-off-by: Amos Kong Acked-by: Michael S. Tsirkin Signed-off-by: Stefan Hajnoczi --- hw/net/e1000.c | 1 + hw/net/rtl8139.c | 1 + 2 files changed, 2 insertions(+)

Re: [Qemu-devel] [PULL 4/4] net: disallow to specify multicast MAC address

2013-10-18 Thread Stefan Hajnoczi
On Fri, Oct 18, 2013 at 10:56:55PM +0800, Amos Kong wrote: > On Fri, Oct 18, 2013 at 03:35:14PM +0200, Stefan Hajnoczi wrote: > > From: Dmitry Krivenok > > > > Added explicit check of MAC address specified via macaddr option. > > Multicast MAC addresses are no longer allowed. > > This fixes bug l

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

2013-10-18 Thread Stefan Hajnoczi
On Thu, Oct 17, 2013 at 07:06:28PM +0400, Dmitry Krivenok wrote: > +bool net_macaddr_is_multicast(uint8_t *macaddr) > +{ > +return (macaddr[0] % 2) ? true : false; > +} Please use is_multicast_ether_addr() instead. Thanks Amos for pointing out this function is duplicated. I have dropped this

Re: [Qemu-devel] [PULL 4/4] net: disallow to specify multicast MAC address

2013-10-18 Thread Eric Blake
On 10/18/2013 10:34 AM, Stefan Hajnoczi wrote: >>> + >>> +bool net_macaddr_is_multicast(uint8_t *macaddr) >>> +{ >>> +return macaddr[0] % 2; >>> +} >> >> Duplicate, we already have is_multicast_ether_addr() in include/net/eth.h > > And net_macaddr_is_multicast() is wrong: > bit 0 is the unica

[Qemu-devel] [PULL v2 0/3] Net patches

2013-10-18 Thread Stefan Hajnoczi
v2: * Dropped multicast MAC patch due to issues pointed out by Amos 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

Re: [Qemu-devel] [PULL 4/4] net: disallow to specify multicast MAC address

2013-10-18 Thread Stefan Hajnoczi
On Fri, Oct 18, 2013 at 10:56:55PM +0800, Amos Kong wrote: > On Fri, Oct 18, 2013 at 03:35:14PM +0200, Stefan Hajnoczi wrote: > > From: Dmitry Krivenok > > > > Added explicit check of MAC address specified via macaddr option. > > Multicast MAC addresses are no longer allowed. > > This fixes bug l

Re: [Qemu-devel] int128_get64: Assertion `!a.hi' failed

2013-10-18 Thread Max Filippov
On Fri, Sep 27, 2013 at 11:36 PM, Paolo Bonzini wrote: > Il 27/09/2013 20:29, Max Filippov ha scritto: >> Hi, >> >> I'm getting said assertion failure debugging linux userspace >> application through the qemu gdbstub. The backtrace looks like this: >> >> qemu-system-xtensa: include/qemu/int128.h:2

[Qemu-devel] [PULL 1/3] x86: fix migration from pre-version 12

2013-10-18 Thread Paolo Bonzini
On KVM, the KVM_SET_XSAVE would be executed with a 0 xstate_bv, and not restore anything. Since FP and SSE data are always valid, set them in xstate_bv at reset time. In fact, that value is the same that KVM_GET_XSAVE returns on pre-XSAVE hosts. Signed-off-by: Paolo Bonzini Signed-off-by: Gleb

[Qemu-devel] [PULL 2/3] x86: cpuid: reconstruct leaf 0Dh data

2013-10-18 Thread Paolo Bonzini
The data in leaf 0Dh depends on information from other feature bits. Instead of passing it blindly from the host, compute it based on whether these feature bits are enabled. Signed-off-by: Paolo Bonzini Signed-off-by: Gleb Natapov --- target-i386/cpu.c | 65 +

[Qemu-devel] [PULL 0/3] KVM patches for 1.7

2013-10-18 Thread Paolo Bonzini
Anthony, The following changes since commit a684f3cf9b9b9c3cb82be87aafc463de8974610c: Merge remote-tracking branch 'kraxel/seabios-1.7.3.2' into staging (2013-09-30 17:15:27 -0500) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master for yo

[Qemu-devel] [PULL 3/3] kvmvapic: Prevent reading beyond the end of guest RAM

2013-10-18 Thread Paolo Bonzini
From: Jan Kiszka rom_state_paddr is guest provided (caller address of outw(VAPIC_PORT) + writen 16-bit value) and can be influenced to point beyond the end of the host memory backing the guest's RAM. Make sure we do not use this pointer to actually read beyond the limits. Reading arbitrary guest

Re: [Qemu-devel] [PULL 4/4] net: disallow to specify multicast MAC address

2013-10-18 Thread Amos Kong
On Fri, Oct 18, 2013 at 03:35:14PM +0200, Stefan Hajnoczi wrote: > From: Dmitry Krivenok > > Added explicit check of MAC address specified via macaddr option. > Multicast MAC addresses are no longer allowed. > This fixes bug lp#495566. > > Signed-off-by: Dmitry V. Krivenok > Signed-off-by: Stef

Re: [Qemu-devel] [ANNOUNCE] We are now in soft freeze for 1.6

2013-10-18 Thread Peter Maydell
On 21 July 2013 13:52, Anthony Liguori wrote: > Peter Maydell writes: >> I'm pretty sure the latter is right (you only need code >> posted, not committed) -- can we fix whichever of the two >> pages is wrong, please? > > It depends on the definition of "major". Any *feature* should have > patche

Re: [Qemu-devel] [PATCH v2] block: support dropping active in bdrv_drop_intermediate

2013-10-18 Thread Eric Blake
On 10/15/2013 01:25 AM, Fam Zheng wrote: > There is only one failure point: bdrv_change_backing_file in this > function, so we can drop the qlist and try to change the backing file > before deleting anything. > > This way bdrv_drop_intermediate is simplified while keeping the > operation transacti

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

2013-10-18 Thread Gerd Hoffmann
On Fr, 2013-10-18 at 15:31 +0200, Andrea Arcangeli wrote: > On Fri, Oct 18, 2013 at 10:55:12AM +0200, Gerd Hoffmann wrote: > > Hi, > > > > > > > The premise that "this will also allow to pass non-contiguous memory" > > > > > is partly false, as you can't use the e820 API below 4g so there's no >

[Qemu-devel] [PULL 3/7] blockdev: fix cdrom read_only flag

2013-10-18 Thread Stefan Hajnoczi
From: Fam Zheng Since 0ebd24e0, cdrom doesn't have read-only on by default, which will error out when using an read only image. Fix it by setting the default value when parsing opts. Reported-by: Edivaldo de Araujo Pereira Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf Signed-off-by: Stefa

[Qemu-devel] [PULL 1/7] hmp: drop bogus "[not inserted]"

2013-10-18 Thread Stefan Hajnoczi
From: Mike Qiu Commit 3e9fab690d59ac15956c3733fe0794ce1ae4c4af ("block: Add support for throttling burst max in QMP and the command line.") introduced bogus "[not inserted]" output, possibly due to a merge failure. Remove this artifact. Output of 'info block' scsi0-hd0: /images/f18-ppc64.qcow2

[Qemu-devel] [PULL 6/7] vmdk: Only read cid from image file when opening

2013-10-18 Thread Stefan Hajnoczi
From: 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:

[Qemu-devel] [PULL 7/7] vmdk: fix VMFS extent parsing

2013-10-18 Thread Stefan Hajnoczi
From: Fam Zheng The VMFS extent line in description file doesn't have start offset as FLAT lines does, and it should be defaulted to 0. The flat_offset variable is initialized to -1, so we need to set it in this case. Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- block/vmdk.c |

[Qemu-devel] [PULL 5/7] virtio: Remove unneeded memcpy

2013-10-18 Thread Stefan Hajnoczi
From: 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) ==19

[Qemu-devel] [PULL 4/7] block/raw-win32: Always use -errno in hdev_open

2013-10-18 Thread Stefan Hajnoczi
From: Max Reitz On one occasion, hdev_open() returned -1 in case of an unknown error instead of a proper -errno value. Adjust this to match the behavior of raw_open() (in raw-win32), which is to return -EINVAL in this case. Also, change the call to error_setg*() to match the one in raw_open() as

[Qemu-devel] [PULL 2/7] sd: Avoid access to NULL BlockDriverState

2013-10-18 Thread Stefan Hajnoczi
From: Andreas Färber Commit 4f8a066b5fc254eeaabbbde56ba4f5b29cc68fdf (blockdev: Remove IF_* check for read-only blockdev_init) added a usage of bdrv_is_read_only() to sd_init(), which is called for versatilepb, versatileab and xilinx-zynq-a9 machines among others with NULL argument by default, ca

[Qemu-devel] [PULL 0/7] Block patches

2013-10-18 Thread Stefan Hajnoczi
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/stefanha/qemu.git block for you to fetch changes up to dbbcaa8d4358f

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

2013-10-18 Thread Roy Franz
On Fri, Oct 18, 2013 at 7:11 AM, Peter Maydell wrote: > On 18 October 2013 15:05, Roy Franz wrote: >> On Fri, Oct 18, 2013 at 7:01 AM, Peter Maydell >> wrote: >>> Yes, you should make the default for the device-width property >>> be to be the same as the bank-width, since that's what we >>> cur

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

2013-10-18 Thread Peter Maydell
On 18 October 2013 15:05, Roy Franz wrote: > On Fri, Oct 18, 2013 at 7:01 AM, Peter Maydell > wrote: >> Yes, you should make the default for the device-width property >> be to be the same as the bank-width, since that's what we >> currently implement; then we can just change the platforms >> whe

Re: [Qemu-devel] [PATCH v4 3/5] Adapt Makefiles to the new LTTng ust interface.

2013-10-18 Thread Stefan Hajnoczi
On Fri, Oct 18, 2013 at 02:39:51AM -0400, Mohamad Gebai wrote: > ## > +# Auto-generated event descriptions for LTTng ust code > + > +ifeq ($(TRACE_BACKEND),ust) > +$(obj)/generated-ust-provider.h: $(obj)/generated-ust-provider.h-t

Re: [Qemu-devel] [PATCH v1 4/4] target-arm: Add CP15 VBAR support

2013-10-18 Thread Peter Maydell
On 17 October 2013 11:38, Peter Maydell wrote: > On 10 July 2013 05:23, wrote: >> From: Nathan Rossi >> >> Added Vector Base Address remapping on ARM v7. > > Apologies for this dropping off my radar for so long. > I've had a bit of a think and I think that you're right > that we can put in this

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

2013-10-18 Thread Roy Franz
On Fri, Oct 18, 2013 at 7:01 AM, Peter Maydell wrote: > On 18 October 2013 14:54, Roy Franz wrote: >> On Fri, Oct 18, 2013 at 6:36 AM, Peter Maydell >> wrote: >>> Probably instead of a single "width" property we should have two, >>> similar to the device tree binding's pair: >>> - bank-width :

Re: [Qemu-devel] [PATCH v4 1/5] Fix configure script for LTTng 2.x

2013-10-18 Thread Stefan Hajnoczi
On Fri, Oct 18, 2013 at 02:39:49AM -0400, Mohamad Gebai wrote: > Signed-off-by: Mohamad Gebai > --- > configure |9 - > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/configure b/configure > index 23dbaaf..627054c 100755 > --- a/configure > +++ b/configure > @@ -328

Re: [Qemu-devel] [PATCH v4 4/5] Update documentation for LTTng ust tracing

2013-10-18 Thread Stefan Hajnoczi
On Fri, Oct 18, 2013 at 02:39:52AM -0400, Mohamad Gebai wrote: > +Package lttng-tools is required for userspace tracing. You must ensure that > the > +current user belongs to the "tracing" group, or manually launch the > +lttng-sessiond daemon for the current user prior to running any instance of

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

2013-10-18 Thread Peter Maydell
On 18 October 2013 14:54, Roy Franz wrote: > On Fri, Oct 18, 2013 at 6:36 AM, Peter Maydell > wrote: >> Probably instead of a single "width" property we should have two, >> similar to the device tree binding's pair: >> - bank-width : Width (in bytes) of the bank. Equal to the >>device widt

Re: [Qemu-devel] [PATCHv4 14/17] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-10-18 Thread Paolo Bonzini
Il 18/10/2013 15:52, Peter Lieven ha scritto: > > Regarding putting this info into the BDI I am fine with that, but I > would keep the wrapper functions. > On the other hand, bdrv_has_zero_init is also not in the BDI... I had it > in the BDI and got the request > to move it to separate functions.

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

2013-10-18 Thread Roy Franz
On Fri, Oct 18, 2013 at 6:36 AM, Peter Maydell wrote: > On 18 October 2013 12:38, Stefan Hajnoczi wrote: >> On Thu, Oct 17, 2013 at 07:30:02PM -0700, Roy Franz wrote: >>> For buffered writes, mask the length with the maximum supported >>> length. This is required for block writes to work on the

Re: [Qemu-devel] [PATCHv4 14/17] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-10-18 Thread Peter Lieven
On 18.10.2013 15:24, Stefan Hajnoczi wrote: On Fri, Oct 18, 2013 at 02:49:11PM +0200, Paolo Bonzini wrote: Il 18/10/2013 14:38, Stefan Hajnoczi ha scritto: On Tue, Oct 08, 2013 at 01:58:08PM +0200, Peter Lieven wrote: this patch does 2 things: a) only do additional call outs if BDRV_BLOCK_ZERO

Re: [Qemu-devel] [PATCHv4 14/17] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-10-18 Thread Paolo Bonzini
Il 18/10/2013 15:26, Peter Lieven ha scritto: >> >> >> - bdrv_discard_zeroes for bdrv_has_discard_write_zeroes > This would conform to the linux ioctl BLKDISCARDZEROES. > However, we need the write_zeroes operation for a guarantee > that zeroes are return. Yes. I'm fine with the current names act

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

2013-10-18 Thread Peter Maydell
On 18 October 2013 12:38, Stefan Hajnoczi wrote: > On Thu, Oct 17, 2013 at 07:30:02PM -0700, Roy Franz wrote: >> 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 bi

[Qemu-devel] [PULL 4/4] net: disallow to specify multicast MAC address

2013-10-18 Thread Stefan Hajnoczi
From: Dmitry Krivenok Added explicit check of MAC address specified via macaddr option. Multicast MAC addresses are no longer allowed. This fixes bug lp#495566. Signed-off-by: Dmitry V. Krivenok Signed-off-by: Stefan Hajnoczi --- net/net.c | 5 + net/util.c | 5 + net/util.h | 2 ++

[Qemu-devel] [PULL 2/4] net/e1000: update network information when macaddr is changed in guest

2013-10-18 Thread Stefan Hajnoczi
From: Amos Kong If we change macaddr in guest by 'ifconfig eth0 hw ether 12:12:12:34:35:36', the mac register of e1000 is already updated, but we don't update network information in qemu. Therefor, the information in monitor is wrong. This patch updates nic info when the second part of macaddr i

[Qemu-devel] [PULL 0/4] Net patches

2013-10-18 Thread Stefan Hajnoczi
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/stefanha/qemu.git net for you to fetch changes up to 6e6247e54da991c

[Qemu-devel] [PULL 1/4] net: update nic info during device reset

2013-10-18 Thread Stefan Hajnoczi
From: Amos Kong macaddr is reset during device reset, but nic info isn't updated, this problem exists in e1000 & rtl8139 Signed-off-by: Amos Kong Acked-by: Michael S. Tsirkin Signed-off-by: Stefan Hajnoczi --- hw/net/e1000.c | 1 + hw/net/rtl8139.c | 1 + 2 files changed, 2 insertions(+)

[Qemu-devel] [PULL 3/4] net/rtl8139: update network information when macaddr is changed in guest

2013-10-18 Thread Stefan Hajnoczi
From: Amos Kong rtl8139 has same problem as e1000, nic info isn't updated when macaddr is changed in guest. This patch updates the nic info when the last bit of macaddr is written. Signed-off-by: Amos Kong Signed-off-by: Stefan Hajnoczi --- hw/net/rtl8139.c | 6 +- 1 file changed, 5 inse

[Qemu-devel] [PATCH] spapr_vscsi: Fix REPORT_LUNS handling

2013-10-18 Thread Nathan Whitehorn
Intercept REPORT_LUNS commands addressed either to SRP LUN 0 or the well-known LUN for REPORT_LUNS commands. This is required to implement the SAM and SPC specifications. Since SRP implements only a single SCSI target port per connection, the SRP target is required to report all available LUNs in

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

2013-10-18 Thread Andrea Arcangeli
On Fri, Oct 18, 2013 at 10:55:12AM +0200, Gerd Hoffmann wrote: > Hi, > > > > > The premise that "this will also allow to pass non-contiguous memory" > > > > is partly false, as you can't use the e820 API below 4g so there's no > > > > way to create non contiguous memory with this mix-cmos-e820-A

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

2013-10-18 Thread Alex Bennée
sunil.ag...@gmail.com writes: > 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

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

2013-10-18 Thread Peter Maydell
On 18 October 2013 14:19, Alex Bennée wrote: > > peter.mayd...@linaro.org writes: >> Oh, and this belongs in hw/misc/, since it's a standalone >> device model. > Ahh I was pondering this. Surely as it's only associated with ARM (and > specifically integrator) it gets grouped with that? No, the o

Re: [Qemu-devel] [PATCHv4 14/17] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-10-18 Thread Peter Lieven
On 18.10.2013 14:49, Paolo Bonzini wrote: Il 18/10/2013 14:38, Stefan Hajnoczi ha scritto: On Tue, Oct 08, 2013 at 01:58:08PM +0200, Peter Lieven wrote: this patch does 2 things: a) only do additional call outs if BDRV_BLOCK_ZERO is not already set. b) use the newly introduced bdrv_has_discard_

Re: [Qemu-devel] [PATCH v7 11/19] block: vhdx write support

2013-10-18 Thread Stefan Hajnoczi
On Fri, Oct 18, 2013 at 02:01:03PM +0200, Stefan Hajnoczi wrote: > On Fri, Oct 11, 2013 at 02:17:31PM -0400, Jeff Cody wrote: > > +/* check the payload block state */ > > +switch (s->bat[sinfo.bat_idx] & VHDX_BAT_STATE_BIT_MASK) { > > +case PAYLOAD_BLOCK_ZERO: >

Re: [Qemu-devel] [PATCHv4 14/17] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-10-18 Thread Stefan Hajnoczi
On Fri, Oct 18, 2013 at 02:49:11PM +0200, Paolo Bonzini wrote: > Il 18/10/2013 14:38, Stefan Hajnoczi ha scritto: > > On Tue, Oct 08, 2013 at 01:58:08PM +0200, Peter Lieven wrote: > >> this patch does 2 things: > >> a) only do additional call outs if BDRV_BLOCK_ZERO is not already set. > >> b) use

Re: [Qemu-devel] [PATCHv4 14/17] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-10-18 Thread Peter Lieven
On 18.10.2013 14:38, Stefan Hajnoczi wrote: On Tue, Oct 08, 2013 at 01:58:08PM +0200, Peter Lieven wrote: this patch does 2 things: a) only do additional call outs if BDRV_BLOCK_ZERO is not already set. b) use the newly introduced bdrv_has_discard_zeroes() to return the zero state of an unal

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

2013-10-18 Thread Alex Bennée
peter.mayd...@linaro.org writes: > On 18 October 2013 12:45, wrote: >> From: Alex Bennée >> >> Commit 9b8c69243 (since reverted) 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 chang

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

2013-10-18 Thread Peter Maydell
On 18 October 2013 12:45, wrote: > From: Alex Bennée > > Commit 9b8c69243 (since reverted) 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

Re: [Qemu-devel] [PATCHv4 14/17] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-10-18 Thread Paolo Bonzini
Il 18/10/2013 14:38, Stefan Hajnoczi ha scritto: > On Tue, Oct 08, 2013 at 01:58:08PM +0200, Peter Lieven wrote: >> this patch does 2 things: >> a) only do additional call outs if BDRV_BLOCK_ZERO is not already set. >> b) use the newly introduced bdrv_has_discard_zeroes() to return the >>zero s

Re: [Qemu-devel] [PATCH 07/13] error: make error_print_loc() static

2013-10-18 Thread Eric Blake
On 10/17/2013 07:11 PM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia > --- > include/qemu/error-report.h |1 - > util/qemu-error.c |2 +- > 2 files changed, 1 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvir

Re: [Qemu-devel] [PATCHv4 14/17] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-10-18 Thread Stefan Hajnoczi
On Tue, Oct 08, 2013 at 01:58:08PM +0200, Peter Lieven wrote: > this patch does 2 things: > a) only do additional call outs if BDRV_BLOCK_ZERO is not already set. > b) use the newly introduced bdrv_has_discard_zeroes() to return the >zero state of an unallocated block. the used callout to >

Re: [Qemu-devel] [PATCH 03/13] qapi: move MonitorEvent define

2013-10-18 Thread Eric Blake
On 10/18/2013 03:36 AM, Paolo Bonzini wrote: > Il 18/10/2013 03:11, Wenchao Xia ha scritto: >> Signed-off-by: Wenchao Xia >> --- >> include/monitor/monitor.h | 38 +- >> include/qapi/qmp/qevent.h | 66 >> + >> include/qapi/q

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

2013-10-18 Thread Alex Bennée
peter.mayd...@linaro.org writes: > On 18 October 2013 12:45, wrote: >> +typedef struct { >> +SysBusDevice parent_obj; >> + >> +MemoryRegion iomem; >> + >> +uint32_t alpha; >> +uint32_t leds; >> +uint32_t switches; > > These three fields are never used, or did I miss somethin

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

2013-10-18 Thread Eric Blake
On 10/17/2013 09:12 PM, Fam Zheng wrote: > The new information looks like: > > v4: Rebase to master. > Free create_type if open fails. (Stefan) > Set create_type for monolithcSparse in no description file case. > > v3: Rebase to kevin's block branch. > > > Fam Zheng (2): > qapi: Add

Re: [Qemu-devel] [PATCHv4 16/17] qemu-img: conditionally zero out target on convert

2013-10-18 Thread Stefan Hajnoczi
On Tue, Oct 08, 2013 at 01:58:10PM +0200, Peter Lieven wrote: > If the target has_zero_init = 0, but supports efficiently > writing zeroes by unmapping we call bdrv_zeroize to s/bdrv_zeroize/bdrv_make_zero/ No need to respin.

Re: [Qemu-devel] [PATCH 08/13] error: don't set sep when print progname

2013-10-18 Thread Markus Armbruster
Paolo Bonzini writes: > Il 18/10/2013 03:11, Wenchao Xia ha scritto: >> The behavior to set sep brings trouble to modification later, >> the logic is not changed by add tailing space in fprintf(). >> >> Signed-off-by: Wenchao Xia >> --- >> util/qemu-error.c |5 ++--- >> 1 files changed, 2

Re: [Qemu-devel] [PATCH v7 00/19] VHDX log replay and write support, .bdrv_create()

2013-10-18 Thread Stefan Hajnoczi
On Fri, Oct 11, 2013 at 02:17:20PM -0400, Jeff Cody wrote: > This patch series contains the initial VHDX log parsing, replay, > write support, and image creation. > > === v7 changes === > https://github.com/codyprime/qemu-kvm-jtc/tree/vhdx-write-v7-upstream > > Rebased to latest qemu/master (pick

Re: [Qemu-devel] [PATCH v7 10/19] block: vhdx - add log write support

2013-10-18 Thread Stefan Hajnoczi
On Fri, Oct 11, 2013 at 02:17:30PM -0400, Jeff Cody wrote: > +/* Perform a log write, and then immediately flush the entire log */ > +int vhdx_log_write_and_flush(BlockDriverState *bs, BDRVVHDXState *s, > + void *data, uint32_t length, uint64_t offset) > +{ > +int re

Re: [Qemu-devel] [PATCH v7 11/19] block: vhdx write support

2013-10-18 Thread Stefan Hajnoczi
On Fri, Oct 11, 2013 at 02:17:31PM -0400, Jeff Cody wrote: > +case PAYLOAD_BLOCK_FULLY_PRESENT: > +/* if the file offset address is in the header zone, > + * there is a problem */ > +if (sinfo.file_offset < (1024 * 1024)) { When a block i

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

2013-10-18 Thread Michael S. Tsirkin
On Fri, Oct 18, 2013 at 01:51:11PM +0200, Paolo Bonzini wrote: > Il 17/10/2013 23:52, Michael S. Tsirkin ha scritto: > > This makes it possible to run bios under qtest > > Alternatively, let's split qtest_init into a part for "-machine > accel=qtest" and one for -qtest. > > Also has the advantag

Re: [Qemu-devel] [PATCH v7 11/19] block: vhdx write support

2013-10-18 Thread Stefan Hajnoczi
On Fri, Oct 11, 2013 at 02:17:31PM -0400, Jeff Cody wrote: > +/* check the payload block state */ > +switch (s->bat[sinfo.bat_idx] & VHDX_BAT_STATE_BIT_MASK) { > +case PAYLOAD_BLOCK_ZERO: > +/* in this case, we need to preserve zero writes for > +

  1   2   >