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

2017-07-04 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(+),

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

2017-07-04 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

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

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > 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

Re: [Qemu-devel] [RFC v3 2/2] target/ppc: move POWER9 DD1 workaround to ppc_cpu_initfn

2017-07-04 Thread Thomas Huth
On 03.07.2017 15:14, Laurent Vivier wrote: > Commit 5f3066d ("target/ppc: Allow workarounds for POWER9 DD1") > disables compatibility mode for POWER9 DD1 to allow to > boot on POWER9 DD1 host with KVM. > > As the workaround has been added in kvmppc_host_cpu_class_init(), > it applies only on CPU

Re: [Qemu-devel] [Qemu-ppc] [RFC v3 1/2] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-07-04 Thread Laurent Vivier
On 04/07/2017 10:51, Greg Kurz wrote: > On Tue, 4 Jul 2017 09:42:33 +0200 > Thomas Huth wrote: > >> On 03.07.2017 15:14, Laurent Vivier wrote: >>> CPU_POWERPC_POWER9_DD1 is 0x004E0100, so this is the POWER9 v1.0. >>> >>> When we run qemu on a POWER9 DD1 host, we must use either

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

2017-07-04 Thread QingFeng Hao
在 2017/7/4 17:34, Cornelia Huck 写道: On Tue, 4 Jul 2017 10:32:31 +0200 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()

[Qemu-devel] [PULL v1 13/17] target-microblaze: dec_barrel: Plug TCG temp leak

2017-07-04 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Plug TCG temp leak. Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- target/microblaze/translate.c | 1 + 1 file changed, 1 insertion(+) diff --git

[Qemu-devel] [PULL v1 17/17] xilinx-dp: Add support for the yuy2 video format

2017-07-04 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add support for the yuy2 video format. Reviewed-by: KONRAD Frederic Acked-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias --- hw/display/xlnx_dp.c | 3 +++ 1

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

2017-07-04 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

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

2017-07-04 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

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

2017-07-04 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

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

2017-07-04 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

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

2017-07-04 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 +++

[Qemu-devel] [PATCH V7 00/12] Add COLO-proxy virtio-net support

2017-07-04 Thread Zhang Chen
If user use -device virtio-net-pci, virtio-net driver will add a header to raw net packet that colo-proxy can't handle it. COLO-proxy just focus on the packet payload, so we skip the virtio-net header to compare the sent packet that primary guest's to secondary guest's. V7: - p1: No change. -

Re: [Qemu-devel] [Qemu-ppc] [RFC v3 1/2] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-07-04 Thread Thomas Huth
On 03.07.2017 15:14, Laurent Vivier wrote: > CPU_POWERPC_POWER9_DD1 is 0x004E0100, so this is the POWER9 v1.0. > > When we run qemu on a POWER9 DD1 host, we must use either > "-cpu host" or "-cpu POWER9", but in the latter case it fails with > > Unable to find sPAPR CPU Core definition > >

Re: [Qemu-devel] [PATCH 4/4] doc: update TYPE_MIGRATION documents

