Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Gabriel L. Somlo
Hi Daniel, On Wed, Feb 04, 2015 at 09:31:32AM +, Daniel P. Berrange wrote: > On Tue, Feb 03, 2015 at 04:38:59PM -0500, Gabriel L. Somlo wrote: > > On Tue, Feb 03, 2015 at 02:11:12PM -0600, Michael Roth wrote: > > > > > > This does seem like useful functionality, but I think I'd like to know >

Re: [Qemu-devel] [PATCH 0/8] block: persistent dirty bitmaps (RFC)

2015-02-04 Thread John Snow
On 02/04/2015 10:07 AM, Vladimir Sementsov-Ogievskiy wrote: On 13.01.2015 20:02, Vladimir Sementsov-Ogievskiy wrote: The bitmaps are saved into qcow2 file format. It provides both 'internal' and 'external' dirty bitmaps feature: - for qcow2 drives we can store bitmaps in the same file - fo

Re: [Qemu-devel] [RFC PATCH v8 12/21] replay: recording and replaying different timers

2015-02-04 Thread Paolo Bonzini
On 03/02/2015 15:05, Pavel Dovgaluk wrote: >> > >> > What about just making qemu_get_timedate use >> > qemu_clock_get_ns(QEMU_CLOCK_HOST) instead of time()? This would just >> > work using the infrastructure of the previous patch. > I can get rid of these calls, but localtime() function used >

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Daniel P. Berrange
On Wed, Feb 04, 2015 at 10:20:14AM -0500, Gabriel L. Somlo wrote: > Hi Daniel, > > On Wed, Feb 04, 2015 at 09:31:32AM +, Daniel P. Berrange wrote: > > On Tue, Feb 03, 2015 at 04:38:59PM -0500, Gabriel L. Somlo wrote: > > > On Tue, Feb 03, 2015 at 02:11:12PM -0600, Michael Roth wrote: > > > >

Re: [Qemu-devel] RFC: Universal encryption on QEMU I/O channels

2015-02-04 Thread Daniel P. Berrange
On Wed, Feb 04, 2015 at 04:22:26PM +0100, Paolo Bonzini wrote: > > > On 04/02/2015 16:11, Daniel P. Berrange wrote: > > > For GIO/GIOChannel, you'd have to choose between zerocopy and many > > > syscalls, or one copy and few syscalls. Since every page has two iov > > > entries, one of which is j

Re: [Qemu-devel] RFC: Universal encryption on QEMU I/O channels

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 16:11, Daniel P. Berrange wrote: > > For GIO/GIOChannel, you'd have to choose between zerocopy and many > > syscalls, or one copy and few syscalls. Since every page has two iov > > entries, one of which is just 8 bytes, one copy and few syscalls is > > probably faster---but still o

Re: [Qemu-devel] [PATCH v4 03/18] spapr_pci: Introduce a liobn number generating macros

2015-02-04 Thread Alexander Graf
On 29.01.15 10:27, Alexey Kardashevskiy wrote: > We are going to have multiple DMA windows per PHB and we want them to > migrate so we need a predictable way of assigning LIOBNs. > > This introduces a macro which makes up a LIOBN from fixed prefix, > PHB index (unique PHB id) and window number.

Re: [Qemu-devel] [PATCH v5 08/26] qcow2: Refcount overflow and qcow2_alloc_bytes()

2015-02-04 Thread Max Reitz
On 2015-02-04 at 06:55, Kevin Wolf wrote: Am 15.12.2014 um 13:50 hat Max Reitz geschrieben: qcow2_alloc_bytes() may reuse a cluster multiple times, in which case the refcount is increased accordingly. However, if this would lead to an overflow the function should instead just not reuse this clus

Re: [Qemu-devel] -device xen-platform crashes

2015-02-04 Thread Stefano Stabellini
On Mon, 2 Feb 2015, Markus Armbruster wrote: > Stefano Stabellini writes: > > > On Fri, 30 Jan 2015, Markus Armbruster wrote: > >> Stefano Stabellini writes: > >> > >> > On Thu, 29 Jan 2015, Markus Armbruster wrote: > >> >> Stefano Stabellini writes: > >> >> > >> >> > On Thu, 29 Jan 2015, Mar

Re: [Qemu-devel] RFC: Universal encryption on QEMU I/O channels

2015-02-04 Thread Daniel P. Berrange
On Wed, Feb 04, 2015 at 04:04:33PM +0100, Paolo Bonzini wrote: > > > On 04/02/2015 15:34, Daniel P. Berrange wrote: > > > GIO doesn't provide writev either, so it's not a good match for > > > non-encrypted migration, which really tries hard to do no copies in > > > userspace. > > > > Ok, maybe R

Re: [Qemu-devel] [PATCH 0/8] block: persistent dirty bitmaps (RFC)

2015-02-04 Thread Vladimir Sementsov-Ogievskiy
On 04.02.2015 18:20, John Snow wrote: On 02/04/2015 10:07 AM, Vladimir Sementsov-Ogievskiy wrote: On 13.01.2015 20:02, Vladimir Sementsov-Ogievskiy wrote: The bitmaps are saved into qcow2 file format. It provides both 'internal' and 'external' dirty bitmaps feature: - for qcow2 drives we ca

[Qemu-devel] [PATCH 1/8] machine: query iommu machine property rather than qemu opts

2015-02-04 Thread Marcel Apfelbaum
Fixes a QEMU crash when passing iommu parameter in command line. Signed-off-by: Marcel Apfelbaum --- hw/core/machine.c | 5 + hw/pci-host/q35.c | 2 +- include/hw/boards.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index fbd

