Re: [Qemu-devel] [PATCH 02/19] migration: They are called vmstate_foo, move them to vmstate.c

2017-04-19 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> Signed-off-by: Juan Quintela >> --- >> migration/savevm.c | 17 - >> migration/vmstate.c | 16 >> 2 files changed, 16 insertions(+), 17 deletions(-) > > OK, but it's a little odd,

[Qemu-devel] blockdev-mirror , how to replace old nodename by new nodename ?

2017-04-19 Thread Alexandre DERUMIER
Hi, I'm trying to implement blockdev-mirror, to replace drive-mirror as we can pass more options with blockdev-mirror. I would like to mirror an attached blockdev to a new blockdev, then switch at the end of block-job-complete, like for drive-mirror. qemu command line (vm-138-disk-1.qcow2 fi

Re: [Qemu-devel] [PATCH v2 7/7] intel_iommu: support passthrough (PT)

2017-04-19 Thread Liu, Yi L
Peter, Besides the gPA->hPA mapping, pt mode enabling requires some sanity check on s->pt_supported. See comments inline. > -Original Message- > From: Qemu-devel [mailto:qemu-devel-bounces+yi.l.liu=intel@nongnu.org] On > Behalf Of Peter Xu > Sent: Monday, April 17, 2017 7:32 PM > To:

Re: [Qemu-devel] [PATCH 10/19] migration: Remove use of old MigrationParams

2017-04-19 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> We have change in the previous patch to use migration capabilities for >> it. Notice that we continue using the old command line flags from >> migrate command from the time being. Remove the set_params method as >>

Re: [Qemu-devel] [PATCH 19/19] monitor: remove monitor parameter from save_vmstate

2017-04-19 Thread Juan Quintela
Paolo Bonzini wrote: > On 18/04/2017 11:44, Paolo Bonzini wrote: >> >> >> On 17/04/2017 22:00, Juan Quintela wrote: >>> load_vmstate() already use error_report, so be consistent. >> >> Better: make both return Error* via an Error** parameter, and add >> >> hmp_handle_error(mon, &err); >>

Re: [Qemu-devel] [RFC v2 3/4] vhost-user: add slave-req-fd support

2017-04-19 Thread Maxime Coquelin
On 04/17/2017 05:29 AM, Peter Xu wrote: On Fri, Apr 14, 2017 at 07:40:55PM +0200, Maxime Coquelin wrote: [...] @@ -486,6 +500,18 @@ Message types If VHOST_USER_PROTOCOL_F_REPLY_ACK is negotiated, slave must respond with zero in case the specified MTU is valid, or non-zero oth

Re: [Qemu-devel] Vhost-pci RFC2.0

2017-04-19 Thread Marc-André Lureau
Hi On Wed, Apr 19, 2017 at 10:38 AM Wang, Wei W wrote: > Hi, > > We made some design changes to the original vhost-pci design, and want to > open > a discussion about the latest design (labelled 2.0) and its extension > (2.1). > 2.0 design: One VM shares the entire memory of another VM > 2.1 des

Re: [Qemu-devel] [RFC v2 4/4] spec/vhost-user spec: Add IOMMU support

2017-04-19 Thread Maxime Coquelin
On 04/17/2017 05:50 AM, Peter Xu wrote: On Fri, Apr 14, 2017 at 07:40:56PM +0200, Maxime Coquelin wrote: [...] +IOMMU support +- + +When the VIRTIO_F_IOMMU_PLATFORM feature has been negotiated, the master has +to send IOTLB entries update & invalidation by sending VHOST_USER_IOTL

Re: [Qemu-devel] Vhost-pci RFC2.0

2017-04-19 Thread Jan Kiszka
On 2017-04-19 08:38, Wang, Wei W wrote: > Hi, > > We made some design changes to the original vhost-pci design, and want > to open > a discussion about the latest design (labelled 2.0) and its extension (2.1). > 2.0 design: One VM shares the entire memory of another VM > 2.1 design: One VM uses a

Re: [Qemu-devel] [PATCH v2 7/7] intel_iommu: support passthrough (PT)

2017-04-19 Thread Lan Tianyu
Hi All: Sorry for later response. On 2017年04月18日 17:04, Liu, Yi L wrote: >> -Original Message- >> From: Peter Xu [mailto:pet...@redhat.com] >> Sent: Tuesday, April 18, 2017 3:27 PM >> To: Liu, Yi L >> Cc: qemu-devel@nongnu.org; Lan, Tianyu ; Michael S . >> Tsirkin ; Jason Wang ; Ma

Re: [Qemu-devel] Jailhouse on Ultrascale+ (ZCU102)

2017-04-19 Thread Constantin Petra
Yes, I am using the QEMU version included by Xilinx in PetaLinux 2016.4. On Wed, Apr 19, 2017 at 7:37 AM, Jan Kiszka wrote: > On 2017-04-19 05:48, Constantin Petra wrote: > > Hello, > > > > I have tried the same binaries on a ZCU102 board and it seems to work. > > Cannot be sure though, the boar

[Qemu-devel] Simulating Soft Error with MCE Injection method

2017-04-19 Thread Naftaly Avadiaev
Hi, QEMU has a build in mechanism for MCE injection. However the mechanism is not perfect, QEMU just fills MCA registers with partial data and then triggers MCE. I want to add a real corruption before triggering MCE. The first thing which I tried is to add all MSRs as described in Intel Sof

Re: [Qemu-devel] Vhost-pci RFC2.0

