Re: [Qemu-devel] [PATCH 1/1] block: fix inability to start VM with native AIO

2015-12-23 Thread Stefan Hajnoczi
On Tue, Dec 22, 2015 at 09:59:46AM +0300, Denis V. Lunev wrote: > error: Failed to start domain rhel7 > error: internal error: process exited while connecting to monitor: > 2015-12-22T06:55:18.812637Z qemu-system-x86_64: > -drive file=/var/lib/libvirt/images/rhel7.qcow2,if=none, > i

Re: [Qemu-devel] [PATCH 1/1] block: fix inability to start VM with native AIO

2015-12-23 Thread Stefan Hajnoczi
On Tue, Dec 22, 2015 at 09:59:46AM +0300, Denis V. Lunev wrote: > error: Failed to start domain rhel7 > error: internal error: process exited while connecting to monitor: > 2015-12-22T06:55:18.812637Z qemu-system-x86_64: > -drive file=/var/lib/libvirt/images/rhel7.qcow2,if=none, > i

Re: [Qemu-devel] [PATCH RFC 0/5] generic image locking and crash recovery

2015-12-23 Thread Fam Zheng
On Wed, 12/23 10:46, Denis V. Lunev wrote: > This series of patches is aimed to prevent usage of image > file by different qemu instances. In case we are the first > instance, and option lock is lockfile, - we lock the image file, > and if check option is on, we check the file and fix it if > nesse

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr/pci: populate PCI DT in reverse order

2015-12-23 Thread Nikunj A Dadhania
David Gibson writes: > On Thu, Dec 17, 2015 at 09:43:29AM +0100, Greg Kurz wrote: >> On Thu, 3 Dec 2015 15:53:17 +0100 >> Greg Kurz wrote: >> >> > On Tue, 1 Dec 2015 22:48:38 +0100 >> > Thomas Huth wrote: >> > >> > > On 30/11/15 11:45, Greg Kurz wrote: >> > > > Since commit 1d2d974244c6 "spap

Re: [Qemu-devel] [PATCH v2 06/14] qapi: Add qstring_append_format()

2015-12-23 Thread Fam Zheng
On Mon, 12/21 17:31, Eric Blake wrote: > Back in commit 764c1ca (Nov 2009), we added qstring_append_int(). > However, it did not see any use until commit 190c882 (Jan 2015). > Furthermore, it has a rather limited use case - to print anything > else, callers still have to format into a temporary buf

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

2015-12-23 Thread Stefan Hajnoczi
On Fri, Dec 18, 2015 at 02:15:38PM +0100, Markus Armbruster wrote: > What should happen when the user asks for a mutation at a place where we > have implicit filter(s)? Please suspend your disbelief for a second: In principle it's simplest not having implicit filters. The client needs to set up

Re: [Qemu-devel] [PATCH RFC 0/5] generic image locking and crash recovery

2015-12-23 Thread Denis V. Lunev
On 12/23/2015 11:09 AM, Fam Zheng wrote: On Wed, 12/23 10:46, Denis V. Lunev wrote: This series of patches is aimed to prevent usage of image file by different qemu instances. In case we are the first instance, and option lock is lockfile, - we lock the image file, and if check option is on, we

Re: [Qemu-devel] [PATCH v2 1/2] igd-passthrough-i440FX: convert to realize()

2015-12-23 Thread Cao jin
Hi mst, Ping Or do I need to cc this to qemu-trivial? On 12/21/2015 07:00 PM, Cao jin wrote: Signed-off-by: Cao jin --- hw/pci-host/piix.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c in

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

2015-12-23 Thread Cao jin
Hi mst friendly ping again... On 12/17/2015 09:53 AM, Cao jin wrote: Ping On 11/30/2015 05:19 PM, Michael S. Tsirkin wrote: On Mon, Nov 30, 2015 at 05:00:44PM +0800, Cao jin wrote: It always return 0(success), change its type to void, and modify its caller. Doing this can reduce a error path

[Qemu-devel] [PATCH 0/2] Fix some coverity reported defects

