Re: [Qemu-devel] [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-04 Thread Christian Borntraeger
Am 03.02.2015 um 16:22 schrieb Paolo Bonzini: > > > On 03/02/2015 16:16, Thomas Huth wrote: >> Actually, I'd prefer to keep the "virtual" in the defines for the type >> of operation below: When it comes to s390 storage keys, we likely might >> need some calls for reading and writing to physical m

[Qemu-devel] [PATCH v3] pc: acpi-build: make linker & RSDP tables dynamic

2015-02-04 Thread Igor Mammedov
Linker and RSDP tables are build only once, so if later during rebuild sizes of other ACPI tables change pointers will be patched incorrectly due to wrong offsets in RSDP and linker. To fix it rebuild linker and RSDP tables along with the rest of ACPI tables so that they would have offsets that ma

Re: [Qemu-devel] [PATCH v2] qga: add guest-set-admin-password command

2015-02-04 Thread Daniel P. Berrange
On Tue, Feb 03, 2015 at 03:16:08PM -0700, Eric Blake wrote: > On 01/12/2015 08:58 AM, Daniel P. Berrange wrote: > > Add a new 'guest-set-admin-password' command for changing the > > root/administrator password. This command is needed to allow > > OpenStack to support its API for changing the admin

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

2015-02-04 Thread Daniel P. Berrange
On Tue, Feb 03, 2015 at 02:09:22PM -0500, Gabriel L. Somlo wrote: > Hi, > > I'm interested in adding a way for a host to pass environment variables > into a qemu guest VM -- analogous to setting environment variables for > a process to access via getenv() and friends. > > The QEMU Guest Agent (QG

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

2015-02-04 Thread Daniel P. Berrange
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 > > more about the actual use-cases being looked at. > > The proposed functionality is m

[Qemu-devel] [PATCH] acpi: update RSDP on guest access

2015-02-04 Thread Michael S. Tsirkin
As Igor pointed out, when RSDT offset changes, RSDP needs to change as well. We really should have put it in a ROM region, but we can't change that for old machine types, let's just set the callback and update it explicitly. Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 10 +++

[Qemu-devel] [PATCH RFC v3 6/6] qemu-iotests: s390x: fix test 055

2015-02-04 Thread Xiao Guang Chen
From: Mao Chuan Li There is no such device 'ide-cd' defined on the s390 platform, so test_medium_not_found() test is skipped. Reviewed-by: Michael Mueller Signed-off-by: Mao Chuan Li --- tests/qemu-iotests/055 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/055

[Qemu-devel] [PATCH RFC v3 0/6] Update tests/qemu-iotests failing cases for the s390 platform

2015-02-04 Thread Xiao Guang Chen
v3: 1. Fix a typo in v2. v2: 1. Drop the patches for test 039 for it has been fixed in upstream. 2. Integrate patches for test 071, 067 and 087. 3. Keep the other patches. v1: 1. updated the test suite to be default-machine-type-aware, from the previous platform-aware 2. created a new patch "qe

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

2015-02-04 Thread Xiao Guang Chen
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 device driver for test case 067. For virtio-blk-pci

[Qemu-devel] [PATCH RFC v3 2/6] qemu-iotests: qemu machine type support

2015-02-04 Thread Xiao Guang Chen
From: Mao Chuan Li This patch adds qemu machine type support to the io test suite. Based on the qemu default machine type the reference output file can now vary from the default to a machine specific output file if necessary. That shall allow all platforms to use this test suite. Reviewed-by:

[Qemu-devel] [PATCH RFC v3 3/6] qemu-iotests: run qemu with -nodefaults

2015-02-04 Thread Xiao Guang Chen
From: Mao Chuan Li This patch fixes an io test suite issue that was introduced with the commit c88930a6866e74953e931ae749781e98e486e5c8 'qemu-char: Permit only a single "stdio" character device'. The option supresses the creation of default devices. Reviewed-by: Michael Mueller Signed-off-by: M

[Qemu-devel] [PATCH RFC v3 4/6] qemu-iotests: s390x: fix test 041

2015-02-04 Thread Xiao Guang Chen
From: Mao Chuan Li There is no such device 'ide-cd' defined on the s390 platform, so test_medium_not_found() test is skipped. Reviewed-by: Michael Mueller Signed-off-by: Mao Chuan Li --- tests/qemu-iotests/041 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/041

[Qemu-devel] [PATCH RFC v3 5/6] qemu-iotests: s390x: fix test 051

2015-02-04 Thread Xiao Guang Chen
From: Mao Chuan Li The tests for device type "ide_cd" are skipped for the s390 platform. The default device id of hard disk on the s390 platform differs to that of the x86 platform. A new variable device_id is defined and "virtio0" set for the s390 platform. A s390 platform specific output file i

Re: [Qemu-devel] [PATCH 00/10] pci: Partial conversion to realize

2015-02-04 Thread Markus Armbruster
Ping? Michael, can this go through your tree? Markus Armbruster writes: > I posted this series as RFC back in October, but it depended on > patches then still under review, so I put it aside, and promptly > forgot. Fortunately, rebasing and updating it wasn't much trouble. > > While discussing

Re: [Qemu-devel] [PATCH v4 4/4] Add migration stream analyzation script

2015-02-04 Thread Amit Shah
On (Thu) 22 Jan 2015 [15:01:40], Alexander Graf wrote: > [PATCH v4 4/4] Add migration stream analyzation script analysis is a more widely-accepted word :-) Amit

