Re: [Qemu-devel] [PATCH V6 07/10] migration: add bitmap for copied page

2017-05-23 Thread Peter Xu
On Tue, May 23, 2017 at 02:31:08PM +0300, Alexey Perevalov wrote: > This patch adds ability to track down already copied > pages, it's necessary for calculation vCPU block time in > postcopy migration feature and maybe for restore after > postcopy migration failure. > > Functions which work with R

Re: [Qemu-devel] [PATCH V6 04/10] migration: split ufd_version_check onto receive/request features part

2017-05-23 Thread Alexey
Hi, Peter, On Wed, May 24, 2017 at 10:36:29AM +0800, Peter Xu wrote: > On Tue, May 23, 2017 at 02:31:05PM +0300, Alexey Perevalov wrote: > > This modification is necessary for userfault fd features which are > > required to be requested from userspace. > > UFFD_FEATURE_THREAD_ID is a one of such "

Re: [Qemu-devel] [PATCH v3 1/3] migration: Introduce unregister_savevm_live()

2017-05-23 Thread David Gibson
On Wed, May 24, 2017 at 08:28:59AM +0200, Juan Quintela wrote: > Bharata B Rao wrote: > > Introduce a new function unregister_savevm_live() to unregister the vmstate > > handlers registered via register_savevm_live(). > > > > register_savevm() allocates SaveVMHandlers while register_savevm_live()

Re: [Qemu-devel] [PATCH v3 1/3] migration: Introduce unregister_savevm_live()

2017-05-23 Thread Juan Quintela
Bharata B Rao wrote: > Introduce a new function unregister_savevm_live() to unregister the vmstate > handlers registered via register_savevm_live(). > > register_savevm() allocates SaveVMHandlers while register_savevm_live() > gets passed with SaveVMHandlers. During unregistration, we want to > f

Re: [Qemu-devel] [PATCH 1/4] qemu-io: Don't die on second open

2017-05-23 Thread Fam Zheng
On Thu, 05/18 21:32, Eric Blake wrote: > Failure to open a file in qemu-io should normally return 1 on > failure to end the command loop, on the presumption that when > batching commands all on the command line, failure to open means > nothing further can be attempted. But when executing qemu-io >

Re: [Qemu-devel] [PATCH 0/4] Block migration (migrate -b) fixes

2017-05-23 Thread Fam Zheng
On Tue, 05/23 16:01, Kevin Wolf wrote: > Kevin Wolf (4): > block: Fix anonymous BBs in blk_root_inactivate() > migration: Inactivate images after .save_live_complete_precopy() > migration/block: Clean up BBs in block_save_complete() > qemu-iotests: Block migration test Reviewed-by: Fam Zhe

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/4] spapr: add pre_plug function for memory

2017-05-23 Thread David Gibson
On Tue, May 23, 2017 at 06:09:00PM +0200, Laurent Vivier wrote: > On 23/05/2017 17:28, Greg Kurz wrote: > > On Tue, 23 May 2017 13:18:09 +0200 > > Laurent Vivier wrote: > > > >> This allows to manage errors before the memory > >> has started to be hotplugged. We already have > >> the function for

Re: [Qemu-devel] [PATCH 3/4] spapr: disable hotplugging without OS

2017-05-23 Thread David Gibson
On Tue, May 23, 2017 at 01:18:11PM +0200, Laurent Vivier wrote: > If the OS is not started, QEMU sends an event to the OS > that is lost and cannot be recovered. An unplug is not > able to restore QEMU in a coherent state. > So, while the OS is not started, disable CPU and memory hotplug. > We use

Re: [Qemu-devel] [PATCH 2/4] spapr: add option vector 6

2017-05-23 Thread David Gibson
On Tue, May 23, 2017 at 01:18:10PM +0200, Laurent Vivier wrote: > This allows to know when the OS is started and its type. > > Signed-off-by: Laurent Vivier This seems a bit oddly complex for the task at hand. AFAICT you're never actually using the value in OV6, just whether it's set or not. So

Re: [Qemu-devel] [PATCH 1/1] Improve Cocoa modifier key handling

2017-05-23 Thread Gerd Hoffmann
Hi, > After a little more experimentation I think that the approach in this > patch is the right one. modifierFlags doesn't[1] indicate which > instance of a modifier (ie: left or right) is being held. Ok, makes sense. One more thing: I think capslock must be handled differently as keydown +

Re: [Qemu-devel] [PATCH v3 3/3] spapr: Fix migration of Radix guests

2017-05-23 Thread Suraj Jitindar Singh
On Wed, 2017-05-24 at 10:23 +0530, Bharata B Rao wrote: > Fix migration of radix guests by ensuring that we issue > KVM_PPC_CONFIGURE_V3_MMU for radix case post migration. > > Reported-by: Nageswara R Sastry > Signed-off-by: Bharata B Rao Reviewed-by: Suraj Jitindar Singh > --- >  hw/ppc/spap

