[Qemu-devel] [PATCH v2 12/15] block: Switch bdrv_co_get_block_status_above() to byte-based

2017-07-03 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal type (no semantic change), and rename it to match the corresponding public function rename. Signed-off-by: Eric Blake --- v2: rebase to earlier changes --- block

[Qemu-devel] [PATCH v2 04/15] block: Make bdrv_round_to_clusters() signature more useful

2017-07-03 Thread Eric Blake
In the process of converting sector-based interfaces to bytes, I'm finding it easier to represent a byte count as a 64-bit integer at the block layer (even if we are internally capped by SIZE_MAX or even INT_MAX for individual transactions, it's still nicer to not have to worry about truncation/ove

[Qemu-devel] [PATCH v2 05/15] qcow2: Switch is_zero_sectors() to byte-based

2017-07-03 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal function (no semantic change), and rename it to is_zero() in the process. Signed-off-by: Eric Blake --- v2: rename function, rebase to upstream changes --- block

[Qemu-devel] [RFC PATCH v2 16/15] block: Add .bdrv_co_block_status() callback

2017-07-03 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Now that the block layer exposes byte-based allocation, it's time to tackle the drivers. Add a new callback that operates on as small as byte boundaries. Subsequent patches will then update individual drivers, then fina

[Qemu-devel] [PATCH v2 06/15] block: Switch bdrv_make_zero() to byte-based

2017-07-03 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Change the internal loop iteration of zeroing a device to track by bytes instead of sectors (although we are still guaranteed that we iterate by steps that are sector-aligned). Signed-off-b

Re: [Qemu-devel] [PATCH v2 3/3] block: add default implementations for bdrv_co_get_block_status()

2017-07-03 Thread Eric Blake
On 07/03/2017 01:31 PM, Eric Blake wrote: >> The throttle driver I'm working on passes bdrv_co_get_block_status() to >> bs->file. If there is a problem with an unused default function (it's >> not static so will compile, but it might not be up to standard), you can >> just remove it and I will rein

[Qemu-devel] [PATCH v2 08/15] block: Convert bdrv_get_block_status() to bytes

2017-07-03 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. In the common case, allocation is unlikely to ever use values that are not naturally sector-aligned, but it is possible that byte-based values will let us be more precise about allocation at the end of an unaligned file

[Qemu-devel] [PATCH v2 07/15] qemu-img: Switch get_block_status() to byte-based

2017-07-03 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Continue by converting an internal function (no semantic change), and simplifying its caller accordingly. Signed-off-by: Eric Blake --- v2: no change --- qemu-img.c | 24 +++-

[Qemu-devel] [PATCH v2 13/15] block: Convert bdrv_get_block_status_above() to bytes

2017-07-03 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. In the common case, allocation is unlikely to ever use values that are not naturally sector-aligned, but it is possible that byte-based values will let us be more precise about allocation at the end of an unaligned file

[Qemu-devel] [PATCH v2 09/15] block: Switch bdrv_co_get_block_status() to byte-based

2017-07-03 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal function (no semantic change), and as with its public counterpart, rename to bdrv_co_block_status() to make the compiler enforce that we catch all uses. For now, we

[Qemu-devel] [PATCH v2 15/15] qemu-io: Relax 'alloc' now that block-status doesn't assert

2017-07-03 Thread Eric Blake
Previously, the alloc command required that input parameters be sector-aligned and clamped to 32 bits, because the underlying bdrv_is_allocated used a 32-bit parameter and asserted aligned inputs. But now that we have fixed block status to report a 64-bit bytes value, and to properly round request

Re: [Qemu-devel] [PATCH 4/4] target-m68k: add fscale, fgetman and fgetexp

2017-07-03 Thread Laurent Vivier
Le 03/07/2017 à 22:31, Richard Henderson a écrit : > On 07/03/2017 12:50 PM, Laurent Vivier wrote: >> fmove.x #0x0ABCDEF12345,%fp0 >> fgetman.x %fp0,%fp6 >> fp02.1518178707571747286191852003521627e-4938(raw >> 0x0abcdef12345) >> fp61.3

Re: [Qemu-devel] [PATCH RFC 0/6] q35: add acpi pci hotplug support

