[Qemu-devel] [PATCH 11/12] tests/test-hmp: Add announce parameter tests

2017-05-24 Thread Vladislav Yasevich
Add 2 new commands for announce parameters to the test. Signed-off-by: Vladislav Yasevich --- tests/test-hmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test-hmp.c b/tests/test-hmp.c index 99e35ec..f3887d1 100644 --- a/tests/test-hmp.c +++

[Qemu-devel] [PATCH 10/12] hmp: Add hmp_announce_self

2017-05-24 Thread Vladislav Yasevich
Add an HMP command to trigger self annocements. Signend-off-by: Vladislav Yasevich --- hmp-commands.hx | 14 ++ hmp.c | 5 + hmp.h | 1 + 3 files changed, 20 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index

[Qemu-devel] [PATCH 09/12] hmp: add announce paraters info/set

2017-05-24 Thread Vladislav Yasevich
Add HMP command to control and read annoucment parameters. Signed-off-by: Vladislav Yasevich --- hmp-commands-info.hx | 13 hmp-commands.hx | 14 + hmp.c| 86 hmp.h|

[Qemu-devel] [PATCH 08/12] announce_timer: Add ability to reset an existing

2017-05-24 Thread Vladislav Yasevich
It is now potentially possible to issue annouce-self command in a tight loop. Instead of doing nother, we can reset the timeout pararameters, especially since each instance may provide it's own values. This allows the user to extend or cut short currently runnig timer. Signed-off-by: Vladislav

[Qemu-devel] [PATCH 06/12] qmp: Expose qemu_announce_self as a qmp command

2017-05-24 Thread Vladislav Yasevich
Add a qmp command that can trigger guest announcements. Based on work of Germano Veit Michel Signed-off-by: Vladislav Yasevich --- migration/savevm.c | 14 ++ qapi-schema.json | 19 +++ 2 files changed, 33 insertions(+)

[Qemu-devel] [PATCH 07/12] migration: Allow for a limited number of announce timers

2017-05-24 Thread Vladislav Yasevich
We currently create a new announcement timer every time qemu_announce_self() is called. Since this is now a qmp command, this can lead to abuse. Limit the number of timers that are created. Give QMP interface and migration process 1 timer each. This way, QMP can't abuse the announce_self

[Qemu-devel] [PATCH 05/12] virtio-net: Allow qemu_announce_self to trigger virtio announcements

2017-05-24 Thread Vladislav Yasevich
Expose the virtio-net self annoucement capability and allow qemu_announce_self() to call it. Signed-off-by: Vladislav Yasevich --- hw/net/virtio-net.c | 32 +--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/hw/net/virtio-net.c

[Qemu-devel] [PATCH 03/12] migration: Switch to using announcement timer

2017-05-24 Thread Vladislav Yasevich
Switch qemu_announce_self and virtio annoucements to use the announcement timer framework. This makes sure that both timers use the same timeouts and number of annoucement attempts Based on work by Dr. David Alan Gilbert Signed-off-by: Vladislav Yasevich

[Qemu-devel] [PATCH 12/12] tests: Add a test for qemu self announcments

2017-05-24 Thread Vladislav Yasevich
We now expose qemu_announce_self through QMP and HMP. Add a test with some very basic packet validation (make sure we get a RARP). Signed-off-by: Vlad Yasevich --- tests/Makefile.include | 2 ++ tests/test-announce-self.c | 78

[Qemu-devel] [PATCH 00/12] self-announce updates

2017-05-24 Thread Vladislav Yasevich
This work a consolidation of the work by David Gilbert, Germano Veit Michel and myself. It started out with David wanting to parametirize self-announcments so that the user may control how often annoucment packets (RARPs) were generated by Qemu. At about the same time, Germano wanted to expose

[Qemu-devel] [PATCH 02/12] migration: Introduce announcement timer

2017-05-24 Thread Vladislav Yasevich
Introdec an annoucement timer structure and initialization to be used by for self-annoucement. Based on the work by Germano Veit Michel Signed-off-by: Vlad Yasevich --- include/migration/vmstate.h | 13 + migration/savevm.c | 22

[Qemu-devel] [PATCH 04/12] net: Add a network device specific self-announcement ability

2017-05-24 Thread Vladislav Yasevich
Some network devices have a capability to do self annoucements (ex: virtio-new). Add infrustrcture that would allow devices to expose this ability. Signed-off-by: Vladislav Yasevich --- include/net/net.h | 2 ++ migration/savevm.c | 6 ++ 2 files changed, 8

[Qemu-devel] [PATCH 01/12] migration: Introduce announce parameters

2017-05-24 Thread Vladislav Yasevich
Add parameters that control RARP/GARP announcement timeouts. The parameters structure is added to the QAPI and a qmp command is added to set/get the parameter data. Based on work by "Dr. David Alan Gilbert" Signed-off-by: Vladislav Yasevich ---

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