Re: [Qemu-devel] [Qemu-arm] [PATCH 1/2] hw/adc: Add basic Aspeed ADC model

2017-05-23 Thread Andrew Jeffery
On Wed, 2017-05-24 at 02:15 -0300, Philippe Mathieu-Daudé wrote: > Hi Andrew, > > On 05/22/2017 02:14 AM, Andrew Jeffery wrote: > > On Mon, 2017-05-22 at 03:15 +, Ryan Chen wrote: > > > In ASPEED SoC chip, all register access have following rule. > > > Most of controller write access is only s

Re: [Qemu-devel] [PATCH v2] qapi: Fix some QMP documentation regressions

2017-05-23 Thread Markus Armbruster
Eric Blake writes: > In the process of getting rid of docs/qmp-commands.txt, we managed > to regress on some of the text that changed after the point where > the move was first branched and when the move actually occurred. > For example, commit 3282eca for blockdev-snapshot re-added the > extra "

[Qemu-devel] [PATCH] Fix nmi injection failure when vcpu got blocked

2017-05-23 Thread Zhuangyanying
From: ZhuangYanying Recently I found NMI could not be injected to vm via libvirt API Reproduce the problem: 1 use guest of redhat 7.3 2 disable nmi_watchdog and trig spinlock deadlock inside the guest check the running vcpu thread, make sure not vcpu0 3 inject NMI into the guest via libvirt API "

Re: [Qemu-devel] [PATCH v2 09/13] vvfat: correctly create base short names for non-ASCII filenames

2017-05-23 Thread Hervé Poussineau
Hi Philippe, Le 24/05/2017 à 06:17, Philippe Mathieu-Daudé a écrit : Hi Hervé, On 05/22/2017 06:12 PM, Hervé Poussineau wrote: More specifically, create short name from filename and change blacklist of invalid chars to whitelist of valid chars. Windows 9x also now correctly see long file name

Re: [Qemu-devel] [PATCH v5 1/4] net/rocker: Remove the dead error handling

2017-05-23 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi Markus, > > On 05/23/2017 06:27 AM, Markus Armbruster wrote: > [...] >> There's one more cleanup opportunity: >> > [...] >>> if (pci_dma_read(dev, le64_to_cpu(info->desc.buf_addr), info->buf, >>> size)) { >>> return NULL; >>> } >> >> None of

Re: [Qemu-devel] [PATCH v3 02/24] docker: add --include-files argument to 'build' command

2017-05-23 Thread Fam Zheng
On Wed, 05/24 13:21, Fam Zheng wrote: > > diff --git a/tests/docker/docker.py b/tests/docker/docker.py > > index 6ddc6e4c2a..68cca25f89 100755 > > --- a/tests/docker/docker.py > > +++ b/tests/docker/docker.py > > @@ -237,6 +237,11 @@ class BuildCommand(SubCommand): > >

Re: [Qemu-devel] [PATCH v3 00/24] docker/shippable: cross-build mipsel and powerpc targets

2017-05-23 Thread Fam Zheng
On Sun, 05/21 00:29, Philippe Mathieu-Daudé wrote: > This patchset add 2 more architectures to the cross-build farm. > > There is still some issue trying to cross-build mips64el-softmmu, it seems the > cross tools use the system outdated libfdt instead of the one checkouted in > the > dtc submodu

Re: [Qemu-devel] [PATCH v3 03/24] docker: rebuild image if 'extra files' checksum does not match

2017-05-23 Thread Fam Zheng
On Sun, 05/21 00:29, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/docker/docker.py | 15 --- > 1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/tests/docker/docker.py b/tests/docker/docker.py > index eef92a54f1..0dd6a3304f 10075

Re: [Qemu-devel] [PATCH v3 02/24] docker: add --include-files argument to 'build' command

2017-05-23 Thread Fam Zheng
On Sun, 05/21 00:29, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/docker/Makefile.include | 5 - > tests/docker/docker.py| 12 +--- > 2 files changed, 13 insertions(+), 4 deletions(-) > > diff --git a/tests/docker/Makefile.include b/tes

Re: [Qemu-devel] [Qemu-arm] [PATCH 1/2] hw/adc: Add basic Aspeed ADC model

2017-05-23 Thread Philippe Mathieu-Daudé
Hi Andrew, On 05/22/2017 02:14 AM, Andrew Jeffery wrote: On Mon, 2017-05-22 at 03:15 +, Ryan Chen wrote: In ASPEED SoC chip, all register access have following rule. Most of controller write access is only support 32bit access. Read is support 8bits/16bits/32bits. This makes sens thinking

[Qemu-devel] [PATCH v3 3/3] spapr: Fix migration of Radix guests

2017-05-23 Thread Bharata B Rao
Fix migration of radix guests by ensuring that we issue KVM_PPC_CONFIGURE_V3_MMU for radix case post migration. Reported-by: Nageswara R Sastry Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index