Re: [Qemu-devel] [PATCH 00/10] pci: Partial conversion to realize

2015-02-04 Thread Michael S. Tsirkin
On Wed, Feb 04, 2015 at 10:34:45AM +0100, Markus Armbruster wrote: > Ping? > > Michael, can this go through your tree? Thanks, I'll apply them. -- MST

Re: [Qemu-devel] [PATCH 00/10] pci: Partial conversion to realize

2015-02-04 Thread Gonglei
On 2015/1/19 22:52, Markus Armbruster wrote: > I posted this series as RFC back in October, but it depended on > patches then still under review, so I put it aside, and promptly > forgot. Fortunately, rebasing and updating it wasn't much trouble. > > While discussing Gonglei's "[PATCH v2 00/19]

Re: [Qemu-devel] [PATCH 0/4] Pair g_malloc() with g_free(), not free()

2015-02-04 Thread Markus Armbruster
Got reviews, want qemu-trivial: *ping* :) Markus Armbruster writes: > I'm routing these patches through qemu-trivial, even though some of > them touch actively maintained code, and could go through the > respective tree instead: > > * PATCH 3 sPAPR (Alex) > > * PATCH 4 USB (Gerd) > > If you want

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

2015-02-04 Thread Markus Armbruster
Ping? Markus Armbruster writes: > The "fall through" added by the commit is clearly intentional. Mark > it so. Hushes up Coverity. > > Signed-off-by: Markus Armbruster > --- > hw/net/xilinx_ethlite.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xi

Re: [Qemu-devel] [PATCH 0/3] util/uri: Cleanups and a bug fix

2015-02-04 Thread Markus Armbruster
Ping? Markus Armbruster writes: > Note: checkpatch is unhappy with the first patch, because I refrained > from cleaning up the ugly return(NULL). They're all over the place. > > Markus Armbruster (3): > util/uri: uri_new() can't fail, drop dead error handling > util/uri: realloc2n() can't f

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 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. Paolo

Re: [Qemu-devel] [RFC v2 6/8] vfio_pci: fix a wrong check in vfio_pci_reset