2017-04-19 Thread Wei Wang
On 04/19/2017 03:31 PM, Marc-André Lureau wrote: Hi On Wed, Apr 19, 2017 at 10:38 AM Wang, Wei W > wrote: Hi, We made some design changes to the original vhost-pci design, and want to open a discussion about the latest design (labelled 2.0) and its

Re: [Qemu-devel] Vhost-pci RFC2.0

2017-04-19 Thread Wei Wang
On 04/19/2017 03:35 PM, Jan Kiszka wrote: On 2017-04-19 08:38, Wang, Wei W wrote: Hi, We made some design changes to the original vhost-pci design, and want to open a discussion about the latest design (labelled 2.0) and its extension (2.1). 2.0 design: One VM shares the entire memory of ano

Re: [Qemu-devel] [RFC v2 3/6] pci: Rename and change signatures of pci_bus_new() & related functions

2017-04-19 Thread Peter Maydell
On 18 April 2017 at 23:17, Eduardo Habkost wrote: > pci_bus_new*() and pci_register_bus() work only when the 'parent' > argument is a PCI_HOST_BRIDGE object. Rename them to reflect that they > are meant to initialize a bus that's in a PCI host bridge. > > The new function names are: > * pci_host_b

Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel

2017-04-19 Thread Paul Durrant
> -Original Message- > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > Sent: 18 April 2017 18:41 > To: Paul Durrant > Cc: 'Stefano Stabellini' ; qemu-devel@nongnu.org; > Anthony Perard ; Wei Liu > ; jgr...@suse.com; julien.gr...@arm.com; xen- > de...@lists.xenproject.org > Subje

Re: [Qemu-devel] Jailhouse on Ultrascale+ (ZCU102)

2017-04-19 Thread Peter Maydell
On 19 April 2017 at 05:37, Jan Kiszka wrote: > On 2017-04-19 05:48, Constantin Petra wrote: >> So from some reason, under QEMU something is not in place, but what can >> that be? It would be convenient from our perspective, if it would work... > > I fully agree, and I'm waiting for official EL2 su

Re: [Qemu-devel] [virtio-dev] Re: Vhost-pci RFC2.0

2017-04-19 Thread Jan Kiszka
On 2017-04-19 10:42, Wei Wang wrote: > On 04/19/2017 03:35 PM, Jan Kiszka wrote: >> On 2017-04-19 08:38, Wang, Wei W wrote: >>> Hi, >>> We made some design changes to the original vhost-pci design, and want >>> to open >>> a discussion about the latest design (labelled 2.0) and its extension >>>

Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-19 Thread Jiahuan Zhang
On 18 April 2017 at 18:26, Peter Maydell wrote: > On 18 April 2017 at 17:19, Jiahuan Zhang wrote: > > Dear QEMU developers, > > I am measuring the processor time for guest-host communication via > socket. > > The guest app is to write a 5M image to a serial device. > > The serial deivce is redir

Re: [Qemu-devel] Jailhouse on Ultrascale+ (ZCU102)

2017-04-19 Thread Jan Kiszka
On 2017-04-19 10:45, Peter Maydell wrote: > On 19 April 2017 at 05:37, Jan Kiszka wrote: >> On 2017-04-19 05:48, Constantin Petra wrote: >>> So from some reason, under QEMU something is not in place, but what can >>> that be? It would be convenient from our perspective, if it would work... >> >> I

Re: [Qemu-devel] blockdev-mirror , how to replace old nodename by new nodename ?

2017-04-19 Thread Fam Zheng
On Wed, 04/19 09:08, Alexandre DERUMIER wrote: > Hi, > > I'm trying to implement blockdev-mirror, to replace drive-mirror as we can > pass more options with blockdev-mirror. > > > I would like to mirror an attached blockdev to a new blockdev, then switch at > the end of block-job-complete, lik

[Qemu-devel] [PATCH] qemu-ga: add guest-network-get-interface-stat command

2017-04-19 Thread ZhiPeng Lu
we can get the network card statistics inside a virtual machine by guest-network-get-interface-stat command. it is very userful for us to monitor and analyze network traff. Signed-off-by: ZhiPeng Lu --- qga/commands-posix.c | 166 ++- qga/comman

Re: [Qemu-devel] [virtio-dev] Re: Vhost-pci RFC2.0