[Qemu-devel] [PATCH v3 1/3] migration: Introduce unregister_savevm_live()

2017-05-23 Thread Bharata B Rao
Introduce a new function unregister_savevm_live() to unregister the vmstate handlers registered via register_savevm_live(). register_savevm() allocates SaveVMHandlers while register_savevm_live() gets passed with SaveVMHandlers. During unregistration, we want to free SaveVMHandlers in the former

[Qemu-devel] [PATCH v3 0/3] ppc/spapr: Fix migration of radix guests

2017-05-23 Thread Bharata B Rao
This patchset fixes the migration of sPAPR radix guests. Changes in v3: -- - Dropped the patch that made h_register_process_table flags global as it is not required with the changed logic. - The post load logic is now same for both TCG as well as KVM radix guests. Also ensured that

[Qemu-devel] [PATCH v3 2/3] spapr: Unregister HPT savevm handlers for radix guests

2017-05-23 Thread Bharata B Rao
HPT gets created by default for TCG guests and later when the guest turns out to be a radix guest, the HPT is destroyed when guest does H_REGISTER_PROC_TBL hcall. Let HTAB savevm handlers registration and unregistration follow the same model so that we don't end up having unrequired HTAB savevm han

Re: [Qemu-devel] [PATCH v3 15/24] docker: add powerpc build target

2017-05-23 Thread Philippe Mathieu-Daudé
Hi Alex, On 05/22/2017 11:08 AM, Alex Bennée wrote: Philippe Mathieu-Daudé writes: Signed-off-by: Philippe Mathieu-Daudé --- tests/docker/Makefile.include | 4 +-- .../docker/dockerfiles/debian-powerpc-cross.docker | 40 ++ 2 files changed, 42 inse

Re: [Qemu-devel] [PATCH v5 2/4] net/rocker: Plug memory leak in pci_rocker_init()

2017-05-23 Thread Philippe Mathieu-Daudé
On 05/23/2017 01:04 AM, Mao Zhongyi wrote: pci_rocker_init() leaks a World when the name more than 9 chars, then return a negative value directly, doesn't make a correct cleanup. So add a new goto label to fix it. Signed-off-by: Mao Zhongyi Reviewed-by: Markus Armbruster Reviewed-by: Philipp

Re: [Qemu-devel] [PATCH v5 3/4] net/rocker: Convert to realize()

2017-05-23 Thread Philippe Mathieu-Daudé
On 05/23/2017 01:04 AM, Mao Zhongyi wrote: The rocker device still implements the old PCIDeviceClass .init() instead of the new .realize(). All devices need to be converted to .realize(). .init() reports errors with fprintf() and return 0 on success, negative number on failure. Meanwhile, when -

Re: [Qemu-devel] [PATCH v5 4/4] net/rocker: Fix the unusual macro name

2017-05-23 Thread Philippe Mathieu-Daudé
On 05/23/2017 01:04 AM, Mao Zhongyi wrote: Suggested-by: Markus Armbruster Signed-off-by: Mao Zhongyi Reviewed-by: Philippe Mathieu-Daudé --- hw/net/rocker/rocker.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/net/rocker/rocker.c b/hw/net/rocke

Re: [Qemu-devel] [PATCH v5 1/4] net/rocker: Remove the dead error handling

2017-05-23 Thread Philippe Mathieu-Daudé
Hi Markus, On 05/23/2017 06:27 AM, Markus Armbruster wrote: [...] There's one more cleanup opportunity: [...] if (pci_dma_read(dev, le64_to_cpu(info->desc.buf_addr), info->buf, size)) { return NULL; } None of the pci_dma_read() calls outside rocker check the return value.

Re: [Qemu-devel] [PATCH v2 13/13] vvfat: change OEM name to 'MSWIN4.1'

2017-05-23 Thread Philippe Mathieu-Daudé
On 05/23/2017 04:41 PM, Hervé Poussineau wrote: Hi Philippe, Le 23/05/2017 à 06:23, Philippe Mathieu-Daudé a écrit : Hi Hervé, On 05/22/2017 06:12 PM, Hervé Poussineau wrote: According to specification: "'MSWIN4.1' is the recommanded setting, because it is the setting least likely to cause co

Re: [Qemu-devel] [PATCH v2 12/13] vvfat: handle KANJI lead byte 0xe5

2017-05-23 Thread Philippe Mathieu-Daudé
Hi Hervé, You explained in the cover "fix problems detected by disk checking utilities in read-only mode", do you think it would be doable to have unit-tests for those corner cases? On 05/22/2017 06:12 PM, Hervé Poussineau wrote: Specification: "FAT: General overview of on-disk format" v1.03

Re: [Qemu-devel] [PATCH] net/rocker: Cleanup the useless return value check

2017-05-23 Thread Mao Zhongyi
On 05/24/2017 11:31 AM, Jason Wang wrote: On 2017年05月24日 10:57, Mao Zhongyi wrote: None of pci_dma_read()'s callers check the return value except rocker. There is no need to check it because it always return 0. So the check work is useless. Remove it entirely. Suggested-by: Markus Armbruste