[Qemu-devel] [PATCH 3/8] machine: query kernel-irqchip machine property rather than qemu opts

2015-02-04 Thread Marcel Apfelbaum
Fixes a QEMU crash when passing kernel_irqchip parameter in command line. Signed-off-by: Marcel Apfelbaum --- hw/ppc/e500.c | 16 +--- hw/ppc/spapr.c | 16 ++-- kvm-all.c | 6 +++--- 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/hw/ppc/e500.c b/h

[Qemu-devel] [PATCH 7/8] machine: query dump-guest-core machine property rather than qemu opts

2015-02-04 Thread Marcel Apfelbaum
Fixes a QEMU crash when passing dump_guest_core parameter in command line. Signed-off-by: Marcel Apfelbaum --- exec.c | 4 ++-- hw/core/machine.c | 6 ++ include/hw/boards.h | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index 6b79ad1..bf

[Qemu-devel] [PATCH 6/8] machine: query phandle-start machine property rather than qemu opts

2015-02-04 Thread Marcel Apfelbaum
Fixes a QEMU crash when passing phandle_start parameter in command line. Signed-off-by: Marcel Apfelbaum --- device_tree.c | 5 ++--- hw/core/machine.c | 5 + include/hw/boards.h | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/device_tree.c b/device_tree.c index

[Qemu-devel] [PATCH 5/8] machine: query kvm-shadow-mem machine property rather than qemu opts

2015-02-04 Thread Marcel Apfelbaum
Fixes a QEMU crash when passing kvm_shadow_mem parameter in command line. Signed-off-by: Marcel Apfelbaum --- hw/core/machine.c | 6 ++ include/hw/boards.h | 1 + target-i386/kvm.c | 3 +-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine

Re: [Qemu-devel] [PATCH V11 2/3] i386: Add a Virtual Machine Generation ID device

2015-02-04 Thread Igor Mammedov
On Wed, 4 Feb 2015 10:09:38 -0500 (EST) Gal Hammer wrote: > Hi Igor, > > - Original Message - > > From: "Igor Mammedov" > > To: "Gal Hammer" > > Cc: qemu-devel@nongnu.org, m...@redhat.com > > Sent: Monday, February 2, 2015 3:55:02 PM > > Subject: Re: [Qemu-devel] [PATCH V11 2/3] i386:

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Christopher Covington
Hi Gabriel, Summary up top, why I like the approach below. On 02/03/2015 02:09 PM, Gabriel L. Somlo wrote: > Hi, > For this functionality to really resemble the way environment variables > are used, environment information should be provided as part of the QEMU > command line, without the requir

Re: [Qemu-devel] [PATCH v5 09/26] qcow2: Helper for refcount array reallocation

2015-02-04 Thread Max Reitz
On 2015-02-04 at 08:21, Kevin Wolf wrote: Am 15.12.2014 um 13:50 hat Max Reitz geschrieben: Add a helper function for reallocating a refcount array, independent of the refcount order. The newly allocated space is zeroed and the function handles failed reallocations gracefully. The helper functi

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Gabriel L. Somlo
On Wed, Feb 04, 2015 at 03:24:32PM +, Daniel P. Berrange wrote: > Yes, there is some overhead in setting up QEMU on the host to provide > the data cloud-init needs, but it isn't all that difficult. For example > Rich Jones describes how to setup a virtual disk for cloud-init > > > https://r

Re: [Qemu-devel] [PATCH v5 11/26] qcow2: More helpers for refcount modification

2015-02-04 Thread Max Reitz
On 2015-02-04 at 08:53, Kevin Wolf wrote: Am 15.12.2014 um 13:50 hat Max Reitz geschrieben: Add helper functions for getting and setting refcounts in a refcount array for any possible refcount order, and choose the correct one during refcount initialization. Signed-off-by: Max Reitz Reviewed-b

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Richard W.M. Jones
On Tue, Feb 03, 2015 at 02:09:22PM -0500, Gabriel L. Somlo wrote: > qemu-system-x86_64 -guest-env="VAR1=value1;VAR2=value 2" -hda image.qcow2 libguestfs does this already by passing a few environment variables on the kernel command line. This requires a Linux guest kernel and that you're usin

Re: [Qemu-devel] [PATCH 0/8] machine: query machine properties rather than qemu opts

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 16:43, Marcel Apfelbaum wrote: > Commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed > option > descriptions from the -machine QemuOptsList to avoid repeating MachineState's > QOM properties. > > This results in a Qemu crash if a non string option is queried

[Qemu-devel] [PATCH 0/8] machine: query machine properties rather than qemu opts

2015-02-04 Thread Marcel Apfelbaum
Commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed option descriptions from the -machine QemuOptsList to avoid repeating MachineState's QOM properties. This results in a Qemu crash if a non string option is queried using qemu opts. Fix this by querying machine properties thr

[Qemu-devel] [PATCH 2/8] hw/machine: kernel-irqchip property support for allowed/required

2015-02-04 Thread Marcel Apfelbaum
The code using kernel-irqchip property requires 'allowed/required' functionality. Replace machine's kernel_irqchip field with two fields representing the new functionality and expose them through wrappers. Signed-off-by: Marcel Apfelbaum --- hw/core/machine.c | 24 +++- inc

[Qemu-devel] [PATCH 4/8] kvm: add machine state to kvm_arch_init

