Re: [Qemu-devel] Minutes from the "Stuttgart block Gipfele"

2015-12-23 Thread Fam Zheng
On Fri, 12/18 14:15, Markus Armbruster wrote: > First, let's examine how such a chain could look like. If we read the > current code correctly, it behaves as if we had a chain > > BB > | > throttle > | > detect-zero > | > copy-on-read >

[Qemu-devel] [PATCH] Xen PCI passthrough: convert to realize()

2015-12-23 Thread Cao jin
Signed-off-by: Cao jin --- Since the callchain is pretty deep & error path is very much too, so I made the patch based on the principal: catch/report the most necessary error msg with smallest modification.(So you can see I don`t change some functions to void, despite

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-23 Thread Daniel P. Berrange
On Tue, Dec 22, 2015 at 11:45:45AM -0700, Eric Blake wrote: > On 12/22/2015 11:17 AM, Daniel P. Berrange wrote: > > Typically a UNIX guest OS will log boot messages to a serial > > port in addition to any graphical console. An admin user > > may also wish to use the serial port for an interactive

[Qemu-devel] [PATCH] spapr vio: fix to incomplete QOMify

2015-12-23 Thread Cao jin
Signed-off-by: Cao jin --- hw/ppc/spapr_vio.c | 12 +--- include/hw/ppc/spapr_vio.h | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c index c51eb8e..46f3b8d 100644 --- a/hw/ppc/spapr_vio.c +++

[Qemu-devel] [PATCH v1 1/6] kvm/x86: Drop stimer_stop() function

2015-12-23 Thread Andrey Smetanin
The function stimer_stop() is called in one place so remove the function and replace it's call by function content. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini

[Qemu-devel] [PATCH v1 2/6] kvm/x86: Hyper-V unify stimer_start() and stimer_restart()

2015-12-23 Thread Andrey Smetanin
This will be used in future to start Hyper-V SynIC timer in several places by one logic in one function. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Roman

[Qemu-devel] [PATCH v1 3/6] kvm/x86: Reorg stimer_expiration() to better control timer restart

2015-12-23 Thread Andrey Smetanin
Split stimer_expiration() into two parts - timer expiration message sending and timer restart/cleanup based on timer state(config). This also fixes a bug where a one-shot timer message whose delivery failed once would get lost for good. Signed-off-by: Andrey Smetanin

[Qemu-devel] [PATCH v1 6/6] kvm/x86: Update SynIC timers on guest entry only

2015-12-23 Thread Andrey Smetanin
Consolidate updating the Hyper-V SynIC timers in a single place: on guest entry in processing KVM_REQ_HV_STIMER request. This simplifies the overall logic, and makes sure the most current state of msrs and guest clock is used for arming the timers (to achieve that, KVM_REQ_HV_STIMER has to be

[Qemu-devel] [PATCH v1 0/6] KVM: Hyper-V SynIC timers migration fixes

2015-12-23 Thread Andrey Smetanin
During testing of Windows 2012R2 guest migration with Hyper-V SynIC timers enabled we found several bugs which lead to restoring guest in a hung state. This patch series provides several fixes to make the migration of guest with Hyper-V SynIC timers enabled succeed. The series applies on top of

[Qemu-devel] [PATCH v1 4/6] kvm/x86: Hyper-V fix SynIC timer disabling condition

2015-12-23 Thread Andrey Smetanin
Hypervisor Function Specification(HFS) doesn't require to disable SynIC timer at timer config write if timer->count = 0. So drop this check, this allow to load timers MSR's during migration restore, because config are set before count in QEMU side. Also fix condition according to HFS

[Qemu-devel] [PATCH v1 5/6] kvm/x86: Skip SynIC vector check for QEMU side

2015-12-23 Thread Andrey Smetanin
QEMU zero-inits Hyper-V SynIC vectors. We should allow that, and don't reject zero values if set by the host. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC:

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-23 Thread Daniel P. Berrange
On Tue, Dec 22, 2015 at 12:07:03PM -0700, Eric Blake wrote: > On 12/22/2015 11:17 AM, Daniel P. Berrange wrote: > > Typically a UNIX guest OS will log boot messages to a serial > > port in addition to any graphical console. An admin user > > may also wish to use the serial port for an interactive

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-23 Thread Paolo Bonzini
On 22/12/2015 19:17, Daniel P. Berrange wrote: > +if (common->has_logfile) { > +int flags = O_WRONLY | O_CREAT; > +if (!common->has_logappend || > +!common->logappend) { > +flags |= O_TRUNC; > +} Should it use O_APPEND if logappend is absent

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-23 Thread Daniel P. Berrange
On Wed, Dec 23, 2015 at 12:34:25PM +0100, Paolo Bonzini wrote: > > > On 22/12/2015 19:17, Daniel P. Berrange wrote: > > +if (common->has_logfile) { > > +int flags = O_WRONLY | O_CREAT; > > +if (!common->has_logappend || > > +!common->logappend) { > > +

Re: [Qemu-devel] [PATCH v14 Resend 10/13] pci: add pci device pre-post reset callbacks for host bus reset

2015-12-23 Thread Michael S. Tsirkin
On Thu, Dec 17, 2015 at 09:41:51AM +0800, Cao jin wrote: > From: Chen Fan > > Particularly, For vfio devices, Once need to recovery devices > by bus reset such as AER, we always need to reset the host bus > to recovery the devices under the bus, so we need to add

Re: [Qemu-devel] [PATCH] Xen PCI passthrough: convert to realize()

2015-12-23 Thread Stefano Stabellini
On Wed, 23 Dec 2015, Cao jin wrote: > Signed-off-by: Cao jin > --- > > Since the callchain is pretty deep & error path is very much too, so I made > the > patch based on the principal: catch/report the most necessary error msg with > smallest modification.(So you can

Re: [Qemu-devel] [Qemu-block] [PATCH 00/10] qcow2: Implement image locking

2015-12-23 Thread Roman Kagan
On Wed, Dec 23, 2015 at 10:47:22AM +, Daniel P. Berrange wrote: > On Wed, Dec 23, 2015 at 11:14:12AM +0800, Fam Zheng wrote: > > As an alternative, can we introduce .bdrv_flock() in protocol drivers, with > > similar semantics to flock(2) or lockf(3)? That way all formats can benefit, > > and

Re: [Qemu-devel] [PATCH v3 0/5] linux-user: manage SOCK_PACKET socket type

2015-12-23 Thread Laurent Vivier
Le 21/12/2015 16:14, Riku Voipio a écrit : > On Fri, Dec 18, 2015 at 04:13:20PM +0100, Laurent Vivier wrote: >> Le 29/10/2015 00:12, Peter Maydell a écrit : >>> On 28 October 2015 at 20:40, Laurent Vivier wrote: This is obsolete, but if we want to use dhcp with some

Re: [Qemu-devel] [Qemu-block] [PATCH 00/10] qcow2: Implement image locking

2015-12-23 Thread Denis V. Lunev
On 12/23/2015 05:57 PM, Vasiliy Tolstov wrote: 2015-12-22 19:46 GMT+03:00 Kevin Wolf : Enough innocent images have died because users called 'qemu-img snapshot' while the VM was still running. Educating the users doesn't seem to be a working strategy, so this series adds

Re: [Qemu-devel] [PATCH v2 13/14] qapi: Support pretty printing in JSON output visitor

2015-12-23 Thread Eric Blake
On 12/23/2015 02:24 AM, Fam Zheng wrote: > On Mon, 12/21 17:31, Eric Blake wrote: >> Similar to pretty printing in the QObject visitor. The rickiest > > "trickiest"? Yep. Fixed in my local tree. > >> parts are the fact that during type_any(), we have to coordinate >> with QObject to also

Re: [Qemu-devel] [PATCH v2 0/3] virtio: cross-endian helpers fixes

2015-12-23 Thread Greg Kurz
On Wed, 23 Dec 2015 15:47:00 +0200 "Michael S. Tsirkin" wrote: > On Thu, Dec 17, 2015 at 09:52:46AM +0100, Greg Kurz wrote: > > This series tries to rework cross-endian helpers for better clarity. > > It does not change behaviour, except perhaps patch 3/3 even if I could not > >

Re: [Qemu-devel] [PATCH] Xen PCI passthrough: convert to realize()

2015-12-23 Thread Cao jin
Hi Stefano, first of all, thanks for your quick response:) On 12/23/2015 08:03 PM, Stefano Stabellini wrote: On Wed, 23 Dec 2015, Cao jin wrote: Signed-off-by: Cao jin --- Since the callchain is pretty deep & error path is very much too, so I made the patch

Re: [Qemu-devel] [PATCH 3/4] backends/hostmem-file: fix fb->mem_path leak

2015-12-23 Thread Igor Mammedov
On Wed, 23 Dec 2015 15:43:20 +0800 Li Zhijian wrote: > Signed-off-by: Li Zhijian > --- > backends/hostmem-file.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c > index

Re: [Qemu-devel] [PATCH] Xen PCI passthrough: convert to realize()

2015-12-23 Thread Stefano Stabellini
On Wed, 23 Dec 2015, Cao jin wrote: > Hi Stefano, > first of all, thanks for your quick response:) Thank you for the patch > On 12/23/2015 08:03 PM, Stefano Stabellini wrote: > > On Wed, 23 Dec 2015, Cao jin wrote: > > > Signed-off-by: Cao jin > > > --- > > > > >

Re: [Qemu-devel] [PATCH v2 0/3] virtio: cross-endian helpers fixes

2015-12-23 Thread Michael S. Tsirkin
On Thu, Dec 17, 2015 at 09:52:46AM +0100, Greg Kurz wrote: > This series tries to rework cross-endian helpers for better clarity. > It does not change behaviour, except perhaps patch 3/3 even if I could not > measure any performance gain. Breaks build: CCmips64-softmmu/hw/mips/mips_malta.o

Re: [Qemu-devel] [PULL v1 0/3] Misc I/O channel fixes

2015-12-23 Thread Peter Maydell
On 23 December 2015 at 10:57, Daniel P. Berrange wrote: > The following changes since commit 5dc42c186d63b7b338594fc071cf290805dcc5a5: > > Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' > into staging (2015-12-22 14:21:42 +) > > are available

Re: [Qemu-devel] [Qemu-block] [PATCH 00/10] qcow2: Implement image locking

2015-12-23 Thread Vasiliy Tolstov
2015-12-23 18:08 GMT+03:00 Denis V. Lunev : > you should do this by asking running QEMU not by > qemu-img, which is badly wrong. > > Den Ok, if this is possible via qmp/hmp qemu, no problem. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru

[Qemu-devel] [PATCH v3] qemu-char: add logfile facility to all chardev backends

2015-12-23 Thread Daniel P. Berrange
Typically a UNIX guest OS will log boot messages to a serial port in addition to any graphical console. An admin user may also wish to use the serial port for an interactive console. A virtualization management system may wish to collect system boot messages by logging the serial port, but also

Re: [Qemu-devel] [PULL] 9p fix

2015-12-23 Thread Peter Maydell
On 23 December 2015 at 11:04, Greg Kurz wrote: > The following changes since commit 5dc42c186d63b7b338594fc071cf290805dcc5a5: > > Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' > into staging (2015-12-22 14:21:42 +) > > are available in

[Qemu-devel] [PATCH] qemu-char: delete send_all/recv_all helper methods

2015-12-23 Thread Daniel P. Berrange
The qemu-char.c contains two helper methods send_all and recv_all. These are in fact declared in sockets.h so ought to have been in util/qemu-sockets.c. For added fun the impl of recv_all is completely missing on Win32. Fortunately there is only a single caller of these methods, the TPM

Re: [Qemu-devel] [PATCH] change type of pci_bridge_initfn() to void

2015-12-23 Thread Michael S. Tsirkin
On Wed, Dec 23, 2015 at 04:53:21PM +0800, Cao jin wrote: > Hi mst > friendly ping again... This does not work since then this function can not be used as an init callback, and this is how dec uses it. > On 12/17/2015 09:53 AM, Cao jin wrote: > >Ping > > > >On 11/30/2015 05:19 PM, Michael S.

[Qemu-devel] [PATCH v1 2/2] kvm/x86: Hyper-V SynIC timers tracepoints

2015-12-23 Thread Andrey Smetanin
Trace the following Hyper SynIC timers events: * periodic timer start * one-shot timer start * timer callback * timer expiration and message delivery result * timer config setup * timer count setup * timer cleanup Signed-off-by: Andrey Smetanin CC: Gleb Natapov

Re: [Qemu-devel] [PATCH 00/10] qcow2: Implement image locking

2015-12-23 Thread Vasiliy Tolstov
2015-12-22 19:46 GMT+03:00 Kevin Wolf : > Enough innocent images have died because users called 'qemu-img snapshot' > while > the VM was still running. Educating the users doesn't seem to be a working > strategy, so this series adds locking to qcow2 that refuses to access the >

Re: [Qemu-devel] [PATCH v3 2/2] tests: update expected SSDT for floppy changes

2015-12-23 Thread Roman Kagan
On Wed, Dec 23, 2015 at 03:45:29PM +0200, Michael S. Tsirkin wrote: > This is the actual vs expected diff with both patches applied. Interesting... The diff suggests that qemu running in your test environment has no floppy drives, while in mine ... > +Scope (\_SB.PCI0.ISA.FDC0) > +{ > +

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-23 Thread Eric Blake
On 12/23/2015 04:32 AM, Daniel P. Berrange wrote: > On Tue, Dec 22, 2015 at 12:07:03PM -0700, Eric Blake wrote: >> On 12/22/2015 11:17 AM, Daniel P. Berrange wrote: >>> Typically a UNIX guest OS will log boot messages to a serial >>> port in addition to any graphical console. An admin user >>> may

Re: [Qemu-devel] [PATCH v3 2/2] tests: update expected SSDT for floppy changes

2015-12-23 Thread Roman Kagan
On Tue, Dec 22, 2015 at 06:41:47PM +0200, Michael S. Tsirkin wrote: > On Fri, Dec 18, 2015 at 10:32:30PM +0300, Roman Kagan wrote: > > Update the expected SSDTs to reflect the changes introduced in the > > previous patch. > > > > Signed-off-by: Roman Kagan > >

Re: [Qemu-devel] [PATCH v3 2/2] tests: update expected SSDT for floppy changes

2015-12-23 Thread Michael S. Tsirkin
On Wed, Dec 23, 2015 at 04:08:19PM +0300, Roman Kagan wrote: > On Tue, Dec 22, 2015 at 06:41:47PM +0200, Michael S. Tsirkin wrote: > > On Fri, Dec 18, 2015 at 10:32:30PM +0300, Roman Kagan wrote: > > > Update the expected SSDTs to reflect the changes introduced in the > > > previous patch. > > >

[Qemu-devel] [PATCH v1 0/2] KVM: Hyper-V SynIC tracepoints

2015-12-23 Thread Andrey Smetanin
The patches adds tracepoints inside Hyper-V SynIC and SynIC timers code. The series applies on top of 'kvm/x86: Update SynIC timers on guest entry only' previously sent. Signed-off-by: Andrey Smetanin CC: Gleb Natapov CC: Paolo Bonzini

[Qemu-devel] [PATCH v1 1/2] kvm/x86: Hyper-V SynIC tracepoints

2015-12-23 Thread Andrey Smetanin
Trace the following Hyper SynIC events: * set msr * set sint irq * ack sint * sint irq eoi Signed-off-by: Andrey Smetanin CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev

Re: [Qemu-devel] [Qemu-block] [PATCH 00/10] qcow2: Implement image locking

2015-12-23 Thread Denis V. Lunev
On 12/23/2015 05:57 PM, Vasiliy Tolstov wrote: 2015-12-22 19:46 GMT+03:00 Kevin Wolf : Enough innocent images have died because users called 'qemu-img snapshot' while the VM was still running. Educating the users doesn't seem to be a working strategy, so this series adds

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-23 Thread Eric Blake
On 12/23/2015 04:24 AM, Daniel P. Berrange wrote: > On Tue, Dec 22, 2015 at 11:45:45AM -0700, Eric Blake wrote: >> On 12/22/2015 11:17 AM, Daniel P. Berrange wrote: >>> Typically a UNIX guest OS will log boot messages to a serial >>> port in addition to any graphical console. An admin user >>> may

Re: [Qemu-devel] Request for Help (Generate Trace for Individual Instructions)

2015-12-23 Thread Lluís Vilanova
Junaid Aslam writes: > Dear Sir > I am a student in Netherlands TU/e and intend to explore QEMU for a project. I > need help in understanding how i can trace an individual instruction which is > translated by TCG. For this moment in am more interested in Guest load store > and > Function call

Re: [Qemu-devel] [PATCH 7/7] qemu-img: allow specifying image as a set of options args

2015-12-23 Thread Daniel P. Berrange
On Tue, Dec 22, 2015 at 11:10:27AM -0700, Eric Blake wrote: > On 12/22/2015 11:07 AM, Daniel P. Berrange wrote: > > > A third option would be to keep using positional arguments, but > > add a '--source-opts' *boolean* flag to indicate how to interpret > > the positional arguments. ie without

[Qemu-devel] [PATCH v8 29.5/35] fixup! qapi: Canonicalize missing object to :empty

2015-12-23 Thread Eric Blake
[original message is fine; here's a couple more related changes that can be squashed in] Signed-off-by: Eric Blake --- scripts/qapi-commands.py | 10 +- scripts/qapi.py | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 7/7] qemu-img: allow specifying image as a set of options args

2015-12-23 Thread Paolo Bonzini
On 23/12/2015 17:55, Daniel P. Berrange wrote: >>> > > A third option would be to keep using positional arguments, but >>> > > add a '--source-opts' *boolean* flag to indicate how to interpret >>> > > the positional arguments. ie without --source-opts we use the >>> > > historic syntax, but

Re: [Qemu-devel] [PATCH v2 2/3] hw/sd: model a power-up delay, as a workaround for an EDK2 bug

2015-12-23 Thread Andrew Baumann
> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > Sent: Monday, 21 December 2015 14:57 > On Mon, Dec 21, 2015 at 2:25 PM, Andrew Baumann > wrote: > >> From: qemu-devel- > bounces+andrew.baumann=microsoft@nongnu.org > >> [mailto:qemu-devel- > >>

Re: [Qemu-devel] [PULL v1 0/6] Misc crypto changes & fixes

2015-12-23 Thread Peter Maydell
On 23 December 2015 at 11:13, Daniel P. Berrange wrote: > The following changes since commit 5dc42c186d63b7b338594fc071cf290805dcc5a5: > > Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' > into staging (2015-12-22 14:21:42 +) > > are available

Re: [Qemu-devel] [PATCH 7/7] qemu-img: allow specifying image as a set of options args

2015-12-23 Thread Daniel P. Berrange
On Wed, Dec 23, 2015 at 07:03:34PM +0100, Paolo Bonzini wrote: > > > On 23/12/2015 17:55, Daniel P. Berrange wrote: > >>> > > A third option would be to keep using positional arguments, but > >>> > > add a '--source-opts' *boolean* flag to indicate how to interpret > >>> > > the positional

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

2015-12-23 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 v2 05/10] qemu-io: allow specifying image as a set of options args

2015-12-23 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

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

2015-12-23 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

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

2015-12-23 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

Re: [Qemu-devel] [PATCH v3 2/2] tests: update expected SSDT for floppy changes

2015-12-23 Thread Roman Kagan
On Wed, Dec 23, 2015 at 06:06:31PM +0300, Roman Kagan wrote: > On Wed, Dec 23, 2015 at 03:45:29PM +0200, Michael S. Tsirkin wrote: > > This is the actual vs expected diff with both patches applied. > > Interesting... The diff suggests that qemu running in your test > environment has no floppy

Re: [Qemu-devel] [PATCH v3 2/2] tests: update expected SSDT for floppy changes

2015-12-23 Thread Roman Kagan
On Wed, Dec 23, 2015 at 06:47:16PM +0100, Igor Mammedov wrote: > On Wed, 23 Dec 2015 20:20:54 +0300 > Roman Kagan wrote: > > > ... two 1.44M drives with bogus geometry for q35. > > > > This one is a bug in my patch, indeed: I was tricked by FDRIVE_DRV_NONE > > being

Re: [Qemu-devel] [PATCH 1/2] compat: Introduce HW_COMPAT_2_5

2015-12-23 Thread Shmulik Ladkani
Hi, On Fri, 18 Dec 2015 09:30:02 +0200 Shmulik Ladkani wrote: > Introduce the place-holder for 2.5 back-compat properties, and the > accompanying PC_COMPAT_2_5, CCW_COMPAT_2_5, SPAPR_COMPAT_2_5. Please ignore this series, it'll clash. Recent pull has

Re: [Qemu-devel] [PATCH v2 2/3] hw/sd: model a power-up delay, as a workaround for an EDK2 bug

2015-12-23 Thread Peter Maydell
On 21 December 2015 at 22:25, Andrew Baumann wrote: >> If you change the VMSTATE layout, you need to bump the version. As >> this is very common code, it may have stricter version bump >> requirements. Last I knew however, there was a way to add new fields >> at the

Re: [Qemu-devel] [PATCH v8 15/35] qom: Swap 'name' next to visitor in ObjectPropertyAccessor

2015-12-23 Thread Eric Blake
On 12/21/2015 10:08 AM, Eric Blake wrote: > Similar to the previous patch, it's nice to have all functions > n the tree that involve a visitor and a name for conversion to s/^n/in/ > or from QAPI to consistently stick the 'name' parameter next > to the Visitor parameter. > -- Eric Blake

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

2015-12-23 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

Re: [Qemu-devel] [PATCH 4/7] qemu-io: add support for --object command line arg

2015-12-23 Thread Paolo Bonzini
On 22/12/2015 18:24, Daniel P. Berrange wrote: > I was a little reluctant to move this 'object_create' method into the > qom/ code though, since I hate the idea of the legacy 'QemuOpts' data > anywhere near those nice new APIs. I guess I could perhaps just keep the > qemu_opts_to_qdict() call in

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

2015-12-23 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

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

2015-12-23 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 First all three gain a --object

Re: [Qemu-devel] [PATCH] qemu-char: delete send_all/recv_all helper methods

2015-12-23 Thread Paolo Bonzini
On 23/12/2015 14:59, Daniel P. Berrange wrote: > The qemu-char.c contains two helper methods send_all > and recv_all. These are in fact declared in sockets.h > so ought to have been in util/qemu-sockets.c. For added > fun the impl of recv_all is completely missing on Win32. > > Fortunately

Re: [Qemu-devel] [PATCH v3 2/2] tests: update expected SSDT for floppy changes

2015-12-23 Thread Igor Mammedov
On Wed, 23 Dec 2015 20:20:54 +0300 Roman Kagan wrote: > On Wed, Dec 23, 2015 at 06:06:31PM +0300, Roman Kagan wrote: > > On Wed, Dec 23, 2015 at 03:45:29PM +0200, Michael S. Tsirkin wrote: > > > This is the actual vs expected diff with both patches applied. > > > >

[Qemu-devel] [PATCH] spapr: Introduce SPAPR_COMPAT_2_5

2015-12-23 Thread Shmulik Ladkani
In 240240d5 'pc: Add pc-*-2.6 machine classes' HW_COMPAT_2_5 and PC_COMPAT_2_5 were introduced. Accordingly, introduce SPAPR_COMPAT_2_5 that uses HW_COMPAT_2_5. Signed-off-by: Shmulik Ladkani --- hw/ppc/spapr.c | 9 + 1 file changed, 9 insertions(+)

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

2015-12-23 Thread Eric Blake
On 12/23/2015 10:11 AM, Daniel P. Berrange wrote: > 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. > > Signed-off-by: Daniel P. Berrange > --- > qemu-nbd.c |

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

2015-12-23 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. Signed-off-by: Daniel P. Berrange --- qemu-io.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff

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

2015-12-23 Thread Vladimir Sementsov-Ogievskiy
The new feature for qcow2: storing bitmaps. This patch adds new header extension to qcow2 - Bitmaps Extension. It provides an ability to store virtual disk related bitmaps in a qcow2 image. For now there is only one type of such bitmaps: Dirty Tracking Bitmap, which just tracks virtual disk

Re: [Qemu-devel] [PATCH 4/7] qemu-io: add support for --object command line arg

2015-12-23 Thread Daniel P. Berrange
On Wed, Dec 23, 2015 at 07:02:01PM +0100, Paolo Bonzini wrote: > > > On 22/12/2015 18:24, Daniel P. Berrange wrote: > > I was a little reluctant to move this 'object_create' method into the > > qom/ code though, since I hate the idea of the legacy 'QemuOpts' data > > anywhere near those nice new

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

2015-12-23 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. Signed-off-by: Daniel P. Berrange --- qemu-nbd.c | 47 --- 1 file changed, 24 insertions(+), 23

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

2015-12-23 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

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

2015-12-23 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. Signed-off-by: Daniel P. Berrange --- qemu-nbd.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-)

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

2015-12-23 Thread Eric Blake
On 12/23/2015 10:11 AM, Daniel P. Berrange wrote: > When declaring the 'struct option' array, use the standard > constants no_argument/required_argument, instead of magic > values 0 and 1. > > Signed-off-by: Daniel P. Berrange > --- > qemu-nbd.c | 47

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

2015-12-23 Thread Eric Blake
On 12/23/2015 10:11 AM, Daniel P. Berrange wrote: > When declaring the 'struct option' array, use the standard > constants no_argument/required_argument, instead of magic > values 0 and 1. > > Signed-off-by: Daniel P. Berrange > --- > qemu-io.c | 30

Re: [Qemu-devel] [PATCH] SeaBios: Fix reset procedure reentrancy problem on qemu-kvm platform

2015-12-23 Thread Kevin O'Connor
On Wed, Dec 23, 2015 at 06:40:12AM +, Gonglei (Arei) wrote: > > From: Kevin O'Connor [mailto:ke...@koconnor.net] > > On Tue, Dec 22, 2015 at 02:14:12AM +, Gonglei (Arei) wrote: > > > Sorry, it doesn't work. What's worse is we cannot stop SeaBIOS stuck by > > > Setting

Re: [Qemu-devel] [PATCH v2 2/3] hw/sd: model a power-up delay, as a workaround for an EDK2 bug

2015-12-23 Thread Andrew Baumann
> From: Peter Maydell [mailto:peter.mayd...@linaro.org] > Sent: Wednesday, 23 December 2015 11:21 > On 21 December 2015 at 22:25, Andrew Baumann > wrote: > > >> If you change the VMSTATE layout, you need to bump the version. As > >> this is very common code, it may

Re: [Qemu-devel] [Qemu-block] [PATCH] block: use drained section in bdrv_close

2015-12-23 Thread Max Reitz
On 23.12.2015 22:55, Paolo Bonzini wrote: > >> On 23.12.2015 11:48, Paolo Bonzini wrote: >>> bdrv_close is used when ejecting a medium. >> >> Is it still? Other than it maybe being indirectly called through >> bdrv_delete(), it shouldn't be. > > Yes, through blk_remove_bs -> bdrv_unref ->

Re: [Qemu-devel] [PATCH v7 1/2] mirror: Rewrite mirror_iteration

2015-12-23 Thread Max Reitz
On 23.12.2015 05:12, Fam Zheng wrote: > The "pnum < nb_sectors" condition in deciding whether to actually copy > data is unnecessarily strict, and the qiov initialization is > unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. > > Rewrite mirror_iteration to fix both flaws. > >

[Qemu-devel] [PATCH v2 4/7] bcm2835_peripherals: add rollup device for bcm2835 peripherals

2015-12-23 Thread Andrew Baumann
This device maintains all the non-CPU peripherals on bcm2835 (Pi1) which are also present on bcm2836 (Pi2). It also implements the private address space used for DMA. Signed-off-by: Andrew Baumann --- Notes: v2 changes: * adapted to use common SDHCI

[Qemu-devel] [PATCH v2 6/7] bcm2836: add bcm2836 soc device

2015-12-23 Thread Andrew Baumann
This is the SoC for Raspberry Pi 2. Signed-off-by: Andrew Baumann --- hw/arm/Makefile.objs | 2 +- hw/arm/bcm2836.c | 135 +++ include/hw/arm/bcm2836.h | 33 3 files changed, 169 insertions(+),

[Qemu-devel] [PATCH v2 2/7] bcm2835_property: add bcm2835 property channel

2015-12-23 Thread Andrew Baumann
This sits behind the mailbox interface, and implements request/response queries for system properties. The framebuffer-related properties will be added in a later patch. Signed-off-by: Andrew Baumann --- hw/misc/Makefile.objs | 1 +

[Qemu-devel] [PATCH v2 3/7] bcm2835_ic: add bcm2835 interrupt controller

2015-12-23 Thread Andrew Baumann
Signed-off-by: Andrew Baumann --- Notes: v2 changes: * split inputs to named gpu_irq and arm_irq gpio inputs * use 64-bit gpu_irq and 8-bit arm_irq status rather than 3*32-bit bitfields * added defined names for register offsets * deleted

Re: [Qemu-devel] [PATCH v3 0/5] qmp: Add blockdev-mirror

2015-12-23 Thread Max Reitz
On 23.12.2015 06:59, Fam Zheng wrote: > v3: Rebase to master. Why did you drop patch 1? Max > v2: 01: Move bdrv_op_block_all down. [Max] > 02, 04: Add Max's rev-by. > 03: Check has_mode and fix "return;". [Max] > 05: Check target->blk. > Drop superfluous whitespace. [Max] >

Re: [Qemu-devel] [PATCH v3 4/5] qmp: Add blockdev-mirror command

2015-12-23 Thread Max Reitz
On 23.12.2015 06:59, Fam Zheng wrote: > This will start a mirror job from a named device to another named > device, its relation with drive-mirror is similar with blockdev-backup > to drive-backup. > > In blockdev-mirror, the target node should be prepared by blockdev-add, > which will be

[Qemu-devel] arm64 qemu tests failing in linux-next since 'arm64: kernel: enforce pmuserenr_el0 initialization and restore'

2015-12-23 Thread Guenter Roeck
oblem and how to fix it (presumably in qemu) ? Bisect log is attached below. Reverting commit 60792ad349f3 on top of linux-next fixes the problem. Thanks, Guenter --- # bad: [80c75a0f1d81922bf322c0634d1e1a15825a89e6] Add linux-next specific files for 20151223 # good: [4ef7675344d687a0ef5b0d7c0ce

Re: [Qemu-devel] [RFC PATCH v0 0/9] Generic cpu-core device

2015-12-23 Thread Zhu Guihua
On 12/17/2015 05:58 AM, Igor Mammedov wrote: On Wed, 16 Dec 2015 16:46:37 +0100 Andreas Färber wrote: Am 10.12.2015 um 13:35 schrieb Igor Mammedov: wrt CLI can't we do something like this? -device some-cpu-model,socket=x[,core=y[,thread=z]] That's problematic and where

Re: [Qemu-devel] [PATCH] Xen PCI passthrough: convert to realize()

2015-12-23 Thread Cao jin
On 12/23/2015 10:03 PM, Stefano Stabellini wrote: On Wed, 23 Dec 2015, Cao jin wrote: [...] The patch as is fails to build: qemu/hw/xen/xen_pt_config_init.c: In function ‘xen_pt_config_init’: qemu/hw/xen/xen_pt_config_init.c:2061:42: error: ‘rc’ may be used uninitialized in this func

Re: [Qemu-devel] [PATCH] change type of pci_bridge_initfn() to void

2015-12-23 Thread Cao jin
Hi mst On 12/23/2015 09:38 PM, Michael S. Tsirkin wrote: On Wed, Dec 23, 2015 at 04:53:21PM +0800, Cao jin wrote: Hi mst friendly ping again... This does not work since then this function can not be used as an init callback, and this is how dec uses it. thanks very much for your time:) I

[Qemu-devel] [PATCH] linux-user/mmap.c: Use end instead of real_end in target_mmap

2015-12-23 Thread chengang
From: Chen Gang In this case, real_end is larger than end, which may cause mmap_frag process the incorrect memory region. Signed-off-by: Chen Gang --- linux-user/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH 1/4] net/filter: fix nf->netdev_id leak

2015-12-23 Thread Jason Wang
On 12/23/2015 03:43 PM, Li Zhijian wrote: > Cc: Jason Wang > Signed-off-by: Li Zhijian > --- > net/filter.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/filter.c b/net/filter.c > index 1365bad..f777ba2 100644 > --- a/net/filter.c

Re: [Qemu-devel] [PATCH 1/8] bcm2835_sbm: add BCM2835 mailboxes

2015-12-23 Thread Andrew Baumann
> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > Sent: Wednesday, 23 December 2015 15:59 > >>> Notice that this file comes from Linux. I know it's not pretty, but > > Where in Linux exactly? I am actually having trouble finding the > original source. Grepping around linux-next,

Re: [Qemu-devel] [PATCH v7 1/2] mirror: Rewrite mirror_iteration

2015-12-23 Thread Max Reitz
On 24.12.2015 01:15, Max Reitz wrote: > On 23.12.2015 05:12, Fam Zheng wrote: >> The "pnum < nb_sectors" condition in deciding whether to actually copy >> data is unnecessarily strict, and the qiov initialization is >> unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. >> >> Rewrite

[Qemu-devel] [PATCH v2 5/7] bcm2836_control: add bcm2836 ARM control logic

2015-12-23 Thread Andrew Baumann
This module is specific to the bcm2836 (Pi2). It implements the top level interrupt controller, and mailboxes used for inter-processor synchronisation. Signed-off-by: Andrew Baumann --- hw/intc/Makefile.objs | 2 +- hw/intc/bcm2836_control.c |

Re: [Qemu-devel] [PATCH v3 2/5] block: Extract blockdev part of qmp_drive_mirror

2015-12-23 Thread Max Reitz
On 23.12.2015 06:59, Fam Zheng wrote: > This is the part that will be reused by blockdev-mirror. > > Signed-off-by: Fam Zheng > --- > blockdev.c | 146 > + > 1 file changed, 88 insertions(+), 58 deletions(-)

Re: [Qemu-devel] [PATCH v7 1/2] mirror: Rewrite mirror_iteration

2015-12-23 Thread Fam Zheng
On Thu, 12/24 01:21, Max Reitz wrote: > On 24.12.2015 01:15, Max Reitz wrote: > > On 23.12.2015 05:12, Fam Zheng wrote: > >> The "pnum < nb_sectors" condition in deciding whether to actually copy > >> data is unnecessarily strict, and the qiov initialization is > >> unnecessarily for

[Qemu-devel] [PATCH v4 2/5] block: Extract blockdev part of qmp_drive_mirror

2015-12-23 Thread Fam Zheng
This is the part that will be reused by blockdev-mirror. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- blockdev.c | 146 + 1 file changed, 88 insertions(+), 58 deletions(-) diff --git

[Qemu-devel] [PATCH v4 4/5] qmp: Add blockdev-mirror command

2015-12-23 Thread Fam Zheng
This will start a mirror job from a named device to another named device, its relation with drive-mirror is similar with blockdev-backup to drive-backup. In blockdev-mirror, the target node should be prepared by blockdev-add, which will be responsible for assigning a name to the new node, so we

[Qemu-devel] [PATCH v4 5/5] iotests: Add test cases for blockdev-mirror

2015-12-23 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- tests/qemu-iotests/041 | 100 ++--- tests/qemu-iotests/041.out | 4 +- 2 files changed, 79 insertions(+), 25 deletions(-) diff --git a/tests/qemu-iotests/041

[Qemu-devel] phys_page_find() returning [PHYS_SECTION_UNASSIGNED]

2015-12-23 Thread Programmingkid
I'm having problems with the pci_dma_read() function. When using a Mac OS X guest, the data that this function returns is all zeros. After doing a lot of instruction tracing, I tracked the problem to a function called phys_page_find(). It always returns [PHYS_SECTION_UNASSIGNED]. What I would

Re: [Qemu-devel] [PATCH v3 0/5] correct some register return values for vxmnet3

2015-12-23 Thread Jason Wang
On 12/23/2015 02:29 PM, Dmitry Fleytman wrote: > Reviewed-by: Dmitry Fleytman > >> On 23 Dec 2015, at 08:06 AM, Miao Yan wrote: >> >> Qemu vmxnet3 emulation doesn't recognize VMXNET3_CMD_GET_DID_LO, >> VMXNET3_CMD_GET_DID_HI and

[Qemu-devel] [PATCH v8 1/2] mirror: Rewrite mirror_iteration

2015-12-23 Thread Fam Zheng
The "pnum < nb_sectors" condition in deciding whether to actually copy data is unnecessarily strict, and the qiov initialization is unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. Rewrite mirror_iteration to fix both flaws. Signed-off-by: Fam Zheng ---

  1   2   3   >