Re: [Qemu-devel] [PATCH v2 09/13] vvfat: correctly create base short names for non-ASCII filenames

2017-05-23 Thread Philippe Mathieu-Daudé
Hi Hervé, On 05/22/2017 06:12 PM, Hervé Poussineau wrote: More specifically, create short name from filename and change blacklist of invalid chars to whitelist of valid chars. Windows 9x also now correctly see long file names of filenames containing a space, but Scandisk still complains about

Re: [Qemu-devel] [PATCH v2 05/13] vvfat: introduce offset_to_bootsector, offset_to_fat and offset_to_root_dir

2017-05-23 Thread Philippe Mathieu-Daudé
Hi Hervé, On 05/22/2017 06:11 PM, Hervé Poussineau wrote: - offset_to_bootsector is the number of sectors up to FAT bootsector - offset_to_fat is the number of sectors up to first File Allocation Table - offset_to_root_dir is the number of sectors up to root directory sector Eventually your co

Re: [Qemu-devel] [PATCH] docker: Add flex and bison to centos6 image

2017-05-23 Thread Philippe Mathieu-Daudé
On 05/23/2017 09:52 PM, Fam Zheng wrote: Currently there are warnings about flex and bison being missing when building in the centos6 image: make[1]: flex: Command not found BISON dtc-parser.tab.c make[1]: bison: Command not found Add them. I had the same issue with debia

Re: [Qemu-devel] [PATCH V6 06/10] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-05-23 Thread Peter Xu
On Tue, May 23, 2017 at 02:31:07PM +0300, Alexey Perevalov wrote: > This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, > in case when this feature is provided by kernel. > > PostcopyBlocktimeContext is incapsulated inside postcopy-ram.c, > due to it's postcopy only feature. > Also

Re: [Qemu-devel] [PATCH] net/rocker: Cleanup the useless return value check

2017-05-23 Thread Jason Wang
On 2017年05月24日 10:57, Mao Zhongyi wrote: None of pci_dma_read()'s callers check the return value except rocker. There is no need to check it because it always return 0. So the check work is useless. Remove it entirely. Suggested-by: Markus Armbruster Signed-off-by: Mao Zhongyi --- hw/net/r

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [PATCH v2 00/16] Vhost-pci for inter-VM communication

2017-05-23 Thread Jason Wang
On 2017年05月23日 18:48, Wei Wang wrote: On 05/23/2017 02:32 PM, Jason Wang wrote: On 2017年05月23日 13:47, Wei Wang wrote: On 05/23/2017 10:08 AM, Jason Wang wrote: On 2017年05月22日 19:46, Wang, Wei W wrote: On Monday, May 22, 2017 10:28 AM, Jason Wang wrote: On 2017年05月19日 23:33, Stefan Hajn

Re: [Qemu-devel] [virtio-dev] Re: [PATCH RFC] virtio-net: enable configurable tx queue size

2017-05-23 Thread Jason Wang
On 2017年05月23日 18:36, Wei Wang wrote: On 05/23/2017 02:24 PM, Jason Wang wrote: On 2017年05月23日 13:15, Wei Wang wrote: On 05/23/2017 10:04 AM, Jason Wang wrote: On 2017年05月22日 19:52, Wei Wang wrote: On 05/20/2017 04:42 AM, Michael S. Tsirkin wrote: On Fri, May 19, 2017 at 10:32:19AM +08

Re: [Qemu-devel] new to qemu with a simple question

2017-05-23 Thread Fam Zheng
On Wed, 05/24 10:56, Wang Dong wrote: > Some C source code is generate from json file. > > I wonder why this? What is the benefits of this? This allows you to concentrate on the high level semantics of the QMP API, without worrying about C syntax and structural code here and there. In one word, m

[Qemu-devel] [PATCH] net/rocker: Cleanup the useless return value check

2017-05-23 Thread Mao Zhongyi
None of pci_dma_read()'s callers check the return value except rocker. There is no need to check it because it always return 0. So the check work is useless. Remove it entirely. Suggested-by: Markus Armbruster Signed-off-by: Mao Zhongyi --- hw/net/rocker/rocker.c | 9 +++-- hw/net/rock

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

2017-05-23 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 7589383..581

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

2017-05-23 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] new to qemu with a simple question

2017-05-23 Thread Wang Dong
Hi guys, I am new to qemu. But I need do some job in it right now. When I try read qmp code. I found a interesting part against it. Some C source code is generate from json file. I wonder why this? What is the benefits of this? Thanks in advance. -- Best regards. Wang Dong

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

2017-05-23 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 dfe577d..51c62ea 100644 --- a/block/block-backe

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

2017-05-23 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 v3 11/16] virtio-scsi: Request BLK_PERM_AIO_CONTEXT_CHANGE for dataplane