2015-12-23 Thread Bandan Das
The first change replaces QLIST_FOREACH with the safe variant and the second was incorrectly using MTPObject * in the trace function after freeing it. Bandan Das (2): usb-mtp: use safe variant when cleaning events list usb-mtp: fix call to trace function hw/usb/dev-mtp.c | 6 +++--- 1 file c

Re: [Qemu-devel] [PATCH 3/5] block: added check image option and callback bdrv_is_opened_unclean

2015-12-23 Thread Fam Zheng
On Wed, 12/23 10:46, Denis V. Lunev wrote: > From: Olga Krishtal > > If image is opened for writing and it was not closed correctly > (the image is dirty) we have to check and repair it. By default > the option is off. > > bdrv_is_opened_unclean - cheks if the image is dirty > This callbsck will

[Qemu-devel] [PATCH 1/2] usb-mtp: use safe variant when cleaning events list

2015-12-23 Thread Bandan Das
usb_mtp_inotify_cleanup uses QLIST_FOREACH to pick events from a list and free them which is incorrect. Use QLIST_FOREACH_SAFE instead. Signed-off-by: Bandan Das --- hw/usb/dev-mtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index

[Qemu-devel] [PATCH 2/2] usb-mtp: fix call to trace function

2015-12-23 Thread Bandan Das
trace_usb_mtp_inotify_event() was being called after the object was being freed. Signed-off-by: Bandan Das --- hw/usb/dev-mtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index db1fd59..4177a87 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/us

Re: [Qemu-devel] [PATCH 3/5] block: added check image option and callback bdrv_is_opened_unclean

2015-12-23 Thread Denis V. Lunev
On 12/23/2015 12:09 PM, Fam Zheng wrote: On Wed, 12/23 10:46, Denis V. Lunev wrote: From: Olga Krishtal If image is opened for writing and it was not closed correctly (the image is dirty) we have to check and repair it. By default the option is off. bdrv_is_opened_unclean - cheks if the image

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

2015-12-23 Thread Fam Zheng
On Mon, 12/21 17:31, Eric Blake wrote: > Similar to pretty printing in the QObject visitor. The rickiest "trickiest"? > parts are the fact that during type_any(), we have to coordinate > with QObject to also print pretty; and the fact that the testsuite > now has to honor parameterization on whe

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 they coule be) hw/xen/xen-

[Qemu-devel] [PATCH] qemu-iotests: make check-block.sh work on out-of-tree builds

2015-12-23 Thread Paolo Bonzini
Since check-block.sh, the "check" script has learnt to find the source path. On the other hand, it expects common.env to be in the build tree (both changes made in commit 76c7560, "configure: Enable out-of-tree iotests", 2014-05-24). So, it is wrong to invoke "check" from the source path like che

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

2015-12-23 Thread Daniel P. Berrange
On Wed, Dec 23, 2015 at 11:14:12AM +0800, Fam Zheng wrote: > On Tue, 12/22 17:46, Kevin Wolf wrote: > > 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 ad

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

2015-12-23 Thread Paolo Bonzini
bdrv_close is used when ejecting a medium. Use a drained section to ensure that all I/O goes to either the old medium or the bitbucket. Signed-off-by: Paolo Bonzini --- block.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 411edbf..01655de 100644

[Qemu-devel] [PATCH] block: add missing call to bdrv_drain_recurse

2015-12-23 Thread Paolo Bonzini
This is also needed in bdrv_drain_all, not just in bdrv_drain. Signed-off-by: Paolo Bonzini --- block/io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/io.c b/block/io.c index 841f5b5..bfe2544 100644 --- a/block/io.c +++ b/block/io.c @@ -293,6 +293,7 @@ void bdrv_drain_all(void)

[Qemu-devel] [PATCH] blockjob: prevent double enter (with dangling access on the second)

2015-12-23 Thread Paolo Bonzini
Because block_job_sleep_ns marks the job as non-busy, it is possible to enter it again from block_job_enter. However, the same coroutine may then be re-entered from co_sleep_cb, and this time the CoSleepCB is not on the stack anymore. Fix this by open coding the sleep in block_job_sleep_ns, and d