2017-04-19 Thread Wei Wang
On 04/19/2017 04:49 PM, Jan Kiszka wrote: On 2017-04-19 10:42, Wei Wang wrote: On 04/19/2017 03:35 PM, Jan Kiszka wrote: On 2017-04-19 08:38, Wang, Wei W wrote: Hi, We made some design changes to the original vhost-pci design, and want to open a discussion about the latest design (labelled

Re: [Qemu-devel] [Qemu-block] [PATCH 02/17] trace: Show blockjob actions via bytes, not sectors

2017-04-19 Thread Stefan Hajnoczi
On Mon, Apr 17, 2017 at 02:55:53PM -0500, Eric Blake wrote: > On 04/17/2017 02:18 PM, John Snow wrote: > >> @@ -346,13 +349,15 @@ static uint64_t coroutine_fn > >> mirror_iteration(MirrorBlockJob *s) > >> backup_do_cow_skip(void *job, int64_t start) "job %p start %"PRId64 > >> backup_do_cow_proc

Re: [Qemu-devel] [Qemu-block] migrate -b problems

2017-04-19 Thread Stefan Hajnoczi
On Tue, Apr 18, 2017 at 05:32:56PM +0200, Kevin Wolf wrote: > Am 18.04.2017 um 16:47 hat Stefan Hajnoczi geschrieben: > > On Wed, Apr 12, 2017 at 11:18:19AM +0200, Kevin Wolf wrote: > > > after getting assertion failure reports for block migration in the last > > > minute, we just hacked around it

Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-19 Thread Peter Maydell
On 19 April 2017 at 09:56, Jiahuan Zhang wrote: > Do you mean that it is reasonable for QEMU emulation consumes high CPU time > when doing host-guest interaction, since the interaction calls many QEMU > codes in the background? > Since my guest app is rather simple and no while() is included, acc

[Qemu-devel] [PATCH v2] iotests: 109: Filter out "len" of failed jobs

2017-04-19 Thread Fam Zheng
Mirror calculates job len from current I/O progress: s->common.len = s->common.offset + (cnt + s->sectors_in_flight) * BDRV_SECTOR_SIZE; The final "len" of a failed mirror job in iotests 109 depends on the subtle timing of the completion of read and write issued in the fir

Re: [Qemu-devel] [PATCH] qemu-ga: add guest-network-get-interface-stat command

2017-04-19 Thread Daniel P. Berrange
On Thu, Apr 20, 2017 at 12:57:08AM +0800, ZhiPeng Lu wrote: > we can get the network card statistics inside a virtual machine by > guest-network-get-interface-stat command. > it is very userful for us to monitor and analyze network traff. In most cases you can already monitor guest network traff

Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-19 Thread Jiahuan Zhang
On 19 April 2017 at 11:15, Peter Maydell wrote: > On 19 April 2017 at 09:56, Jiahuan Zhang wrote: > > Do you mean that it is reasonable for QEMU emulation consumes high CPU > time > > when doing host-guest interaction, since the interaction calls many QEMU > > codes in the background? > > > Sinc

Re: [Qemu-devel] [PATCH v4 1/1] qga: Add 'guest-get-users' command

2017-04-19 Thread Vinzenz Feenstra
> On Apr 14, 2017, at 12:09 AM, Michael Roth wrote: > > Quoting Vinzenz 'evilissimo' Feenstra (2017-04-13 05:41:17) >> From: Vinzenz Feenstra >> >> A command that will list all currently logged in users, and the time >> since when they are logged in. >> >> Examples: >> >> virsh # qemu-agent-

[Qemu-devel] [PATCH v5 0/1] qga: Add 'guest-get-users' command

2017-04-19 Thread Vinzenz 'evilissimo' Feenstra
From: Vinzenz Feenstra Changes since v4: - Removed unnecessary ifdefs - Win32 implementation now uses W32_FT_OFFSET instead of custom constant - Moved variable declarations to the top of the function - Also ensure that only the earliest login time on Windows is reported Changes since v3: - Remov

[Qemu-devel] [PATCH v5 1/1] qga: Add 'guest-get-users' command

2017-04-19 Thread Vinzenz 'evilissimo' Feenstra
From: Vinzenz Feenstra A command that will list all currently logged in users, and the time since when they are logged in. Examples: virsh # qemu-agent-command F25 '{ "execute": "guest-get-users" }' {"return":[{"login-time":1490622289.903835,"user":"root"}]} virsh # qemu-agent-command Win2k12r

Re: [Qemu-devel] [PATCH] MAINTAINERS: update Wen's email address

2017-04-19 Thread Stefan Hajnoczi
On Tue, Apr 18, 2017 at 11:08:13AM +0800, Changlong Xie wrote: > So he can get CC'ed on future patches and bugs for this feature > > Signed-off-by: Changlong Xie > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, applied to my block-next tree: https://github.com

Re: [Qemu-devel] [PATCH for-2.10 10/23] numa: mirror cpu to node mapping in MachineState::possible_cpus

2017-04-19 Thread Igor Mammedov
On Thu, 13 Apr 2017 10:58:05 -0300 Eduardo Habkost wrote: > On Wed, Mar 22, 2017 at 02:32:35PM +0100, Igor Mammedov wrote: > > Introduce machine_set_cpu_numa_node() helper that stores > > node mapping for CPU in MachineState::possible_cpus. > > CPU and node it belongs to is specified by 'props' a

Re: [Qemu-devel] [virtio-dev] Re: Vhost-pci RFC2.0

2017-04-19 Thread Jan Kiszka
On 2017-04-19 11:09, Wei Wang wrote: > On 04/19/2017 04:49 PM, Jan Kiszka wrote: >> On 2017-04-19 10:42, Wei Wang wrote: >>> On 04/19/2017 03:35 PM, Jan Kiszka wrote: On 2017-04-19 08:38, Wang, Wei W wrote: > Hi, >We made some design changes to the original vhost-pci design, >

Re: [Qemu-devel] qemu and own disk driver writing questions

2017-04-19 Thread Kevin Wolf
Am 18.04.2017 um 19:14 hat Stefan Hajnoczi geschrieben: > On Thu, Apr 13, 2017 at 01:57:17PM +0300, Vasiliy Tolstov wrote: > > Hi! If i want to develop some sort of qemu network block driver to own > > storage. I can write qemu driver or tcmu / scst userspace driver and > > attach to qemu block dev

Re: [Qemu-devel] blockdev-mirror , how to replace old nodename by new nodename ?

2017-04-19 Thread Alexandre DERUMIER
Ok thanks. I'll retry without replaces, but I'm pretty sure It was not working too. Also, I notice something strange, when I define the job-id (which is mandatory), it's replace the device option. (If I set a random job-id name, the mirroring is not working because it don't find the device).

[Qemu-devel] [PATCH v2 00/16] block: Protect AIO context change with perm API