2017-05-23 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 46a3e3f..074e235 100644 --- a/hw/scs

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

2017-05-23 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

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

2017-05-23 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 v3 09/16] commit: Allow aio context change on s->base

2017-05-23 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 e2ee0ff..bbf7768 100644 --- a/block/commit.c +++ b/block/com

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

2017-05-23 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 03e82eb..a3337ee 100

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

2017-05-23 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 v3 07/16] backup: Do initial aio context move of target via BB interface

2017-05-23 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 v3 06/16] backup: Request BLK_PERM_AIO_CONTEXT_CHANGE on target

2017-05-23 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 v3 00/16] block: Protect AIO context change with perm API

2017-05-23 Thread Fam Zheng
v3: Move blk_set_aio_context to the front of mirror_start_job to avoid accessing target without acquiring its aio context. [Stefan] Use error_free_or_abort in test code. [Stefan] v2: Address Stefan's comments: - Clean up redundancy in bdrv_format_default_perms change. - Add a test

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

2017-05-23 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

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

2017-05-23 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 76a0d98..e2e

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

2017-05-23 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 d98662f..1e5eae7 100644 --- a

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

2017-05-23 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 50ba264..d98662f 100644 --- a/block.c +++ b/block.c @@ -1649,6 +1649,8 @@ char *bdrv_perm_names(uint64_t perm)

Re: [Qemu-devel] [PATCH V6 04/10] migration: split ufd_version_check onto receive/request features part

2017-05-23 Thread Peter Xu
On Tue, May 23, 2017 at 02:31:05PM +0300, Alexey Perevalov wrote: > This modification is necessary for userfault fd features which are > required to be requested from userspace. > UFFD_FEATURE_THREAD_ID is a one of such "on demand" feature, which will > be introduced in the next patch. > > QEMU ha

Re: [Qemu-devel] [PATCH risu] ppc64: Fix patterns for rotate doubleword instructions

2017-05-23 Thread joserz
On Tue, May 23, 2017 at 11:47:30AM +0530, Nikunj A Dadhania wrote: > G 3 writes: > > > On May 22, 2017, at 4:32 AM, qemu-devel-requ...@nongnu.org wrote: > > > > Hello I have also done some work risu. My patches add ppc32 support. > > Well my patches were made to work with Mac OS X but they are

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