2017-05-24 Thread Aurelien Jarno
On 2017-05-23 16:21, Richard Henderson wrote: > On 05/23/2017 10:28 AM, Aurelien Jarno wrote: > > > Something like this, as a delta patch. I confirm this patch is really needed, otherwise the executed instruction seems to be executed at the next instruction. > > Unfortunately it doesn't work. So

[Qemu-devel] [PATCH] xics: add unrealize handler

2017-05-24 Thread Greg Kurz
Now that ICPState objects get finalized on CPU unplug, we should unregister reset handlers as well to avoid a QEMU crash at machine reset time. Signed-off-by: Greg Kurz --- hw/intc/xics.c |5 + hw/intc/xics_kvm.c |6 ++ 2 files changed, 11 insertions(+) diff

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

2017-05-24 Thread Michael Roth
Quoting Laurent Vivier (2017-05-24 11:02:30) > On 24/05/2017 17:54, Greg Kurz wrote: > > On Wed, 24 May 2017 12:14:02 +0200 > > Igor Mammedov wrote: > > > >> On Wed, 24 May 2017 11:28:57 +0200 > >> Greg Kurz wrote: > >> > >>> On Wed, 24 May 2017 15:07:54

Re: [Qemu-devel] [svt-core] [PATCH] kvmclock: update system_time_msr address forcibly

2017-05-24 Thread Marcelo Tosatti
On Wed, May 24, 2017 at 06:54:09PM +0300, Roman Kagan wrote: > On Wed, May 24, 2017 at 05:07:24PM +0300, Denis Plotnikov wrote: > > Do an update of system_time_msr address every time before reading > > the value of tsc_timestamp from guest's kvmclock page. > > > > It should be done in a forcible

Re: [Qemu-devel] [PATCH v1 04/13] qcow2: preallocation at image expand

2017-05-24 Thread Anton Nefedov
On 05/22/2017 10:29 PM, Eric Blake wrote: On 05/19/2017 04:34 AM, Anton Nefedov wrote: From: "Denis V. Lunev" This patch adds image preallocation at expand to provide better locality of QCOW2 image file and optimize this procedure for some distributed storages where this

Re: [Qemu-devel] [PATCH v2] sockets: improve error reporting if UNIX socket path is too long

2017-05-24 Thread Eric Blake
On 05/24/2017 11:18 AM, Daniel P. Berrange wrote: > The 'struct sockaddr_un' only allows 108 bytes for the socket > path. > > If the user supplies a path, QEMU uses snprintf() to silently > truncate it when too long. This is undesirable because the user > will then be unable to connect to the

Re: [Qemu-devel] [PATCH v6 11/18] qcow2: convert QCow2 to use QCryptoBlock for encryption