2017-04-19 Thread Fam Zheng
v2: Address Stefan's comments: - Clean up redundancy in bdrv_format_default_perms change. - Add a test case to check both success/failure cases. A failure case is not possible at user interface level because of other checks we have, so write a unit test in tests/test-blk-perm.c

[Qemu-devel] [PATCH v2 01/16] block: Define BLK_PERM_AIO_CONTEXT_CHANGE

2017-04-19 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block.c | 2 ++ include/block/block.h | 7 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 1fbbb8d..5a3affb 100644 --- a/block.c +++ b/block.c @@ -1562,6 +1562,8 @@ static char *bdrv_perm_names(uint64_t perm)

Re: [Qemu-devel] [PATCH RESEND v4 1/4] X86: Move rdmsr/wrmsr functionality to standalone functions

2017-04-19 Thread Paolo Bonzini
> On Tue, Apr 18, 2017 at 05:38:01PM +0200, Paolo Bonzini wrote: > > On 18/04/2017 17:28, Eduardo Habkost wrote: > > > Hi, > > > > > > A few comments below: > > > > > > On Tue, Apr 18, 2017 at 09:39:43AM +0200, Julian Kirsch wrote: > > >> Add two new functions to provide read/write access to mod

[Qemu-devel] [PATCH v2 09/16] commit: Allow aio context change on s->base

2017-04-19 Thread Fam Zheng
The block job has the aio context change notifier, we should allow it here as well. Signed-off-by: Fam Zheng --- block/commit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/commit.c b/block/commit.c index c07ee00..1241dd3 100644 --- a/block/commit.c +++ b/block/com

[Qemu-devel] [PATCH v2 02/16] block-backend: Add blk_request_perm

2017-04-19 Thread Fam Zheng
This function tries to request, if not granted yet, for the given permissions. Signed-off-by: Fam Zheng --- block/block-backend.c | 12 include/sysemu/block-backend.h | 1 + 2 files changed, 13 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index

[Qemu-devel] [PATCH v2 04/16] blockjob: Allow aio context change on intermediate nodes

2017-04-19 Thread Fam Zheng
The intermediate nodes do work with aio context change, so allow that operations. Signed-off-by: Fam Zheng --- block/commit.c | 3 ++- block/mirror.c | 3 ++- block/stream.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/block/commit.c b/block/commit.c index 91d2c34..c07

[Qemu-devel] [PATCH v2 03/16] blockjob: Add BLK_PERM_AIO_CONTEXT_CHANGE shared perm on bs

2017-04-19 Thread Fam Zheng
Signed-off-by: Fam Zheng --- blockjob.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blockjob.c b/blockjob.c index 6e48932..b20fb86 100644 --- a/blockjob.c +++ b/blockjob.c @@ -214,6 +214,9 @@ void *block_job_create(const char *job_id, const BlockJobDriver *driver, } }

[Qemu-devel] [PATCH v2 05/16] block: Propagate BLK_PERM_AIO_CONTEXT_CHANGE down the graph

2017-04-19 Thread Fam Zheng
bdrv_set_aio_context can take care of children recursively, so it is okay to pass down the perm. Signed-off-by: Fam Zheng --- block.c | 10 ++ block/vvfat.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index 5a3affb..7e696e5 100644 --- a

[Qemu-devel] [PATCH v2 07/16] backup: Do initial aio context move of target via BB interface

2017-04-19 Thread Fam Zheng
The old aio context check is hacky because when it was added we didn't have the permission system to enforce a general rule. It only checks if the target BDS has a BB, which is in fact insufficient because there may be other BBs in the graph that cannot handle the aio context change. Do this throu

[Qemu-devel] [PATCH v2 06/16] backup: Request BLK_PERM_AIO_CONTEXT_CHANGE on target

2017-04-19 Thread Fam Zheng
What's done in the source's context change notifier is moving the target's context to follow the new one, so we request this permission here. Signed-off-by: Fam Zheng --- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/backup.c b/block/backup.c index a4fb

[Qemu-devel] [PATCH v2 10/16] mirror: Do initial aio context move of target via BB interface

2017-04-19 Thread Fam Zheng
While blockdev-backup tried to verify before moving target's aio context, the same is missing for blockdev-mirror. Now that we have the right interface, fix this as well. As a bonus, the aio context move is now conditional, which avoids some unnecessary operations in bdrv_set_aio_context. Signed-

[Qemu-devel] [PATCH v2 08/16] mirror: Request aio context change permission on target

2017-04-19 Thread Fam Zheng
What's done in the source's context change notifier is moving the target's context to follow the new one, so we request this permission here. Signed-off-by: Fam Zheng --- block/mirror.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/mirror.c b/block/mirror.c index 7ab3289..fe2fb7a 100

[Qemu-devel] [PATCH v2 13/16] blk: fix aio context loss on media change

2017-04-19 Thread Fam Zheng
From: Vladimir Sementsov-Ogievskiy If we have separate iothread for cdrom, we lose connection to it on qmp_blockdev_change_medium, as aio_context is on bds which is dropped and switched with new one. As an example result, after such media change we have crash on virtio_scsi_ctx_check: Assertion

Re: [Qemu-devel] [PATCH for-2.10 10/23] numa: mirror cpu to node mapping in MachineState::possible_cpus

2017-04-19 Thread Igor Mammedov
On Wed, 12 Apr 2017 18:15:29 -0300 Eduardo Habkost wrote: > On Wed, Mar 22, 2017 at 02:32:35PM +0100, Igor Mammedov wrote: > > Introduce machine_set_cpu_numa_node() helper that stores > > node mapping for CPU in MachineState::possible_cpus. > > CPU and node it belongs to is specified by 'props' a