2017-07-03 Thread Alexander Bezzubikov
That is why I think we can consider a possibility of forgetting about ACPI hot plug in pcie-pci bridge and use only SHPC (with some correcting work). Especially since q35 is used only for 'modern' Windows guests and there're no big problems with SHPC on Linux guests. вт, 4 июля 2017 г. в 1:06, Ale

Re: [Qemu-devel] [PULL 01/21] virtio-net: enable configurable tx queue size

2017-07-03 Thread Wei Wang
On 07/04/2017 03:44 AM, Michael S. Tsirkin wrote: From: Wei Wang This patch enables the virtio-net tx queue size to be configurable between 256 (the default queue size) and 1024 by the user when the vhost-user backend is used. Currently, the maximum tx queue size for other backends is 512 due

Re: [Qemu-devel] [PATCH 2/4] vl: move global property, migrate init earlier

2017-07-03 Thread Peter Xu
On Mon, Jul 03, 2017 at 11:59:03AM -0300, Eduardo Habkost wrote: > On Mon, Jul 03, 2017 at 10:44:06AM +0800, Peter Xu wrote: > > Currently drive_init_func() may call migrate_get_current() while the > > migrate object is still not ready yet at that time. Move the migration > > object init earlier, a

Re: [Qemu-devel] [PATCH v7 0/9] Convert to realize and cleanup

2017-07-03 Thread Mao Zhongyi
Hi, Michael On 07/04/2017 01:41 AM, Michael S. Tsirkin wrote: On Tue, Jun 27, 2017 at 02:16:46PM +0800, Mao Zhongyi wrote: This series mainly implements the conversions of pci-bridge devices i82801b11, io3130_upstream/downstream and so on to realize(). Naturally part of error messages need to b

Re: [Qemu-devel] [PATCH 2/3] xen-pt: bind/unbind interrupt remapping format MSI

2017-07-03 Thread Lan Tianyu
Hi Anthony: On 2017年06月30日 23:48, Anthony PERARD wrote: > On Thu, Jun 29, 2017 at 01:49:53AM -0400, Lan Tianyu wrote: >> From: Chao Gao >> >> If a vIOMMU is exposed to guest, guest will configure the msi to remapping >> format. The original code isn't suitable to the new format. A new pair >> bin

Re: [Qemu-devel] [PATCH 3/4] doc: add item for "-M enforce-config-section"

2017-07-03 Thread Peter Xu
On Mon, Jul 03, 2017 at 02:07:12PM -0300, Eduardo Habkost wrote: > On Mon, Jul 03, 2017 at 10:44:07AM +0800, Peter Xu wrote: > > It's never documented, and now we have one more parameter for it (which > > means this one can be obsolete in the future). Document it properly. > > > > Although now whe

Re: [Qemu-devel] [PATCH] i386/kvm: mask MSR_IA32_BNDCFGS if MPX is not enabled in guest cpuid

2017-07-03 Thread Haozhong Zhang
On 07/03/17 17:45 +0200, Paolo Bonzini wrote: > > > On 03/07/2017 17:23, Haozhong Zhang wrote: > > Otherwise, QEMU on a host with MPX support will try to set guest > > MSR_IA32_BNDCFGS although guest MPX is not enabled, and result in > > abort. > > > > For example, > >qemu-system-x86_64 -ena

Re: [Qemu-devel] [PATCH 1/3] i386/msi: Correct mask of destination ID in MSI address

2017-07-03 Thread Peter Xu
On Thu, Jun 29, 2017 at 01:49:52AM -0400, Lan Tianyu wrote: > From: Chao Gao > > According to SDM 10.11.1, only [19:12] bits of MSI address are > Destination ID, change the mask to avoid ambiguity for VT-d spec > has used the bit 4 to indicate a remappable interrupt request. > > Signed-off-by: C

Re: [Qemu-devel] [PATCH v2 06/15] kvmvapic: remove tcg related code

2017-07-03 Thread Zhong Yang
On Mon, Jul 03, 2017 at 04:28:00PM +0200, Paolo Bonzini wrote: > > > On 03/07/2017 12:12, Yang Zhong wrote: > > Since Paolo's below patch has fixed A20 issue > > commit bbfa326fc8028e275eddf8c9965c2a1b59405b2e > > target/i386: enable A20 automatically in system management mod > > How is this pat