2017-05-23 Thread Fam Zheng
On Thu, 05/11 16:27, Stefan Hajnoczi wrote: > On Wed, Apr 19, 2017 at 05:43:50PM +0800, Fam Zheng wrote: > > diff --git a/blockdev.c b/blockdev.c > > index dfd1385..53f9874 100644 > > --- a/blockdev.c > > +++ b/blockdev.c > > @@ -3556,8 +3556,6 @@ void qmp_drive_mirror(DriveMirror *arg, Error **err

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

2017-05-23 Thread Fam Zheng
On Thu, 05/11 15:41, Stefan Hajnoczi wrote: > On Wed, Apr 19, 2017 at 05:43:46PM +0800, Fam Zheng wrote: > > 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. > > It's true that the backup block job

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

2017-05-23 Thread Fam Zheng
On Thu, 05/11 15:32, Stefan Hajnoczi wrote: > On Wed, Apr 19, 2017 at 05:43:42PM +0800, Fam Zheng wrote: > > This function tries to request, if not granted yet, for the given > > permissions. > > > > Signed-off-by: Fam Zheng > > --- > > block/block-backend.c | 12 > > inclu

Re: [Qemu-devel] [Xen-devel] [RFC PATCH V2 1/2] xen-pt: bind/unbind interrupt remapping format MSI

2017-05-23 Thread Lan Tianyu
On 2017年05月24日 01:06, Anthony PERARD wrote: > On Tue, May 23, 2017 at 08:16:25PM +0800, Lan Tianyu wrote: >> On 2017年05月19日 20:04, Jan Beulich wrote: >> On 19.05.17 at 13:16, wrote: On Thu, May 18, 2017 at 01:32:59AM -0400, Lan Tianyu wrote: > --- a/include/hw/i386/apic-msidef.h >

Re: [Qemu-devel] virtio crypto device implemenation

2017-05-23 Thread Michael S. Tsirkin
On Tue, May 23, 2017 at 04:08:25PM +, Zeng, Xin wrote: > Hi, Michael, >As you know, Lei Gong from Huawei and I are co-working on virtio crypto > device spec, he is focusing on symmetric algorithm part, I am focusing on > asymmetric part. Now I am planning the implementation for asymmet

[Qemu-devel] [PATCH] docker: Add flex and bison to centos6 image

2017-05-23 Thread Fam Zheng
Currently there are warnings about flex and bison being missing when building in the centos6 image: make[1]: flex: Command not found BISON dtc-parser.tab.c make[1]: bison: Command not found Add them. Reported-by: Thomas Huth Signed-off-by: Fam Zheng --- tests/docker/docke

[Qemu-devel] [Bug 1693050] [NEW] xhci HCIVERSION register read emulation incorrectly handled

2017-05-23 Thread Robert Mustacchi
Public bug reported: We had an illumos user trying to run illumos in QEMU 2.9.0 with the qemu-xhci device enabled. Note, that while this was discovered against QEMU 2.9.0, from my current read of the HEAD, it is still present. The illumos bug at https://www.illumos.org/issues/8173 has additional i

Re: [Qemu-devel] [PATCH 02/31] target/s390x: Implement EXECUTE via new TranslationBlock

2017-05-23 Thread Richard Henderson
On 05/23/2017 10:28 AM, Aurelien Jarno wrote: Something like this, as a delta patch. Unfortunately it doesn't work. So far I have no real idea what could be the root cause of the issue. I have just determined that up to the crash, only a very limited set of instructions are being executed. They

Re: [Qemu-devel] [PATCH v2 4/4] 9pfs: local: metadata file for the VirtFS root

2017-05-23 Thread Leo Gaspard
On 05/23/2017 07:13 PM, Eric Blake wrote:> We have to block VIRTFS_META_DIR at any depth in the hierarchy, but > can/should we change the blocking of VIRTFS_META_ROOT_FILE to only > happen at the root directory, rather than at all directories? On the > other hand, if you can simultaneously map /pa

Re: [Qemu-devel] [PATCH v2 0/4] 9pfs: local: fix metadata of mapped-file security mode

2017-05-23 Thread Leo Gaspard
On 05/23/2017 04:32 PM, Greg Kurz wrote: > v2: - posted patch for CVE-2017-7493 separately > - other changes available in each patch changelog > > Leo, > > If you find time to test this series, I'll gladly add your Tested-by: to > it before merging. Just tested with a base of 2.9.0 with patc

Re: [Qemu-devel] [PATCH v2 0/4] 9pfs: local: fix metadata of mapped-file security mode

2017-05-23 Thread Fam Zheng
On Tue, 05/23 17:04, Greg Kurz wrote: > > CC hw/9pfs/9p-xattr-user.o > > In file included from > > /var/tmp/patchew-tester-tmp-5niyvzwz/src/hw/9pfs/9p-local.c:18:0: > > /var/tmp/patchew-tester-tmp-5niyvzwz/src/hw/9pfs/9p-local.c: In function > > ‘local_set_mapped_file_attrat’: > > /var/tmp

Re: [Qemu-devel] [PATCH v2 3/4] 9pfs: local: simplify file opening

2017-05-23 Thread Greg Kurz
On Tue, 23 May 2017 10:51:26 -0500 Eric Blake wrote: > On 05/23/2017 09:32 AM, Greg Kurz wrote: > > The logic to open a path currently sits between local_open_nofollow() and > > the relative_openat_nofollow() helper, which has no other user. > > > > For the sake of clarity, this patch moves all

[Qemu-devel] [Bug 1318091] Re: Perfctr MSRs not available to Guest OS on AMD Phenom II

2017-05-23 Thread Oliver Kaltenreiner
i don't understand this in detail, but since the last update of qemu i can't start my virtual win7 machine. i use gnome-boxes 3.24. qemu 2.8 works, 2.9 leads to this: Preformatted text(gnome-boxes:4301): Boxes-WARNING **: machine.vala:611: Failed to start win7: Unable to start domain: the CPU is

Re: [Qemu-devel] [PATCH v2] tests/libqtest: Print error instead of aborting when env variable is missing

2017-05-23 Thread Michael Roth
Quoting Thomas Huth (2017-05-23 02:25:30) > On 22.05.2017 17:58, no-re...@patchew.org wrote: > > This series failed automatic build test. Please find the testing commands > > and > > their output below. If you have docker installed, you can probably > > reproduce it > > locally. > [...] > >

Re: [Qemu-devel] [PATCH 1/7] qcow2: Remove unused Error in do_perform_cow()

2017-05-23 Thread Eric Blake
On 05/23/2017 06:22 AM, Alberto Garcia wrote: > qcow2_encrypt_sectors() does not need an Error parameter, and we're > not checking its value anyway, so we can safely remove it. Misleading. You are NOT removing the Error parameter from qcow2_encrypt_sectors(), but rather are explicitly ignoring any

Re: [Qemu-devel] [PATCH 02/31] target/s390x: Implement EXECUTE via new TranslationBlock

2017-05-23 Thread Thomas Huth
On 23.05.2017 17:54, Richard Henderson wrote: > On 05/23/2017 03:48 AM, Aurelien Jarno wrote: >> On 2017-05-22 20:02, Richard Henderson wrote: >>> Previously, helper_ex would construct the insn and then implement >>> the insn via direct calls other helpers. This was sufficient to >>> boot Linux bu

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/4] spapr: disable hotplugging without OS