[Qemu-devel] [PATCH v2 11/16] virtio-scsi: Request BLK_PERM_AIO_CONTEXT_CHANGE for dataplane

2017-04-19 Thread Fam Zheng
blk_set_aio_context is audited by perm API, so follow the protocol and request for permission first. Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index bd62d08..d130ba3 100644 --- a/hw/scs

[Qemu-devel] [PATCH v2 16/16] tests: Add test case for BLK_PERM_AIO_CONTEXT_CHANGE

2017-04-19 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/Makefile.include | 2 ++ tests/test-blk-perm.c | 59 ++ 2 files changed, 61 insertions(+) create mode 100644 tests/test-blk-perm.c diff --git a/tests/Makefile.include b/tests/Makefile.include index f3de81f..b38

[Qemu-devel] [PATCH v2 14/16] nbd: Allow BLK_PERM_AIO_CONTEXT_CHANGE on BB

2017-04-19 Thread Fam Zheng
This is safe because of the aio context notifier we'll register on this node. So allow it. Signed-off-by: Fam Zheng --- nbd/server.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nbd/server.c b/nbd/server.c index 924a1fe..a8f58fb 100644 --- a/nbd/server.c +++ b/nbd/se

[Qemu-devel] [PATCH v2 15/16] block: Add perm assertion on blk_set_aio_context

2017-04-19 Thread Fam Zheng
Now that all BB users comply with the BLK_PERM_AIO_CONTEXT_CHANGE rule, we can assert it. Signed-off-by: Fam Zheng --- block/block-backend.c | 4 1 file changed, 4 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index 6133917..166edac 100644 --- a/block/block-backe

[Qemu-devel] [PATCH v2 12/16] virtio-blk: Request BLK_PERM_AIO_CONTEXT_CHANGE for dataplane

2017-04-19 Thread Fam Zheng
blk_set_aio_context is audited by perm API, so follow the protocol and request for permission first. Previously the return code in error path was hardcoded as -EPERM, but returning 'r' is more meaningful here both for the new error and existing ones. Signed-off-by: Fam Zheng --- hw/block/datapl

Re: [Qemu-devel] [virtio-dev] Vhost-pci RFC2.0

2017-04-19 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 06:38:11AM +, Wang, Wei W wrote: > We made some design changes to the original vhost-pci design, and want to open > a discussion about the latest design (labelled 2.0) and its extension (2.1). > 2.0 design: One VM shares the entire memory of another VM > 2.1 design: One

Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-19 Thread Peter Maydell
On 19 April 2017 at 10:25, Jiahuan Zhang wrote: > On 19 April 2017 at 11:15, Peter Maydell wrote: >> What is happening is that the guest kernel's serial driver >> has a loop that (simplified) looks like this: >> >> do { >> if (pl011_read(REG_FR) & FR_TXFF) >> break; /* fifo full

Re: [Qemu-devel] [virtio-dev] Re: Vhost-pci RFC2.0

2017-04-19 Thread Wei Wang
On 04/19/2017 05:31 PM, Jan Kiszka wrote: On 2017-04-19 11:09, Wei Wang wrote: On 04/19/2017 04:49 PM, Jan Kiszka wrote: On 2017-04-19 10:42, Wei Wang wrote: On 04/19/2017 03:35 PM, Jan Kiszka wrote: On 2017-04-19 08:38, Wang, Wei W wrote: Hi, We made some design changes to the original

Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-19 Thread Jiahuan Zhang
On 19 April 2017 at 11:55, Peter Maydell wrote: > On 19 April 2017 at 10:25, Jiahuan Zhang wrote: > > On 19 April 2017 at 11:15, Peter Maydell > wrote: > >> What is happening is that the guest kernel's serial driver > >> has a loop that (simplified) looks like this: > >> > >> do { > >>

Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-19 Thread Peter Maydell
On 19 April 2017 at 11:04, Jiahuan Zhang wrote: > Okay. Thank you for pointing this out. > I would like to make a new serial device based on pl011, > but containing a buffer for guest-to-host data transfer. As I've said, the PL011 is inherently byte at a time. If you want better than that, I reco

Re: [Qemu-devel] What's the next QEMU version after 2.9 ? (or: when is a good point in time to get rid of old interfaces)

2017-04-19 Thread Gerd Hoffmann
Hi, > > There is -global, which is actually used by libvirt to configure > > built-in floppy devices. But as the name suggests it sets properties > > globally, i.e. for all instances. Which works in this specific use > > case, as there can be only one floppy controller per machine, but I > >

Re: [Qemu-devel] What's the next QEMU version after 2.9 ? (or: when is a good point in time to get rid of old interfaces)

2017-04-19 Thread Gerd Hoffmann
Hi, > >> We probably want something like > >> -qom-set-property {objpath|alias}.prop=value > > Makes sense to me. > > We should be able to desugar -net, ... to -qom-set-property then. > However, the desugaring would be machine-specific in general. Yes. Establishing rules for alias names fo

Re: [Qemu-devel] [PATCH v2 for-2.10 1/1] qemu-iotests: _cleanup_qemu must be called on exit

