[Qemu-devel] [PATCH v2 26/28] linux-user: Use safe_syscall for execve syscall

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Wrap execve() in the safe-syscall handling. Although execve() is not an interruptible syscall, it is a special case: if we allow a signal to happen before we make the host$ syscall then we will 'lose' it, because at the point of execve the process leaves QEMU's control. S

[Qemu-devel] [PATCH v2 03/28] linux-user: Reindent signal handling

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Some of the signal handling was a mess with a mixture of tabs and 8 space indents. Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-3-git-send-email-t.e.baldwi...@members.leeds.ac.uk Reviewed-by: Peter Maydell [PMM: just rebased] Signed-off-by: Peter M

[Qemu-devel] [PATCH v2 08/28] linux-user: Support for restarting system calls for MIPS targets

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Update the MIPS main loop code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn (We already handle TARGET_QEMU_ESIGRETURN.) Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-7-git-send-email-t.e.baldwi...@members.leeds.ac.uk Rev

[Qemu-devel] [PATCH v2 04/28] linux-user: Define TARGET_ERESTART* errno values

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Define TARGET_ERESTARTSYS; like the kernel, we will use this to indicate that a guest system call should be restarted. We use the same value the kernel does for this, 512. Signed-off-by: Timothy Edward Baldwin [PMM: split out from the patch which moves and renumbers TAR

[Qemu-devel] [PATCH v2 25/28] linux-user: Use safe_syscall for wait system calls

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Use safe_syscall for waitpid, waitid and wait4 syscalls. Note that this change allows us to implement support for waitid's fifth (rusage) argument in future; for the moment we ignore it as we have done up til now. Signed-off-by: Timothy Edward Baldwin Message-id: 1441497

[Qemu-devel] [PATCH v2 16/28] linux-user: Support for restarting system calls for S390 targets

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Update the S390 main loop and sigreturn code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn * set all guest CPU state within signal.c code on sigreturn * handle TARGET_QEMU_ESIGRETURN in the main loop as the indication that the main loop sho

[Qemu-devel] [PATCH v2 23/28] linux-user: Use safe_syscall for read and write system calls

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Restart read() and write() if signals occur before, or during with SA_RESTART Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-15-git-send-email-t.e.baldwi...@members.leeds.ac.uk [PMM: Update to new safe_syscall() convention of setting errno] Reviewed-b

[Qemu-devel] [PATCH v2 02/28] linux-user: Consistently return host errnos from do_openat()

2016-05-12 Thread Peter Maydell
The function do_openat() is not consistent about whether it is returning a host errno or a guest errno in case of failure. Standardise on returning -1 with errno set (ie caller has to call get_errno()). Signed-off-by: Peter Maydell Reported-by: Timothy Edward Baldwin --- Timothy's patchset for f

[Qemu-devel] [PATCH v2 19/28] linux-user: Set r14 on exit from microblaze syscall

2016-05-12 Thread Peter Maydell
All syscall exits on microblaze result in r14 being equal to the PC we return to, because the kernel syscall exit instruction "rtbd" does this. (This is true even for sigreturn(); note that r14 is not a userspace-usable register as the kernel may clobber it at any point.) Emulate the setting of r1

[Qemu-devel] [PATCH v2 24/28] linux-user: Use safe_syscall for open and openat system calls

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Restart open() and openat() if signals occur before, or during with SA_RESTART. Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-17-git-send-email-t.e.baldwi...@members.leeds.ac.uk [PMM: Adjusted to follow new -1-and-set-errno safe_syscall convention] S

[Qemu-devel] [PATCH v2 20/28] linux-user: Support for restarting system calls for Microblaze targets

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Update the Microblaze main loop and sigreturn code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn * set all guest CPU state within signal.c code on sigreturn * handle TARGET_QEMU_ESIGRETURN in the main loop as the indication that the main lo

[Qemu-devel] [PATCH v2 18/28] linux-user: Support for restarting system calls for tilegx targets

2016-05-12 Thread Peter Maydell
Update the tilegx main loop and sigreturn code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn * return -TARGET_QEMU_ESIGRETURN from sigreturn rather than current R_RE * handle TARGET_QEMU_ESIGRETURN in the main loop as the indication that the main loop should not tou

[Qemu-devel] [PATCH v2 22/28] linux-user: Provide safe_syscall for fixing races between signals and syscalls

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin If a signal is delivered immediately before a blocking system call the handler will only be called after the system call returns, which may be a long time later or never. This is fixed by using a function (safe_syscall) that checks if a guest signal is pending prior to ma

[Qemu-devel] [PATCH v2 06/28] linux-user: Support for restarting system calls for x86 targets

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Update the x86 main loop and sigreturn code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn * set all guest CPU state within signal.c code rather than passing it back out as the "return code" from do_sigreturn() * handle TARGET_QEMU_ESIGRETUR

[Qemu-devel] [PULL 66/69] block: add support for --image-opts in block I/O tests

2016-05-12 Thread Kevin Wolf
From: "Daniel P. Berrange" Currently all block tests use the traditional syntax for images just specifying a filename. To support the LUKS driver without resorting to JSON, the tests need to be able to use the new --image-opts argument to qemu-img and qemu-io. This introduces a new env variable

[Qemu-devel] [PATCH v2 01/28] linux-user: Check array bounds in errno conversion

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Check array bounds in host_to_target_errno() and target_to_host_errno(). Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-2-git-send-email-t.e.baldwi...@members.leeds.ac.uk [PMM: Add a lower-bound check, use braces on if(), tweak commit message] Signed-

[Qemu-devel] [PATCH v2 27/28] linux-user: Use safe_syscall for pselect, select syscalls

2016-05-12 Thread Peter Maydell
Use the safe_syscall wrapper for the pselect and select syscalls. Since not every architecture has the select syscall, we now have to implement select in terms of pselect, which means doing timeval<->timespec conversion. (Five years on from the initial patch that added pselect support to QEMU and

[Qemu-devel] [PATCH v2 17/28] linux-user: Support for restarting system calls for CRIS targets

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Update the CRIS main loop and sigreturn code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn * set all guest CPU state within signal.c code on sigreturn * handle TARGET_QEMU_ESIGRETURN in the main loop as the indication that the main loop sho

[Qemu-devel] [PATCH v2 07/28] linux-user: Support for restarting system calls for ARM targets

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Update the 32-bit and 64-bit ARM main loop and sigreturn code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn * set all guest CPU state within signal.c code on sigreturn * handle TARGET_QEMU_ESIGRETURN in the main loop as the indication that

[Qemu-devel] [PATCH v2 15/28] linux-user: Support for restarting system calls for M68K targets

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Update the M68K main loop and sigreturn code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn * set all guest CPU state within signal.c code on sigreturn * handle TARGET_QEMU_ESIGRETURN in the main loop as the indication that the main loop sho

[Qemu-devel] [PATCH v2 09/28] linux-user: Support for restarting system calls for PPC targets

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Update the PPC main loop code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn (We already handle TARGET_QEMU_ESIGRETURN.) Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-8-git-send-email-t.e.baldwi...@members.leeds.ac.uk Revi

[Qemu-devel] [PATCH v2 00/28] linux-user: fix race between signals and syscalls

2016-05-12 Thread Peter Maydell
This patch series is an updated version of the original series sent by Timothy Baldwin in autumn of last year (https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg01388.html). I have attempted to address various code review comments made on that original patchset. Changes v1->v2: * more desc

[Qemu-devel] [PATCH v2 13/28] linux-user: Support for restarting system calls for UniCore32 targets

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Update the UniCore32 main loop code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn * handle TARGET_QEMU_ESIGRETURN in the main loop as the indication that the main loop should not touch any guest CPU state (We don't support signals on this t

[Qemu-devel] [PATCH v2 05/28] linux-user: Renumber TARGET_QEMU_ESIGRETURN, make it not arch-specific

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Currently we define a QEMU-internal errno TARGET_QEMU_ESIGRETURN only on the MIPS and PPC targets; move this to errno_defs.h so it is available for all architectures, and renumber it to 513. We pick 513 because this is safe from future use as a system call return value: Li

[Qemu-devel] [PATCH v2 11/28] linux-user: Support for restarting system calls for SH4 targets

2016-05-12 Thread Peter Maydell
From: Timothy E Baldwin Update the SH4 main loop and sigreturn code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn * set all guest CPU state within signal.c code on sigreturn * handle TARGET_QEMU_ESIGRETURN in the main loop as the indication that the main loop shou

Re: [Qemu-devel] [PATCH v4 0/3] usb, xen: add pvUSB backend

2016-05-12 Thread Gerd Hoffmann
On Do, 2016-05-12 at 07:47 +0200, Juergen Gross wrote: > This series adds a Xen pvUSB backend driver to qemu. USB devices > connected to the host can be passed through to a Xen guest. The > devices are specified via Xenstore. Access to the devices is done > via host-libusb.c > > I've tested the ba

[Qemu-devel] [PATCH 2/6] vl: Use &error_fatal when parsing monitor options

2016-05-12 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- vl.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/vl.c b/vl.c index bd05609..eea8a04 100644 --- a/vl.c +++ b/vl.c @@ -2402,7 +2402,6 @@ static int mon_init_func(void *opaque, QemuOpts *opts, Error **errp) static void monitor_parse(

[Qemu-devel] [PULL 35/69] virtio: Switch to byte-based aio block access

2016-05-12 Thread Kevin Wolf
From: Eric Blake Sector-based blk_aio_readv() and blk_aio_writev() should die; switch to byte-based blk_aio_preadv() and blk_aio_pwritev() instead. The trace is modified at the same time, and nb_sectors is now unused. Fix a comment typo while in the vicinity. Signed-off-by: Eric Blake Signed-

Re: [Qemu-devel] [PATCH v2] target-i386: implement CPUID[0xB] (Extended Topology Enumeration)

2016-05-12 Thread Radim Krčmář
2016-05-12 19:15+0200, Radim Krčmář: > I looked at a dozen Intel CPU that have this CPUID and all of them > always had Core offset as 1 (a wasted bit when hyperthreading is > disabled) and Package offset at least 4 (wasted bits at <= 4 cores). > > QEMU uses more compact IDs and it doesn't make muc

[Qemu-devel] [PATCH v3] target-i386: implement CPUID[0xB] (Extended Topology Enumeration)

2016-05-12 Thread Radim Krčmář
I looked at a dozen Intel CPU that have this CPUID and all of them always had Core offset as 1 (a wasted bit when hyperthreading is disabled) and Package offset at least 4 (wasted bits at <= 4 cores). QEMU uses more compact IDs and it doesn't make much sense to change it now. I keep the SMT and C

Re: [Qemu-devel] [PATCH v2] cpu-exec: Clean up 'interrupt_request' reloading in cpu_handle_interrupt()

2016-05-12 Thread Richard Henderson
On 05/12/2016 06:52 AM, Sergey Fedorov wrote: From: Sergey Fedorov Suggested-by: Richard Henderson Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov --- This patch applies on top of commit: 40ae3669fb55 ("cpu-exec: Remove unused 'x86_cpu' and 'env' from cpu_exec()") from:

Re: [Qemu-devel] proposal: drop linux-user unicore32 support from QEMU

2016-05-12 Thread Richard Henderson
On 05/12/2016 04:34 AM, Peter Maydell wrote: QEMU has something that claims to be linux-user support for the unicore32 guest CPU. However the syscall numbers in linux-user/unicore32 are nothing like those actually implemented in the upstream kernel (which uses asm-generic syscall numbers). We sh

[Qemu-devel] [PATCH v2] target-i386: implement CPUID[0xB] (Extended Topology Enumeration)

2016-05-12 Thread Radim Krčmář
I looked at a dozen Intel CPU that have this CPUID and all of them always had Core offset as 1 (a wasted bit when hyperthreading is disabled) and Package offset at least 4 (wasted bits at <= 4 cores). QEMU uses more compact IDs and it doesn't make much sense to change it now. I keep the SMT and C

Re: [Qemu-devel] [PATCH 0/6] Use &error_fatal in some initialization code

2016-05-12 Thread Eduardo Habkost
On Thu, May 12, 2016 at 12:48:41PM -0400, Paolo Bonzini wrote: > > > This changes some initialization code in vl.c, qemu-img, qemu-io, > > and qemu-nbd to use &error_fatal instead of manual error > > checking/reporting. > > > > The series is based on my machine branch, available at: > > git://g

[Qemu-devel] [PATCH] Modify net/socket.c to use socket_* functions from include/qemu/sockets.h

2016-05-12 Thread Ashijeet Acharya
Changed the listen(),connect(),parse_host_port() in net/socket.c with the socket_*()functions in include/qemu/sockets.h. Signed-off-by: Ashijeet Acharya --- net/socket.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/net/socket.c b/n

[Qemu-devel] [PATCH 4/6] main-loop: Use &error_fatal when calling qemu_init_main_loop()

2016-05-12 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- qemu-img.c | 5 + qemu-io.c | 5 + qemu-nbd.c | 5 + vl.c | 6 +- 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 46f2a6d..d3cfec3 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3465,10 +3465,7 @

[Qemu-devel] [PULL 60/69] qemu-io: Add missing option documentation

2016-05-12 Thread Kevin Wolf
From: Eric Blake The Usage: summary is missing several options, but rather than having to maintain it, it's simpler to just state [OPTIONS], since the options are spelled out below. Commit 499afa2 added --image-opts, but forgot to document it in --help. Likewise for commit 9e8f183 and -d/--disc

Re: [Qemu-devel] [PATCH v7 06/19] scsi-disk: Switch to byte-based aio block access

2016-05-12 Thread Eric Blake
On 05/12/2016 05:25 AM, Paolo Bonzini wrote: > > > On 06/05/2016 18:26, Eric Blake wrote: >> @@ -340,11 +338,12 @@ static void scsi_do_read(SCSIDiskReq *r, int ret) >> r->req.aiocb = dma_blk_read(s->qdev.conf.blk, r->req.sg, r->sector, >> scsi_dma_com

[Qemu-devel] [PATCH v2] cpu-exec: Clean up 'interrupt_request' reloading in cpu_handle_interrupt()

2016-05-12 Thread Sergey Fedorov
From: Sergey Fedorov Suggested-by: Richard Henderson Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov --- This patch applies on top of commit: 40ae3669fb55 ("cpu-exec: Remove unused 'x86_cpu' and 'env' from cpu_exec()") from: git://github.com/rth7680/qemu.git tcg-next Chan

Re: [Qemu-devel] [PATCH 08/11] test-aio-multithread: add performance comparison with thread-based mutexes

2016-05-12 Thread Paolo Bonzini
> > tests/test-aio-multithread.c | 152 > > +++ > > 1 file changed, 152 insertions(+) > > > > diff --git a/tests/test-aio-multithread.c b/tests/test-aio-multithread.c > > index 18b3548..d7bc1bf 100644 > > --- a/tests/test-aio-multithread.c > > +++ b/tests/

Re: [Qemu-devel] [PATCH] cpu-exec: Clean up 'interrupt_request' reloading in cpu_handle_interrupt()

2016-05-12 Thread Sergey Fedorov
On 12/05/16 19:47, Richard Henderson wrote: > On 05/12/2016 04:14 AM, Sergey Fedorov wrote: >> @@ -489,9 +489,10 @@ static inline void cpu_handle_interrupt(CPUState >> *cpu, >> *last_tb = NULL; >> } > > [A] > >> } >> -/* Don't use the cached interrupt_

Re: [Qemu-devel] [PATCH 0/6] Use &error_fatal in some initialization code

2016-05-12 Thread Paolo Bonzini
> This changes some initialization code in vl.c, qemu-img, qemu-io, > and qemu-nbd to use &error_fatal instead of manual error > checking/reporting. > > The series is based on my machine branch, available at: > git://github.com/ehabkost/qemu.git machine Patches 1-2-6 are obvious. I'm not sure

Re: [Qemu-devel] [PATCH] cpu-exec: Clean up 'interrupt_request' reloading in cpu_handle_interrupt()

2016-05-12 Thread Richard Henderson
On 05/12/2016 04:14 AM, Sergey Fedorov wrote: @@ -489,9 +489,10 @@ static inline void cpu_handle_interrupt(CPUState *cpu, *last_tb = NULL; } [A] } -/* Don't use the cached interrupt_request value, - do_interrupt may have updated the EXI

[Qemu-devel] [PULL 10/43] hw/intc: QOM'ify omap_intc.c

2016-05-12 Thread Peter Maydell
From: xiaoqiang zhao * Split the old SysBus init into an instance_init and a DeviceClass::realize function * Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/intc/omap_intc.c | 64 ++

Re: [Qemu-devel] [Nbd] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE

2016-05-12 Thread Alex Bligh
On 11 May 2016, at 22:06, Wouter Verhelst wrote: > On Tue, May 10, 2016 at 04:08:50PM +0100, Alex Bligh wrote: >> What surprises me is that a release kernel is using experimental >> NBD extensions; there's no guarantee these won't change. Or does >> fstrim work some other way? > > What makes yo

[Qemu-devel] [PATCH v5 1/3] loader: Allow ELF loader to auto-detect the ELF arch

2016-05-12 Thread Alistair Francis
If the caller didn't specify an architecture for the ELF machine the load_elf() function will auto detect it based on the ELF file. Signed-off-by: Alistair Francis --- hw/core/loader.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/core/loader.c b/hw/core/loader.c index c049

[Qemu-devel] [Bug 955379] Re: cmake hangs with qemu-arm-static

2016-05-12 Thread Peter Maydell
I was hoping for a "run this command" level of reproducer :-) Alternatively, if anybody's conveniently able to build and test a new QEMU with whatever was failing for them, you can try the git branch https://git.linaro.org/people/peter.maydell/qemu-arm.git sigrace-fixes -- You received this bug

Re: [Qemu-devel] [PATCH v5 3/3] docs: Add a generic loader explanation document

2016-05-12 Thread Eric Blake
On 05/12/2016 10:13 AM, Alistair Francis wrote: > Signed-off-by: Alistair Francis > --- > V4: > - Re-write to be more comprehensive > > docs/generic-loader.txt | 56 > + > 1 file changed, 56 insertions(+) > create mode 100644 docs/generic-loader

[Qemu-devel] [PATCH v5 0/3] Add a generic loader

2016-05-12 Thread Alistair Francis
This work is based on the original work by Li Guang with extra features added by Peter C and myself. The idea of this loader is to allow the user to load multiple images or values into QEMU at startup. Memory values can be loaded like this: -device loader,addr=0xfd1a0104,data=0x800e,data-len

Re: [Qemu-devel] [PULL 00/69] Block layer patches

2016-05-12 Thread Peter Maydell
On 12 May 2016 at 15:34, Kevin Wolf wrote: > The following changes since commit 26617924e9a329bdff81936d2d277983f0c4d372: > > Open 2.7 development tree (2016-05-12 12:35:25 +0100) > > are available in the git repository at: > > git://repo.or.cz/qemu/kevin.git tags/for-upstream > > for you to f

[Qemu-devel] [PATCH v5 3/3] docs: Add a generic loader explanation document

2016-05-12 Thread Alistair Francis
Signed-off-by: Alistair Francis --- V4: - Re-write to be more comprehensive docs/generic-loader.txt | 56 + 1 file changed, 56 insertions(+) create mode 100644 docs/generic-loader.txt diff --git a/docs/generic-loader.txt b/docs/generic-loader.tx

Re: [Qemu-devel] [PATCH v4 0/3] Add a generic loader

2016-05-12 Thread Alistair Francis
On Wed, Mar 16, 2016 at 10:18 AM, Alistair Francis wrote: > > On 16 Mar 2016 5:04 am, "Peter Maydell" wrote: >> >> On 3 March 2016 at 19:42, Alistair Francis >> wrote: >> > This work is based on the original work by Li Guang with extra >> > features added by Peter C and myself. >> > >> > The ide

[Qemu-devel] [PATCH v5 2/3] generic-loader: Add a generic loader

2016-05-12 Thread Alistair Francis
Add a generic loader to QEMU which can be used to load images or set memory values. Signed-off-by: Alistair Francis --- V5: - Rebase V4: - Allow the loader to work with every architecture - Move the file to hw/core - Increase the maximum number of CPUs - Make the CPU operations conditional

Re: [Qemu-devel] ipxe and arm

2016-05-12 Thread Gerd Hoffmann
Hi, > > I don't understand the question, sorry. How can ipxe fail if ipxe is not > > made available to the guest, in any NIC's PCI option ROM BAR? > What I meat to say is that on x86 user can use rtl8139 or e1000 to use > ipxe. If uefi doesn't support rtl8139 or e1000, user can't use ipxe with >

Re: [Qemu-devel] ipxe and arm

2016-05-12 Thread Laszlo Ersek
On 05/12/16 15:29, Shannon Zhao wrote: > On 2016年05月11日 22:44, Laszlo Ersek wrote: >> On 05/11/16 15:51, Shannon Zhao wrote: On 2016年05月11日 21:38, Laszlo Ersek wrote: >> On 05/11/16 15:03, Gerd Hoffmann wrote: Hi, ipxe gained support for arm and aarch64 efi pla

[Qemu-devel] [PULL 40/43] hw/arm: QOM'ify spitz.c

2016-05-12 Thread Peter Maydell
From: xiaoqiang zhao Drop the use of old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/spitz.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/hw/arm/spi

Re: [Qemu-devel] [PATCH v4 00/11] nbd: tighter protocol compliance

2016-05-12 Thread Alex Bligh
On 11 May 2016, at 23:39, Eric Blake wrote: > Fix several corner-case bugs in our implementation of the NBD > protocol, both as client and as server. I thought I'd added a Reviewed-By: line to more of these before. On a very very quick look, they all look good to me. -- Alex Bligh

Re: [Qemu-devel] [PATCH v4 09/11] nbd: Add qemu-nbd -D for human-readable description

2016-05-12 Thread Daniel P. Berrange
On Thu, May 12, 2016 at 09:38:58AM -0600, Eric Blake wrote: > On 05/12/2016 01:47 AM, Daniel P. Berrange wrote: > > On Wed, May 11, 2016 at 04:39:42PM -0600, Eric Blake wrote: > >> The NBD protocol allows servers to advertise a human-readable > >> description alongside an export name during NBD_OPT

[Qemu-devel] [Bug 955379] Re: cmake hangs with qemu-arm-static

2016-05-12 Thread skunk
iirc i've was able to reproduce this bug every time while compiling kdelibs4 on a chrooted arm image -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/955379 Title: cmake hangs with qemu-arm-static St

[Qemu-devel] [PATCH 6/6] Use &error_fatal when initializing crypto on qemu-{img, io, nbd}

2016-05-12 Thread Eduardo Habkost
In addition to making the code simpler, this will replace the long error messages: cannot initialize crypto: Unable to initialize GNUTLS library: [...] cannot initialize crypto: Unable to initialize gcrypt with shorter messages: Unable to initialize GNUTLS library: [...] Unable to initializ

Re: [Qemu-devel] [PATCH v5 4/6] qemu-io: Allow unaligned access by default

2016-05-12 Thread Eric Blake
On 05/12/2016 08:38 AM, Kevin Wolf wrote: > Am 08.05.2016 um 05:16 hat Eric Blake geschrieben: >> There's no reason to require the user to specify a flag just so >> they can pass in unaligned numbers. Keep 'read -p' and 'write -p' >> as no-ops so that I don't have to hunt down and update all users

[Qemu-devel] [PATCH 5/6] main-loop: Make qemu_init_main_loop() and qemu_signal_init() void

2016-05-12 Thread Eduardo Habkost
Their return values are not used by their callers anymore, so the functions can be void. Signed-off-by: Eduardo Habkost --- include/qemu/main-loop.h | 2 +- main-loop.c | 21 - 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/include/qemu/main-loo

[Qemu-devel] [PULL 34/69] scsi-disk: Switch to byte-based aio block access

2016-05-12 Thread Kevin Wolf
From: Eric Blake Sector-based blk_aio_readv() and blk_aio_writev() should die; switch to byte-based blk_aio_preadv() and blk_aio_pwritev() instead. As part of the cleanup, scsi_init_iovec() no longer needs to return a value, and reword a comment. [ kwolf: Fix read accounting change ] Signed-of

Re: [Qemu-devel] [PATCH v4 09/11] nbd: Add qemu-nbd -D for human-readable description

2016-05-12 Thread Eric Blake
On 05/12/2016 01:47 AM, Daniel P. Berrange wrote: > On Wed, May 11, 2016 at 04:39:42PM -0600, Eric Blake wrote: >> The NBD protocol allows servers to advertise a human-readable >> description alongside an export name during NBD_OPT_LIST. Add >> an option to pass through the user's string to the NB

[Qemu-devel] [Bug 955379] Re: cmake hangs with qemu-arm-static

2016-05-12 Thread Peter Maydell
Does anybody have a reliable reproduce case for this bug? I have some patches I'd like to test which I think should fix it, but I cannot get the test case attached in comment #10 to hang at all, even without the fixes. -- You received this bug notification because you are a member of qemu- devel-

Re: [Qemu-devel] [PULL 00/43] target-arm queue

2016-05-12 Thread Peter Maydell
72: > > Open 2.7 development tree (2016-05-12 12:35:25 +0100) > > are available in the git repository at: > > git://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20160512 > > for you to fetch changes up to 0bc91ab3bb70f836d5a7a3ef6f800ef8c22e936f: >

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-05-12 Thread Kevin Wolf
Am 12.05.2016 um 15:47 hat Alberto Garcia geschrieben: > On Tue 03 May 2016 03:48:47 PM CEST, Kevin Wolf wrote: > > Am 03.05.2016 um 15:33 hat Alberto Garcia geschrieben: > >> On Tue 03 May 2016 03:23:24 PM CEST, Kevin Wolf wrote: > >> >> c) we fix bdrv_reopen() so we can actually run both jobs at

Re: [Qemu-devel] [Nbd] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE

2016-05-12 Thread Alex Bligh
On 11 May 2016, at 22:12, Wouter Verhelst wrote: > On Tue, May 10, 2016 at 04:38:29PM +0100, Alex Bligh wrote: >> On 10 May 2016, at 16:29, Eric Blake wrote: >>> So the kernel is currently one of the clients that does NOT honor block >>> sizes, and as such, servers should be prepared for ANY si

[Qemu-devel] [PULL 62/69] qemu-io: Use bool for command line flags

2016-05-12 Thread Kevin Wolf
From: Eric Blake We require a C99 compiler; let's use it to express what we really mean. (Yes, we now have an instance of 'if (bool + bool + bool > 1)', which, although semantically valid C, looks ugly; it gets cleaned up later.) Signed-off-by: Eric Blake Reviewed-by: Max Reitz Message-id: 14

Re: [Qemu-devel] [PATCH v2 0/2] trace: Add event for vCPU memory accesses

2016-05-12 Thread Lluís Vilanova
Lluís Vilanova writes: > This series adds an event to track information related to memory accesses > performed by the guest CPUs ("guest_mem_before"). > A future series might extend this to contain the physical address and memory > value (e.g., "guest_mem_after"). Sorry, I replayed the command a

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-05-12 Thread Kevin Wolf
Am 12.05.2016 um 17:13 hat Alberto Garcia geschrieben: > On Thu 12 May 2016 05:04:51 PM CEST, Kevin Wolf wrote: > > Am 12.05.2016 um 15:47 hat Alberto Garcia geschrieben: > >> On Tue 03 May 2016 03:48:47 PM CEST, Kevin Wolf wrote: > >> > Am 03.05.2016 um 15:33 hat Alberto Garcia geschrieben: > >> >

[Qemu-devel] [PULL 40/69] pflash: Switch to byte-based block access

2016-05-12 Thread Kevin Wolf
From: Eric Blake Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Signed-off-by: Eric Blake Signed-off-by: Kevin Wolf --- hw/block/pflash_cfi01.c | 12 ++-- hw/block/pflash_cfi02.c | 12 ++-- 2 files changed, 12 insertio

Re: [Qemu-devel] [Xen-devel] [PATCH v5 1/3] xen: introduce dummy system device

2016-05-12 Thread Wei Liu
On Thu, May 12, 2016 at 04:13:39PM +0200, Juergen Gross wrote: > Introduce a new dummy system device serving as parent for virtual > buses. This will enable new pv backends to introduce virtual buses > which are removable again opposed to system buses which are meant > to stay once added. > > Sign

[Qemu-devel] [PATCH] net: vl: Move default_net to vl.c

2016-05-12 Thread Eduardo Habkost
All handling of defaults (default_* variables) is inside vl.c, move default_net there too, so we can more easily refactor that code later. Signed-off-by: Eduardo Habkost --- include/net/net.h | 1 - net/net.c | 23 --- vl.c | 24 +++-

Re: [Qemu-devel] [PATCH 00/23] GICv3 emulation

2016-05-12 Thread Peter Maydell
On 12 May 2016 at 16:01, Shannon Zhao wrote: > On 2016年05月12日 22:35, Peter Maydell wrote: >> Can you put the Image file somewhere I can download it, please? > I just upload it to > http://people.linaro.org/~shannon.zhao/ACPI_ARM/Image OK, I can reproduce with that, and I think I know what this is

[Qemu-devel] [PULL 64/69] qemu-io: Add 'write -f' to test FUA flag

2016-05-12 Thread Kevin Wolf
From: Eric Blake Make it easier to test block drivers with BDRV_REQ_FUA in .supported_write_flags, by adding the '-f' flag to qemu-io to conditionally pass the flag through to specific writes ('write', 'write -z', 'writev', 'aio_write', 'aio_write -z'). You'll want to use 'qemu-io -t none' to act

[Qemu-devel] [PATCH 3/6] main-loop: Use Error** to report qemu_signal_init() errors

2016-05-12 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- main-loop.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main-loop.c b/main-loop.c index 89a6994..8e8eafc 100644 --- a/main-loop.c +++ b/main-loop.c @@ -71,7 +71,7 @@ static void sigfd_handler(void *opaque) } } -static int

Re: [Qemu-devel] [PATCH 00/23] GICv3 emulation

2016-05-12 Thread Shannon Zhao
On 2016年05月12日 22:35, Peter Maydell wrote: > On 12 May 2016 at 15:31, Shannon Zhao wrote: >> > On 2016年05月12日 21:53, Peter Maydell wrote: >>> >> On 11 May 2016 at 07:51, Shannon Zhao wrote: >>> Hi Peter, >>> >>> On 2016/5/10 1:29, Peter Maydell wrote: >>> > Code revie

Re: [Qemu-devel] [PULL 00/23] QAPI patches for 2016-05-12

2016-05-12 Thread Peter Maydell
On 12 May 2016 at 08:58, Markus Armbruster wrote: > The following changes since commit bfc766d38e1fae5767d43845c15c79ac8fa6d6af: > > Update version for v2.6.0 release (2016-05-11 16:44:26 +0100) > > are available in the git repository at: > > git://repo.or.cz/qemu/armbru.git tags/pull-qapi-201

[Qemu-devel] [PULL 54/69] block: Inactivate all children

2016-05-12 Thread Kevin Wolf
From: Fam Zheng Currently we only inactivate the top BDS. Actually bdrv_inactivate should be the opposite of bdrv_invalidate_cache. Recurse into the whole subtree instead. Because a node may have multiple parents, and because once BDRV_O_INACTIVE is set for a node, further writes are not allowe

[Qemu-devel] [PULL 63/69] qemu-io: Allow unaligned access by default

2016-05-12 Thread Kevin Wolf
From: Eric Blake There's no reason to require the user to specify a flag just so they can pass in unaligned numbers. Keep 'read -p' and 'write -p' as no-ops so that I don't have to hunt down and update all users of qemu-io, but otherwise make their behavior default as 'read' and 'write'. Also f

[Qemu-devel] [PULL 55/69] iotests: fix the redirection order in 083

2016-05-12 Thread Kevin Wolf
From: Wei Jiangang It should redirect stdout to /dev/null first, then redirect stderr to whatever stdout currently points at. Signed-off-by: Wei Jiangang Message-id: 1461665601-14908-1-git-send-email-weijg.f...@cn.fujitsu.com Reviewed-by: Eric Blake Signed-off-by: Max Reitz --- tests/qemu-io

[Qemu-devel] [PULL 52/69] block: Invalidate all children

2016-05-12 Thread Kevin Wolf
From: Fam Zheng Currently we only recurse to bs->file, which will miss the children in quorum and VMDK. Recurse into the whole subtree to avoid that. Signed-off-by: Fam Zheng Reviewed-by: Alberto Garcia Signed-off-by: Kevin Wolf --- block.c | 20 ++-- 1 file changed, 14 inse

[Qemu-devel] [PULL 65/69] qemu-io: Add 'write -z -u' to test MAY_UNMAP flag

2016-05-12 Thread Kevin Wolf
From: Eric Blake Make it easier to control whether the BDRV_REQ_MAY_UNMAP flag can be passed through a write_zeroes command, by adding the '-u' flag to qemu-io 'write -z' and 'aio_write -z'. To be useful, the device has to be opened with BDRV_O_UNMAP (done by default in qemu-io, but can be made

[Qemu-devel] [PULL 56/69] qemu-img: check block status of backing file when converting.

2016-05-12 Thread Kevin Wolf
From: Ren Kimura When converting images, check the block status of its backing file chain to avoid needlessly reading zeros. Signed-off-by: Ren Kimura Message-id: 1461773098-20356-1-git-send-email-rkx1209...@gmail.com Signed-off-by: Max Reitz --- qemu-img.c | 15 +-- 1 file change

[Qemu-devel] [PULL 68/69] block: enable testing of LUKS driver with block I/O tests

2016-05-12 Thread Kevin Wolf
From: "Daniel P. Berrange" This adds support for testing the LUKS driver with the block I/O test framework. cd tests/qemu-io-tests ./check -luks A handful of test cases are modified to work with luks - 004 - whitelist luks format - 012 - use TEST_IMG_FILE instead of TEST_IMG for file o

[Qemu-devel] [PULL 67/69] block: add support for encryption secrets in block I/O tests

2016-05-12 Thread Kevin Wolf
From: "Daniel P. Berrange" The LUKS block driver tests will require the ability to specify encryption secrets with block devices. This requires using the --object argument to qemu-img/qemu-io to create a 'secret' object. When the IMGKEYSECRET env variable is set, it provides the password to be a

[Qemu-devel] [PULL 61/69] qemu-io: Make 'open' subcommand more like command line

2016-05-12 Thread Kevin Wolf
From: Eric Blake The command line defaults to BDRV_O_UNMAP, but can use -d to reset it. Meanwhile, the 'open' subcommand was defaulting to no discards, with no way to set it. The command line has both -n and -tMODE to set a variety of cache modes, but the 'open' subcommand had only -n. The 'op

Re: [Qemu-devel] [PATCH v5 4/6] qemu-io: Allow unaligned access by default

2016-05-12 Thread Kevin Wolf
Am 08.05.2016 um 05:16 hat Eric Blake geschrieben: > There's no reason to require the user to specify a flag just so > they can pass in unaligned numbers. Keep 'read -p' and 'write -p' > as no-ops so that I don't have to hunt down and update all users > of qemu-io, but otherwise make their behavio

[Qemu-devel] [PULL 37/69] fdc: Switch to byte-based block access

2016-05-12 Thread Kevin Wolf
From: Eric Blake Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Signed-off-by: Eric Blake Signed-off-by: Kevin Wolf --- hw/block/fdc.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/hw/b

[Qemu-devel] [PULL 69/69] qemu-iotests: iotests: fail hard if not run via "check"

2016-05-12 Thread Kevin Wolf
From: Sascha Silbe Running an iotests-based Python test directly might appear to work, but may fail in subtle ways and is insecure: - It creates files with predictable file names in a world-writable location (/var/tmp). - Tests expect the environment to be set up by check. E.g. 041 and 055

[Qemu-devel] [PULL 42/69] m25p80: Switch to byte-based block access

2016-05-12 Thread Kevin Wolf
From: Eric Blake Sector-based blk_read() should die; switch to byte-based blk_pread() instead. Likewise for blk_aio_readv() and blk_aio_writev(). Signed-off-by: Eric Blake Signed-off-by: Kevin Wolf --- hw/block/m25p80.c | 23 +++ 1 file changed, 7 insertions(+), 16 deleti

[Qemu-devel] [PULL 49/69] block: Make supported_write_flags a per-bds property

2016-05-12 Thread Kevin Wolf
From: Eric Blake Pre-patch, .supported_write_flags lives at the driver level, which means we are blindly declaring that all block devices using a given driver will either equally support FUA, or that we need a fallback at the block layer. But there are drivers where FUA support is a per-block de

[Qemu-devel] [PULL 58/69] quorum: implement bdrv_add_child() and bdrv_del_child()

2016-05-12 Thread Kevin Wolf
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Message-id: 1462865799-19402-3-git-send-email-xiecl.f...@cn.fujitsu.com Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- block.c

[Qemu-devel] [PULL 36/69] xen_disk: Switch to byte-based aio block access

2016-05-12 Thread Kevin Wolf
From: Eric Blake Sector-based blk_aio_readv() and blk_aio_writev() should die; switch to byte-based blk_aio_preadv() and blk_aio_pwritev() instead. Signed-off-by: Eric Blake Signed-off-by: Kevin Wolf --- hw/block/xen_disk.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) dif

[Qemu-devel] [PULL 53/69] block: Drop superfluous invalidating bs->file from drivers

2016-05-12 Thread Kevin Wolf
From: Fam Zheng Now they are invalidated by the block layer, so it's not necessary to do this in block drivers' implementations of .bdrv_invalidate_cache. Signed-off-by: Fam Zheng Reviewed-by: Alberto Garcia Signed-off-by: Kevin Wolf --- block/qcow2.c | 7 --- block/qed.c| 6 -

[Qemu-devel] [PULL 59/69] qmp: add monitor command to add/remove a child

2016-05-12 Thread Kevin Wolf
From: Wen Congyang The new QMP command name is x-blockdev-change. It's just for adding/removing quorum's child now, and doesn't support all kinds of children, all kinds of operations, nor all block drivers. So it is experimental now. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Sig

[Qemu-devel] [PULL 57/69] Add new block driver interface to add/delete a BDS's child

2016-05-12 Thread Kevin Wolf
From: Wen Congyang In some cases, we want to take a quorum child offline, and take another child online. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia Message-id: 1462865799-19

[Qemu-devel] [PULL 44/69] nbd: Switch to byte-based block access

2016-05-12 Thread Kevin Wolf
From: Eric Blake Sector-based blk_read() should die; switch to byte-based blk_pread() instead. Add a constant for our magic number 512, to make it obvious that this size will NOT change even if BDRV_SECTOR_SIZE does, even though the two happen to be the same for now. Split assignments from cond

[Qemu-devel] [PULL 50/69] block: Honor BDRV_REQ_FUA during write_zeroes

2016-05-12 Thread Kevin Wolf
From: Eric Blake The block layer has a couple of cases where it can lose Force Unit Access semantics when writing a large block of zeroes, such that the request returns before the zeroes have been guaranteed to land on underlying media. SCSI does not support FUA during WRITESAME(10/16); FUA is o

<    1   2   3   4   >