[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

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

[Qemu-devel] [PATCH v11 6/6] trace: [trivial] Statically enable all guest events

2017-07-04 Thread Lluís Vilanova
The existing optimizations makes it feasible to have them available on all builds. Some quick'n'dirty numbers with 400.perlbench (SPECcpu2006) on the train input (medium size - suns.pl) and the guest_mem_before event: * vanilla, statically disabled real0m2,259s user0m2,252s sys

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

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 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] [PATCH] spapr: make default PHB optionnal

2017-07-04 Thread Greg Kurz
On Tue, 4 Jul 2017 17:29:01 +1000 David Gibson wrote: > On Mon, Jul 03, 2017 at 06:48:25PM +0200, Greg Kurz wrote: > > The sPAPR machine always create a default PHB during initialization, even > > if -nodefaults was passed on the command line. This forces the user to

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

[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 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 0/4] block: Block driver callbacks fixes

2017-07-04 Thread Manos Pitsidianakis
This series makes implementing some of the bdrv_* callbacks easier for block drivers by passing requests to bs->file if bs->drv doesn't implement it instead of failing, and adding default bdrv_co_get_block_status() implementations. This is based against Kevin Wolf's block branch, commit

[Qemu-devel] [PATCH v3 4/4] block: Add default implementations for bdrv_co_get_block_status()

2017-07-04 Thread 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 block drivers won't have to duplicate code to implement this. Reviewed-by: Fam Zheng

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

2017-07-04 Thread Manos Pitsidianakis
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 Instead, the call should be passed to bs->file if it exists, to allow filter

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 v11 2/6] trace: [tcg] Delay changes to dynamic state when translating

2017-07-04 Thread Lluís Vilanova
This keeps consistency across all decisions taken during translation when the dynamic state of a vCPU is changed in the middle of translating some guest code. Signed-off-by: Lluís Vilanova Reviewed-by: Richard Henderson Reviewed-by: Emilio G. Cota

[Qemu-devel] [PATCH v11 1/6] trace: Allocate cpu->trace_dstate in place

2017-07-04 Thread Lluís Vilanova
There's little point in dynamically allocating the bitmap if we know at compile-time the max number of events we want to support. Thus, make room in the struct for the bitmap, which will make things easier later: this paves the way for upcoming changes, in which we'll use a u32 to fully capture

[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

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:

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 02/22] configure: early test for supported targets

2017-07-04 Thread Daniel P. Berrange
On Mon, Jul 03, 2017 at 06:34:33PM +0200, Paolo Bonzini wrote: > Check for unsupported targets in target_list, and print an > error early in the configuration process. > > Signed-off-by: Paolo Bonzini > --- > configure | 65 >

[Qemu-devel] [PATCH v3 0/1] virtio-scsi-ccw: fix iotest 068 for s390x

2017-07-04 Thread QingFeng Hao
This commit fixes iotest 068 for s390x as s390x uses virtio-scsi-ccw. It's based on commit c324fd0a39c by Stefan Hajnoczi. Thanks! Change history: v3: Take Christian Borntraeger and Cornelia Huck's comment to check if kvm is enabled in s390_assign_subch_ioeventfd instead of

[Qemu-devel] [PATCH v11 0/6] trace: [tcg] Optimize per-vCPU tracing states with separate TB caches

2017-07-04 Thread Lluís Vilanova
Optimizes tracing of events with the 'tcg' and 'vcpu' properties (e.g., memory accesses), making it feasible to statically enable them by default on all QEMU builds. Last patch shows that overheads are completely eliminated in various types of benchmarks for linux-user and softmmu (overheads where

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

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] [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 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 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 3/4] doc: add item for "-M enforce-config-section"

2017-07-04 Thread Markus Armbruster
Peter Xu writes: > 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 when enforce-config-section is set, it'll override the > other "-global" parameter, that is not

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] spapr: fix memory hotplug error path

2017-07-04 Thread Greg Kurz
On Tue, 4 Jul 2017 09:20:50 +0530 Bharata B Rao wrote: > 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. > > >

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] 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] [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] [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] [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 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] [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] [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] spapr: make default PHB optionnal

2017-07-04 Thread David Gibson
On Mon, Jul 03, 2017 at 06:48:25PM +0200, Greg Kurz wrote: > The sPAPR machine always create a default PHB during initialization, even > if -nodefaults was passed on the command line. This forces the user to > rely on -global if she wants to set properties of the default PHB, such > as numa_node.

Re: [Qemu-devel] [PATCH v2 0/2] Add global device ID in virt machine

2017-07-04 Thread Diana Madalina Craciun
ping On 5/23/2017 2:12 PM, Diana Craciun wrote: > The NXP DPAA2 is a hardware architecture designed for high-speeed network > packet processing. The DPAA2 hardware components are managed by a hardware > component called the Management Complex (or MC) which provides an > object-base abstraction

[Qemu-devel] [PATCH V7 11/12] net/filter-rewriter.c: Make filter-rewriter support vnet_hdr_len

2017-07-04 Thread Zhang Chen
We add the vnet_hdr_support option for filter-rewriter, 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-rewriter,id=rew0,netdev=hn0,queue=all,vnet_hdr_support We get the vnet_hdr_len from NetClientState

[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

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

[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] [PATCH V7 09/12] net/colo.c: Add vnet packet parse feature in colo-proxy

2017-07-04 Thread Zhang Chen
Make colo-compare and filter-rewriter can parse vnet packet. Signed-off-by: Zhang Chen --- net/colo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/colo.c b/net/colo.c index 180eaed..28ce7c8 100644 --- a/net/colo.c +++ b/net/colo.c

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

2017-07-04 Thread 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 when KVM is disabled) >>> >>> Do

[Qemu-devel] [PATCH V7 05/12] net/filter-mirror.c: Add new option to enable vnet support for filter-redirector

2017-07-04 Thread Zhang Chen
We add the vnet_hdr_support option for filter-redirector, default is disabled. If you use virtio-net-pci net driver or other driver needs vnet_hdr, please enable it. Because colo-compare or other modules needs the vnet_hdr_len to parse packet, we add this new option send the len to others. You

Re: [Qemu-devel] [PATCH v2 03/15] block: Add flag to avoid wasted work in bdrv_is_allocated()

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > @@ -1717,6 +1718,10 @@ int64_t coroutine_fn > bdrv_co_get_block_status_from_backing(BlockDriverState *bs, > * Drivers not implementing the functionality are assumed to not support > * backing files, hence all their sectors are reported as allocated. >

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

[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 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 01/12] net: Add vnet_hdr_len arguments in NetClientState

2017-07-04 Thread Zhang Chen
Add vnet_hdr_len arguments in NetClientState that make other module get real vnet_hdr_len easily. Signed-off-by: Zhang Chen --- include/net/net.h | 1 + net/net.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/net/net.h b/include/net/net.h

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

2017-07-04 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/misc/mips_cmgcr.c | 22 ++ include/hw/misc/mips_cmgcr.h | 5 +++-- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/hw/misc/mips_cmgcr.c b/hw/misc/mips_cmgcr.c index a1edb53..f9b2a67 100644 ---

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

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 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 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 V7 04/12] net/filter-mirror.c: Make filter mirror support vnet support.

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

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

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

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

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

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

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

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

2017-07-04 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 06/12] net/colo.c: Make vnet_hdr_len as packet property

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

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

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

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

[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 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 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 05/20] qdev: Add const qualifier to PropertyInfo definitions

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

[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

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

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

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

<    1   2   3   4