2015-02-04 Thread Marcel Apfelbaum
Needed to query machine's properties. Signed-off-by: Marcel Apfelbaum --- include/sysemu/kvm.h | 2 +- kvm-all.c| 2 +- target-arm/kvm.c | 2 +- target-i386/kvm.c| 2 +- target-mips/kvm.c| 2 +- target-ppc/kvm.c | 2 +- target-s390x/kvm.c | 2 +- 7 files changed, 7

Re: [Qemu-devel] [PATCH v5 10/26] qcow2: Helper function for refcount modification

2015-02-04 Thread Kevin Wolf
Am 15.12.2014 um 13:50 hat Max Reitz geschrieben: > Since refcounts do not always have to be a uint16_t, all refcount blocks > and arrays in memory should not have a specific type (thus they become > pointers to void) and for accessing them, two helper functions are used > (a getter and a setter).

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Gabriel L. Somlo
On Wed, Feb 04, 2015 at 04:00:05PM +, Richard W.M. Jones wrote: > On Tue, Feb 03, 2015 at 02:09:22PM -0500, Gabriel L. Somlo wrote: > > qemu-system-x86_64 -guest-env="VAR1=value1;VAR2=value 2" -hda > > image.qcow2 > > libguestfs does this already by passing a few environment variables on

Re: [Qemu-devel] [PATCH V11 2/3] i386: Add a Virtual Machine Generation ID device

2015-02-04 Thread Michael S. Tsirkin
On Wed, Feb 04, 2015 at 04:53:54PM +0100, Igor Mammedov wrote: > > > > Isn't this will cause a VMEXIT when the guest is reading the GUID? If it > > > > is then this idea was already presented and Michael didn't approve it. > > > It will, but is it performance critical? VM supposed to read it > > >

Re: [Qemu-devel] [PATCH v5 08/26] qcow2: Refcount overflow and qcow2_alloc_bytes()

2015-02-04 Thread Kevin Wolf
Am 04.02.2015 um 16:33 hat Max Reitz geschrieben: > On 2015-02-04 at 06:55, Kevin Wolf wrote: > >Am 15.12.2014 um 13:50 hat Max Reitz geschrieben: > >>qcow2_alloc_bytes() may reuse a cluster multiple times, in which case > >>the refcount is increased accordingly. However, if this would lead to an >

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Daniel P. Berrange
On Wed, Feb 04, 2015 at 10:59:18AM -0500, Gabriel L. Somlo wrote: > On Wed, Feb 04, 2015 at 03:24:32PM +, Daniel P. Berrange wrote: > > Yes, there is some overhead in setting up QEMU on the host to provide > > the data cloud-init needs, but it isn't all that difficult. For example > > Rich Jone

[Qemu-devel] [RFC PATCH] vfio-pci: Enable device request notification support

2015-02-04 Thread Alex Williamson
Register a notifier and attempt to unplug when a request for the device is received. Signed-off-by: Alex Williamson --- This is the matching QEMU support for the proposed vfio device request interface (https://lkml.org/lkml/2015/2/4/425). By default QEMU would be cooperative, registering for an

Re: [Qemu-devel] [PATCH v2 0/9] target-i386: Simplify APIC ID initialization, move compat code to pc.c

2015-02-04 Thread Paolo Bonzini
On 03/02/2015 20:39, Eduardo Habkost wrote: > This series removes the APIC ID initialization code from x86_cpu_initfn() > (getting us one step closer to making object_new() of X86CPU have no > dependency > on cpu_exec_init() and other global QEMU state), and moves the APIC ID > compatibility log

Re: [Qemu-devel] [PATCH v2 01/12] qcow2: Add new overlap check functions

2015-02-04 Thread Max Reitz
On 2015-02-03 at 18:08, Eric Blake wrote: On 11/24/2014 08:56 AM, Max Reitz wrote: The existing qcow2 metadata overlap detection function used existing structures to determine the location of the image metadata, from plain fields such as l1_table_offset and l1_size in the BDRVQcowState, over ima

[Qemu-devel] [Bug 1216845] Re: qemu-system-arm semihosting always calls exit(0)

2015-02-04 Thread Liviu Ionescu
thank you for your suggestion. as semihosting servers I use the j-link gdb server, openocd and qemu. if I got it right, you suggest to modify all these servers to retrieve the exit code from a specific location. as long as this is not documented in the ARM manuals, I cannot recommend such a soluti

Re: [Qemu-devel] [PATCH v2 03/12] qcow2: Create metadata list

2015-02-04 Thread Max Reitz
On 2015-02-03 at 18:34, Eric Blake wrote: On 11/24/2014 08:56 AM, Max Reitz wrote: Create and destroy the metadata list on creation and destruction of a qcow2 BDS, respectively. Skip creation if no overlap checks should be performed. Signed-off-by: Max Reitz --- block/qcow2.c | 10 ++

Re: [Qemu-devel] RFC: Universal encryption on QEMU I/O channels

2015-02-04 Thread Markus Armbruster
Peter Maydell writes: > On 4 February 2015 at 13:49, Markus Armbruster wrote: >> Remind me: what GLib version are we targeting, and why? > > Our current minimum is 2.12 (or 2.20 in Windows specific code), > and the reason is RHEL5/Centos 5. Any idea when we can move on? Don't get me started on

[Qemu-devel] [PATCH] Fix emulation of splice syscall

2015-02-04 Thread Andreas Schwab
The second and fourth argument are in/out parameters, store them back after the syscall. Also, the fourth argument was mishandled, and EFAULT handling was missing. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) dif

