[Qemu-devel] [PATCH] ehci: update irq on reset

2016-01-19 Thread Gerd Hoffmann
After clearing the status register we also have to update the irq line status. Otherwise a irq which happends to be pending at reset time causes a interrupt storm. And the guest can't stop as the status register doesn't indicate any pending interrupt. Both NetBSD and FreeBSD hang on shutdown bec

Re: [Qemu-devel] usb-storage assertions

2016-01-19 Thread Gerd Hoffmann
Hi, > Probably not enough with driver subsystem to point even at the obvious > issue in the EHCI driver. I`d start with slowing down an emulated CPU > 10...100 times via its thread cg, leaving emulator code hanging with > enough CPU cycles and check if the issue is still here. If roots of > the

Re: [Qemu-devel] [PATCH 0/2] 9pfs: fsdev: use error_report() instead of fprintf(stderr)

2016-01-19 Thread Greg Kurz
On Mon, 18 Jan 2016 17:39:28 +0100 Markus Armbruster wrote: > Greg Kurz writes: > > > Hi, > > > > This series moves all the 9pfs/fsdev code to use error_report(), with the > > notable exception of virtfs-proxy-helper, which doesn't need it. > > > > Markus, > > > > Should this patches go through

Re: [Qemu-devel] [PATCH 1/2] 9pfs: use error_report() instead of fprintf(stderr)

2016-01-19 Thread Greg Kurz
On Mon, 18 Jan 2016 17:35:25 +0100 Markus Armbruster wrote: > Greg Kurz writes: > > > Signed-off-by: Greg Kurz > > --- I agree to all your suggestions. Thanks ! > > hw/9pfs/9p-handle.c |5 +++-- > > hw/9pfs/9p-local.c | 15 --- > > hw/9pfs/9p-proxy.c | 12 ++--

[Qemu-devel] [PATCH v4 2/4] char: convert from GIOChannel to QIOChannel

2016-01-19 Thread Daniel P. Berrange
In preparation for introducing TLS support to the TCP chardev backend, convert existing chardev code from using GIOChannel to QIOChannel. This simplifies the chardev code by removing most of the OS platform conditional code for dealing with file descriptor passing. Signed-off-by: Daniel P. Berrang

[Qemu-devel] [PATCH v4 1/4] char: remove fixed length filename allocation

2016-01-19 Thread Daniel P. Berrange
A variety of places were snprintf()ing into a fixed length filename buffer. Some of the buffers were stack allocated, while another was heap allocated with g_malloc(). Switch them all to heap allocated using g_strdup_printf() avoiding arbitrary length restrictions. This also facilitates later patc

[Qemu-devel] [PATCH v4 0/4] Convert chardevs to QIOChannel & add TLS support

2016-01-19 Thread Daniel P. Berrange
This is an update of patches previously shown in an RFC posting RFC: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg00829.html v1: https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg04222.html v2: https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg03823.html v3: ht

[Qemu-devel] [PATCH v4 4/4] char: introduce support for TLS encrypted TCP chardev backend

2016-01-19 Thread Daniel P. Berrange
This integrates support for QIOChannelTLS object in the TCP chardev backend. If the 'tls-creds=NAME' option is passed with the '-chardev tcp' argument, then it will setup the chardev such that the client is required to establish a TLS handshake when connecting. There is no support for checking the

[Qemu-devel] [PATCH v4 3/4] char: don't assume telnet initialization will not block

2016-01-19 Thread Daniel P. Berrange
The current code for doing telnet initialization is writing to a socket without checking the return status. While it is highly unlikely to be a problem when writing to a bare socket, as the buffers are large enough to prevent blocking, this cannot be assumed safe with TLS sockets. So write the teln

Re: [Qemu-devel] [RFC 0/3] Draft implementation of HPT resizing (qemu side)

2016-01-19 Thread David Gibson
On Tue, Jan 19, 2016 at 01:18:17PM +0530, Bharata B Rao wrote: > On Mon, Jan 18, 2016 at 04:44:38PM +1100, David Gibson wrote: > > Here is a draft qemu implementation of my proposed PAPR extension for > > allowing runtime resizing of a KVM/ppc64 guest's hash page table. > > That in turn will allow

[Qemu-devel] [PATCH v3 09/10] qemu-nbd: use no_argument/required_argument constants

2016-01-19 Thread Daniel P. Berrange
When declaring the 'struct option' array, use the standard constants no_argument/required_argument, instead of magic values 0 and 1. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- qemu-nbd.c | 47 --- 1 file changed, 24 insertions(+), 2

Re: [Qemu-devel] usb-storage assertions

2016-01-19 Thread Andrey Korolyov
On Tue, Jan 19, 2016 at 10:13 AM, Gerd Hoffmann wrote: > On Di, 2016-01-19 at 02:49 +0300, Andrey Korolyov wrote: >> On Mon, Jan 18, 2016 at 4:55 PM, Gerd Hoffmann wrote: >> > Hi, >> > >> >> > ok. Had no trouble with freebsd, will go fetch netbsd images. What >> >> > arch is this? i386? x86

Re: [Qemu-devel] [PATCHv4 8/8] pseries: Clean up error reporting in htab migration functions

2016-01-19 Thread David Gibson
On Tue, Jan 19, 2016 at 08:44:51AM +0100, Markus Armbruster wrote: > David Gibson writes: > > > The functions for migrating the hash page table on pseries machine type > > (htab_save_setup() and htab_load()) can report some errors with an > > explicit fprintf() before returning an appropriate err

[Qemu-devel] [PATCH v3 08/10] qemu-nbd: don't overlap long option values with short options

2016-01-19 Thread Daniel P. Berrange
When defining values for long options, the normal practice is to start numbering from 256, to avoid overlap with the range of valid values for short options. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- qemu-nbd.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(

[Qemu-devel] [PATCH v3 05/10] qemu-io: allow specifying image as a set of options args

2016-01-19 Thread Daniel P. Berrange
Currently qemu-io allows an image filename to be passed on the command line, but unless using the JSON format, it does not have a way to set any options except the format eg qemu-io https://127.0.0.1/images/centos7.iso qemu-io /home/berrange/demo.qcow2 This adds a --image-opts arg that indicate

[Qemu-devel] [PATCH v3 10/10] qemu-io: use no_argument/required_argument constants

2016-01-19 Thread Daniel P. Berrange
When declaring the 'struct option' array, use the standard constants no_argument/required_argument, instead of magic values 0 and 1. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- qemu-io.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) di

[Qemu-devel] [PATCH v3 07/10] qemu-img: allow specifying image as a set of options args

2016-01-19 Thread Daniel P. Berrange
Currently qemu-img allows an image filename to be passed on the command line, but unless using the JSON format, it does not have a way to set any options except the format eg qemu-img info https://127.0.0.1/images/centos7.iso This adds a --image-opts arg that indicates that the positional file

[Qemu-devel] [PATCH v3 03/10] qemu-nbd: add support for --object command line arg

2016-01-19 Thread Daniel P. Berrange
Allow creation of user creatable object types with qemu-nbd via a new --object command line arg. This will be used to supply passwords and/or encryption keys to the various block driver backends via the recently added 'secret' object type. # printf letmein > mypasswd.txt # qemu-nbd --object secr

[Qemu-devel] [PATCH v3 06/10] qemu-nbd: allow specifying image as a set of options args

2016-01-19 Thread Daniel P. Berrange
Currently qemu-nbd allows an image filename to be passed on the command line, but unless using the JSON format, it does not have a way to set any options except the format eg qemu-nbd https://127.0.0.1/images/centos7.iso qemu-nbd /home/berrange/demo.qcow2 This adds a --image-opts arg that i

[Qemu-devel] [PATCH v3 04/10] qemu-io: add support for --object command line arg

2016-01-19 Thread Daniel P. Berrange
Allow creation of user creatable object types with qemu-io via a new --object command line arg. This will be used to supply passwords and/or encryption keys to the various block driver backends via the recently added 'secret' object type. # printf letmein > mypasswd.txt # qemu-io --object secret

Re: [Qemu-devel] [RFC PATCH v2 02/10] pci: Introduce function for PCI PM capability creation

2016-01-19 Thread Marcel Apfelbaum
On 01/18/2016 07:35 PM, Leonid Bloch wrote: From: Dmitry Fleytman Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch --- hw/pci/pci.c | 21 + include/hw/pci/pci.h | 2 ++ include/hw/pci/pci_regs.h | 1 + 3 files changed, 24 insertions(+) d

[Qemu-devel] [PATCH v3 02/10] qemu-img: add support for --object command line arg

2016-01-19 Thread Daniel P. Berrange
Allow creation of user creatable object types with qemu-img via a new --object command line arg. This will be used to supply passwords and/or encryption keys to the various block driver backends via the recently added 'secret' object type. # printf letmein > mypasswd.txt # qemu-img info --object

[Qemu-devel] [PATCH v3 01/10] qom: add helpers for UserCreatable object types

2016-01-19 Thread Daniel P. Berrange
The QMP monitor code has two helper methods object_add and qmp_object_del that are called from several places in the code (QMP, HMP and main emulator startup). The HMP and main emulator startup code also share further logic that extracts the qom-type & id values from a qdict. We soon need to use

[Qemu-devel] [PATCH v3 00/10] Make qemu-img/qemu-nbd/qemu-io CLI more flexible

2016-01-19 Thread Daniel P. Berrange
This series of patches expands the syntax of the qemu-img, qemu-nbd and qemu-io commands to make them more flexible. v0: http://lists.gnu.org/archive/html/qemu-devel/2015-10/msg04365.html v1: https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg04014.html v2: https://lists.gnu.org/archiv

Re: [Qemu-devel] [PATCH 2/2] migration/virtio: Remove simple .get/.put use

2016-01-19 Thread Dr. David Alan Gilbert
* Sascha Silbe (si...@linux.vnet.ibm.com) wrote: > Dear David, > > "Dr. David Alan Gilbert" writes: > > > +/* a variable length array (i.e. _type *_field) but we know the > > + * length > > + */ > > +#define VMSTATE_STRUCT_VARRAY_POINTER_KNOWN(_field, _state, _num, > > _version, _vmsd, _type) {

Re: [Qemu-devel] [PATCH] hw/misc: slavepci_passthru driver

2016-01-19 Thread Francesco Zuliani
Hi Alex, On 01/18/2016 05:41 PM, Alex Williamson wrote: On Mon, 2016-01-18 at 10:16 -0500, Marc-André Lureau wrote: Hi - Original Message - Hi there, I'd like to submit this new pci driver ( hw/misc )for inclusion, if you think it could be useful to other as well as ourself. The d

Re: [Qemu-devel] [PATCH v16 10/14] pci: introduce pci bus pre reset

2016-01-19 Thread Chen Fan
On 01/15/2016 04:36 AM, Alex Williamson wrote: On Tue, 2016-01-12 at 10:43 +0800, Cao jin wrote: From: Chen Fan avoid repeat bus reset, here introduce a sequence ID for each time bus hot reset, so each vfio device could know whether they've already been reset for that sequence ID. Signed-off

Re: [Qemu-devel] [PATCH v16 08/14] vfio: add check host bus reset is support or not

2016-01-19 Thread Chen Fan
On 01/18/2016 06:32 PM, Marcel Apfelbaum wrote: On 01/12/2016 04:43 AM, Cao jin wrote: From: Chen Fan Hi, I think the subject should be rephrased. when init vfio devices done, we should test all the devices supported aer whether conflict with others. For each one, get the hot reset info

Re: [Qemu-devel] [PATCH 5/7] target-ppc: gdbstub: fix altivec registers for little-endian guests

2016-01-19 Thread Greg Kurz
On Mon, 18 Jan 2016 13:25:19 +1100 David Gibson wrote: > On Fri, Jan 15, 2016 at 04:00:38PM +0100, Greg Kurz wrote: > > Altivec registers are 128-bit wide. They are stored in memory as two > > 64-bit values that must be byteswapped when the guest is little-endian. > > Let's reuse the ppc_maybe_bs

[Qemu-devel] cgroup blkio weight has no effect on qemu

2016-01-19 Thread 陈博
Hi folks, Could you enlighten me about how to achieve proportional IO sharing by using cgroup, instead of qemu? My qemu config is like: -drive file=$DISKFILe,if=none,format=qcow2,cache=none,aio=native Test command inside vm is like: dd if=/dev/vdc of=/dev/null iflag=direct Cgroup blkio weigh

[Qemu-devel] cgroup blkio weight has no effect for qemu

2016-01-19 Thread 陈博
Hi folks, Could you please enlighten me about how to achieve proportional IO sharing by using cgroup, instead of qemu? My qemu config is like: -drive file=$DISKFILe,if=none,format=qcow2,cache=none,aio=native Test command inside vm is like: dd if=/dev/vdc of=/dev/null iflag=direct Cgroup blki

Re: [Qemu-devel] [PATCHv2 1/3] spapr: Small fixes to rtas_ibm_get_system_parameter, remove rtas_st_buffer

2016-01-19 Thread Alexey Kardashevskiy
On 01/19/2016 03:30 PM, David Gibson wrote: rtas_st_buffer() appears in spapr.h as though it were a widely used helper, but in fact it is only used for saving data in a format used by rtas_ibm_get_system_parameter(). This changes it to a local helper more specifically for that function. While w

Re: [Qemu-devel] [PATCH v16 07/14] vfio: add aer support for vfio device

2016-01-19 Thread Chen Fan
On 01/18/2016 05:12 PM, Marcel Apfelbaum wrote: On 01/12/2016 04:43 AM, Cao jin wrote: From: Chen Fan Calling pcie_aer_init to initilize aer related registers for vfio device, then reload physical related registers to expose device capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 8

Re: [Qemu-devel] [PATCH v4 0/2] block: Reject negative values for throttling options

2016-01-19 Thread Markus Armbruster
Fam Zheng writes: > v4: Add Max's rev-by in both patches, while fixing the "maxs" typo. > > v3: Address comments: > - Add test for large value; [Berto] > - Fix typos "negative" & "caught"; [Eric, Berto] > - Use "LL" suffix to the upper limit constant. [Berto] > > v2: Check the value r

Re: [Qemu-devel] [PATCH v16 05/14] vfio: add pcie extanded capability support

2016-01-19 Thread Chen Fan
On 01/17/2016 09:22 PM, Marcel Apfelbaum wrote: On 01/12/2016 04:43 AM, Cao jin wrote: From: Chen Fan Hi, I noticed a type in the subject, extanded -> extended For vfio pcie device, we could expose the extended capability on PCIE bus. in order to avoid config space broken, we introduce a

Re: [Qemu-devel] [PATCH v1 05/15] crypto: add block encryption framework

2016-01-19 Thread Daniel P. Berrange
On Mon, Jan 18, 2016 at 12:48:56PM -0700, Eric Blake wrote: > On 01/14/2016 05:16 AM, Daniel P. Berrange wrote: > > >>> +# @qcowaes: QCow/QCow2 built-in AES-CBC encryption. Do not use > >>> +# > >> > >> Well, the only reason to use it would be to read data off an old > >> insecurely-encrypted qcow

Re: [Qemu-devel] [PATCH v3 ] doc: Introduce coding style for errors

2016-01-19 Thread Thomas Huth
On 18.01.2016 21:26, Eric Blake wrote: > On 01/15/2016 06:54 AM, Lluís Vilanova wrote: >> Gives some general guidelines for reporting errors in QEMU. >> >> Signed-off-by: Lluís Vilanova >> --- >> HACKING | 36 >> 1 file changed, 36 insertions(+) ... >> +Func

Re: [Qemu-devel] [PATCH v16 13/14] vfio-pci: pass the aer error to guest

2016-01-19 Thread Chen Fan
On 01/18/2016 06:45 PM, Marcel Apfelbaum wrote: On 01/12/2016 04:43 AM, Cao jin wrote: From: Chen Fan when the vfio device encounters an uncorrectable error in host, the vfio_pci driver will signal the eventfd registered by this vfio device, the results in the qemu eventfd handler getting M

Re: [Qemu-devel] [PATCH v16 00/14] vfio-pci: pass the aer error to guest

2016-01-19 Thread Chen Fan
On 01/17/2016 02:34 AM, Michael S. Tsirkin wrote: On Tue, Jan 12, 2016 at 10:43:01AM +0800, Cao jin wrote: From: Chen Fan For now, for vfio pci passthough devices when qemu receives an error from host aer report, currentlly just terminate the guest, but usually user want to know what error oc

Re: [Qemu-devel] [PATCH v7] spec: add qcow2 bitmaps extension specification

2016-01-19 Thread Vladimir Sementsov-Ogievskiy
On 19.01.2016 00:16, Eric Blake wrote: preserving semantics of those extra_data bytes). We have enough room for future extension, and that's good e Ok, so, what should go to the spec? Current wording is ok? Just delete "Type-specific": + +20 - 23:extra_data_size +

Re: [Qemu-devel] [PATCH v8 00/35] qapi visitor cleanups (post-introspection cleanups subset E)

2016-01-19 Thread Markus Armbruster
Eric Blake writes: > Based on qemu.git master. Pending prerequisites: > + Not a strong dependency, but for qapi-tests to consistently pass, > I needed a race fixed: > https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg01827.html > > Also available as a tag at this location: > git fetch git:

Re: [Qemu-devel] [PATCH 1/1] nvdimm: disable balloon

2016-01-19 Thread Xiao Guangrong
On 01/18/2016 07:42 PM, Denis V. Lunev wrote: From: Vladimir Sementsov-Ogievskiy NVDIMM for now is planned to use as a backing store for DAX filesystem in the guest and thus this memory is excluded from guest memory management and LRUs. In this case libvirt running QEMU along with configured

Re: [Qemu-devel] [RE-RESEND PATCH] pci: Adjust PCI config limit based on bus topology

2016-01-19 Thread Marcel Apfelbaum
On 01/19/2016 01:06 AM, Alex Williamson wrote: A conventional PCI bus does not support config space accesses above the standard 256 byte configuration space. PCIe-to-PCI bridges are not permitted to forward transactions if the extended register address field is non-zero and must handle it as an

Re: [Qemu-devel] [PATCH v1 1/1] arm_gic: Update ID registers based on revision

2016-01-19 Thread Peter Maydell
On 19 January 2016 at 01:33, Alistair Francis wrote: > Update the GIC ID registers (registers above 0xfe0) based on the GIC > revision instead of using the sames values for all GIC implementations. > > Signed-off-by: Alistair Francis > Tested-by: Sören Brinkmann > --- > > hw/intc/arm_gic.c | 29

Re: [Qemu-devel] [PATCH 0/3] clean-includes script to add osdep.h to everything

2016-01-19 Thread Peter Maydell
On 19 January 2016 at 07:27, Markus Armbruster wrote: > Peter Maydell writes: > >> On 11 January 2016 at 15:19, Daniel P. Berrange wrote: >>> I think even guest-agent code & tests could include it in order to >>> get clean includes, even if they don't use any of the QEMU functions >>> defined in

Re: [Qemu-devel] [PATCH COLO-Frame v13 36/39] filter-buffer: Introduce a helper function to enable/disable default filter

2016-01-19 Thread Hailiang Zhang
On 2016/1/19 11:35, Jason Wang wrote: On 12/29/2015 03:09 PM, zhanghailiang wrote: The default buffer filter doesn't buffer packets in default, but we need to buffer packets for COLO or Micro-checkpoint, Here we add a helper function to enable/disable filter's buffer capability. Signed-off-by

Re: [Qemu-devel] [PATCH COLO-Frame v13 35/39] filter-buffer: Accept zero interval

2016-01-19 Thread Hailiang Zhang
On 2016/1/19 11:21, Jason Wang wrote: On 12/29/2015 03:09 PM, zhanghailiang wrote: For default buffer filter, its 'interval' value is zero, so here we should accept zero interval. Signed-off-by: zhanghailiang Reviewed-by: Yang Hongyang Cc: Jason Wang --- v12: - Add Reviewed-by tag v11: - A

Re: [Qemu-devel] [PATCH COLO-Frame v13 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2016-01-19 Thread Hailiang Zhang
Hi Jason, Thanks for your review. On 2016/1/19 11:19, Jason Wang wrote: On 12/29/2015 03:09 PM, zhanghailiang wrote: We add each netdev (except vhost-net) a default filter-buffer, which will be used for COLO or Micro-checkpoint to buffer VM's packets. The name of default filter-buffer is 'no

Re: [Qemu-devel] Status of my hacks on the MTTCG WIP branch

2016-01-19 Thread alvise rigo
On Mon, Jan 18, 2016 at 8:09 PM, Alex Bennée wrote: > > > Alex Bennée writes: > > > alvise rigo writes: > > > >> On Fri, Jan 15, 2016 at 4:25 PM, Alex Bennée > >> wrote: > >>> > >>> alvise rigo writes: > >>> > On Fri, Jan 15, 2016 at 3:51 PM, Alex Bennée > wrote: > > > > a

Re: [Qemu-devel] [RFC PATCH v2 00/10] Introduce Intel 82574 GbE Controller Emulation (e1000e)

2016-01-19 Thread Dmitry Fleytman
> On 19 Jan 2016, at 05:48 AM, Jason Wang wrote: > > > > On 01/19/2016 01:35 AM, Leonid Bloch wrote: >> Hello All, >> >> This series is the latest code of the e1000e device emulation being >> developed. >> >> Changes since v1: >> >> 1. Added support for all the device features: >> - Inter

Re: [Qemu-devel] [PATCH] hw/pci: ensure that only PCI/PCIe bridges can be attached to pxb/pxb-pcie devices

2016-01-19 Thread Marcel Apfelbaum
On 01/18/2016 08:16 PM, Laszlo Ersek wrote: On 01/18/16 19:08, Peter Maydell wrote: On 18 January 2016 at 15:27, Marcel Apfelbaum wrote: PCI devices can't be plugged directly into PCI extra root bridges because their resources can't be computed by firmware before the ACPI tables are loaded. S

[Qemu-devel] [PATCH 1/1] vl: change QEMU state machine for system reset

2016-01-19 Thread Denis V. Lunev
This patch implements proposal from Paolo to handle system reset when the guest is not running. "After a reset, main_loop_should_exit should actually transition to VM_STATE_PRELAUNCH (*not* RUN_STATE_PAUSED) for *all* states except RUN_STATE_INMIGRATE, RUN_STATE_SAVE_VM (which I think cannot happe

<    1   2   3   4