2017-05-24 Thread Daniel P. Berrange
On Thu, May 11, 2017 at 04:29:11PM +0200, Alberto Garcia wrote: > On Tue 25 Apr 2017 05:38:51 PM CEST, Daniel P. Berrange wrote: > > +switch (s->crypt_method_header) { > > +case QCOW_CRYPT_NONE: > > +if (encryptfmt) { > > +error_setg(errp, "No encryption in image

Re: [Qemu-devel] [PATCH 7/7] qcow2: Merge the writing of the COW regions with the guest data

2017-05-24 Thread Anton Nefedov
If the guest tries to write data that results on the allocation of a new cluster, instead of writing the guest data first and then the data from the COW regions, write everything together using one single I/O operation. This can improve the write performance by 25% or more, depending on several

Re: [Qemu-devel] [PATCH v2 3/3] scripts: Test script to look for -device crashes

2017-05-24 Thread Eduardo Habkost
On Tue, May 23, 2017 at 04:52:47PM +0200, Markus Armbruster wrote: > Beware, my review is rather superficial. > > Eduardo Habkost writes: > > > Test code to check if we can crash QEMU using -device. It will > > test all accel/machine/device combinations by default, which

Re: [Qemu-devel] [PATCH 4/4] migration: use dirty_rate_high_cnt more aggressively

2017-05-24 Thread Felipe Franciosi
> On 24 May 2017, at 17:25, Daniel P. Berrange wrote: > > On Wed, May 24, 2017 at 05:10:03PM +0100, Felipe Franciosi wrote: >> The commit message from 070afca25 suggests that dirty_rate_high_cnt >> should be used more aggressively to start throttling after two >> iterations

Re: [Qemu-devel] [PATCH] target/s390x/cpu_models: Allow some additional feature bits for the "qemu" CPU

2017-05-24 Thread Richard Henderson
On 05/24/2017 01:54 AM, Thomas Huth wrote: feats[] = { +S390_FEAT_STFLE, +S390_FEAT_EXTENDED_IMMEDIATE, +S390_FEAT_LONG_DISPLACEMENT, +S390_FEAT_LONG_DISPLACEMENT_FAST, +S390_FEAT_STORE_CLOCK_FAST, +S390_FEAT_GENERAL_INSTRUCTIONS_EXT, +

Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-05-24 Thread Anton Nefedov
On 05/24/2017 07:20 PM, Alberto Garcia wrote: On Wed 24 May 2017 06:09:42 PM CEST, Anton Nefedov wrote: I agree; as mentioned we have similar patches and they don't conflict much. We noticed a performance regression on HDD though, for the presumably optimized case (random 4k write over a

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

2017-05-24 Thread Jeff Cody
On Wed, May 24, 2017 at 11:02:02AM +0200, Niels de Vos wrote: > On Tue, May 23, 2017 at 01:27:50PM -0400, Jeff Cody wrote: > > On current released versions of glusterfs, glfs_lseek() will sometimes > > return invalid values for SEEK_DATA or SEEK_HOLE. For SEEK_DATA and > > SEEK_HOLE, the returned

Re: [Qemu-devel] [PATCH 4/4] migration: use dirty_rate_high_cnt more aggressively

2017-05-24 Thread Daniel P. Berrange
On Wed, May 24, 2017 at 05:10:03PM +0100, Felipe Franciosi wrote: > The commit message from 070afca25 suggests that dirty_rate_high_cnt > should be used more aggressively to start throttling after two > iterations instead of four. The code, however, only changes the auto > convergence behaviour to

Re: [Qemu-devel] [PATCH 02/11] migration: Remove unneeded includes of migration/vmstate.h

2017-05-24 Thread Laurent Vivier
On 18/05/2017 19:25, Juan Quintela wrote: > Signed-off-by: Juan Quintela > Reviewed-by: Philippe Mathieu-Daudé > --- > hw/core/qdev.c | 1 - > include/hw/acpi/memory_hotplug.h | 1 - > include/hw/acpi/pcihp.h | 1 - >

Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-05-24 Thread Alberto Garcia
On Wed 24 May 2017 06:09:42 PM CEST, Anton Nefedov wrote: > I agree; as mentioned we have similar patches and they don't conflict > much. We noticed a performance regression on HDD though, for the > presumably optimized case (random 4k write over a large backed image); > so the patches were put

[Qemu-devel] [PATCH v2] sockets: improve error reporting if UNIX socket path is too long

2017-05-24 Thread Daniel P. Berrange
The 'struct sockaddr_un' only allows 108 bytes for the socket path. If the user supplies a path, QEMU uses snprintf() to silently truncate it when too long. This is undesirable because the user will then be unable to connect to the path they asked for. If the user doesn't supply a path, QEMU

[Qemu-devel] [PULL v2 00/20] Misc patches for 2017-05-19

2017-05-24 Thread Paolo Bonzini
The following changes since commit 56821559f0ba682fe6b367815572e6f974d329ab: Merge remote-tracking branch 'dgilbert/tags/pull-hmp-20170517' into staging (2017-05-18 13:36:15 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch

[Qemu-devel] [PULL 17/20] vhost-user-scsi: Introduce vhost-user-scsi host device

2017-05-24 Thread Paolo Bonzini
From: Felipe Franciosi This commit introduces a vhost-user device for SCSI. This is based on the existing vhost-scsi implementation, but done over vhost-user instead. It also uses a chardev to connect to the backend. Unlike vhost-scsi (today), VMs using vhost-user-scsi can be

[Qemu-devel] [PATCH 3/4] migration: set bytes_xfer_* outside of autoconverge logic

2017-05-24 Thread Felipe Franciosi
The bytes_xfer_now/prev counters are only used by the auto convergence logic. However, they are used alongside the dirty_pages_rate counter, which is calculated (and required) outside of this logic. The problem with this approach is that if the auto convergence capability is changed while a

[Qemu-devel] [PULL 18/20] vhost-user-scsi: Introduce a vhost-user-scsi sample application

2017-05-24 Thread Paolo Bonzini
From: Felipe Franciosi This commit introduces a vhost-user-scsi backend sample application. It must be linked with libiscsi and libvhost-user. To use it, compile with: $ make vhost-user-scsi And run as follows: $ ./vhost-user-scsi -u vus.sock -i iscsi://uri_to_target/

[Qemu-devel] [PATCH 0/4] migration: autoconverge counter fixes

2017-05-24 Thread Felipe Franciosi
As discussed in the ML [1], there are some issues around the way ram.c accounts for transferred data and dirty pages for the auto convergence calculations. The patches in these series fix that by: - Keeping bytes_xfer_prev zeroed until it's used - Ensure bytes_xfer_* counters are accounted for

[Qemu-devel] [PATCH 4/4] migration: use dirty_rate_high_cnt more aggressively

2017-05-24 Thread Felipe Franciosi
The commit message from 070afca25 suggests that dirty_rate_high_cnt should be used more aggressively to start throttling after two iterations instead of four. The code, however, only changes the auto convergence behaviour to throttle after three iterations. This makes the behaviour more aggressive

[Qemu-devel] [PATCH 2/4] migration: set dirty_pages_rate before autoconverge logic

2017-05-24 Thread Felipe Franciosi
Currently, a "period" in the RAM migration logic is at least a second long and accounts for what happened since the last period (or the beginning of the migration). The dirty_pages_rate counter is calculated at the end this logic. If the auto convergence capability is enabled from the start of

[Qemu-devel] [PATCH 1/4] migration: keep bytes_xfer_prev init'd to zero

2017-05-24 Thread Felipe Franciosi
The first time migration_bitmap_sync() is called, bytes_xfer_prev is set to ram_state.bytes_transferred which is, at this point, zero. The next time migration_bitmap_sync() is called, an iteration has happened and bytes_xfer_prev is set to 'x' bytes. Most likely, more than one second has passed,

Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-05-24 Thread Anton Nefedov
On 05/24/2017 05:20 PM, Alberto Garcia wrote: On Tue 23 May 2017 04:36:52 PM CEST, Eric Blake wrote: here's a patch series that rewrites the copy-on-write code in the qcow2 driver to reduce the number of I/O operations. And it competes with Denis and Anton's patches:

Re: [Qemu-devel] [PATCH 01/11] migration: Create savevm.h for functions exported from savevm.c

2017-05-24 Thread Laurent Vivier
On 18/05/2017 19:25, Juan Quintela wrote: > This removes last trace of migration functions from sysemu/sysemu.h. > > Signed-off-by: Juan Quintela Reviewed-by: Laurent Vivier > --- > include/sysemu/sysemu.h | 47

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

2017-05-24 Thread Laurent Vivier
On 24/05/2017 17:54, Greg Kurz wrote: > On Wed, 24 May 2017 12:14:02 +0200 > Igor Mammedov wrote: > >> On Wed, 24 May 2017 11:28:57 +0200 >> Greg Kurz wrote: >> >>> On Wed, 24 May 2017 15:07:54 +1000 >>> David Gibson wrote: >>>

Re: [Qemu-devel] [PATCH] sockets: report error if UNIX socket path is too long

2017-05-24 Thread Eric Blake
On 05/24/2017 10:54 AM, Eric Blake wrote: > On 05/24/2017 10:42 AM, Daniel P. Berrange wrote: >> The 'struct sockaddr_un' only allows 108 bytes for the socket >> path. Currently QEMU uses snprintf() and so silently truncates >> the socket path provided by the user. This is undesirable because >>

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

2017-05-24 Thread Greg Kurz
On Wed, 24 May 2017 12:14:02 +0200 Igor Mammedov wrote: > On Wed, 24 May 2017 11:28:57 +0200 > Greg Kurz wrote: > > > On Wed, 24 May 2017 15:07:54 +1000 > > David Gibson wrote: > > > > > On Tue, May 23, 2017 at 01:18:11PM

Re: [Qemu-devel] [PATCH] sockets: report error if UNIX socket path is too long

2017-05-24 Thread Eric Blake
On 05/24/2017 10:42 AM, Daniel P. Berrange wrote: > The 'struct sockaddr_un' only allows 108 bytes for the socket > path. Currently QEMU uses snprintf() and so silently truncates > the socket path provided by the user. This is undesirable because > the user will then be unable to connect to the

Re: [Qemu-devel] [svt-core] [PATCH] kvmclock: update system_time_msr address forcibly

2017-05-24 Thread Roman Kagan
On Wed, May 24, 2017 at 05:07:24PM +0300, Denis Plotnikov wrote: > Do an update of system_time_msr address every time before reading > the value of tsc_timestamp from guest's kvmclock page. > > It should be done in a forcible manner because there is a situation > when system_time_msr has been set

Re: [Qemu-devel] Monitor file path length limitation

2017-05-24 Thread Daniel P. Berrange
On Wed, May 24, 2017 at 10:26:58AM -0500, Eric Blake wrote: > On 05/24/2017 10:16 AM, Simon wrote: > > Hello, > > > > It seems that the monitor file path length is limited to about 100 > > characters (107 to be precise). > > Welcome to the joy of Unix socket (AF_UNIX) files. The kernel imposes

[Qemu-devel] [PATCH] sockets: report error if UNIX socket path is too long

2017-05-24 Thread Daniel P. Berrange
The 'struct sockaddr_un' only allows 108 bytes for the socket path. Currently QEMU uses snprintf() and so silently truncates the socket path provided by the user. This is undesirable because the user will then be unable to connect to the path they asked for. This change makes QEMU bounds check and

Re: [Qemu-devel] [PATCH] migration: remove register_savevm()

2017-05-24 Thread Cornelia Huck
On Wed, 24 May 2017 14:10:48 +0200 Laurent Vivier wrote: > We can replace the four remaining calls of register_savevm() by > calls to register_savevm_live(). So we can remove the function and > as we don't allocate anymore the ops pointer with g_new0() > we don't have to free

Re: [Qemu-devel] Monitor file path length limitation

2017-05-24 Thread Simon
Thank you for your answer Eric, I've learned a new thing today :) !

Re: [Qemu-devel] Monitor file path length limitation

2017-05-24 Thread Eric Blake
On 05/24/2017 10:16 AM, Simon wrote: > Hello, > > It seems that the monitor file path length is limited to about 100 > characters (107 to be precise). Welcome to the joy of Unix socket (AF_UNIX) files. The kernel imposes a hard length limit on sockaddr_un.sun_path[] (see 'man 7 unix') - and it

[Qemu-devel] Monitor file path length limitation

2017-05-24 Thread Simon
Hello, It seems that the monitor file path length is limited to about 100 characters (107 to be precise). Currently I'm using the '-monitor' parameter to create the monitor file in a directory which gather all the files related to a given VM (monitor file, PID file, disk image, etc.):

[Qemu-devel] [PATCH] kvmclock: update system_time_msr address forcibly

2017-05-24 Thread Denis Plotnikov
Do an update of system_time_msr address every time before reading the value of tsc_timestamp from guest's kvmclock page. It should be done in a forcible manner because there is a situation when system_time_msr has been set by kvm but qemu doesn't aware of it. This leads to updates of

Re: [Qemu-devel] [PATCH] kvmclock: update system_time_msr address forcibly

2017-05-24 Thread Denis Plotnikov
On 24.05.2017 17:09, Denis V. Lunev wrote: On 05/24/2017 05:07 PM, Denis Plotnikov wrote: Do an update of system_time_msr address every time before reading the value of tsc_timestamp from guest's kvmclock page. It should be done in a forcible manner because there is a situation when

Re: [Qemu-devel] [PATCH v4 8/8] tpm: Added support for TPM emulator

2017-05-24 Thread Stefan Berger
On 05/16/2017 03:58 AM, Amarnath Valluri wrote: This change introduces a new TPM backend driver that can communicate with swtpm(software TPM emulator) using unix domain socket interface. Swtpm uses two unix sockets, one for plain TPM commands and responses, and one for out-of-band control

Re: [Qemu-devel] VhostUserRequest # 20

2017-05-24 Thread Marc-André Lureau
Hi - Original Message - > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > > HI > > > > - Original Message - > > > Hi, > > > libvhost-user.h defines: > > >VHOST_USER_INPUT_GET_CONFIG = 20, > > > > That slipped by mistake from my vhost-user-input series WIP,

[Qemu-devel] Status of q35-lite?

2017-05-24 Thread Stefan Hajnoczi
Hi Chao, Last year there was an effort to make "built-in" hardware optional so that VMs can be launched with a minimal set of devices. You made SATA, PIT, and SMBus optional. What is the current status of this work? Are there more devices that could benefit from an optional switch? For

Re: [Qemu-devel] [PATCH 2/4] block: Guarantee that *file is set on bdrv_get_block_status()

2017-05-24 Thread Eric Blake
On 05/18/2017 09:32 PM, Eric Blake wrote: > We document that *file is valid if the return is not an error and > includes BDRV_BLOCK_OFFSET_VALID, but forgot to obey this contract > when a driver (such as blkdebug) lacks a callback. Broken in > commit 67a0fd2 (v2.6), when we added the file

Re: [Qemu-devel] [PATCH v4 7/8] tpm-passthrough: move reusable code to utils

2017-05-24 Thread Stefan Berger
On 05/16/2017 03:58 AM, Amarnath Valluri wrote: Signed-off-by: Amarnath Valluri Reviewed-by: Stefan Berger

Re: [Qemu-devel] [PATCH v4 6/8] tpm-backend: Move realloc_buffer() implementation to tpm-tis model

2017-05-24 Thread Stefan Berger
On 05/16/2017 03:58 AM, Amarnath Valluri wrote: buffer reallocation is very unlikely to be backend specific. Hence move inside the tis. Signed-off-by: Amarnath Valluri Reviewed-by: Stefan Berger

Re: [Qemu-devel] [PATCH 1/3] migration: Use savevm_handlers instead of loadvm copy

2017-05-24 Thread Juan Quintela
Laurent Vivier wrote: > On 24/05/2017 10:55, Juan Quintela wrote: >> From: Juan Quintela >> >> There is no reason for having the loadvm_handlers at all. There is >> only one use, and we can use the savevm handlers. >> >> We will remove the loadvm

Re: [Qemu-devel] [PATCH v4 5/8] tmp backend: Add new api to read backend TpmInfo

2017-05-24 Thread Stefan Berger
On 05/16/2017 03:58 AM, Amarnath Valluri wrote: TPM configuration options are backend implementation details and shall not be part of base TPMBackend object, and these shall not be accessed directly outside of the class, hence added a new interface method, get_tpm_options() to TPMDriverOps.,

Re: [Qemu-devel] [PATCH v4 1/8] tpm-backend: Remove unneeded member variable from backend class

2017-05-24 Thread Marc-André Lureau
Hi On Tue, May 16, 2017 at 12:00 PM Amarnath Valluri < amarnath.vall...@intel.com> wrote: > TPMDriverOps inside TPMBackend is not required, as it is supposed to be a > class > member. The only possible reason for keeping in TPMBackend was, to get the > backend type in tpm.c where dedicated

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

2017-05-24 Thread Radim Krčmář
Please use tags in patches. We usually begin the subject with "KVM: x86:" when touching arch/x86/kvm/x86.c. 2017-05-24 13:48+0800, Zhuangyanying: > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > @@ -8394,7 +8394,8 @@ static inline bool kvm_vcpu_has_events(struct kvm_vcpu > *vcpu) >

Re: [Qemu-devel] [RFC 0/3] qmp: Return extra information on qom-list-types

2017-05-24 Thread Eric Blake
On 05/24/2017 07:13 AM, Markus Armbruster wrote: >>> Might lead to more traffic rather than less. Depends on what >>> information the client needs to query. >> >> I think queries that return all available QOM types are likely to >> (should?) be cached by clients. > > Perhaps libvirt developers

Re: [Qemu-devel] [PATCH v4 4/8] tpm-backend: Made few interface methods optional

2017-05-24 Thread Stefan Berger
On 05/16/2017 03:58 AM, Amarnath Valluri wrote: This allows backend implementations left optional interface methods. For mandatory methods assertion checks added. Took the opportunity to remove unused methods: tpm_backend_get_type() tpm_backend_get_desc() Signed-off-by: Amarnath Valluri

Re: [Qemu-devel] [PATCH v4 3/8] tpm-backend: Initialize and free data members in it's own methods

2017-05-24 Thread Stefan Berger
On 05/16/2017 03:58 AM, Amarnath Valluri wrote: Initialize and free TPMBackend data members in it's own instance_init() and instance_finalize methods. Took the opportunity to remove unneeded destroy() method from TpmDriverOps interface as TPMBackend is a Qemu Object, we can use object_unref()

Re: [Qemu-devel] [PATCH] migration: remove register_savevm()

2017-05-24 Thread Dmitry Fleytman
> On 24 May 2017, at 15:10 PM, Laurent Vivier wrote: > > We can replace the four remaining calls of register_savevm() by > calls to register_savevm_live(). So we can remove the function and > as we don't allocate anymore the ops pointer with g_new0() > we don't have to free

Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-05-24 Thread Alberto Garcia
On Tue 23 May 2017 04:36:52 PM CEST, Eric Blake wrote: >> here's a patch series that rewrites the copy-on-write code in the >> qcow2 driver to reduce the number of I/O operations. > > And it competes with Denis and Anton's patches: >

Re: [Qemu-devel] [PATCH v4 2/8] tpm-backend: Move thread handling inside TPMBackend

2017-05-24 Thread Stefan Berger
On 05/16/2017 03:58 AM, Amarnath Valluri wrote: Move thread handling inside TPMBackend, this way backend implementations need not to maintain their own thread life cycle, instead they needs to implement 'handle_request()' class method that always been called from a thread. This change made

Re: [Qemu-devel] [PATCH v4 1/8] tpm-backend: Remove unneeded member variable from backend class

2017-05-24 Thread Stefan Berger
On 05/16/2017 03:58 AM, Amarnath Valluri wrote: TPMDriverOps inside TPMBackend is not required, as it is supposed to be a class member. The only possible reason for keeping in TPMBackend was, to get the backend type in tpm.c where dedicated backend api, tpm_backend_get_type() is present.

Re: [Qemu-devel] [PATCH] kvmclock: update system_time_msr address forcibly

2017-05-24 Thread Denis V. Lunev
On 05/24/2017 05:07 PM, Denis Plotnikov wrote: > Do an update of system_time_msr address every time before reading > the value of tsc_timestamp from guest's kvmclock page. > > It should be done in a forcible manner because there is a situation > when system_time_msr has been set by kvm but qemu

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

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

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

2017-05-24 Thread Eric Blake
On 05/23/2017 11:10 PM, Philippe Mathieu-Daudé wrote: > Hi Hervé, > > On 05/22/2017 06:11 PM, Hervé Poussineau wrote: >> - offset_to_bootsector is the number of sectors up to FAT bootsector >> - offset_to_fat is the number of sectors up to first File Allocation >> Table >> - offset_to_root_dir is

Re: [Qemu-devel] [PATCH 1/3] migration: Use savevm_handlers instead of loadvm copy

2017-05-24 Thread Laurent Vivier
On 24/05/2017 10:55, Juan Quintela wrote: > From: Juan Quintela > > There is no reason for having the loadvm_handlers at all. There is > only one use, and we can use the savevm handlers. > > We will remove the loadvm handlers on a following patch. > > Signed-off-by: Juan

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

2017-05-24 Thread Eric Blake
On 05/23/2017 09:56 PM, Wang Dong wrote: > > Hi guys, > > I am new to qemu. But I need do some job in it right now. > > When I try read qmp code. I found a interesting part against it. > > Some C source code is generate from json file. > > I wonder why this? What is the benefits of this?

Re: [Qemu-devel] [PATCH] libvhost-user: Fix VHOST_USER_NET_SET_MTU entry

2017-05-24 Thread Marc-André Lureau
- Original Message - > From: "Dr. David Alan Gilbert" > > VHOST_USER_'s 20th entry is defined as VHOST_USER_INPUT_GET_CONFIG but > should be VHOST_USER_NET_SET_MTU. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau

Re: [Qemu-devel] [RFC 0/3] qmp: Return extra information on qom-list-types

2017-05-24 Thread Eduardo Habkost
On Wed, May 24, 2017 at 02:13:16PM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Tue, May 23, 2017 at 04:12:43PM +0200, Markus Armbruster wrote: > >> Eduardo Habkost writes: > >> > >> > This series adds 'abstract' and

Re: [Qemu-devel] [PATCH] migration: keep bytes_xfer_prev init'd to zero

2017-05-24 Thread Felipe Franciosi
> On 23 May 2017, at 05:27, Peter Xu wrote: > > On Fri, May 19, 2017 at 10:59:02PM +0100, Felipe Franciosi wrote: >> The first time migration_bitmap_sync() is called, bytes_xfer_prev is set >> to ram_state.bytes_transferred which is, at this point, zero. The next >> time

Re: [Qemu-devel] [PATCH v6 0/9] qemu-img: add measure sub-command

2017-05-24 Thread Stefan Hajnoczi
On Mon, May 08, 2017 at 10:15:27AM -0400, Stefan Hajnoczi wrote: > v6: > * Change bdrv_measure() return type to BlockMeasureInfo * [Eric] > * Clarify that holes in sparse POSIX files are still counted [Eric] > > v5: > * Use UINT64_MAX instead of ~0ULL [Berto] > * Document qemu-img measure

Re: [Qemu-devel] [PULL 00/21] s390x patches

2017-05-24 Thread Stefan Hajnoczi
On Tue, May 23, 2017 at 01:12:45PM +0200, Cornelia Huck wrote: > The following changes since commit 56821559f0ba682fe6b367815572e6f974d329ab: > > Merge remote-tracking branch 'dgilbert/tags/pull-hmp-20170517' into staging > (2017-05-18 13:36:15 +0100) > > are available in the git repository

Re: [Qemu-devel] [PATCH] migration: remove register_savevm()

2017-05-24 Thread Samuel Thibault
Laurent Vivier, on mer. 24 mai 2017 14:10:48 +0200, wrote: > We can replace the four remaining calls of register_savevm() by > calls to register_savevm_live(). So we can remove the function and > as we don't allocate anymore the ops pointer with g_new0() > we don't have to free it then. > >

Re: [Qemu-devel] [PATCH 3/5] migration: Remove use of old MigrationParams

2017-05-24 Thread Markus Armbruster
Markus Armbruster writes: > Juan Quintela writes: > >> We have change in the previous patch to use migration capabilities for >> it. Notice that we continue using the old command line flags from >> migrate command from the time being. Remove the

Re: [Qemu-devel] [PATCH 3/5] migration: Remove use of old MigrationParams

2017-05-24 Thread Markus Armbruster
I got confused and replied to an old version. Please ignore. Markus Armbruster writes: > Juan Quintela writes: > >> We have change in the previous patch to use migration capabilities for >> it. Notice that we continue using the old command line flags

Re: [Qemu-devel] [PATCH 3/5] migration: Remove use of old MigrationParams

2017-05-24 Thread Markus Armbruster
Juan Quintela writes: > We have change in the previous patch to use migration capabilities for > it. Notice that we continue using the old command line flags from > migrate command from the time being. Remove the set_params method as for the time being > now it is empty.

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

2017-05-24 Thread Alexey Perevalov
On 05/24/2017 03:01 PM, Peter Xu wrote: On Wed, May 24, 2017 at 10:56:37AM +0300, Alexey wrote: On Wed, May 24, 2017 at 02:57:36PM +0800, Peter Xu wrote: On Tue, May 23, 2017 at 02:31:08PM +0300, Alexey Perevalov wrote: This patch adds ability to track down already copied pages, it's

Re: [Qemu-devel] [RFC 0/3] qmp: Return extra information on qom-list-types

2017-05-24 Thread Markus Armbruster
Eduardo Habkost writes: > On Tue, May 23, 2017 at 04:12:43PM +0200, Markus Armbruster wrote: >> Eduardo Habkost writes: >> >> > This series adds 'abstract' and 'parent-types' fields to the >> > output of qom-list-types. >> >> Peeking at PATCH 3, it

[Qemu-devel] [PATCH] migration: remove register_savevm()

2017-05-24 Thread Laurent Vivier
We can replace the four remaining calls of register_savevm() by calls to register_savevm_live(). So we can remove the function and as we don't allocate anymore the ops pointer with g_new0() we don't have to free it then. Signed-off-by: Laurent Vivier --- hw/net/vmxnet3.c

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

2017-05-24 Thread Marcel Apfelbaum
- Original Message - > From: "Markus Armbruster" > To: "Philippe Mathieu-Daudé" > Cc: qemu-devel@nongnu.org, "Mao Zhongyi" , > j...@resnulli.us, jasow...@redhat.com, "Michael > S. Tsirkin" , "Marcel

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

2017-05-24 Thread Peter Xu
On Wed, May 24, 2017 at 10:56:37AM +0300, Alexey wrote: > On Wed, May 24, 2017 at 02:57:36PM +0800, Peter Xu wrote: > > On Tue, May 23, 2017 at 02:31:08PM +0300, Alexey Perevalov wrote: > > > This patch adds ability to track down already copied > > > pages, it's necessary for calculation vCPU

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

2017-05-24 Thread Alexey Perevalov
On 05/24/2017 02:33 PM, Peter Xu wrote: On Wed, May 24, 2017 at 09:45:48AM +0300, Alexey wrote: [...] return false; } -ioctl_mask = (__u64)1 << _UFFDIO_REGISTER | - (__u64)1 << _UFFDIO_UNREGISTER; +ioctl_mask = 1 << _UFFDIO_REGISTER | +

Re: [Qemu-devel] [PATCH V6 08/10] migration: calculate vCPU blocktime on dst side

2017-05-24 Thread Alexey Perevalov
On 05/24/2017 02:22 PM, Peter Xu wrote: On Wed, May 24, 2017 at 12:37:20PM +0300, Alexey wrote: On Wed, May 24, 2017 at 03:53:05PM +0800, Peter Xu wrote: On Tue, May 23, 2017 at 02:31:09PM +0300, Alexey Perevalov wrote: This patch provides blocktime calculation per vCPU, as a summary and as a

Re: [Qemu-devel] [PATCH 2/4] migration: Inactivate images after .save_live_complete_precopy()

2017-05-24 Thread Juan Quintela
Kevin Wolf wrote: > Block migration may still access the image during its > .save_live_complete_precopy() implementation, so we should only > inactivate the image afterwards. > > Another reason for the change is that inactivating an image fails when > there is still a non-device

Re: [Qemu-devel] [PATCH v2] migration: Allow unregister of save_live handlers

2017-05-24 Thread Juan Quintela
Peter Xu wrote: > On Wed, May 24, 2017 at 01:21:52PM +0200, Juan Quintela wrote: >> Migration non save_live handlers have an ops member that is >> dinamically allocated by migration code. Save_live handlers have it >> passed as argument and are responsability of the caller.

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

2017-05-24 Thread Peter Xu
On Wed, May 24, 2017 at 09:45:48AM +0300, Alexey wrote: [...] > > > > > return false; > > > } > > > > > > -ioctl_mask = (__u64)1 << _UFFDIO_REGISTER | > > > - (__u64)1 << _UFFDIO_UNREGISTER; > > > +ioctl_mask = 1 << _UFFDIO_REGISTER | > > > +

Re: [Qemu-devel] [PATCH v2] migration: Allow unregister of save_live handlers

2017-05-24 Thread Peter Xu
On Wed, May 24, 2017 at 01:21:52PM +0200, Juan Quintela wrote: > Migration non save_live handlers have an ops member that is > dinamically allocated by migration code. Save_live handlers have it > passed as argument and are responsability of the caller. Add a new > member is_allocated that

Re: [Qemu-devel] [PATCH V6 08/10] migration: calculate vCPU blocktime on dst side

2017-05-24 Thread Peter Xu
On Wed, May 24, 2017 at 12:37:20PM +0300, Alexey wrote: > On Wed, May 24, 2017 at 03:53:05PM +0800, Peter Xu wrote: > > On Tue, May 23, 2017 at 02:31:09PM +0300, Alexey Perevalov wrote: > > > This patch provides blocktime calculation per vCPU, > > > as a summary and as a overlapped value for all

[Qemu-devel] [PATCH v2] migration: Allow unregister of save_live handlers

2017-05-24 Thread Juan Quintela
Migration non save_live handlers have an ops member that is dinamically allocated by migration code. Save_live handlers have it passed as argument and are responsability of the caller. Add a new member is_allocated that remembers if ops has to be freed. This allows unregister_savevm() to work

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

2017-05-24 Thread David Gibson
On Wed, May 24, 2017 at 11:55:13AM +0200, Greg Kurz wrote: 1;4601;0c> On Wed, 24 May 2017 14:52:36 +1000 > David Gibson wrote: > [...] > > > > This patch seems like a good idea regardless of the rest, so I've > > fixed the minor nits Greg pointed out and merged to

Re: [Qemu-devel] [virtio-dev] Re: virtio crypto device implemenation

2017-05-24 Thread Cornelia Huck
On Wed, 24 May 2017 04:13:47 +0300 "Michael S. Tsirkin" wrote: > On Tue, May 23, 2017 at 04:08:25PM +, Zeng, Xin wrote: > > Hi, Michael, > >As you know, Lei Gong from Huawei and I are co-working on virtio crypto > > device spec, he is focusing on symmetric algorithm

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

2017-05-24 Thread Igor Mammedov
On Wed, 24 May 2017 11:28:57 +0200 Greg Kurz wrote: > On Wed, 24 May 2017 15:07:54 +1000 > David Gibson wrote: > > > On Tue, May 23, 2017 at 01:18:11PM +0200, Laurent Vivier wrote: > > > If the OS is not started, QEMU sends an event to the OS > >

<    1   2   3   >