Re: [Qemu-devel] RFC: Universal encryption on QEMU I/O channels

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 16:26, Daniel P. Berrange wrote: > > GIOChannel's advantage is that---even though it may not be used for > > regular migration---integration with chardev would be really easy. > > If we did a QEMUIOChannel that was basically the same as IOChannel, but > with support for iovec write

Re: [Qemu-devel] RFC: Universal encryption on QEMU I/O channels

2015-02-04 Thread Daniel P. Berrange
On Wed, Feb 04, 2015 at 05:33:36PM +0100, Markus Armbruster wrote: > Peter Maydell writes: > > > On 4 February 2015 at 13:49, Markus Armbruster wrote: > >> Remind me: what GLib version are we targeting, and why? > > > > Our current minimum is 2.12 (or 2.20 in Windows specific code), > > and the

Re: [Qemu-devel] [PATCH 1/8] machine: query iommu machine property rather than qemu opts

2015-02-04 Thread Markus Armbruster
Marcel Apfelbaum writes: > Fixes a QEMU crash when passing iommu parameter in command line. > > Signed-off-by: Marcel Apfelbaum > --- > hw/core/machine.c | 5 + > hw/pci-host/q35.c | 2 +- > include/hw/boards.h | 1 + > 3 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/hw

Re: [Qemu-devel] [PATCH] xilinx_ethlite: Clean up after commit 2f991ad

2015-02-04 Thread Peter Crosthwaite
On Wed, Jan 21, 2015 at 5:18 AM, Markus Armbruster wrote: > The "fall through" added by the commit is clearly intentional. Mark > it so. Hushes up Coverity. > > Signed-off-by: Markus Armbruster Reviewed-by: Peter Crosthwaite > --- > hw/net/xilinx_ethlite.c | 1 + > 1 file changed, 1 inserti

Re: [Qemu-devel] [PATCH v5 10/26] qcow2: Helper function for refcount modification

2015-02-04 Thread Max Reitz
On 2015-02-04 at 11:06, Kevin Wolf wrote: Am 15.12.2014 um 13:50 hat Max Reitz geschrieben: Since refcounts do not always have to be a uint16_t, all refcount blocks and arrays in memory should not have a specific type (thus they become pointers to void) and for accessing them, two helper functio

Re: [Qemu-devel] [PATCH 2/3] rcu: use rcu_{dereference, assign_pointer} instead of atomic_rcu_{read, set}

2015-02-04 Thread Emilio G. Cota
On Wed, Feb 04, 2015 at 11:01:00 +0100, Paolo Bonzini wrote: > On 03/02/2015 23:08, Emilio G. Cota wrote: > > This matches the semantics of liburcu. > > This is not necessary. The two sets of macros are exactly the same, so > it's okay to use atomic_rcu_read/write. They're not exactly the same,

Re: [Qemu-devel] [PATCH 2/3] rcu: use rcu_{dereference, assign_pointer} instead of atomic_rcu_{read, set}

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 18:25, Emilio G. Cota wrote: > On Wed, Feb 04, 2015 at 11:01:00 +0100, Paolo Bonzini wrote: >> On 03/02/2015 23:08, Emilio G. Cota wrote: >>> This matches the semantics of liburcu. >> >> This is not necessary. The two sets of macros are exactly the same, so >> it's okay to use atom

[Qemu-devel] [PATCH 1/8] qdev: Improve qdev_init_nofail()'s error reporting

2015-02-04 Thread Markus Armbruster
We get two error messages: a specific one from qdev_init(), and a generic one from qdev_init_nofail(). The specific one gets suppressed in QMP context. qdev_init_nofail() failing there is a bug, though. Cut out the qdev_init() middle-man: realize the device, and on error exit with a single error

[Qemu-devel] [PATCH 8/8] parallel: parallel_hds_isa_init() shouldn't fail

2015-02-04 Thread Markus Armbruster
It shouldn't fail, and no caller checks for failure. Make failure fatal. Maintainers of affected machines cc'ed. Cc: Anthony Liguori Cc: "Michael S. Tsirkin" Cc: Aurelien Jarno Cc: Leon Alrae Cc: Blue Swirl Signed-off-by: Markus Armbruster --- hw/char/parallel.c | 12 +++- 1 file

[Qemu-devel] [PATCH 2/8] ide/isa: Replace unchecked qdev_init() by qdev_init_nofail()

2015-02-04 Thread Markus Armbruster
isa_ide_init()'s callers don't check for failure. isa_ide_init() looks like it could fail, but since isa_ide_realizefn() can't fail, it actually can't. Replace its qdev_init() by qdev_init_nofail() to make it obvious. Cc: Kevin Wolf Cc: Stefan Hajnoczi Signed-off-by: Markus Armbruster --- hw

[Qemu-devel] [PATCH 4/8] etsec: Replace qdev_init() by qdev_init_nofail()

2015-02-04 Thread Markus Armbruster
etsec_create() is a helper to create and realize the eTSEC. It's currently unused. Similar helpers for other NICs use qdev_init_nofail(). Match that. Signed-off-by: Markus Armbruster --- hw/net/fsl_etsec/etsec.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/net/fs

[Qemu-devel] [PATCH 0/8] Cleanups around unchecked qdev_init()

2015-02-04 Thread Markus Armbruster
Board setup should normally use qdev_init_nofail(), not qdev_init(), because inability to create an onboard device is normally fatal. Board setup should certainly not ignore qdev_init() failure. Even when we know that realization can't actually fail now, qdev_init_nofail() is clearer and more robu