2017-04-19 Thread Fam Zheng
On Tue, 04/18 15:42, Jeff Cody wrote: > > One idea presented in an earlier thread was that common.rc should create > > a subdirectory per test (rather than all tests sharing scratch/), and > > then common.rc itself install the cleanup hook that wipes out the entire > > subdirectory (or maybe even a

Re: [Qemu-devel] [virtio-dev] Re: Vhost-pci RFC2.0

2017-04-19 Thread Jan Kiszka
On 2017-04-19 12:02, Wei Wang wrote: > The design presented here intends to use only one BAR to expose > both TX and RX. The two VMs share an intermediate memory > here, why couldn't we give the same permission to TX and RX? > For security and/or safety reasons: the TX side can

Re: [Qemu-devel] [virtio-dev] Vhost-pci RFC2.0

2017-04-19 Thread Wei Wang
On 04/19/2017 05:57 PM, Stefan Hajnoczi wrote: On Wed, Apr 19, 2017 at 06:38:11AM +, Wang, Wei W wrote: We made some design changes to the original vhost-pci design, and want to open a discussion about the latest design (labelled 2.0) and its extension (2.1). 2.0 design: One VM shares the en

Re: [Qemu-devel] 答复: [PATCH 0/5] mc146818rtc: fix Windows VM clock faster

2017-04-19 Thread Hailiang Zhang
On 2017/4/19 10:02, Xiao Guangrong wrote: On 04/13/2017 05:38 PM, Hailiang Zhang wrote: On 2017/4/13 17:35, Xiao Guangrong wrote: On 04/13/2017 05:29 PM, Hailiang Zhang wrote: On 2017/4/13 17:18, Xiao Guangrong wrote: On 04/13/2017 05:05 PM, Zhanghailiang wrote: Hi, -邮件原件- 发件人: kvm

Re: [Qemu-devel] blockdev-mirror , how to replace old nodename by new nodename ?

2017-04-19 Thread Kashyap Chamarthy
On Wed, Apr 19, 2017 at 09:08:20AM +0200, Alexandre DERUMIER wrote: > Hi, > > I'm trying to implement blockdev-mirror, to replace drive-mirror as we > can pass more options with blockdev-mirror. > > > I would like to mirror an attached blockdev to a new blockdev, then > switch at the end of block

[Qemu-devel] [PATCH v6 1/1] qga: Add `guest-get-timezone` command

2017-04-19 Thread Vinzenz 'evilissimo' Feenstra
From: Vinzenz Feenstra Adds a new command `guest-get-timezone` reporting the currently configured timezone on the system. The information on what timezone is currently is configured is useful in case of Windows VMs where the offset of the hardware clock is required to have the same offset. This c

[Qemu-devel] [PATCH v6 0/1] qga: Add `guest-get-timezone` command

2017-04-19 Thread Vinzenz 'evilissimo' Feenstra
From: Vinzenz Feenstra Changes since v5: - Dropped unnecessary g_time_zone_unref in error handling - Made implementation check for glib 2.28 or higher - Move variable declaration to function top Vinzenz Feenstra (1): qga: Add `guest-get-timezone` command qga/commands.c | 38 +++

Re: [Qemu-devel] [virtio-dev] Re: Vhost-pci RFC2.0

2017-04-19 Thread Wei Wang
On 04/19/2017 06:36 PM, Jan Kiszka wrote: On 2017-04-19 12:02, Wei Wang wrote: The design presented here intends to use only one BAR to expose both TX and RX. The two VMs share an intermediate memory here, why couldn't we give the same permission to TX and RX? For security and/or safety reason

Re: [Qemu-devel] 答复: [PATCH 0/5] mc146818rtc: fix Windows VM clock faster

2017-04-19 Thread Xiao Guangrong
On 04/19/2017 06:41 PM, Hailiang Zhang wrote: Hi Hailiang, Does this patchset work for you? :) Yes, i think it works for us, nice work :) Appreciate your test, Hailiang! Paolo, any comment? :)

Re: [Qemu-devel] [Qemu-block] migrate -b problems

2017-04-19 Thread Dr. David Alan Gilbert
* Kevin Wolf (kw...@redhat.com) wrote: > Am 18.04.2017 um 16:47 hat Stefan Hajnoczi geschrieben: > > On Wed, Apr 12, 2017 at 11:18:19AM +0200, Kevin Wolf wrote: > > > after getting assertion failure reports for block migration in the last > > > minute, we just hacked around it by commenting out op

Re: [Qemu-devel] [PATCH for-2.10 07/23] pc: add node-id property to CPU

2017-04-19 Thread Igor Mammedov
On Wed, 12 Apr 2017 18:02:39 -0300 Eduardo Habkost wrote: > On Wed, Mar 22, 2017 at 02:32:32PM +0100, Igor Mammedov wrote: > > it will allow switching from cpu_index to property based > > numa mapping in follow up patches. > > I am not sure I understand all the consequences of this, so I > wil

Re: [Qemu-devel] [Qemu-block] migrate -b problems

2017-04-19 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Kevin Wolf (kw...@redhat.com) wrote: >> Am 18.04.2017 um 16:47 hat Stefan Hajnoczi geschrieben: >> > On Wed, Apr 12, 2017 at 11:18:19AM +0200, Kevin Wolf wrote: >> > > after getting assertion failure reports for block migration in the last >> > > minute, we just

Re: [Qemu-devel] [Qemu-block] migrate -b problems

2017-04-19 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert" wrote: > > * Kevin Wolf (kw...@redhat.com) wrote: > >> Am 18.04.2017 um 16:47 hat Stefan Hajnoczi geschrieben: > >> > On Wed, Apr 12, 2017 at 11:18:19AM +0200, Kevin Wolf wrote: > >> > > after getting assertion failure reports

Re: [Qemu-devel] [virtio-dev] Re: Vhost-pci RFC2.0

2017-04-19 Thread Jan Kiszka
On 2017-04-19 13:11, Wei Wang wrote: > On 04/19/2017 06:36 PM, Jan Kiszka wrote: >> On 2017-04-19 12:02, Wei Wang wrote: >>> The design presented here intends to use only one BAR to expose >>> both TX and RX. The two VMs share an intermediate memory >>> here, why couldn't we give the sa