[Qemu-devel] [PATCH] block: acquire in bdrv_query_image_info

2015-12-23 Thread Paolo Bonzini
NFS calls aio_poll inside bdrv_get_allocated_size. This requires acquiring the AioContext. Signed-off-by: Paolo Bonzini --- block/qapi.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index fecac25..ea400e0 100644 --- a/block/qapi.c +++

Re: [Qemu-devel] [PATCH 1/2] io: fix setting of QIO_CHANNEL_FEATURE_FD_PASS on server connections

2015-12-23 Thread Daniel P. Berrange
On Tue, Dec 22, 2015 at 11:14:41AM -0700, Eric Blake wrote: > On 12/21/2015 09:23 AM, Daniel P. Berrange wrote: > > The QIO_CHANNEL_FEATURE_FD_PASS feature flag is set in the > > qio_channel_socket_set_fd() method, however, this only deals > > with client side connections. > > > > To ensure server

Re: [Qemu-devel] [PATCH 2/2] io: fix stack allocation when sending of file descriptors

2015-12-23 Thread Daniel P. Berrange
On Tue, Dec 22, 2015 at 11:20:30AM -0700, Eric Blake wrote: > On 12/21/2015 09:23 AM, Daniel P. Berrange wrote: > > When sending file descriptors over a socket, we have to > > allocate a data buffer to hold the FDs in the scmsghdr. > > Unfortunately we allocated the buffer on the stack inside > > a

Re: [Qemu-devel] [PATCH] blockjob: prevent double enter (with dangling access on the second)

2015-12-23 Thread Paolo Bonzini
On 23/12/2015 11:48, Paolo Bonzini wrote: > Because block_job_sleep_ns marks the job as non-busy, it is > possible to enter it again from block_job_enter. However, the > same coroutine may then be re-entered from co_sleep_cb, and this > time the CoSleepCB is not on the stack anymore. > > Fix this

Re: [Qemu-devel] [PATCH 1/6] crypto: add ability to query the cipher key, block & IV lens

2015-12-23 Thread Daniel P. Berrange
On Mon, Dec 21, 2015 at 09:18:42AM -0700, Eric Blake wrote: > On 12/21/2015 09:06 AM, Daniel P. Berrange wrote: > > Adds new methods to allow querying the length of the cipher > > key, block size and initialization vectors. > > In the subject line, I read 'lens' as a synonym for 'viewports', not >

Re: [Qemu-devel] [PATCH 2/6] crypto: add ability to query hash digest len

2015-12-23 Thread Daniel P. Berrange
On Mon, Dec 21, 2015 at 09:22:42AM -0700, Eric Blake wrote: > On 12/21/2015 09:06 AM, Daniel P. Berrange wrote: > > Add a qcrypto_hash_digest_len() method which allows querying of > > the raw digest size for a given hash algorithm. > > > > Signed-off-by: Daniel P. Berrange > > --- > > crypto/has

[Qemu-devel] [PULL v1 1/3] io: bind to loopback IP addrs in test suite

2015-12-23 Thread Daniel P. Berrange
The test suite currently binds to 0.0.0.0 or ::, which covers all interfaces of the machine. It is bad practice for test suite to open publically accessible ports on a machine, so switch to use loopback addrs 127.0.0.1 or ::1. Reported-by: Peter Maydell Reviewed-by: Eric Blake Signed-off-by: Dan

[Qemu-devel] [PULL v1 2/3] io: fix setting of QIO_CHANNEL_FEATURE_FD_PASS on server connections

2015-12-23 Thread Daniel P. Berrange
The QIO_CHANNEL_FEATURE_FD_PASS feature flag is set in the qio_channel_socket_set_fd() method, however, this only deals with client side connections. To ensure server side connections also have the feature flag set, we must set it in qio_channel_socket_accept() too. This also highlighted a typo fi

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

2015-12-23 Thread Daniel P. Berrange
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 the git repository at: git://github.com/berrange/qemu tags/pull-io-fixes-2015-12-23-

[Qemu-devel] [PULL v1 3/3] io: fix stack allocation when sending of file descriptors