[Qemu-devel] [PATCH 3/8] leon3: Replace unchecked qdev_init() by qdev_init_nofail()

2015-02-04 Thread Markus Armbruster
grlib_irqmp_create(), grlib_gptimer_create() and grlib_apbuart_create() are helpers to create and realize GRLIB devices. Their only caller leon3_generic_hw_init() doesn't check for failure. Only the first can actually fail, and only when the caller fails to set up a pointer property, which is a p

[Qemu-devel] [PATCH 5/8] serial: Factor out common serial_hds_isa_init()

2015-02-04 Thread Markus Armbruster
It's the same old loop copied five times, plus another instance where it's clipped to two iterations and unrolled. No external users of serial_isa_init() are left, so give it internal linkage. Maintainers of affected machines cc'ed. Cc: Richard Henderson Cc: Anthony Liguori Cc: "Michael S. Tsi

[Qemu-devel] [PATCH 7/8] parallel: Factor out common parallel_hds_isa_init()

2015-02-04 Thread Markus Armbruster
Maintainers of affected machines cc'ed. Cc: Anthony Liguori Cc: "Michael S. Tsirkin" Cc: Aurelien Jarno Cc: Leon Alrae Cc: Blue Swirl Signed-off-by: Markus Armbruster --- hw/char/parallel.c | 31 +++ hw/i386/pc.c| 7 +-- hw/mips/mips_fulong2

[Qemu-devel] [PATCH 6/8] serial: serial_hds_isa_init() shouldn't fail

2015-02-04 Thread Markus Armbruster
It shouldn't fail, and no caller checks for failure. Make failure fatal. Maintainers of affected machines cc'ed. Cc: Richard Henderson Cc: Anthony Liguori Cc: "Michael S. Tsirkin" Cc: Aurelien Jarno Cc: Leon Alrae Cc: Blue Swirl Signed-off-by: Markus Armbruster --- hw/char/serial-isa.c |

[Qemu-devel] [PATCH 8/8] machine: query mem-merge machine property rather than qemu opts

2015-02-04 Thread Marcel Apfelbaum
Fixes a QEMU crash when passing mem_merge parameter in command line. Signed-off-by: Marcel Apfelbaum --- exec.c | 2 +- hw/core/machine.c | 6 ++ include/hw/boards.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index bfca528..becd122 100

Re: [Qemu-devel] [PATCH RFC v3 1/6] qemu-iotests: fix tests 067, 071 and 087

2015-02-04 Thread Max Reitz
On 2015-02-04 at 04:32, Xiao Guang Chen wrote: From: Xiao Guang Chen Update the output files for test case 067, 071 and 087 because qemu option -nodefaults was used to start a guest so there are no default floppy and cdrom for guests any more. Use virtio-blk instead of virtio-blk-pci as the dev

[Qemu-devel] [PATCH reformat] block: move I/O request processing to block/io.c

2015-02-04 Thread Eric Blake
From: Stefan Hajnoczi The block.c file has grown to over 6000 lines. It is time to split this file so there are fewer conflicts and the code is easier to maintain. Extract I/O request processing code: * Read * Write * Flush * Discard * ioctl * Tracked requests and queuing * Throttling an

Re: [Qemu-devel] [PATCH reformat] block: move I/O request processing to block/io.c

2015-02-04 Thread Eric Blake
On 02/04/2015 10:51 AM, Eric Blake wrote: > From: Stefan Hajnoczi > > The block.c file has grown to over 6000 lines. It is time to split this > file so there are fewer conflicts and the code is easier to maintain. > > Extract I/O request processing code: > * Read > * Write > * Flush > * Dis

Re: [Qemu-devel] [PATCH reformat] block: move I/O request processing to block/io.c

2015-02-04 Thread Eric Blake
On 02/04/2015 11:01 AM, Eric Blake wrote: > On 02/04/2015 10:51 AM, Eric Blake wrote: >> From: Stefan Hajnoczi >> >> The block.c file has grown to over 6000 lines. It is time to split this >> file so there are fewer conflicts and the code is easier to maintain. >> >> This patch produces identica

[Qemu-devel] [Bug 1216845] Re: qemu-system-arm semihosting always calls exit(0)

2015-02-04 Thread Karl Zimmerman
Had a similar problem with my emulation environment. However, I did some inspection of the assembly code generated by newlib for ARM semi- hosting. While it initially appears that exit() and _exit() discard the status code, upon careful inspection one finds that it is pushed on the stack, with th

Re: [Qemu-devel] [PATCH 1/3] vfio: cleanup vfio_get_device error path, remove vfio_populate_device callback

2015-02-04 Thread Alex Williamson
On Wed, 2015-02-04 at 13:11 +0100, Paolo Bonzini wrote: > With the next patch vfio_put_base_device will be called unconditionally at > instance_finalize time, which will mean calling it twice if > vfio_populate_device > fails. This works, but it is slightly harder to follow. > > Change vfio_get_

Re: [Qemu-devel] RFC: Universal encryption on QEMU I/O channels

2015-02-04 Thread Eric Blake
On 02/04/2015 07:02 AM, Daniel P. Berrange wrote: >> >> I think fixing this for migration might simplify stuff for users a lot as >> well; >> the choice of whether libvirt does tunneling or not and what it means >> for how block migration happens etc can get very confusing. > > Yes, and not help