2015-02-04 Thread Chen Fan
On 02/03/2015 04:16 AM, Alex Williamson wrote: On Wed, 2015-01-28 at 16:37 +0800, Chen Fan wrote: when vfio device support FLR, then when device reset, we call VFIO_DEVICE_RESET ioctl to reset the device first, at kernel side, we also can see the order of reset: 3330 rc = pcie_flr(dev,

Re: [Qemu-devel] [PATCH v4 0/4] Migration Deciphering aid

2015-02-04 Thread Amit Shah
On (Thu) 22 Jan 2015 [15:01:36], Alexander Graf wrote: > Migration is a black hole to most people. One of the biggest reasons for > this is that its protocol is a secret, undocumented sauce of code rolling > around random parts of the QEMU code base. > > But what if we simply exposed the descripti

[Qemu-devel] [PATCH v2 2/6] rtl8139: g_malloc() can't fail, bury dead error handling

2015-02-04 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Gonglei --- hw/net/rtl8139.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 6fa9e0a..b55e438 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -2075,20 +2075

[Qemu-devel] [PATCH v2 3/6] kvm: g_malloc() can't fail, bury dead error handling

2015-02-04 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Gonglei --- kvm-all.c | 4 1 file changed, 4 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 2f21a4e..05a79c2 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -2070,10 +2070,6 @@ int kvm_insert_breakpoint(CPUState *cpu,

[Qemu-devel] [PATCH v2 5/6] vnc: g_realloc() can't fail, bury dead error handling

2015-02-04 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Gonglei Reviewed-by: Thomas Huth --- ui/vnc.c | 4 1 file changed, 4 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index a742c90..02552ee 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -659,10 +659,6 @@ void buffer_reserve(Bu

[Qemu-devel] [PATCH v2 0/6] Trivial cleanups around g_malloc()

2015-02-04 Thread Markus Armbruster
I'm routing these patches through qemu-trivial, even though some of them touch actively maintained code, and could go through the respective tree instead: * PATCH 1 block (Kevin, Stefan) * PATCH 3 KVM (Paolo) * PATCH 4 migration (Juan, Amit) * PATCH 5 VNC (Gerd) If you want me to reroute any o

[Qemu-devel] [PATCH v2 4/6] rdma: g_malloc0() can't fail, bury dead error handling

2015-02-04 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Gonglei --- migration/rdma.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index b32dbdf..306570d 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -1147,9 +1147,6 @@ static i

[Qemu-devel] [PATCH v2 6/6] translate-all: Use g_try_malloc() for dynamic translator buffer

2015-02-04 Thread Markus Armbruster
The USE_MMAP code can fail, and the caller handles the failure already. Let the !USE_MMAP code fail as well, for consistency. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Gonglei --- translate-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t

Re: [Qemu-devel] [PATCH v2 00/12] QEmu memory hot unplug support

2015-02-04 Thread Michael S. Tsirkin
Re: subject - it's really QEMU - not QEmu. you have this in code as well, so I'm guessing you didn't run your patches through checkpatch.pl. Please do and fix fallout if any. -- MST

[Qemu-devel] [PATCH v2 1/6] onenand: g_malloc() can't fail, bury dead error handling

2015-02-04 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Gonglei --- hw/block/onenand.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/block/onenand.c b/hw/block/onenand.c index 348630d..1b2c893 100644 --- a/hw/block/onenand.c +++ b/hw/block/onenand.c

Re: [Qemu-devel] [PATCH 00/10] pci: Partial conversion to realize

2015-02-04 Thread Markus Armbruster
Gonglei writes: > Markus, you may forget to add my 'R-by' in this formal version. :) I chose not to carry R-bys from the RFC version forward, because the rebase after almost three months wasn't 100% trivial. I certainly didn't mean to snub your review! > For series: > Reviewed-by: Gonglei Th

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

2015-02-04 Thread Paolo Bonzini
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 conflict. As to call_rcu/call_rcu1, I understand there is a problem. May

Re: [Qemu-devel] [PATCH 00/10] pci: Partial conversion to realize

2015-02-04 Thread Gonglei
On 2015/2/4 18:30, Markus Armbruster wrote: > Gonglei writes: > >> Markus, you may forget to add my 'R-by' in this formal version. :) > > I chose not to carry R-bys from the RFC version forward, because the > rebase after almost three months wasn't 100% trivial. I certainly > didn't mean to sn

Re: [Qemu-devel] [PATCH v2 00/12] QEmu memory hot unplug support

2015-02-04 Thread Zhu Guihua
On Wed, 2015-02-04 at 11:28 +0100, Michael S. Tsirkin wrote: > Re: subject - it's really QEMU - not QEmu. > > you have this in code as well, so I'm guessing you didn't > run your patches through checkpatch.pl. Please do > and fix fallout if any. I do it now, and I find warnings about this. I will

Re: [Qemu-devel] [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 09:26, Christian Borntraeger wrote: > Am 03.02.2015 um 16:22 schrieb Paolo Bonzini: >> On 03/02/2015 16:16, Thomas Huth wrote: >>> Actually, I'd prefer to keep the "virtual" in the defines for the type >>> of operation below: When it comes to s390 storage keys, we likely might >>> n

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

2015-02-04 Thread Ian Campbell
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 since actually > >> no any

Re: [Qemu-devel] [PATCH v2] qga: add guest-set-admin-password command

2015-02-04 Thread Roman Kagan
On Mon, Jan 12, 2015 at 03:58:14PM +, Daniel P. Berrange wrote: > Add a new 'guest-set-admin-password' command for changing the > root/administrator password. This command is needed to allow > OpenStack to support its API for changing the admin password > on a running guest. > > Accepts either

Re: [Qemu-devel] [PATCH v2] qga: add guest-set-admin-password command

2015-02-04 Thread Daniel P. Berrange
On Wed, Feb 04, 2015 at 01:48:40PM +0300, Roman Kagan wrote: > On Mon, Jan 12, 2015 at 03:58:14PM +, Daniel P. Berrange wrote: > > Add a new 'guest-set-admin-password' command for changing the > > root/administrator password. This command is needed to allow > > OpenStack to support its API for

Re: [Qemu-devel] [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-04 Thread Thomas Huth
On Wed, 04 Feb 2015 09:26:11 +0100 Christian Borntraeger wrote: > Am 03.02.2015 um 16:22 schrieb Paolo Bonzini: > > > > > > On 03/02/2015 16:16, Thomas Huth wrote: > >> Actually, I'd prefer to keep the "virtual" in the defines for the type > >> of operation below: When it comes to s390 storage

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

2015-02-04 Thread Daniel P. Berrange
In QEMU there are a number of features which involve communication with an external system over an I/O channel of some form. The features include migration, NBD, VNC and character devices. The I/O channel in question might might be a FIFO pipe, a PTY, a TCP socket, a UNIX domain socket, RMDA channe

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

2015-02-04 Thread Marcel Apfelbaum
Commit 4db14629c3 (vnc: switch to QemuOpts, allow multiple servers) converted vnc option to QemuOpts. However, the default vnc display had ...,to=99,... between parameters that is not covered by the QemuOpts. Remove it because is not longer used and solves the crash. Signed-off-by: Marcel Apfelbau

Re: [Qemu-devel] [PATCH v5 07/26] qcow2: Respect error in qcow2_alloc_bytes()

2015-02-04 Thread Kevin Wolf
Am 15.12.2014 um 13:50 hat Max Reitz geschrieben: > qcow2_update_cluster_refcount() may fail, and qcow2_alloc_bytes() should > mind that case. > > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > Reviewed-by: Stefan Hajnoczi > --- > block/qcow2-refcount.c | 33 +

Re: [Qemu-devel] [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-04 Thread Christian Borntraeger
Am 04.02.2015 um 11:39 schrieb Paolo Bonzini: >> Conny: >> I am asking myself, if we should explicitly add a comment in the >> virtio-ccw spec, that all accesses are assumed to be with key 0 and >> thus never cause key protection. The change/reference bit is set >> by the underlying I/O or memory

Re: [Qemu-devel] [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 12:25, Christian Borntraeger wrote: > Whenever vhost or qemu or a finished aio request wrote content into a > virtio buffer, the HW has set the storage key for that physical page, > which makes it automatically dirty/referenced in the guest visible > storage key. Ah, I knew the s

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

2015-02-04 Thread Kevin Wolf
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 cluster and > allocate a new one. > > Sign

[Qemu-devel] [PATCH v2 0/3] vfio: free data and unmap BARs in instance_finalize

2015-02-04 Thread Paolo Bonzini
This is v2 of the patch sent yesterday. In addition to including the missing vfio bits, I split it in two parts: one introducing instance_finalize (patch 2), and the second making the freeing of BARs RCU-friendly (patch 3). With these two changes I found the error path logic a bit hard to follow.

[Qemu-devel] [PATCH 2/3] vfio: free dynamically-allocated data in instance_finalize

2015-02-04 Thread Paolo Bonzini
In order to enable out-of-BQL address space lookup, destruction of devices needs to be split in two phases. Unrealize is the first phase; once it complete no new accesses will be started, but there may still be pending memory accesses can still be completed. The second part is freeing the device,

[Qemu-devel] [PATCH 3/3] vfio: unmap and free BAR data in instance_finalize

2015-02-04 Thread Paolo Bonzini
In the case of VFIO, the unrealize callback is too early to munmap the BARs. The munmap must be delayed until memory accesses are complete. To do this, split vfio_unmap_bars in two. The removal step, now called vfio_unregister_bars, remains in vfio_exitfn. The reclamation step is vfio_unmap_bars

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

2015-02-04 Thread Paolo Bonzini
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_device to not touch the vbasedev struct until it will definitely succ

Re: [Qemu-devel] [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-04 Thread Christian Borntraeger
Am 04.02.2015 um 12:42 schrieb Paolo Bonzini: > > > On 04/02/2015 12:25, Christian Borntraeger wrote: >> Whenever vhost or qemu or a finished aio request wrote content into a >> virtio buffer, the HW has set the storage key for that physical page, >> which makes it automatically dirty/referenced

[Qemu-devel] [PATCH 4/7] usb: Suppress bogus error when automatic usb-hub creation fails

2015-02-04 Thread Markus Armbruster
USBDevice's realize method usb_qdev_realize() automatically creates a usb-hub when only one port is left. Creating devices in realize methods is questionable, but works. If usb-hub creation fails, an error is reported to stderr, but the failure is otherwise ignored. We then create the actual dev

[Qemu-devel] [PATCH 0/7] usb: Improvements around device realization

2015-02-04 Thread Markus Armbruster
Markus Armbruster (7): usb: usb_create() can't fail, drop useless error handling usb: Improve -usbdevice error reporting a bit usb: Do not prefix error_setg() messages with "Error: " usb: Suppress bogus error when automatic usb-hub creation fails usb: Change usb_create_simple() to abort o

[Qemu-devel] [PATCH 2/7] usb: Improve -usbdevice error reporting a bit

2015-02-04 Thread Markus Armbruster
Most LegacyUSBFactory usbdevice_init() methods realize with qdev_init_nofail(), even though their caller usbdevice_create() can handle failure. Okay if it really can't fail (I didn't check), but somewhat brittle. usb_msd_init() and usb_bt_init() call qdev_init(). The latter additionally reports

[Qemu-devel] [PATCH 5/7] usb: Change usb_create_simple() to abort on failure

2015-02-04 Thread Markus Armbruster
Instead of returning null pointer. Matches pci_create_simple(), isa_create_simple(), sysbus_create_simple(). It's unused since the previous commit, but I'll put it to use again shortly. Signed-off-by: Markus Armbruster --- hw/usb/bus.c | 9 + 1 file changed, 1 insertion(+), 8 deletions

[Qemu-devel] [PATCH 6/7] r2d: Don't use legacy -usbdevice support for setting up board

2015-02-04 Thread Markus Armbruster
It's tempting, because usbdevice_create() is so simple to use. But there's a lot of unwanted complexity behind the simple interface. Switch to usb_create_simple(). Cc: Magnus Damm Signed-off-by: Markus Armbruster --- hw/sh4/r2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[Qemu-devel] [PATCH 1/7] usb: usb_create() can't fail, drop useless error handling

2015-02-04 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/usb/bus.c | 4 hw/usb/dev-bluetooth.c | 6 +- hw/usb/dev-network.c | 3 --- hw/usb/dev-serial.c| 3 --- hw/usb/dev-storage.c | 3 --- 5 files changed, 1 insertion(+), 18 deletions(-) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index

[Qemu-devel] [PATCH 7/7] PPC: Don't use legacy -usbdevice support for setting up board

2015-02-04 Thread Markus Armbruster
It's tempting, because usbdevice_create() is so simple to use. But there's a lot of unwanted complexity behind the simple interface. Switch to usb_create_simple(). Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster --- hw/ppc/mac_newworld.c | 7 +-- hw/ppc/spapr.c

[Qemu-devel] [PATCH 3/7] usb: Do not prefix error_setg() messages with "Error: "

2015-02-04 Thread Markus Armbruster
Because it produces beauties like (qemu) usb_add mouse Failed to initialize USB device 'usb-mouse': Error: tried to attach usb device QEMU USB Mouse to a bus with no free ports Signed-off-by: Markus Armbruster --- hw/usb/bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

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

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 12:32, Daniel P. Berrange wrote: > So my idea would be that we define a QEMUChannel object and set of APIs to > standardize all interaction with sockets, pipes, RDMA, whatever $channel, > and then convert the QEMU features I've mentioned over to use that. I think > that would be sim

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

2015-02-04 Thread Paolo Bonzini
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) >> version. Also, each operation is implemented as macro. >> >> U

Re: [Qemu-devel] [PATCH 6/9] cosmetic changes preparing for the following patches

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 04:10, Fam Zheng wrote: >> > -return; > Other changes are equivalent, but not quite for this one. But I think it is > still correct, so: > > Reviewed-by: Fam Zheng True, this is not entirely cosmetic. Still, the loop is guaranteed to only hit one block, because of th

Re: [Qemu-devel] [PATCH 7/7] PPC: Don't use legacy -usbdevice support for setting up board

2015-02-04 Thread Alexander Graf
On 04.02.15 13:28, Markus Armbruster wrote: > It's tempting, because usbdevice_create() is so simple to use. But > there's a lot of unwanted complexity behind the simple interface. > Switch to usb_create_simple(). > > Cc: Alexander Graf > Cc: qemu-...@nongnu.org > Signed-off-by: Markus Armbrus

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

2015-02-04 Thread Daniel P. Berrange
On Wed, Feb 04, 2015 at 01:43:12PM +0100, Paolo Bonzini wrote: > > > On 04/02/2015 12:32, Daniel P. Berrange wrote: > > So my idea would be that we define a QEMUChannel object and set of APIs to > > standardize all interaction with sockets, pipes, RDMA, whatever $channel, > > and then convert the

Re: [Qemu-devel] [PATCH v6 0/5] Geometry and blocksize detection for backing devices.

2015-02-04 Thread Ekaterina Tumanova
On 01/19/2015 05:34 PM, Ekaterina Tumanova wrote: Updates v5 -> v6: Minor Updates according the last review from Stefan Hajnoczi: 1. Do not change the flow of code, factored out of raw_probe_alignment. 2. added #ifdef __linux__ in 2 places of raw-posix.c, mentioned by reviewer. 3. adjusted the c

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

2015-02-04 Thread Kevin Wolf
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 function will always align the buffer siz

Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2015-02-04 Thread Pedro Alves
Hi, I was skimming the list, and noticed: On 01/31/2015 10:28 AM, Jan Kiszka wrote: > @@ -1187,6 +1193,10 @@ static int gdb_handle_packet(GDBState *s, const char > *line_buf) > put_packet_binary(s, buf, len + 1); > break; > } > +if (strncmp(p, "Attached"

Re: [Qemu-devel] [PATCH v2] qga: add guest-set-admin-password command

2015-02-04 Thread Olga Krishtal
On 12/01/15 18:58, Daniel P. Berrange wrote: Add a new 'guest-set-admin-password' command for changing the root/administrator password. This command is needed to allow OpenStack to support its API for changing the admin password on a running guest. Accepts either the raw password string: $ virs

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

2015-02-04 Thread Alexander Graf
On 14.01.15 02:41, David Gibson wrote: > On Mon, Jan 05, 2015 at 11:26:28AM +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

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

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 14:00, Daniel P. Berrange wrote: > On Wed, Feb 04, 2015 at 01:43:12PM +0100, Paolo Bonzini wrote: >> >> >> On 04/02/2015 12:32, Daniel P. Berrange wrote: >>> So my idea would be that we define a QEMUChannel object and set of APIs to >>> standardize all interaction with sockets, pipe

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

2015-02-04 Thread David Gibson
On Wed, Feb 04, 2015 at 02:42:00PM +0100, Alexander Graf wrote: > > > On 14.01.15 02:41, David Gibson wrote: > > On Mon, Jan 05, 2015 at 11:26:28AM +1100, Gavin Shan wrote: > >> The patch implements sPAPRPHBClass::eeh_handler so that the > >> EEH RTAS requests can be routed to VFIO for further ha

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

2015-02-04 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: > In QEMU there are a number of features which involve communication with an > external system over an I/O channel of some form. The features include > migration, NBD, VNC and character devices. The I/O channel in question might > might be a FIFO pi

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

2015-02-04 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Wed, Feb 04, 2015 at 01:43:12PM +0100, Paolo Bonzini wrote: >> >> >> On 04/02/2015 12:32, Daniel P. Berrange wrote: >> > So my idea would be that we define a QEMUChannel object and set of APIs to >> > standardize all interaction with sockets, pipes, RDMA, whate

Re: [Qemu-devel] [PATCH v1] vhost-user: fix not send all hugepage files to vhost-user

2015-02-04 Thread Michael S. Tsirkin
On Mon, Feb 02, 2015 at 12:29:47AM +0100, Paolo Bonzini wrote: > > > On 17/12/2014 07:02, haifeng@huawei.com wrote: > > From: linhaifeng > > > > If we create VM with two or more numa nodes qemu will create two > > or more hugepage files but qemu only send one hugepage file fd > > to vhost-u

Re: [Qemu-devel] [RFC v2 6/8] vfio_pci: fix a wrong check in vfio_pci_reset

2015-02-04 Thread Alex Williamson
On Wed, 2015-02-04 at 17:54 +0800, Chen Fan wrote: > On 02/03/2015 04:16 AM, Alex Williamson wrote: > > On Wed, 2015-01-28 at 16:37 +0800, Chen Fan wrote: > >> when vfio device support FLR, then when device reset, > >> we call VFIO_DEVICE_RESET ioctl to reset the device first, > >> at kernel side,

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

2015-02-04 Thread Kevin Wolf
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-by: Eric Blake > Reviewed-by: Ste

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

2015-02-04 Thread Peter Maydell
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. -- PMM

Re: [Qemu-devel] [PATCH v1] vhost-user: fix not send all hugepage files to vhost-user

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 14:52, Michael S. Tsirkin wrote: > I'm not sure: does memory core ever give us two adjacent > RAM segments that we *can* merge? I don't think so. Memory core merges ranges already if the following holds: - same memory region - same dirty logging mode - same readonly behavior (ign

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

2015-02-04 Thread Daniel P. Berrange
On Wed, Feb 04, 2015 at 01:08:21PM +, Dr. David Alan Gilbert wrote: > * Daniel P. Berrange (berra...@redhat.com) wrote: > > In QEMU there are a number of features which involve communication with an > > external system over an I/O channel of some form. The features include > > migration, NBD, V

Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2015-02-04 Thread Jan Kiszka
On 2015-02-04 14:36, Pedro Alves wrote: > Hi, I was skimming the list, and noticed: > > On 01/31/2015 10:28 AM, Jan Kiszka wrote: >> @@ -1187,6 +1193,10 @@ static int gdb_handle_packet(GDBState *s, const char >> *line_buf) >> put_packet_binary(s, buf, len + 1); >> break;

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

2015-02-04 Thread Daniel P. Berrange
On Wed, Feb 04, 2015 at 02:42:20PM +0100, Paolo Bonzini wrote: > > > On 04/02/2015 14:00, Daniel P. Berrange wrote: > > On Wed, Feb 04, 2015 at 01:43:12PM +0100, Paolo Bonzini wrote: > >> > >> > >> On 04/02/2015 12:32, Daniel P. Berrange wrote: > >>> So my idea would be that we define a QEMUChann

Re: [Qemu-devel] [PATCH v2] qga: add guest-set-admin-password command

2015-02-04 Thread Daniel P. Berrange
On Wed, Feb 04, 2015 at 04:25:47PM +0300, Olga Krishtal wrote: > On 12/01/15 18:58, Daniel P. Berrange wrote: > >Add a new 'guest-set-admin-password' command for changing the > >root/administrator password. This command is needed to allow > >OpenStack to support its API for changing the admin passw

Re: [Qemu-devel] [PATCH] vl.c: fix -usb option assertion failure in qemu_opt_get_bool_helper()

2015-02-04 Thread Christian Borntraeger
Am 02.02.2015 um 11:02 schrieb Marcel Apfelbaum: > On 01/31/2015 11:23 AM, Jan Kiszka wrote: >> On 2015-01-05 12:37, Jan Kiszka wrote: >>> On 2015-01-05 12:22, Stefan Hajnoczi wrote: Commit 49d2e648e8087d154d8bf8b91f27c8e05e79d5a6 ("machine: remove qemu_machine_opts global list") removed

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

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 15:08, Daniel P. Berrange wrote: >> > As long as QEMUFile remains there and GIOChannel is used only when >> > encryption is required, that would be an acceptable limitation. As I >> > wrote above, migration is a bit special anyway. > I'm not sure I'd like the idea of having differe

Re: [Qemu-devel] [PATCH 1/8] qga: fixed warning in qemu-ga.exe for mingw >= 4.9.1

2015-02-04 Thread Olga Krishtal
On 04/02/15 00:29, Eric Blake wrote: On 12/31/2014 06:06 AM, Denis V. Lunev wrote: From: Olga Krishtal strtok_r was redefined before the patch Signed-off-by: Olga Krishtal Signed-off-by: Denis V. Lunev CC: Michael Roth --- include/sysemu/os-win32.h | 2 ++ 1 file changed, 2 insertions(+

Re: [Qemu-devel] [PATCH] vl.c: fix -usb option assertion failure in qemu_opt_get_bool_helper()

2015-02-04 Thread Marcel Apfelbaum
On 02/04/2015 04:18 PM, Christian Borntraeger wrote: Am 02.02.2015 um 11:02 schrieb Marcel Apfelbaum: On 01/31/2015 11:23 AM, Jan Kiszka wrote: On 2015-01-05 12:37, Jan Kiszka wrote: On 2015-01-05 12:22, Stefan Hajnoczi wrote: Commit 49d2e648e8087d154d8bf8b91f27c8e05e79d5a6 ("machine: remove

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

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 15:02, Daniel P. Berrange wrote: > > I'm not sure if it makes sense for RDMA; it already has a couple of hooks > > that go around the back of QEMUFile in migration, and it's transferring the > > data via DMA so the page data doesn't go through the same path. > > Could you ever anti

Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2015-02-04 Thread Peter Maydell
On 4 February 2015 at 13:36, Pedro Alves wrote: > > This looks like it'd mishandle a future qAttached2 packet. > > It should be doing something like: > >if (strncmp(p, "Attached", 8) == 0 && > (p[8] == '\0' || p[8] == ':')) { > > or: > >if (strcmp(p, "Attached") == 0 || s

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

2015-02-04 Thread Daniel P. Berrange
On Wed, Feb 04, 2015 at 03:23:22PM +0100, Paolo Bonzini wrote: > > > On 04/02/2015 15:08, Daniel P. Berrange wrote: > >> > As long as QEMUFile remains there and GIOChannel is used only when > >> > encryption is required, that would be an acceptable limitation. As I > >> > wrote above, migration

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

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 14:08, Dr. David Alan Gilbert wrote: > 3) I'd considered making a separate socket/fd for passing page data > in the hope of maybe making that page take data via splice; but am not > sure yet. There were even patches for this: http://lists.gnu.org/archive/html/qemu-devel

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

2015-02-04 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 04/02/2015 14:08, Dr. David Alan Gilbert wrote: > > 3) I'd considered making a separate socket/fd for passing page data > > in the hope of maybe making that page take data via splice; but am not > > sure yet. > > There were even p

Re: [Qemu-devel] [PATCH RFC v2 7/8] migration: add dirty parameter

2015-02-04 Thread Vladimir Sementsov-Ogievskiy
On 27.01.2015 19:20, Eric Blake wrote: On 01/27/2015 03:56 AM, Vladimir Sementsov-Ogievskiy wrote: Add dirty parameter to qmp-migrate command. If this parameter is true, migration/block.c will migrate dirty bitmaps. This parameter can be used without "blk" parameter to migrate only dirty bitmaps

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:48:44PM +0200, Marcel Apfelbaum wrote: > On 02/04/2015 04:28 PM, Paolo Bonzini wrote: > > > > > >On 04/02/2015 15:02, Daniel P. Berrange wrote: > >>>I'm not sure if it makes sense for RDMA; it already has a couple of hooks > >>>that go around the back of QEMUFile in migra

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

2015-02-04 Thread Marcel Apfelbaum
On 02/04/2015 04:28 PM, Paolo Bonzini wrote: On 04/02/2015 15:02, Daniel P. Berrange wrote: I'm not sure if it makes sense for RDMA; it already has a couple of hooks that go around the back of QEMUFile in migration, and it's transferring the data via DMA so the page data doesn't go through the

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

2015-02-04 Thread Paolo Bonzini
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 RDMA will still need QEMUFile, but for non-encrypted TCP > I'd hope to be able t

Re: [Qemu-devel] [PATCH v5 07/26] qcow2: Respect error in qcow2_alloc_bytes()

2015-02-04 Thread Max Reitz
On 2015-02-04 at 06:40, Kevin Wolf wrote: Am 15.12.2014 um 13:50 hat Max Reitz geschrieben: qcow2_update_cluster_refcount() may fail, and qcow2_alloc_bytes() should mind that case. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block/qcow2-refcount.c | 33

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

2015-02-04 Thread Gal Hammer
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: Add a Virtual Machine > Generation ID device > > On Mon, 02 Feb 2015 15:13

Re: [Qemu-devel] [PATCH v5 07/26] qcow2: Respect error in qcow2_alloc_bytes()

2015-02-04 Thread Kevin Wolf
Am 04.02.2015 um 16:04 hat Max Reitz geschrieben: > On 2015-02-04 at 06:40, Kevin Wolf wrote: > >Am 15.12.2014 um 13:50 hat Max Reitz geschrieben: > >>qcow2_update_cluster_refcount() may fail, and qcow2_alloc_bytes() should > >>mind that case. > >> > >>Signed-off-by: Max Reitz > >>Reviewed-by: Eri

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

2015-02-04 Thread Vladimir Sementsov-Ogievskiy
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 - for other formats we can store bitmaps in the separate qcow2 file

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

2015-02-04 Thread Alexander Graf
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_LOGICAL_CI_LOAD and >>> H_LOGICAL_CI_STORE as PAPR extensions. These are used b

  1   2   3   >