2017-07-04 Thread Markus Armbruster
Peter Xu writes: > [Peter collected Eduardo's patch comment and formatted into patch] > > Suggested-by: Eduardo Habkost > Signed-off-by: Peter Xu > --- > migration/migration.c | 15 +-- > 1 file changed, 9 insertions(+), 6

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

2017-07-04 Thread Markus Armbruster
Eduardo Habkost writes: > 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, along with the global

Re: [Qemu-devel] [PATCH 4/4] doc: update TYPE_MIGRATION documents

2017-07-04 Thread Peter Xu
On Tue, Jul 04, 2017 at 10:04:01AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > [Peter collected Eduardo's patch comment and formatted into patch] > > > > Suggested-by: Eduardo Habkost > > Signed-off-by: Peter Xu > > --- >

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

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > 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

[Qemu-devel] [PATCH v4 12/18] crypto: introduce some common functions for af_alg backend

2017-07-04 Thread Longpeng(Mike)
The AF_ALG socket family is the userspace interface for linux crypto API, this patch adds af_alg family support and some common functions for af_alg backend. It'll be used by afalg-backend crypto latter. Signed-off-by: Longpeng(Mike) --- configure| 22

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

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > 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

Re: [Qemu-devel] [PATCH 04/22] vl: convert -tb-size to qemu_strtoul

2017-07-04 Thread Daniel P. Berrange
On Mon, Jul 03, 2017 at 12:46:06PM -0700, Richard Henderson wrote: > On 07/03/2017 09:34 AM, Paolo Bonzini wrote: > > -extern int tcg_tb_size; > > +extern unsigned long tcg_tb_size; > > size_t would be more natural. > > I don't think we support any hosts for which sizeof(size_t) != >

Re: [Qemu-devel] [PATCH 14/22] tcg: add CONFIG_TCG guards in headers

2017-07-04 Thread Paolo Bonzini
On 03/07/2017 22:10, Richard Henderson wrote: > On 07/03/2017 09:34 AM, Paolo Bonzini wrote: >> --- a/include/exec/helper-proto.h >> +++ b/include/exec/helper-proto.h >> @@ -28,7 +28,9 @@ dh_ctype(ret) HELPER(name) (dh_ctype(t1), >> dh_ctype(t2), dh_ctype(t3), \ >> #include "helper.h" >>

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

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > 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 >

[Qemu-devel] [PULL v1 00/17] Xilinx queue

2017-07-04 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" The following changes since commit fd479c60f5766f7fb247ad146b9e3c33d03d2055: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20170603' into staging (2017-07-03 09:54:32 +0100) are available in the git repository at:

[Qemu-devel] [PULL v1 03/17] target-microblaze: Don't hard code 0xb as initial MB version

2017-07-04 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Don't hard code 0xb as initial MB version. Reviewed-by: Alistair Francis Signed-off-by: Edgar E. Iglesias --- target/microblaze/cpu.c | 3 +-- 1 file changed, 1 insertion(+), 2

[Qemu-devel] [PULL v1 06/17] target-microblaze: Introduce a use-div property

2017-07-04 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Introduce a use-div property making division instructions optional. Reviewed-by: Alistair Francis Signed-off-by: Edgar E. Iglesias --- target/microblaze/cpu.c | 9 +

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

2017-07-04 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 +

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

2017-07-04 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 @@

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

2017-07-04 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/ppc/spapr_rng.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/ppc/spapr_rng.c b/hw/ppc/spapr_rng.c index 80515eb..fcffc65 100644 --- a/hw/ppc/spapr_rng.c +++ b/hw/ppc/spapr_rng.c @@ -34,7 +34,8 @@ struct

[Qemu-devel] [PATCH V7 10/12] net/colo-compare.c: Add vnet packet's tcp/udp/icmp compare

2017-07-04 Thread Zhang Chen
COLO-Proxy just focus on packet payload, so we skip vnet header. Signed-off-by: Zhang Chen --- net/colo-compare.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 945e7d4..0be12de 100644 ---

[Qemu-devel] [PATCH V7 03/12] net/filter-mirror.c: Introduce parameter for filter_send()

2017-07-04 Thread Zhang Chen
This patch change the filter_send() parameter from CharBackend to MirrorState, we can get more information like vnet_hdr(We use it to support packet with vnet_header). Signed-off-by: Zhang Chen --- net/filter-mirror.c | 10 +- 1 file changed, 5

[Qemu-devel] [Bug 1377095] Re: KVM guest VM does not reattach a throughpassed USB printer from Host after switching printer off and on

2017-07-04 Thread Thomas Huth
I guess switching the printer off and on again is like attaching a new USB device to your host (so it only shows up in the host, of course, and not in the guest). Have you already tried to do a new "device_add usb- host,..." in the QEMU monitor to attach it to the guest again while the VM is

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

2017-07-04 Thread QingFeng Hao
在 2017/7/4 15:06, Christian Borntraeger 写道: On 07/04/2017 05:41 AM, QingFeng Hao wrote: 在 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

Re: [Qemu-devel] [PATCH v3 1/1] s390x: vmstatify config migration for virtio-ccw

2017-07-04 Thread Christian Borntraeger
On 07/03/2017 11:34 PM, Halil Pasic wrote: > Let's vmstatify virtio_ccw_save_config and virtio_ccw_load_config for > flexibility (extending using subsections) and for fun. > > To achieve this we need to hack the config_vector, which is VirtIODevice > (that is common virtio) state, in the middle

Re: [Qemu-devel] [PATCH 01/22] configure: factor out list of supported Xen/KVM/HAX targets

2017-07-04 Thread Daniel P. Berrange
On Mon, Jul 03, 2017 at 06:34:32PM +0200, Paolo Bonzini wrote: > This will be useful when the functions are called, early in the configure > process, to filter out targets that do not support hardware acceleration. > > Signed-off-by: Paolo Bonzini > --- > configure | 90 >

Re: [Qemu-devel] postcopy migration hangs while loading virtio state

2017-07-04 Thread Christian Borntraeger
On 07/04/2017 10:16 AM, Martin Schwidefsky wrote: > On Tue, 4 Jul 2017 09:48:11 +0200 > Christian Borntraeger wrote: > >> On 07/03/2017 09:07 PM, Dr. David Alan Gilbert wrote: >>> * Michael S. Tsirkin (m...@redhat.com) wrote: On Fri, Jun 30, 2017 at 05:31:39PM

[Qemu-devel] [PATCH v11 3/6] exec: [tcg] Use different TBs according to the vCPU's dynamic tracing state

2017-07-04 Thread Lluís Vilanova
Every vCPU now uses a separate set of TBs for each set of dynamic tracing event state values. Each set of TBs can be used by any number of vCPUs to maximize TB reuse when vCPUs have the same tracing state. This feature is later used by tracetool to optimize tracing of guest code events. The

Re: [Qemu-devel] [PATCH v3 15/18] crypto: hmac: add af_alg hmac support

2017-07-04 Thread Longpeng (Mike)
Hi Daniel, First, sorry for the long delay... I have modified the code as your suggestion, and I'll send V4 soon. On 2017/4/26 20:23, Daniel P. Berrange wrote: > On Sat, Apr 22, 2017 at 03:20:24PM +0800, Longpeng(Mike) wrote: >> Adds afalg-backend hmac support: introduces some private APIs >>

[Qemu-devel] [PATCH v4 08/18] crypto: hmac: introduce qcrypto_hmac_ctx_new for gcrypt-backend

2017-07-04 Thread Longpeng(Mike)
1) Fix a handle-leak problem in qcrypto_hmac_new(), didn't free ctx->handle if gcry_mac_setkey fails. 2) Extracts qcrypto_hmac_ctx_new() from qcrypto_hmac_new() for gcrypt-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei

[Qemu-devel] [PATCH v4 07/18] crypto: hmac: move crypto/hmac.h into include/crypto/

2017-07-04 Thread Longpeng(Mike)
Moves crypto/hmac.h into include/crypto/, likes cipher.h and hash.h Reviewed-by: Daniel P. Berrange Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/hmac.h

[Qemu-devel] [PATCH v4 16/18] tests: crypto: add cipher speed benchmark support

2017-07-04 Thread Longpeng(Mike)
Now we have two qcrypto backends, libiary-backend and afalg-backend, but which one is faster? This patch add a cipher speed benchmark, it helps us to measure the performance by using "make check-speed" or using "./tests/benchmark-crypto-cipher" directly. Signed-off-by: Longpeng(Mike)

[Qemu-devel] [PATCH v4 14/18] crypto: hash: add afalg-backend hash support

2017-07-04 Thread Longpeng(Mike)
Adds afalg-backend hash support: introduces some private APIs firstly, and then intergrates them into qcrypto_hash_afalg_driver. Signed-off-by: Longpeng(Mike) --- crypto/Makefile.objs | 1 + crypto/afalgpriv.h | 1 + crypto/hash-afalg.c | 139

[Qemu-devel] [PATCH v4 10/18] crypto: hmac: introduce qcrypto_hmac_ctx_new for glib-backend

2017-07-04 Thread Longpeng(Mike)
Extracts qcrypto_hmac_ctx_new() from qcrypto_hmac_new() for glib-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/hmac-glib.c | 34 --

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

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > 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

Re: [Qemu-devel] [RFC v3 2/2] target/ppc: move POWER9 DD1 workaround to ppc_cpu_initfn

2017-07-04 Thread David Gibson
On Tue, Jul 04, 2017 at 10:17:18AM +0200, Thomas Huth wrote: > On 03.07.2017 15:14, Laurent Vivier wrote: > > Commit 5f3066d ("target/ppc: Allow workarounds for POWER9 DD1") > > disables compatibility mode for POWER9 DD1 to allow to > > boot on POWER9 DD1 host with KVM. > > > > As the workaround

[Qemu-devel] [PULL v1 12/17] target-microblaze: dec_barrel: Add braces around if-statements

2017-07-04 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add braces around if-statements. No functional change. Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- target/microblaze/translate.c | 9 + 1 file changed, 5

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

2017-07-04 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

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

2017-07-04 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 +++

[Qemu-devel] [PATCH V7 08/12] net/colo-compare.c: Make colo-compare support vnet_hdr_len

2017-07-04 Thread Zhang Chen
We add the vnet_hdr_support option for colo-compare, 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 colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0,vnet_hdr_support

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

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > 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

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

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > From: Manos Pitsidianakis > > bdrv_co_get_block_status_from_file() and > bdrv_co_get_block_status_from_backing() set *file to bs->file and > bs->backing respectively, so that bdrv_co_get_block_status() can recurse > to them. Future

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

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > 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 >

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

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > 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

Re: [Qemu-devel] [PATCH v2 02/15] block: Allow NULL file for bdrv_get_block_status()

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > Not all callers care about which BDS owns the mapping for a given > range of the file. This patch merely simplifies the callers by > consolidating the logic in the common call point, while guaranteeing > a non-NULL file to all the driver callbacks, for no

Re: [Qemu-devel] postcopy migration hangs while loading virtio state

2017-07-04 Thread Christian Borntraeger
On 07/03/2017 09:07 PM, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: >> On Fri, Jun 30, 2017 at 05:31:39PM +0100, Dr. David Alan Gilbert wrote: >>> * Christian Borntraeger (borntrae...@de.ibm.com) wrote: On 04/26/2017 01:45 PM, Christian Borntraeger wrote:

[Qemu-devel] [PATCH v3 2/4] block: Use defaults of bdrv_* callbacks in raw

2017-07-04 Thread Manos Pitsidianakis
Now that passing the call to bs->file is the default for some bdrv_* callbacks, remove the duplicate implementations in block/raw-format.c Reviewed-by: Eric Blake Signed-off-by: Manos Pitsidianakis --- block/raw-format.c | 30

[Qemu-devel] [PATCH v3 3/4] block: Remove bdrv_truncate callback in blkdebug

2017-07-04 Thread Manos Pitsidianakis
Now that bdrv_truncate is passed to bs->file by default, remove the callback from block/blkdebug.c Signed-off-by: Manos Pitsidianakis --- block/blkdebug.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index b25856c4..5e118e10

[Qemu-devel] [PATCH v11 5/6] trace: [tcg, trivial] Re-align generated code

2017-07-04 Thread Lluís Vilanova
Last patch removed a nesting level in generated code. Re-align all code generated by backends to be 4-column aligned. Signed-off-by: Lluís Vilanova --- scripts/tracetool/backend/dtrace.py |4 ++-- scripts/tracetool/backend/ftrace.py | 20 ++--

[Qemu-devel] [PATCH RESEND v6] qga: Add support network interface statistics in guest-network-get-interfaces command

2017-07-04 Thread ZhiPeng Lu
we can get the network interface statistics inside a virtual machine by guest-network-get-interfaces command. it is very useful for us to monitor and analyze network traffic. Signed-off-by: ZhiPeng Lu --- qga/commands-posix.c | 80

Re: [Qemu-devel] [Qemu-ppc] [RFC v3 1/2] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-07-04 Thread Greg Kurz
On Tue, 4 Jul 2017 09:42:33 +0200 Thomas Huth wrote: > On 03.07.2017 15:14, Laurent Vivier wrote: > > CPU_POWERPC_POWER9_DD1 is 0x004E0100, so this is the POWER9 v1.0. > > > > When we run qemu on a POWER9 DD1 host, we must use either > > "-cpu host" or "-cpu POWER9", but in

[Qemu-devel] [PATCH v4 15/18] crypto: hmac: add af_alg hmac support

2017-07-04 Thread Longpeng(Mike)
Adds afalg-backend hmac support: introduces some private APIs firstly, and then intergrates them into qcrypto_hmac_afalg_driver. Signed-off-by: Longpeng(Mike) --- crypto/hash-afalg.c | 104 +--- crypto/hmac.c | 22

Re: [Qemu-devel] [RFC v2 6/8] virtio-iommu: Implement the translation and commands

2017-07-04 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Eric Auger [mailto:eric.au...@redhat.com] > Sent: Wednesday, June 07, 2017 9:31 PM > To: eric.auger@gmail.com; eric.au...@redhat.com; > peter.mayd...@linaro.org; alex.william...@redhat.com; m...@redhat.com; > qemu-...@nongnu.org;

Re: [Qemu-devel] [PATCH v2 11/15] block: Switch bdrv_common_block_status_above() to byte-based

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > 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). > > Signed-off-by: Eric Blake > Reviewed-by: Fam Zheng

[Qemu-devel] [PATCH] checkpatch: should not use signal except for SIG_DFL or SIG_IGN

2017-07-04 Thread Paolo Bonzini
Using signal to establish a signal handler is not portable; on SysV systems, the signal handler would be reset to SIG_DFL after delivery, while BSD preserves the signal handler. Daniel Berrange reported that (to complicate matters further) the signal system call has SysV behavior, but glibc

Re: [Qemu-devel] [RFC v3 0/2] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-07-04 Thread David Gibson
On Mon, Jul 03, 2017 at 03:14:53PM +0200, Laurent Vivier wrote: > This patch series allows to use "-cpu POWER9" with a POWER9 > DD1 host and KVM HV. With TCG, "-cpu POWER9" selects > POWER9_v2.0 (POWER9 DD2). Since these fix a real bug, I've applied them to ppc-for-2.10. There are some revisions

Re: [Qemu-devel] [Qemu-ppc] [RFC v3 1/2] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-07-04 Thread David Gibson
On Tue, Jul 04, 2017 at 10:56:56AM +0200, Laurent Vivier wrote: > On 04/07/2017 10:51, Greg Kurz wrote: > > On Tue, 4 Jul 2017 09:42:33 +0200 > > Thomas Huth wrote: > > > >> On 03.07.2017 15:14, Laurent Vivier wrote: > >>> CPU_POWERPC_POWER9_DD1 is 0x004E0100, so this is the

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

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > 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

Re: [Qemu-devel] [PATCH v2 14/15] block: Align block status requests

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > Any device that has request_alignment greater than 512 should be > unable to report status at a finer granularity; it may also be > simpler for such devices to be guaranteed that the block layer > has rounded things out to the granularity boundary (the way

Re: [Qemu-devel] [PATCH v3] s390: return unavailable features via query-cpu-definitions

2017-07-04 Thread Christian Borntraeger
On 07/04/2017 11:35 AM, David Hildenbrand wrote: >> + >> static void create_cpu_model_list(ObjectClass *klass, void *opaque) >> { >> -CpuDefinitionInfoList **cpu_list = opaque; >> +struct CpuDefinitionInfoListData *cpu_list_data = opaque; >> +CpuDefinitionInfoList **cpu_list =

[Qemu-devel] [PULL v1 05/17] target-microblaze: Introduce a use-barrel property

2017-07-04 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Introduce a use-barrel property making barrel shifter instructions optional. Reviewed-by: Alistair Francis Signed-off-by: Edgar E. Iglesias --- target/microblaze/cpu.c | 9

[Qemu-devel] [PULL v1 01/17] disas/microblaze: Add missing 'const' attributes

2017-07-04 Thread Edgar E. Iglesias
From: Stefan Weil Making the opcode list 'const' saves memory. Some function arguments and local variables needed 'const', too. Add also 'static' to two local functions. Reviewed-by: Edgar E. Iglesias Signed-off-by: Stefan Weil

[Qemu-devel] [PULL v1 07/17] target-microblaze: Introduce a use-hw-mul property

2017-07-04 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Introduce a use-div property making multiplication instructions optional. Reviewed-by: Alistair Francis Signed-off-by: Edgar E. Iglesias --- target/microblaze/cpu.c | 12

[Qemu-devel] [PULL v1 11/17] target-microblaze: dec_barrel: Use extract32

2017-07-04 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Use extract32 instead of opencoding the shifting and masking. No functional change. Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- target/microblaze/translate.c | 4 ++-- 1

Re: [Qemu-devel] [PATCH 20/22] target/i386: add the tcg_enabled() in target/i386/

2017-07-04 Thread Paolo Bonzini
On 03/07/2017 22:19, Richard Henderson wrote: > On 07/03/2017 09:34 AM, Paolo Bonzini wrote: >> @@ -215,10 +215,12 @@ void breakpoint_handler(CPUState *cs) >> if (cs->watchpoint_hit) { >> if (cs->watchpoint_hit->flags & BP_CPU) { >> cs->watchpoint_hit = NULL; >> -

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

2017-07-04 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

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

2017-07-04 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 @@

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

2017-07-04 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.

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

2017-07-04 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

[Qemu-devel] [PATCH v3 19/20] cpu: Convert to DEFINE_PROP_LINK

2017-07-04 Thread Fam Zheng
Signed-off-by: Fam Zheng --- cpus.c| 5 +++-- exec.c| 30 -- include/qom/cpu.h | 4 +++- qom/cpu.c | 1 + target/arm/cpu.c | 6 +++--- target/i386/cpu.c | 5 +++-- 6 files changed, 29 insertions(+), 22

[Qemu-devel] [PATCH V7 07/12] net/colo-compare.c: Introduce parameter for compare_chr_send()

2017-07-04 Thread Zhang Chen
This patch change the compare_chr_send() parameter from CharBackend to CompareState, we can get more information like vnet_hdr(We use it to support packet with vnet_header). Signed-off-by: Zhang Chen --- net/colo-compare.c | 14 +++--- 1 file changed, 7

[Qemu-devel] [PATCH V7 02/12] net/net.c: Add vnet_hdr support in SocketReadState

2017-07-04 Thread Zhang Chen
We add a flag to decide whether net_fill_rstate() need read the vnet_hdr_len or not. Signed-off-by: Zhang Chen Suggested-by: Jason Wang --- include/net/net.h | 9 +++-- net/colo-compare.c | 4 ++-- net/filter-mirror.c | 2 +-

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

2017-07-04 Thread Greg Kurz
On Mon, 3 Jul 2017 14:03:07 -0300 Daniel Henrique Barboza wrote: > On 07/03/2017 11:54 AM, 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

Re: [Qemu-devel] [PATCH 03/22] configure: add --disable-tcg configure option

2017-07-04 Thread Daniel P. Berrange
On Mon, Jul 03, 2017 at 06:34:34PM +0200, Paolo Bonzini wrote: > This lets you build without TCG (hardware accelerationor qtest only). When > this flag is passed to configure, it will automatically filter out the target > list to only those that support KVM or Xen or HAX. > > Signed-off-by:

Re: [Qemu-devel] [PATCH 22/22] configure: warn on untested --disable-tcg

2017-07-04 Thread Daniel P. Berrange
On Mon, Jul 03, 2017 at 06:34:53PM +0200, Paolo Bonzini wrote: > --disable-tcg will almost certainly fail to compile on non-x86 platforms, > so issue a warning. > > Signed-off-by: Paolo Bonzini > --- > configure | 7 +++ > 1 file changed, 7 insertions(+) Reviewed-by:

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

2017-07-04 Thread QingFeng Hao
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 always returns 0. Since commit 8c56c1a592b5092d91da8d8943c1d6462a6f ("memory: emulate

[Qemu-devel] [PATCH v11 4/6] trace: [tcg] Do not generate TCG code to trace dynamically-disabled events

2017-07-04 Thread Lluís Vilanova
If an event is dynamically disabled, the TCG code that calls the execution-time tracer is not generated. Removes the overheads of execution-time tracers for dynamically disabled events. As a bonus, also avoids checking the event state when the execution-time tracer is called from TCG-generated

[Qemu-devel] [PATCH v4 06/18] crypto: hash: add hash driver framework

2017-07-04 Thread Longpeng(Mike)
1) makes the public APIs in hash-nettle/gcrypt/glib static, and rename them with "nettle/gcrypt/glib" prefix. 2) introduces hash framework, including QCryptoHashDriver and new public APIs. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei

[Qemu-devel] [PATCH v4 02/18] crypto: cipher: introduce qcrypto_cipher_ctx_new for gcrypt-backend

2017-07-04 Thread Longpeng(Mike)
Extracts qcrypto_cipher_ctx_new() from qcrypto_cipher_new() for gcrypt-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/cipher-gcrypt.c | 50

[Qemu-devel] [PATCH v4 03/18] crypto: cipher: introduce qcrypto_cipher_ctx_new for nettle-backend

2017-07-04 Thread Longpeng(Mike)
Extracts qcrypto_cipher_ctx_new() from qcrypto_cipher_new() for nettle-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/cipher-nettle.c | 41

[Qemu-devel] [PATCH v4 01/18] crypto: cipher: introduce context free function

2017-07-04 Thread Longpeng(Mike)
Refactors the qcrypto_cipher_free(), splits it into two parts. One is gcrypt/nettle__cipher_free_ctx() to free the special context. This makes code more clear, what's more, it would be used by the later patch. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei

[Qemu-devel] [PATCH v4 17/18] tests: crypto: add hash speed benchmark support

2017-07-04 Thread Longpeng(Mike)
This patch add a hash speed benchmark, it helps us to measure the performance by using "make check-speed" or using "./tests/benchmark-crypto-cipher" directly. Signed-off-by: Longpeng(Mike) --- tests/Makefile.include| 2 ++ tests/benchmark-crypto-hash.c | 67

[Qemu-devel] [PATCH v4 05/18] crypto: cipher: add cipher driver framework

2017-07-04 Thread Longpeng(Mike)
1) makes the public APIs in cipher-nettle/gcrypt/builtin static, and rename them with "nettle/gcrypt/builtin" prefix. 2) introduces cipher framework, including QCryptoCipherDriver and new public APIs. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei

Re: [Qemu-devel] [PATCH v3 1/4] block: Pass bdrv_* methods to bs->file by default

2017-07-04 Thread Kevin Wolf
Am 04.07.2017 um 10:40 hat Manos Pitsidianakis geschrieben: > The following functions fail if bs->drv does not implement them: > > bdrv_probe_blocksizes > bdrv_probe_geometry > bdrv_truncate > bdrv_has_zero_init > bdrv_get_info > bdrv_media_changed > bdrv_eject > bdrv_lock_medium > bdrv_co_ioctl

Re: [Qemu-devel] [PATCH 01/22] configure: factor out list of supported Xen/KVM/HAX targets

2017-07-04 Thread Paolo Bonzini
On 04/07/2017 10:28, Daniel P. Berrange wrote: >> +supported_kvm_target() { >> +test "$kvm" = "yes" || return 1 >> +glob "$1" "*-softmmu" || return 1 >> +case "${1%-softmmu}:$cpu" in >> +arm:arm | aarch64:aarch64 | \ >> +i386:i386 | i386:x86_64 | i386:x32 | \ >> +

Re: [Qemu-devel] [PATCH] checkpatch: Error if signal(2) is used non-portably.

2017-07-04 Thread Richard W.M. Jones
Ignore this, Paolo also sent a similar patch after we were discussing this on IRC. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch

Re: [Qemu-devel] [PATCH v3 2/4] block: Use defaults of bdrv_* callbacks in raw

2017-07-04 Thread Kevin Wolf
Am 04.07.2017 um 10:40 hat Manos Pitsidianakis geschrieben: > Now that passing the call to bs->file is the default for some bdrv_* > callbacks, remove the duplicate implementations in block/raw-format.c > > Reviewed-by: Eric Blake > Signed-off-by: Manos Pitsidianakis

[Qemu-devel] [PULL v1 02/17] target-microblaze: Correct bit shift for the PVR0 version field

2017-07-04 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Correct bit shift for the PVR0 version field. Reviewed-by: Alistair Francis Signed-off-by: Edgar E. Iglesias --- target/microblaze/cpu.c | 2 +- target/microblaze/cpu.h | 2 ++ 2

[Qemu-devel] [PULL v1 16/17] target-microblaze: Add CPU version 10.0

2017-07-04 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add CPU version 10.0. Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- target/microblaze/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/microblaze/cpu.c

[Qemu-devel] [PULL v1 04/17] target-microblaze: Add CPU versions 9.4, 9.5 and 9.6

2017-07-04 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add CPU versions 9.4, 9.5 and 9.6. Reviewed-by: Alistair Francis Signed-off-by: Edgar E. Iglesias --- target/microblaze/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

  1   2   3   4   >