Re: [Qemu-devel] [PATCH v3 3/4] target-arm: Add 32/64-bit register sync

2015-02-04 Thread Greg Bellows
On Tue, Feb 3, 2015 at 12:54 PM, Peter Maydell wrote: > On 27 January 2015 at 23:58, Greg Bellows wrote: > > Add AArch32 to AArch64 register sychronization functions. > > Replace manual register synchronization with new functions in > > aarch64_cpu_do_interrupt() and HELPER(exception_return)().

[Qemu-devel] Network Migration in QEMU during Live Migration

2015-02-04 Thread Azizul Hakim
Hi all, Does QEMU support network migration so that the migration process is transparent to users? For example if my VM has a web server, I would like my user still be able to send request to the server after the migration process is completed. But since migration causes a change of the physical m

[Qemu-devel] [PULL 1/2] vfio: fix wrong initialize vfio_group_list

2015-02-04 Thread Alex Williamson
From: Chen Fan Signed-off-by: Chen Fan Signed-off-by: Alex Williamson --- hw/vfio/common.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index cf483ff..e71385e 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -32,7 +32,7 @@ #

[Qemu-devel] [PULL 0/2] vfio fixes

2015-02-04 Thread Alex Williamson
The following changes since commit ec6f25e788ef57ce1e9f734984ef8885172fd9e2: Merge remote-tracking branch 'remotes/rth/tags/pull-tg-s390-20150203' into staging (2015-02-03 21:37:16 +) are available in the git repository at: git://github.com/awilliam/qemu-vfio.git tags/vfio-update-201502

[Qemu-devel] [PULL 2/2] vfio-pci: Fix missing unparent of dynamically allocated MemoryRegion

2015-02-04 Thread Alex Williamson
Commit d8d95814609e added explicit object_unparent() calls for dynamically allocated MemoryRegions. The VFIOMSIXInfo structure also contains such a MemoryRegion, covering the mmap'd region of a PCI BAR above the MSI-X table. This structure is freed as part of the class exit function and therefore

Re: [Qemu-devel] [PATCH 1/8] machine: query iommu machine property rather than qemu opts

2015-02-04 Thread Marcel Apfelbaum
On 02/04/2015 06:47 PM, Markus Armbruster wrote: Marcel Apfelbaum writes: Fixes a QEMU crash when passing iommu parameter in command line. Signed-off-by: Marcel Apfelbaum --- hw/core/machine.c | 5 + hw/pci-host/q35.c | 2 +- include/hw/boards.h | 1 + 3 files changed, 7 inserti

Re: [Qemu-devel] [PATCH 0/8] machine: query machine properties rather than qemu opts

2015-02-04 Thread Christian Borntraeger
Am 04.02.2015 um 16:43 schrieb Marcel Apfelbaum: > Commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed > option > descriptions from the -machine QemuOptsList to avoid repeating MachineState's > QOM properties. > > This results in a Qemu crash if a non string option is querie

[Qemu-devel] [PATCH] qcow2: Rewrite qcow2_alloc_bytes()

2015-02-04 Thread Max Reitz
qcow2_alloc_bytes() is a function with insufficient error handling and an unnecessary goto. This patch rewrites it. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 77 +- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/block/q

Re: [Qemu-devel] Network Migration in QEMU during Live Migration

2015-02-04 Thread Eric Blake
On 02/04/2015 12:01 PM, Azizul Hakim wrote: > Hi all, > > Does QEMU support network migration so that the migration process is > transparent to users? For example if my VM has a web server, I would like > my user still be able to send request to the server after the migration > process is complete

Re: [Qemu-devel] [PATCH 1/3] vfio: cleanup vfio_get_device error path, remove vfio_populate_device callback

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 19:22, Alex Williamson wrote: > On Wed, 2015-02-04 at 13:11 +0100, Paolo Bonzini wrote: >> With the next patch vfio_put_base_device will be called unconditionally at >> instance_finalize time, which will mean calling it twice if >> vfio_populate_device >> fails. This works, but it

Re: [Qemu-devel] [PATCH] Fix emulation of splice syscall

2015-02-04 Thread Peter Maydell
On 4 February 2015 at 16:37, Andreas Schwab wrote: > The second and fourth argument are in/out parameters, store them back > after the syscall. Also, the fourth argument was mishandled, and EFAULT > handling was missing. > > Signed-off-by: Andreas Schwab > --- > linux-user/syscall.c | 16 ++

Re: [Qemu-devel] [Bug 1216845] Re: qemu-system-arm semihosting always calls exit(0)

2015-02-04 Thread Peter Maydell
On 4 February 2015 at 15:56, Karl Zimmerman wrote: > Had a similar problem with my emulation environment. However, I did > some inspection of the assembly code generated by newlib for ARM semi- > hosting. While it initially appears that exit() and _exit() discard the > status code, upon careful

Re: [Qemu-devel] [PATCH] vl.c: fixed QEMU crash if no display was selected in command line

2015-02-04 Thread Don Slutz
A proper fix for this is the thread: Subject: [PATCH v2 0/3] fix qemu crash about vnc Date: Fri, 30 Jan 2015 10:14:33 +0800 Message-ID: <1422584076-5728-1-git-send-email-arei.gong...@huawei.com> This also has a bug: https://bugs.launchpad.net/qemu/+bug/1414222 Xen expects this to be working.

Re: [Qemu-devel] RFC: Universal encryption on QEMU I/O channels

