[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 --- a/hw/misc/mips_cmgcr.c +++

[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 index 99b28d5..9a92c70 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 deletions(-) diff --git a/cp

[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 --- a/net/colo-compare.c +++ b/net/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 sPAPRRngState {

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

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

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 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 @@ -43,11 +43,11 @@ int parse_pa

[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 insertions(+), 5 deletions(-) diff --git

[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 +- net/net.c | 36 --

[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 insertions(+), 7 deletions(-) d

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

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

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 for

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 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 block drivers won't have

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

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

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 b

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 s

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 Revi

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

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 spapr_drc_attach() is called. > > >

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

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:

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] 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. > > > Let's propagate the error instea

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 deletions(-) > > diff --git a/migration/migration.c b/migra

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 necessarily a rule. Fo

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 of

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 properties, right aft

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 > > --- > > migration/migration.c | 15 +-- > > 1 file ch

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 c

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 +0100, Dr. David Alan Gilbert

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

[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

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

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

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

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: Daniel P. Berrange R

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

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

[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 --- include/qom/cpu.h |3 +++ trace/c

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 a

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

[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 Reviewed-by: Eri

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

[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 -- 1 file changed, 30 deletions(-) diff

[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 100644 --- a/block/blkd

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

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

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 > > rely on -global if she wa

[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 ++-- scripts/tracetool/backend/log.

[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 +++- qga/qapi-sc

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 the latter case it fa

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

[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 0m0,00

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 >>> "-cpu host" or

[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 Signed-off-by: Longpeng(Mike) -

[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 Signed-off-by: Longpeng(Mike) --- crypto/hash

[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 +- 1 file changed, 33 insertions(+), 17 dele

[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 + 1 file changed, 29 insertions(+), 12 deletions(-)

[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 Signed-off-by: Longpeng(Mike) --- crypto/hmac-g

[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 | 166 -- include/crypto/hmac.h

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

2017-07-04 Thread Longpeng(Mike)
Extracts qcrypto_hmac_ctx_new() from qcrypto_hmac_new() for nettle-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/hmac-nettle.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a

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

2017-07-04 Thread Longpeng(Mike)
The AF_ALG socket family is the userspace interface for linux crypto API, users can use it to access hardware accelerators. This patchset adds a afalg-backend for qemu crypto subsystem. Currently when performs encrypt/decrypt, we'll try afalg-backend first and will back to libiary-backend if it fa

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

2017-07-04 Thread Longpeng(Mike)
Extracts qcrypto_cipher_ctx_new() from qcrypto_cipher_new() for builtin-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/cipher-builtin.c | 101 ++-- 1 file changed, 55 insertions(+), 46 del

[Qemu-devel] [PATCH v4 11/18] crypto: hmac: add hmac driver framework

2017-07-04 Thread Longpeng(Mike)
1) makes the public APIs in hmac-nettle/gcrypt/glib static, and rename them with "nettle/gcrypt/glib" prefix. 2) introduces hmac framework, including QCryptoHmacDriver and new public APIs. Reviewed-by: Daniel P. Berrange Signed-off-by: Longpeng(Mike) --- crypto/hmac-gcrypt.c | 51 ++

[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 +-- crypto/hmacpri

[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 -- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/cry

[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) --- tests/M

[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 18/18] tests: crypto: add hmac speed benchmark support

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

[Qemu-devel] [PATCH v4 13/18] crypto: cipher: add afalg-backend cipher support

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

Re: [Qemu-devel] [PATCH v2 10/15] block: Switch BdrvCoGetBlockStatusData 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 B

[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 Signed-off-by: Longpeng(Mike) ---

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 compil

[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 ++ crypto/Makefile.obj

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

2017-07-04 Thread Bharata B Rao
On Tue, Jul 04, 2017 at 10:02:46AM +0200, Greg Kurz wrote: > > > There is some history to this. I was doing error recovery and propagation > > > here similarly during memory hotplug development phase until Igor > > > suggested that we shoudn't try to recover after we have done guest > > > visible c

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; qemu-devel@nongnu.

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

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

2017-07-04 Thread Greg Kurz
On Tue, 4 Jul 2017 14:41:33 +0530 Bharata B Rao wrote: > On Tue, Jul 04, 2017 at 10:02:46AM +0200, Greg Kurz wrote: > > > > There is some history to this. I was doing error recovery and > > > > propagation > > > > here similarly during memory hotplug development phase until Igor > > > > suggeste

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

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 POWER9 v1.0. > >>> >

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 h

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 B

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

2017-07-04 Thread David Hildenbrand
> + > static void create_cpu_model_list(ObjectClass *klass, void *opaque) > { > -CpuDefinitionInfoList **cpu_list = opaque; > +struct CpuDefinitionInfoListData *cpu_list_data = opaque; > +CpuDefinitionInfoList **cpu_list = &cpu_list_data->list; > CpuDefinitionInfoList *entry; >

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 a

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" >> #i

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) != > sizeof(unsig

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

2017-07-04 Thread Daniel P. Berrange
On Tue, Jul 04, 2017 at 11:27:04AM +0200, Paolo Bonzini wrote: > 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 matt

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

2017-07-04 Thread Paolo Bonzini
On 03/07/2017 21:46, 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) != > sizeof(unsigned long), but perhap

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

2017-07-04 Thread Richard W.M. Jones
The only portable use for signal(2) is setting a signal to SIG_IGN or SIG_DFL. Everything else is a portability minefield. This change adds such a check to checkpatch. It gives an error like this: ERROR: Use sigaction instead of signal, except when setting the handler to SIG_IGN or SIG_DFL

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

2017-07-04 Thread Richard W.M. Jones
On Tue, Jul 04, 2017 at 11:27:04AM +0200, Paolo Bonzini wrote: > 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 matt

Re: [Qemu-devel] [PATCH 18/22] target/i386: split cpu_set_mxcsr() and make cpu_set_fpuc() inline

2017-07-04 Thread Paolo Bonzini
On 03/07/2017 22:14, Richard Henderson wrote: > On 07/03/2017 09:34 AM, Paolo Bonzini wrote: >> +static inline void cpu_set_mxcsr(CPUX86State *env, uint32_t mxcsr) >> +{ >> +env->mxcsr = mxcsr; >> +if (tcg_enabled()) { >> +tcg_update_mxcsr(env); > > I'd prefer update_mxcsr_status

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 http://li

  1   2   3   4   >