Re: [Qemu-devel] [PATCH v2 0/7] KVM: MMU: fast write protect

2017-07-03 Thread Xiao Guangrong
On 07/03/2017 11:47 PM, Paolo Bonzini wrote: On 03/07/2017 16:39, Xiao Guangrong wrote: On 06/20/2017 05:15 PM, guangrong.x...@gmail.com wrote: From: Xiao Guangrong Changelog in v2: thanks to Paolo's review, this version disables write-protect-all if PML is supported Hi Paolo, Do you

Re: [Qemu-devel] [PATCH] spapr: fix memory hotplug error path

2017-07-03 Thread Bharata B Rao
On Mon, Jul 03, 2017 at 02:21:31PM +0200, Greg Kurz wrote: > QEMU shouldn't abort if spapr_add_lmbs()->spapr_drc_attach() fails. > Let's propagate the error instead, like it is done everywhere else > where spapr_drc_attach() is called. > > Signed-off-by: Greg Kurz > --- > hw/ppc/spapr.c | 10 +

Re: [Qemu-devel] [PATCH v2 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled

2017-07-03 Thread QingFeng Hao
在 2017/7/3 18:20, Christian Borntraeger 写道: On 07/03/2017 10:51 AM, QingFeng Hao wrote: This patch is based on a similar patch from Stefan Hajnoczi - commit c324fd0a39c (" virtio-pci: use ioeventfd even when KVM is disabled) Do not check kvm_eventfds_enabled() when KVM is disabled since it al

Re: [Qemu-devel] [PATCH 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled

2017-07-03 Thread QingFeng Hao
在 2017/7/3 19:48, Cornelia Huck 写道: On Mon, 3 Jul 2017 09:38:36 +0200 QingFeng Hao wrote: Do not check kvm_eventfds_enabled() when KVM is disabled since it always returns 0. Since commit 8c56c1a592b5092d91da8d8943c1d6462a6f ("memory: emulate ioeventfd") it has been possible to use ioev

Re: [Qemu-devel] [PATCH] spapr: fix memory hotplug error path

2017-07-03 Thread Bharata B Rao
On Tue, Jul 04, 2017 at 09:01:43AM +0530, Bharata B Rao wrote: > On Mon, Jul 03, 2017 at 02:21:31PM +0200, Greg Kurz wrote: > > QEMU shouldn't abort if spapr_add_lmbs()->spapr_drc_attach() fails. > > Let's propagate the error instead, like it is done everywhere else > > where spapr_drc_attach() is

Re: [Qemu-devel] [PATCH] include/hw/ptimer.h: Add documentation comments

2017-07-03 Thread Philippe Mathieu-Daudé
On Mon, Jul 3, 2017 at 12:13 PM, Peter Maydell wrote: > Add documentation comments describing the public API of the > ptimer countdown timer. > > Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé > --- > I was trying to write a timer device and discovered that the ptimer > API w

Re: [Qemu-devel] [PATCH v4 11/13] virtio-console: chardev hotswap support

2017-07-03 Thread Amit Shah
On (Mon) 03 Jul 2017 [14:50:07], Anton Nefedov wrote: > On 06/29/2017 01:02 PM, Marc-André Lureau wrote: > > Hi > > > > Looks good, but please write something in the commit message about what > > needs to be done for be-change (what this patch does). > > > > thanks > > > > Hi, > > thank you!

Re: [Qemu-devel] [RFC PATCH 1/3] vmstate: error hint for failed equal checks

2017-07-03 Thread Markus Armbruster
Halil Pasic writes: > On 07/03/2017 03:52 PM, Markus Armbruster wrote: >> Halil Pasic writes: >> >>> On 06/30/2017 04:54 PM, Eric Blake wrote: On 06/30/2017 09:41 AM, Halil Pasic wrote: >>> 'This' basically boils down to the question and >>> 'Why aren't hints reported in QMP contex

[Qemu-devel] [PATCH v3 01/20] qom: enforce readonly nature of link's check callback

2017-07-03 Thread Fam Zheng
From: Igor Mammedov link's check callback is supposed to verify/permit setting it, however currently nothing restricts it from misusing it and modifying target object from within. Make sure that readonly semantics are checked by compiler to prevent callback's misuse. Signed-off-by: Igor Mammedov

[Qemu-devel] [PATCH v3 04/20] qmp: Use ObjectProperty.type if present

2017-07-03 Thread Fam Zheng
The dynamic value is more informative in the case of link property, otherwise it is the same. Signed-off-by: Fam Zheng --- qmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qmp.c b/qmp.c index 133fdfc..9f8a167 100644 --- a/qmp.c +++ b/qmp.c @@ -496,7 +496,8 @@ static De

[Qemu-devel] [PATCH v3 12/20] armv7m: Convert bitband.source-mamory to DEFINE_PROP_LINK

2017-07-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/arm/armv7m.c | 10 +++--- include/hw/arm/armv7m.h | 3 ++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index c8a11f2..3a13d82 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -97,12 +97,6 @@ sta

[Qemu-devel] [PATCH v3 05/20] qdev: Add const qualifier to PropertyInfo definitions

2017-07-03 Thread Fam Zheng
The remaining non-const ones are in e1000e which modifies description at runtime. They can be addressed separatedly. Signed-off-by: Fam Zheng --- hw/core/qdev-properties-system.c | 8 +++ hw/core/qdev-properties.c| 44 +- hw/s390x/css.c

[Qemu-devel] [PATCH v3 00/20] qdev: Introduce DEFINE_PROP_LINK

2017-07-03 Thread Fam Zheng
v3: Include Igor's patch, and fix virtio-crypto too. Always use qdev_prop_allow_set_link_before_realize and OBJ_PROP_LINK_UNREF_ON_RELEASE. Include as many applicable devices as possible and some more clean-ups. There are still more left but they use uncommon check and flags paramet

[Qemu-devel] [PATCH v3 11/20] ivshmem: Convert to DEFINE_PROP_LINK

2017-07-03 Thread Fam Zheng
Unlike the usual object_property_add_link() invocations in other devices, ivshmem checks the "is mapped" state of the backend in addition to qdev_prop_allow_set_link_before_realize. To convert it without specializing DEFINE_PROP_LINK which always uses the qdev callback, move the extra check to devi

[Qemu-devel] [PATCH v3 02/20] qdev: Introduce PropertyInfo.create

2017-07-03 Thread Fam Zheng
This allows property implementation to provide a specialized property creation method. Update conditions guarding property types accordingly. Signed-off-by: Fam Zheng --- hw/core/qdev.c | 31 +++ include/hw/qdev-core.h | 1 + qmp.c | 2 +-

[Qemu-devel] [PATCH v3 07/20] virtio-scsi: Convert to DEFINE_PROP_LINK

2017-07-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/s390x/virtio-ccw.c | 2 -- hw/scsi/virtio-scsi-dataplane.c | 2 +- hw/scsi/virtio-scsi.c | 13 ++--- hw/virtio/virtio-pci.c | 2 -- include/hw/virtio/virtio-scsi.h | 3 ++- 5 files changed, 5 insertions(+), 17 deletions(-)

[Qemu-devel] [PATCH v3 06/20] virtio-blk: Convert to DEFINE_PROP_LINK

2017-07-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 2 +- hw/block/virtio-blk.c | 5 + hw/s390x/virtio-ccw.c | 2 -- hw/virtio/virtio-pci.c | 2 -- include/hw/virtio/virtio-blk.h | 3 ++- 5 files changed, 4 insertions(+), 10 deletions(-) diff --git a/

[Qemu-devel] [PATCH v3 03/20] qdev: Introduce DEFINE_PROP_LINK

2017-07-03 Thread Fam Zheng
This property can be used to replace the object_property_add_link in device code, to add a link to other objects, which is a common pattern. Signed-off-by: Fam Zheng --- hw/core/qdev-properties.c| 18 ++ include/hw/qdev-core.h | 1 + include/hw/qdev-properties.h | 9 +

[Qemu-devel] [PATCH v3 13/20] armv7m: Convert armv7m.memory to DEFINE_PROP_LINK

2017-07-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/arm/armv7m.c | 10 +++--- include/hw/arm/armv7m.h | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 3a13d82..3b0ada0 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -132,12 +132,6 @@ st

[Qemu-devel] [PATCH v3 08/20] virtio-rng: Convert to DEFINE_PROP_LINK

2017-07-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/s390x/virtio-ccw.c | 2 -- hw/virtio/virtio-pci.c | 2 -- hw/virtio/virtio-rng.c | 14 ++ include/hw/virtio/virtio-rng.h | 3 ++- 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390

[Qemu-devel] [PATCH V7 06/12] net/colo.c: Make vnet_hdr_len as packet property

2017-07-03 Thread Zhang Chen
We can use this property flush and send packet with vnet_hdr_len. Signed-off-by: Zhang Chen --- net/colo-compare.c| 8 ++-- net/colo.c| 3 ++- net/colo.h| 4 +++- net/filter-rewriter.c | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/net/col

[Qemu-devel] [PATCH v3 09/20] virtio-crypto: Convert to DEFINE_PROP_LINK

2017-07-03 Thread Fam Zheng
Unlike other object_property_add_link() occurrences in virtio devices, virtio-crypto checks the "in use" state of the linked backend object in addition to qdev_prop_allow_set_link_before_realize. To convert it without needing to specialize DEFINE_PROP_LINK which always uses the qdev callback, move

[Qemu-devel] [PATCH V7 12/12] docs/colo-proxy.txt: Update colo-proxy usage of net driver with vnet_header

2017-07-03 Thread Zhang Chen
Signed-off-by: Zhang Chen --- docs/colo-proxy.txt | 26 ++ 1 file changed, 26 insertions(+) diff --git a/docs/colo-proxy.txt b/docs/colo-proxy.txt index c4941de..f6a624f 100644 --- a/docs/colo-proxy.txt +++ b/docs/colo-proxy.txt @@ -182,6 +182,32 @@ Secondary(ip:3.3.3.8):

[Qemu-devel] [PATCH v3 14/20] gicv3: Convert to DEFINE_PROP_LINK

2017-07-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/intc/arm_gicv3_its_kvm.c| 18 ++ include/hw/intc/arm_gicv3_its_common.h | 3 ++- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c index 1f8991b..5520c28 100644 ---

[Qemu-devel] [PATCH v3 10/20] dimm: Convert to DEFINE_PROP_LINK

2017-07-03 Thread Fam Zheng
Unlike the usual object_property_add_link() invocations in other devices, dimm checks the "is mapped" state of the backend in addition to qdev_prop_allow_set_link_before_realize. To convert it without specializing DEFINE_PROP_LINK which always uses the qdev general check callback, move the extra ch

[Qemu-devel] [PATCH V7 04/12] net/filter-mirror.c: Make filter mirror support vnet support.

2017-07-03 Thread Zhang Chen
We add the vnet_hdr_support option for filter-mirror, default is disabled. If you use virtio-net-pci or other driver needs vnet_hdr, please enable it. You can use it for example: -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0,vnet_hdr_support If it has vnet_hdr_support flag, we wil

[Qemu-devel] [PATCH v3 15/20] xlnx_zynqmp: Convert to DEFINE_PROP_LINK

2017-07-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/arm/xlnx-zynqmp.c | 12 include/hw/arm/xlnx-zynqmp.h | 3 ++- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index 64f52f8..2ce9cad 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw/arm/xlnx

[Qemu-devel] [PATCH v3 17/20] xilinx_axidma: Convert to DEFINE_PROP_LINK

2017-07-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/dma/xilinx_axidma.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c index 6065689..df293d3 100644 --- a/hw/dma/xilinx_axidma.c +++ b/hw/dma/xilinx_axidma.c @@ -124,8 +1

Re: [Qemu-devel] [RFC v2 2/3] qemu-error: Implement a more generic error reporting

2017-07-03 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Mon, Jul 03, 2017 at 04:07:21PM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > On Thu, Jun 29, 2017 at 12:42:38PM -0700, Alistair Francis wrote: >> >> This patch removes the exisinting error_vreport() function and replaces it >> >> with

[Qemu-devel] [PATCH v3 16/20] xilinx_axienet: Convert to DEFINE_PROP_LINK

2017-07-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/net/xilinx_axienet.c | 31 +-- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c index b670184..e92762b 100644 --- a/hw/net/xilinx_axienet.c +++ b/hw/net/xilinx_axienet.c @@

<    1   2   3   4