2015-02-04 Thread Peter Maydell
On 4 February 2015 at 16:33, Markus Armbruster wrote: > Peter Maydell writes: >> On 4 February 2015 at 13:49, Markus Armbruster wrote: >>> Remind me: what GLib version are we targeting, and why? >> >> Our current minimum is 2.12 (or 2.20 in Windows specific code), >> and the reason is RHEL5/Cent

Re: [Qemu-devel] [PATCH] vl.c: fixed QEMU crash if no display was selected in command line

2015-02-04 Thread Marcel Apfelbaum
On 02/04/2015 10:40 PM, Don Slutz wrote: A proper fix for this is the thread: I suspected I don't have the whole picture, good to know it is fixed! Thanks! Marcel Subject: [PATCH v2 0/3] fix qemu crash about vnc Date: Fri, 30 Jan 2015 10:14:33 +0800 Message-ID: <1422584076-5728-1-git-send-em

Re: [Qemu-devel] [PATCH 0/3] rcu: add option to use upstream liburcu

2015-02-04 Thread Emilio G. Cota
On Wed, Feb 04, 2015 at 11:32:57 +0100, Paolo Bonzini wrote: > On 03/02/2015 23:08, Emilio G. Cota wrote: > > * The first two patches bring back the RCU API to exactly > > match that of liburcu. > > Bringing over rcu_dereference/rcu_assign_pointer is unnecessary, I > think. The names do not con

Re: [Qemu-devel] RFC: Universal encryption on QEMU I/O channels

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 21:41, Peter Maydell wrote: > That suggests to me that we could reasonably advance to > 2.22 or 2.24 if it seemed beneficial, but not beyond that. > Is there anything particularly worthwhile that would get us? 2.22 is the first version to have GIO. 2.28 would give us TLS support i

Re: [Qemu-devel] [PATCH v3 5/8] tcg: Put opcodes in a linked list

2015-02-04 Thread Bastian Koppelmann
On 02/03/2015 03:35 PM, Richard Henderson wrote: The previous setup required ops and args to be completely sequential, and was error prone when it came to both iteration and optimization. Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 22 ++- tcg/optimize.c| 2

Re: [Qemu-devel] [PATCH v3 7/8] tcg: Implement insert_op_before

2015-02-04 Thread Bastian Koppelmann
On 02/03/2015 03:35 PM, Richard Henderson wrote: Rather reserving space in the op stream for optimization, let the optimizer add ops as necessary. Signed-off-by: Richard Henderson --- tcg/optimize.c | 57 +++-- tcg/tcg-op.c | 21

Re: [Qemu-devel] [PATCH v3 1/8] tcg: Move some opcode generation functions out of line

2015-02-04 Thread Bastian Koppelmann
On 02/03/2015 03:35 PM, Richard Henderson wrote: Some of these functions are really quite large. We have a number of things that ought to be circularly dependent, but we duplicated code to break that chain for the inlines. This saved 25% of the code size of one of the translators I examined.

Re: [Qemu-devel] [PATCH 0/3] rcu: add option to use upstream liburcu

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 22:01, Emilio G. Cota wrote: >> You're right, I was imprecise---I meant they are interoperable. You can >> use atomic_rcu_read/write together with liburcu, you do not need to use >> the liburcu-provided rcu_dereference/rcu_assign_pointer. > > It's true that they can coexist. I'm j

Re: [Qemu-devel] [PATCH 0/8] machine: query machine properties rather than qemu opts

2015-02-04 Thread Marcel Apfelbaum
On 02/04/2015 09:45 PM, Christian Borntraeger wrote: Am 04.02.2015 um 16:43 schrieb Marcel Apfelbaum: Commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed option descriptions from the -machine QemuOptsList to avoid repeating MachineState's QOM properties. This results in a

Re: [Qemu-devel] Network Migration in QEMU during Live Migration

2015-02-04 Thread Gary R Hook
On 2/4/15 2:02 PM, Eric Blake wrote: On 02/04/2015 12:01 PM, Azizul Hakim wrote: Does QEMU support network migration so that the migration process is transparent to users? For example if my VM has a web server, I would like my user still be able to send request to the server after the migration

Re: [Qemu-devel] [PATCH] qcow2: Rewrite qcow2_alloc_bytes()