Re: [Qemu-devel] [PATCH v2] hw/arm/virt: generate 64-bit addressable ACPI objects

2017-04-19 Thread Igor Mammedov
On Fri, 7 Apr 2017 15:41:38 +0100 Ard Biesheuvel wrote: > Our current ACPI table generation code limits the placement of ACPI > tables to 32-bit addressable memory, in order to be able to emit the > root pointer (RSDP) and root table (RSDT) using table types from the > ACPI 1.0 days. > > Since

Re: [Qemu-devel] [RFC for-3.0 4/4] block/qcow2-rust: Register block driver

2017-04-19 Thread Fam Zheng
On Sat, 04/01 17:57, Max Reitz wrote: > +/* This is just for the module loading system to detect this driver */ > +static BlockDriver _ __attribute__((used)) = { > +.format_name = "qcow2-rust", > +}; You see why I didn't like that system in the first place. Fam

Re: [Qemu-devel] [PATCH] qemu-ga: add guest-network-get-interface-stat command

2017-04-19 Thread Cornelia Huck
On Thu, 20 Apr 2017 00:57:08 +0800 ZhiPeng Lu wrote: > diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json > index a02dbf2..60111dc 100644 > --- a/qga/qapi-schema.json > +++ b/qga/qapi-schema.json > @@ -1042,3 +1042,37 @@ >'data':{ 'path': 'str', '*arg': ['str'], '*env': ['str'], >

Re: [Qemu-devel] [PATCH] qemu-ga: add guest-network-get-interface-stat command

2017-04-19 Thread Daniel P. Berrange
On Wed, Apr 19, 2017 at 01:41:47PM +0200, Cornelia Huck wrote: > On Thu, 20 Apr 2017 00:57:08 +0800 > ZhiPeng Lu wrote: > > > diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json > > index a02dbf2..60111dc 100644 > > --- a/qga/qapi-schema.json > > +++ b/qga/qapi-schema.json > > @@ -1042,3 +10

Re: [Qemu-devel] [Qemu-block] migrate -b problems

2017-04-19 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> "Dr. David Alan Gilbert" wrote: >> > * Kevin Wolf (kw...@redhat.com) wrote: >> >> Am 18.04.2017 um 16:47 hat Stefan Hajnoczi geschrieben: >> >> > On Wed, Apr 12, 2017 at 11:18:19AM +0200, Kevin Wolf wrote: >> >> > >

Re: [Qemu-devel] [PATCH] qemu-ga: add guest-network-get-interface-stat command

2017-04-19 Thread Cornelia Huck
On Wed, 19 Apr 2017 12:50:36 +0100 "Daniel P. Berrange" wrote: > On Wed, Apr 19, 2017 at 01:41:47PM +0200, Cornelia Huck wrote: > > On Thu, 20 Apr 2017 00:57:08 +0800 > > ZhiPeng Lu wrote: > > > > > diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json > > > index a02dbf2..60111dc 100644 > >

Re: [Qemu-devel] [RFC v2 3/6] pci: Rename and change signatures of pci_bus_new() & related functions

2017-04-19 Thread Cornelia Huck
On Tue, 18 Apr 2017 22:42:07 -0300 Eduardo Habkost wrote: > On Wed, Apr 19, 2017 at 10:29:26AM +1000, David Gibson wrote: > > On Tue, Apr 18, 2017 at 07:17:21PM -0300, Eduardo Habkost wrote: > > > pci_bus_new*() and pci_register_bus() work only when the 'parent' > > > argument is a PCI_HOST_BRIDG

Re: [Qemu-devel] [PATCH v2 for-2.10 1/1] qemu-iotests: _cleanup_qemu must be called on exit

2017-04-19 Thread Max Reitz
On 19.04.2017 12:36, Fam Zheng wrote: > On Tue, 04/18 15:42, Jeff Cody wrote: >>> One idea presented in an earlier thread was that common.rc should create >>> a subdirectory per test (rather than all tests sharing scratch/), and >>> then common.rc itself install the cleanup hook that wipes out the

Re: [Qemu-devel] [PATCH v3 1/6] vmdk: Move vmdk_find_offset_in_cluster() to the top

2017-04-19 Thread Fam Zheng
On Mon, 04/10 18:34, Ashijeet Acharya wrote: > On Sat, Apr 1, 2017 at 8:14 PM, Ashijeet Acharya > wrote: > > Move the existing vmdk_find_offset_in_cluster() function to the top of > > the driver. Also, introduce a new helper function size_to_clusters() > > which returns the number of clusters for

Re: [Qemu-devel] [PATCH v3 2/6] vmdk: Rename get_whole_cluster() to vmdk_perform_cow()

2017-04-19 Thread Fam Zheng
On Sat, 04/01 20:14, Ashijeet Acharya wrote: > Rename the existing function get_whole_cluster() to vmdk_perform_cow() > as its sole purpose is to perform COW for the first and the last > allocated clusters if needed. > > Signed-off-by: Ashijeet Acharya > --- > block/vmdk.c | 23 ++---

Re: [Qemu-devel] [RFC for-3.0 4/4] block/qcow2-rust: Register block driver

2017-04-19 Thread Max Reitz
On 19.04.2017 13:28, Fam Zheng wrote: > On Sat, 04/01 17:57, Max Reitz wrote: >> +/* This is just for the module loading system to detect this driver */ >> +static BlockDriver _ __attribute__((used)) = { >> +.format_name = "qcow2-rust", >> +}; > > You see why I didn't like that system in the f

Re: [Qemu-devel] [RFC v2 6/6] pci: Remove unnecessary PCIBus variables

2017-04-19 Thread Cornelia Huck
On Tue, 18 Apr 2017 19:17:24 -0300 Eduardo Habkost wrote: > "phb->bus" is a short expression, there's no need for an extra variable > just to hold its value. > > Generated using the following Coccinelle patch: > > @@ > identifier b; > identifier phb; > typedef PCIBus; > @@ >

Re: [Qemu-devel] blockdev-mirror , how to replace old nodename by new nodename ?

2017-04-19 Thread Alexandre DERUMIER
Thanks I'll try. (I'm on 2.9.0-rc4) can you send your initial qemu command line ? also : >>"execute":"blockdev-add", >>"arguments":{ >>"driver":"qcow2", >>"node-name":"node1", ... then >>"execute":"blockdev-mirror", >>"arguments":{ >>"device":"foo", >>"job-id":"job-2", >>"target":"nod

Re: [Qemu-devel] [Qemu-block] migrate -b problems

2017-04-19 Thread Kevin Wolf
Am 19.04.2017 um 13:13 hat Dr. David Alan Gilbert geschrieben: > * Kevin Wolf (kw...@redhat.com) wrote: > > Am 18.04.2017 um 16:47 hat Stefan Hajnoczi geschrieben: > > > On Wed, Apr 12, 2017 at 11:18:19AM +0200, Kevin Wolf wrote: > > > > after getting assertion failure reports for block migration i

Re: [Qemu-devel] [PATCH v2 for-2.10 1/1] qemu-iotests: _cleanup_qemu must be called on exit

2017-04-19 Thread Jeff Cody
On Wed, Apr 19, 2017 at 02:13:35PM +0200, Max Reitz wrote: > On 19.04.2017 12:36, Fam Zheng wrote: > > On Tue, 04/18 15:42, Jeff Cody wrote: > >>> One idea presented in an earlier thread was that common.rc should create > >>> a subdirectory per test (rather than all tests sharing scratch/), and > >

Re: [Qemu-devel] [PATCH for-2.10 3/3] qemu-img/convert: Move bs_n > 1 && -B check down

2017-04-19 Thread Max Reitz
On 13.04.2017 23:17, Eric Blake wrote: > On 04/13/2017 03:34 PM, Max Reitz wrote: >> It does not make much sense to use a backing image for the target when >> you concatenate multiple images (because then there is no correspondence >> between the source images' backing files and the target's); but

[Qemu-devel] [PATCH 1/1] qga-win: fix 1357789 - installation on localized windows - acquire user and group names by well-known SIDs

2017-04-19 Thread Daniel Rempel
Replace hardcoded user and group names ("Administrators", "SYSTEM") with the ones acquired from system. Windows uses localized strings for these names and it may cause the installation to fail. Windows has Well-known SIDs for "Administrators" group and "SYSTEM" user so they were used to identify

[Qemu-devel] [Bug 1523246] Re: Virtio-blk does not support TRIM

2017-04-19 Thread Mike Mol
Granted, it's been there since October of 2014. http://wiki.qemu- project.org/index.php?title=ToDo/Block&oldid=4410#virtio- blk_discard_support_.5BPeter_Lieven.5D -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.

Re: [Qemu-devel] [PATCH v2 for-2.10 1/1] qemu-iotests: _cleanup_qemu must be called on exit

2017-04-19 Thread Max Reitz
On 19.04.2017 14:36, Jeff Cody wrote: > On Wed, Apr 19, 2017 at 02:13:35PM +0200, Max Reitz wrote: >> On 19.04.2017 12:36, Fam Zheng wrote: >>> On Tue, 04/18 15:42, Jeff Cody wrote: > One idea presented in an earlier thread was that common.rc should create > a subdirectory per test (rather

[Qemu-devel] [Bug 1523246] Re: Virtio-blk does not support TRIM

2017-04-19 Thread Mike Mol
> Virtio will never support discard requests. Why? If you don't want to write a treatise on the subject, perhaps point at an LWN article or LKML thread where that conclusion was discussed or reached. > So, please rename bug to "Feature request: Refuse to operate if virtio + discard is requested"

[Qemu-devel] [Bug 1523246] Re: Virtio-blk does not support TRIM

2017-04-19 Thread Mike Mol
discard support for virtio-blk is on the QEMU TODO list: http://wiki.qemu-project.org/ToDo/Block#virtio- blk_discard_support_.5BPeter_Lieven.5D -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1523246

Re: [Qemu-devel] [RFC v2 3/6] pci: Rename and change signatures of pci_bus_new() & related functions

2017-04-19 Thread Eduardo Habkost
On Wed, Apr 19, 2017 at 09:41:42AM +0100, Peter Maydell wrote: > On 18 April 2017 at 23:17, Eduardo Habkost wrote: > > pci_bus_new*() and pci_register_bus() work only when the 'parent' > > argument is a PCI_HOST_BRIDGE object. Rename them to reflect that they > > are meant to initialize a bus that

Re: [Qemu-devel] [PATCH v3 3/6] vmdk: New functions to assist allocating multiple clusters

2017-04-19 Thread Fam Zheng
On Sat, 04/01 20:14, Ashijeet Acharya wrote: > Move the cluster tables loading code out of the existing > get_cluster_offset() function to avoid code duplication and implement it > in separate get_cluster_table() and vmdk_L2load() functions. > > Introduce two new helper functions handle_alloc() an

  1   2   3   4   >