2015-12-23 Thread Daniel P. Berrange
When sending file descriptors over a socket, we have to allocate a data buffer to hold the FDs in the scmsghdr. Unfortunately we allocated the buffer on the stack inside an if () {} block, but called sendmsg() outside the block. So the stack bytes holding the FDs were liable to be overwritten with

[Qemu-devel] [PULL] 9p fix

2015-12-23 Thread Greg Kurz
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 the git repository at: https://github.com/gkurz/qemu.git tags/for-upstream for you

[Qemu-devel] [PULL] virtio-9p: use accessor to get thread_pool

2015-12-23 Thread Greg Kurz
The aio_context_new() function does not allocate a thread pool. This is deferred to the first call to the aio_get_thread_pool() accessor. It is hence forbidden to access the thread_pool field directly, as it may be NULL. The accessor *must* be used always. Fixes: ebac1202c95a4f1b76b6ef3f0f63926fa7

[Qemu-devel] [PULL v1 2/6] crypto: add ability to query hash digest len

2015-12-23 Thread Daniel P. Berrange
Add a qcrypto_hash_digest_len() method which allows querying of the raw digest size for a given hash algorithm. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- crypto/hash.c| 15 +++ include/crypto/hash.h| 11 +++ tests/test-crypto-hash.c | 5 +

[Qemu-devel] [PULL v1 3/6] crypto: move QCryptoHashAlgorithm enum definition into QAPI

2015-12-23 Thread Daniel P. Berrange
The QCryptoHashAlgorithm enum is defined in the crypto/hash.h header. In the future some QAPI types will want to reference the hash enums, so move the enum definition into QAPI too. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- crypto/hash.c | 4 ++-- include/crypto/has

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

2015-12-23 Thread Daniel P. Berrange
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 the git repository at: git://github.com/berrange/qemu tags/pull-crypto-fixes-2015-12

[Qemu-devel] [PULL v1 1/6] crypto: add additional query accessors for cipher instances

2015-12-23 Thread Daniel P. Berrange
Adds new methods to allow querying the length of the cipher key, block size and initialization vectors. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- crypto/cipher.c| 48 ++ include/crypto/cipher.h| 37 +

[Qemu-devel] [PULL v1 4/6] crypto: move QCryptoCipherAlgorithm/Mode enum definitions into QAPI

2015-12-23 Thread Daniel P. Berrange
The QCryptoCipherAlgorithm and QCryptoCipherMode enums are defined in the crypto/cipher.h header. In the future some QAPI types will want to reference the hash enums, so move the enum definition into QAPI too. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- crypto/cipher.c

[Qemu-devel] [PULL v1 5/6] crypto: ensure qapi/crypto.json is listed in qapi-modules

2015-12-23 Thread Daniel P. Berrange
The rebuild of qapi-types.c/h is not correctly triggered when qapi/crypto.json is changed because it was missing from the list of files in the qapi-modules variable. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) d

[Qemu-devel] [PULL v1 6/6] crypto: fix transposed arguments in cipher error message

2015-12-23 Thread Daniel P. Berrange
When reporting an incorrect key length for a cipher, we mixed up the actual vs expected arguments. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- crypto/cipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/cipher.c b/crypto/cipher.c index a24677c..7

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 +++ b/hw/ppc/spapr_vio.c @@ -3