2015-02-04 Thread Eric Blake
On 02/04/2015 12:53 PM, Max Reitz wrote: My review jumps around a bit; try to follow the numbers to learn my stream of consciousness on reviewing it. tl;dr: It looks like this is functionally correct (you won't break behavior), but that you have a pessimization bug (see [7]), so you ought to spin

Re: [Qemu-devel] [PATCH] qcow2: Rewrite qcow2_alloc_bytes()

2015-02-04 Thread Eric Blake
On 02/04/2015 02:59 PM, Eric Blake wrote: >> qcow2_alloc_bytes() is a function with insufficient error handling and >> an unnecessary goto. This patch rewrites it. >> - redo: >> + >> free_in_cluster = s->cluster_size - >> offset_into_cluster(s, s->free_byte_offset); > > Based on [0]

Re: [Qemu-devel] [PATCH 0/8] machine: query machine properties rather than qemu opts

2015-02-04 Thread Christian Borntraeger
Am 04.02.2015 um 22:35 schrieb Marcel Apfelbaum: [...] >> Would a function there that does gets >> S390_CCW_MACHINE(current_machine)->aes_key_wrap >> considered ok, or do we need to pollute hw/core/machine.c with architecture >> specific >> options? > We surely don't add this to hw/core/machine.

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let all lock_user_struct() and unlock_user_struct() paired with each other

2015-02-04 Thread Chen Gang S
On 1/29/15 09:37, Chen Gang S wrote: > On 1/29/15 06:36, Peter Maydell wrote: >> On 28 January 2015 at 22:09, Chen Gang S wrote: >>> - Is what I said above really correct (e.g. is linux-user really mainly >>>for cpu emulation)?. >> >> Not really. linux-user is mainly for running single Linux

Re: [Qemu-devel] [PATCH 0/3] rcu: add option to use upstream liburcu

2015-02-04 Thread Emilio G. Cota
On Wed, Feb 04, 2015 at 22:17:44 +0100, Paolo Bonzini wrote: > > What I'm investigating now is how to do this in a manner that is palatable > > to upstream. For this as it's well known we need a multi-threaded TCG, > > and I believe quite a few bits from liburcu(-cds) might help to > > get there. >

Re: [Qemu-devel] [PATCH v3 3/4] target-arm: Add 32/64-bit register sync

2015-02-04 Thread Greg Bellows
On Tue, Feb 3, 2015 at 12:54 PM, Peter Maydell wrote: > On 27 January 2015 at 23:58, Greg Bellows wrote: > > Add AArch32 to AArch64 register sychronization functions. > > Replace manual register synchronization with new functions in > > aarch64_cpu_do_interrupt() and HELPER(exception_return)().

Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations

2015-02-04 Thread David Gibson
On Wed, Feb 04, 2015 at 04:19:14PM +0100, Alexander Graf wrote: > > > On 04.02.15 02:32, David Gibson wrote: > > On Wed, Feb 04, 2015 at 08:19:06AM +1100, Paul Mackerras wrote: > >> On Tue, Feb 03, 2015 at 05:10:51PM +1100, David Gibson wrote: > >>> qemu currently implements the hypercalls H_LOGI

Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations

2015-02-04 Thread Alexander Graf
On 05.02.15 01:48, David Gibson wrote: > On Wed, Feb 04, 2015 at 04:19:14PM +0100, Alexander Graf wrote: >> >> >> On 04.02.15 02:32, David Gibson wrote: >>> On Wed, Feb 04, 2015 at 08:19:06AM +1100, Paul Mackerras wrote: On Tue, Feb 03, 2015 at 05:10:51PM +1100, David Gibson wrote: > qem

Re: [Qemu-devel] [v2][PATCH] libxl: add one machine property to support IGD GFX passthrough

2015-02-04 Thread Chen, Tiejun
On 2015/2/4 18:41, Ian Campbell wrote: On Wed, 2015-02-04 at 09:34 +0800, Chen, Tiejun wrote: "-machine xxx,igd-passthru=on", to enable/disable that feature. And we also remove that old option, "-gfx_passthru", just from the case of LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN sinc

Re: [Qemu-devel] [PATCH v2 06/12] qcow2/overlaps: Protect refcount blocks

2015-02-04 Thread Eric Blake
On 11/24/2014 08:56 AM, Max Reitz wrote: > Keep track of the refcount blocks in the metadata list to protect them > against accidental modifications. > > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 38 +- > 1 file changed, 37 insertions(+), 1 del

Re: [Qemu-devel] [PATCH v2 07/12] qcow2/overlaps: Protect active L1 table

2015-02-04 Thread Eric Blake
On 11/24/2014 08:56 AM, Max Reitz wrote: > Keep track of the active L1 table in the metadata list to protect it > against accidental modifications. > > Signed-off-by: Max Reitz > --- > block/qcow2-cluster.c | 11 +++ > block/qcow2-snapshot.c | 10 ++ > block/qcow2.c |

Re: [Qemu-devel] [PATCH 4/9] rcu: introduce RCU-enabled QLIST

2015-02-04 Thread Fam Zheng
On Wed, 02/04 13:46, Paolo Bonzini wrote: > > > On 04/02/2015 04:42, Fam Zheng wrote: > > On Tue, 02/03 13:52, Paolo Bonzini wrote: > >> From: Mike Day > >> > >> Add RCU-enabled variants on the existing bsd DQ facility. Each > >> operation has the same interface as the existing (non-RCU) > >> ve

[Qemu-devel] Intel X86 hardware transactional memory

2015-02-04 Thread Xin Tong
If i want to implement Intel X86 hardware transactional memory (HTM) in QEMU. what would be a good way to track the memory accesses. I think one possible way is to clear the software tlb on entry to the transaction and disable (not install any translations) the software TLB till the end of the tra

Re: [Qemu-devel] [PATCH v16 2/2] sPAPR: Implement sPAPRPHBClass::eeh_handler

2015-02-04 Thread David Gibson
On Wed, Feb 04, 2015 at 01:27:36PM +1100, Gavin Shan wrote: > The patch implements sPAPRPHBClass::eeh_handler so that the > EEH RTAS requests can be routed to VFIO for further handling. > > Signed-off-by: Gavin Shan > --- > hw/ppc/spapr_pci_vfio.c | 58 >

Re: [Qemu-devel] [PATCH v16 1/2] sPAPR: Implement EEH RTAS calls

2015-02-04 Thread David Gibson
On Wed, Feb 04, 2015 at 01:27:35PM +1100, Gavin Shan wrote: > The emulation for EEH RTAS requests from guest isn't covered > by QEMU yet and the patch implements them. > > The patch defines constants used by EEH RTAS calls and adds > callback sPAPRPHBClass::eeh_handler, which is going to be used >

<    1   2   3   >