2017-05-23 Thread Laurent Vivier
On 23/05/2017 20:22, Daniel Henrique Barboza wrote: > > > This is the Libvirt use case that fails with this patch set applied in > QEMU master, Libvirt 3.4.0 compiled from > source: > > # ./virsh start dhb_ub1704_nfs 2 > # > # ./virsh setvcpus dhb_ub1704_nfs 2 --live > # > # ./virsh -c 'qemu:///

Re: [Qemu-devel] [PATCH v2 13/13] vvfat: change OEM name to 'MSWIN4.1'

2017-05-23 Thread Hervé Poussineau
Hi Philippe, Le 23/05/2017 à 06:23, Philippe Mathieu-Daudé a écrit : Hi Hervé, On 05/22/2017 06:12 PM, Hervé Poussineau wrote: According to specification: "'MSWIN4.1' is the recommanded setting, because it is the setting least likely to cause compatibility problems. If you want to put somethin

Re: [Qemu-devel] [PATCH v2 4/4] 9pfs: local: metadata file for the VirtFS root

2017-05-23 Thread Greg Kurz
On Tue, 23 May 2017 12:13:17 -0500 Eric Blake wrote: > On 05/23/2017 09:32 AM, Greg Kurz wrote: > > When using the mapped-file security, credentials are stored in a metadata > > directory located in the parent directory. This is okay for all paths with > > the notable exception of the root path,

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/4] spapr: disable hotplugging without OS

2017-05-23 Thread Daniel Henrique Barboza
On 05/23/2017 03:07 PM, Daniel Henrique Barboza wrote: On 05/23/2017 02:52 PM, Daniel Henrique Barboza wrote: Hi Laurent, This is an interesting patch series. I've been working in the last weeks in the DRC migration, mainly to solve the problem in which a hot CPU unplug will not succeed a

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/4] spapr: disable hotplugging without OS

2017-05-23 Thread Daniel Henrique Barboza
On 05/23/2017 02:52 PM, Daniel Henrique Barboza wrote: Hi Laurent, This is an interesting patch series. I've been working in the last weeks in the DRC migration, mainly to solve the problem in which a hot CPU unplug will not succeed after a migration if the CPU was hotplugged in the source.

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/4] spapr: disable hotplugging without OS

2017-05-23 Thread Daniel Henrique Barboza
Hi Laurent, This is an interesting patch series. I've been working in the last weeks in the DRC migration, mainly to solve the problem in which a hot CPU unplug will not succeed after a migration if the CPU was hotplugged in the source. The problem happened when migrating with virsh because Li

Re: [Qemu-devel] [PATCH] block/gluster: glfs_lseek() workaround

2017-05-23 Thread Eric Blake
On 05/23/2017 12:27 PM, Jeff Cody wrote: > On current released versions of glusterfs, glfs_lseek() will sometimes > return invalid values for SEEK_DATA or SEEK_HOLE. For SEEK_DATA and > SEEK_HOLE, the returned value should be >= the passed offset, or < 0 in > the case of error: > > However, occa

Re: [Qemu-devel] [PATCH 29/31] target/s390x: Use atomic operations for COMPARE SWAP PURGE