[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 CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- arch/x86/kvm/hyperv

[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 doc(15.3.1):

[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 Reviewed-by: Roman Kagan CC

[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 proc

[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 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 Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- arch/x86/kvm/hyperv.c | 37 +++

[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: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- arch/x86/kvm/hyperv.c | 7

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 or

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) { > > +f

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 pci device > callbacks to specify

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 see I don`t change some func

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 a

[Qemu-devel] [PATCH] sheepdog: allow to delete snapshot

2015-12-23 Thread Hitoshi Mitake
From: Vasiliy Tolstov This patch implements a blockdriver function bdrv_snapshot_delete() in the sheepdog driver. With the new function, snapshots of sheepdog can be deleted from libvirt. Cc: Jeff Cody Signed-off-by: Hitoshi Mitake Signed-off-by: Vasiliy Tolstov --- block/sheepdog.c | 125 ++

Re: [Qemu-devel] [PULL 0/4] xen-2015-12-22

2015-12-23 Thread Peter Maydell
On 22 December 2015 at 16:20, Stefano Stabellini wrote: > The following changes since commit c3626ca7df027dabf0568284360a23faf18f0884: > > Update version for v2.5.0-rc3 release (2015-12-07 17:47:40 +) > > are available in the git repository at: > > git://xenbits.xen.org/people/sstabellini/

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

2015-12-23 Thread Daniel P. Berrange
On Wed, Dec 23, 2015 at 03:15:50PM +0300, Roman Kagan wrote: > 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 se

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

2015-12-23 Thread Daniel P. Berrange
On Wed, Dec 23, 2015 at 03:15:50PM +0300, Roman Kagan wrote: > 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 se

Re: [Qemu-devel] [PATCH 2/5] block: implemented bdrv_lock_image for raw file

2015-12-23 Thread Daniel P. Berrange
On Wed, Dec 23, 2015 at 10:46:53AM +0300, Denis V. Lunev wrote: > From: Olga Krishtal > > To lock the image file flock (LockFileEx) is used. > We lock file handle/descriptor. If lock is failed - > an error is returned. > > In win32 realization we can lock reagion of bytes within the file. > For

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

2015-12-23 Thread Denis V. Lunev
On 12/23/2015 03:29 PM, Daniel P. Berrange wrote: On Wed, Dec 23, 2015 at 03:15:50PM +0300, Roman Kagan wrote: 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 pro

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

2015-12-23 Thread Daniel P. Berrange
On Wed, Dec 23, 2015 at 03:41:01PM +0300, Denis V. Lunev wrote: > On 12/23/2015 03:29 PM, Daniel P. Berrange wrote: > >On Wed, Dec 23, 2015 at 03:15:50PM +0300, Roman Kagan wrote: > >>On Wed, Dec 23, 2015 at 10:47:22AM +, Daniel P. Berrange wrote: > >>>On Wed, Dec 23, 2015 at 11:14:12AM +0800,

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

2015-12-23 Thread Denis V. Lunev
On 12/23/2015 03:34 PM, Daniel P. Berrange wrote: On Wed, Dec 23, 2015 at 03:15:50PM +0300, Roman Kagan wrote: 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 pro

Re: [Qemu-devel] [PULL 00/55] acpi, pc features

2015-12-23 Thread Peter Maydell
On 22 December 2015 at 16:52, Michael S. Tsirkin 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 the git repository a

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

2015-12-23 Thread Daniel P. Berrange
On Wed, Dec 23, 2015 at 03:47:00PM +0300, Denis V. Lunev wrote: > On 12/23/2015 03:34 PM, Daniel P. Berrange wrote: > >On Wed, Dec 23, 2015 at 03:15:50PM +0300, Roman Kagan wrote: > >>On Wed, Dec 23, 2015 at 10:47:22AM +, Daniel P. Berrange wrote: > >>>On Wed, Dec 23, 2015 at 11:14:12AM +0800,

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 based on the principal: catch/r

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 > > Signed-off-by: Denis V. Lunev > > C

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 distros (like debian >>>

[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 wis

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 in the git repository a

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 e9b6d21..5a73fd0 100644 > --- a/backends/hostmem-file.c >

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

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

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] 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 the git repository at: > >

[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 CC: qemu-devel@nongnu.org --- arch/x86/kvm/hyperv.c | 10 +++--- arch/x86/kvm/trace.h | 93

[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 CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu

[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 CC: Paolo Bonzini CC: Roman Kagan

[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 passthroug

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 > > > --- > > > > > > Since the callchain is p

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 > image > read-write

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] [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 locking to qcow2 that re

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 locking to qcow2 that re

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

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 ins

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 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 prin

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 > > measure any perfo

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 ebla

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 --so

[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 p

[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 secr

[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 i

[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 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 secret

[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 indicate

[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(-) diff --git a/qemu-nbd

  1   2   3   >