2017-05-23 Thread Aurelien Jarno
On 2017-05-23 09:31, Richard Henderson wrote: > On 05/23/2017 05:28 AM, Aurelien Jarno wrote: > > On 2017-05-22 20:03, Richard Henderson wrote: > > > +/* flush global tlb */ > > > +void HELPER(purge)(CPUS390XState *env) > > > +{ > > > +S390CPU *cpu = s390_env_get_cpu(env); > > > + > > > +tl

[Qemu-devel] [PATCH v2] qapi: Fix some QMP documentation regressions

2017-05-23 Thread Eric Blake
In the process of getting rid of docs/qmp-commands.txt, we managed to regress on some of the text that changed after the point where the move was first branched and when the move actually occurred. For example, commit 3282eca for blockdev-snapshot re-added the extra "options" layer which had been c

Re: [Qemu-devel] [PATCH 1/1] Improve Cocoa modifier key handling

2017-05-23 Thread Ian McKellar via Qemu-devel
On Tue, May 23, 2017 at 8:52 AM Ian McKellar wrote: > On Tue, May 23, 2017 at 3:03 AM Gerd Hoffmann wrote: > >> >> I'm wondering whenever we should just use modifierFlags all the time. >> > > Probably. My initial patch tried to be minimally intrusive but I can try > reworking the NSEventTypeFlag

Re: [Qemu-devel] [PATCH 02/31] target/s390x: Implement EXECUTE via new TranslationBlock

2017-05-23 Thread Aurelien Jarno
On 2017-05-23 08:54, Richard Henderson wrote: > On 05/23/2017 03:48 AM, Aurelien Jarno wrote: > > On 2017-05-22 20:02, Richard Henderson wrote: > > > Previously, helper_ex would construct the insn and then implement > > > the insn via direct calls other helpers. This was sufficient to > > > boot L

[Qemu-devel] [PATCH] block/gluster: glfs_lseek() workaround

2017-05-23 Thread Jeff Cody
On current released versions of glusterfs, glfs_lseek() will sometimes return invalid values for SEEK_DATA or SEEK_HOLE. For SEEK_DATA and SEEK_HOLE, the returned value should be >= the passed offset, or < 0 in the case of error: LSEEK(2): off_t lseek(int fd, off_t offset, int whence);

Re: [Qemu-devel] [PATCH] qapi: Fix some blockdev-add documentation regressions

2017-05-23 Thread Eric Blake
On 05/23/2017 09:32 AM, Eric Blake wrote: > On 05/23/2017 03:39 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> In the process of getting rid of docs/qmp-commands.txt, we >>> managed to regress on any text that changed after the point >>> where the move was first branched and when the mo

Re: [Qemu-devel] [PATCH 30/31] target/s390x: Implement CSPG

2017-05-23 Thread Aurelien Jarno
On 2017-05-23 09:33, Richard Henderson wrote: > On 05/23/2017 04:12 AM, Aurelien Jarno wrote: > > On 2017-05-22 20:03, Richard Henderson wrote: > > > Signed-off-by: Richard Henderson > > > --- > > > target/s390x/insn-data.def | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a

Re: [Qemu-devel] [PATCH v2] tests/libqtest: Print error instead of aborting when env variable is missing

2017-05-23 Thread John Snow
On 05/23/2017 03:25 AM, Thomas Huth wrote: > On 22.05.2017 17:58, no-re...@patchew.org wrote: >> This series failed automatic build test. Please find the testing commands and >> their output below. If you have docker installed, you can probably reproduce >> it >> locally. > [...] >> LEX co

Re: [Qemu-devel] [PATCH v2 4/4] 9pfs: local: metadata file for the VirtFS root

2017-05-23 Thread Eric Blake
On 05/23/2017 09:32 AM, Greg Kurz wrote: > When using the mapped-file security, credentials are stored in a metadata > directory located in the parent directory. This is okay for all paths with > the notable exception of the root path, since we don't want and probably > can't create a metadata dire

Re: [Qemu-devel] [Xen-devel] [RFC PATCH V2 1/2] xen-pt: bind/unbind interrupt remapping format MSI

2017-05-23 Thread Anthony PERARD
On Tue, May 23, 2017 at 08:16:25PM +0800, Lan Tianyu wrote: > On 2017年05月19日 20:04, Jan Beulich wrote: > On 19.05.17 at 13:16, wrote: > >> On Thu, May 18, 2017 at 01:32:59AM -0400, Lan Tianyu wrote: > >>> --- a/include/hw/i386/apic-msidef.h > >>> +++ b/include/hw/i386/apic-msidef.h > >>> @@ -

Re: [Qemu-devel] [PATCH 1/4] block: Fix anonymous BBs in blk_root_inactivate()

2017-05-23 Thread Juan Quintela
Kevin Wolf wrote: > blk->name isn't an array, but a pointer that can be NULL. Checking for > an anonymous BB must involve a NULL check first, otherwise we get > crashes. > > Signed-off-by: Kevin Wolf Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH 30/31] target/s390x: Implement CSPG

2017-05-23 Thread Richard Henderson
On 05/23/2017 04:12 AM, Aurelien Jarno wrote: On 2017-05-22 20:03, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/s390x/insn-data.def | 1 + 1 file changed, 1 insertion(+) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index 4c91f30..8604847 10064

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] spapr: add option vector 6

2017-05-23 Thread Greg Kurz
On Tue, 23 May 2017 13:18:10 +0200 Laurent Vivier wrote: > This allows to know when the OS is started and its type. > > Signed-off-by: Laurent Vivier > --- > hw/ppc/spapr.c | 36 > hw/ppc/spapr_hcall.c| 5 - > hw/ppc/spapr_ovec.c

Re: [Qemu-devel] [PATCH 29/31] target/s390x: Use atomic operations for COMPARE SWAP PURGE

2017-05-23 Thread Richard Henderson
On 05/23/2017 05:28 AM, Aurelien Jarno wrote: On 2017-05-22 20:03, Richard Henderson wrote: +/* flush global tlb */ +void HELPER(purge)(CPUS390XState *env) +{ +S390CPU *cpu = s390_env_get_cpu(env); + +tlb_flush_all_cpus(CPU(cpu)); From what I understand from the PoP, the instruction s

Re: [Qemu-devel] [PATCH 4/4] qemu-iotests: Block migration test

2017-05-23 Thread Eric Blake
On 05/23/2017 11:18 AM, Kevin Wolf wrote: > Am 23.05.2017 um 17:46 hat Eric Blake geschrieben: >> On 05/23/2017 09:01 AM, Kevin Wolf wrote: >>> Signed-off-by: Kevin Wolf >>> --- >>> tests/qemu-iotests/183 | 121 >>> + >>> tests/qemu-iotests/183.out

  1   2   3   4   >