[libvirt] a libvirt event question

2018-01-18 Thread Chen, Xiaogang
Hello: We are adding libvirt functions to launch SEV VM. When start VM I put it at "pause" state. During that time qemu sends an event "sev_measurement". We hope libvirtd get this event before we resume VM. But I did not see libvirtd receive it. If I send this event at qemu during resume

Re: [libvirt] [PATCH] add support of iSER transport type in qemu with libiscsi

2018-01-18 Thread John Ferlan
On 01/18/2018 01:46 AM, Charles Kelimod wrote: > Hello John, > This is a technical list - top-posting is not acceptable. > I have questions: > >>>This and the Parse makes no sense when compared to the 3 possible > options.  That is, it's possible to have "tcp", "rdma", and "iser", but > you

Re: [libvirt] [PATCH RESEND v1 1/2] i386: Add Intel Processor Trace feature support

2018-01-18 Thread Paolo Bonzini
On 18/01/2018 17:52, Eduardo Habkost wrote: > On Thu, Jan 18, 2018 at 03:44:49PM +0100, Paolo Bonzini wrote: >> On 18/01/2018 15:37, Eduardo Habkost wrote: >>> On Thu, Jan 18, 2018 at 02:39:57PM +0100, Paolo Bonzini wrote: On 18/01/2018 14:24, Eduardo Habkost wrote: > However, if there's

Re: [libvirt] [PATCH RESEND v1 1/2] i386: Add Intel Processor Trace feature support

2018-01-18 Thread Eduardo Habkost
On Thu, Jan 18, 2018 at 03:44:49PM +0100, Paolo Bonzini wrote: > On 18/01/2018 15:37, Eduardo Habkost wrote: > > On Thu, Jan 18, 2018 at 02:39:57PM +0100, Paolo Bonzini wrote: > >> On 18/01/2018 14:24, Eduardo Habkost wrote: > >>> However, if there's a simple way to make it possible to migrate >

[libvirt] [PATCH 14/14] qemu_hotplug: Hotunplug of reservations

2018-01-18 Thread Michal Privoznik
Just line in previous commit, if we are the last ones that are using the pr-manager delete it and also kill the pr-helper process. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 18 ++ src/qemu/qemu_domain.h | 4 src/qemu/qemu_hotplug.c

[libvirt] [PATCH 13/14] qemu_hotplug: Hotplug of reservations

2018-01-18 Thread Michal Privoznik
Surprisingly, nothing special is happening here. If we are the first to use the managed helper then spawn it. If not, we're almost done. Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 97 + 1 file changed, 97

[libvirt] [PATCH 12/14] qemu_process.c: Introduce qemuProcessSetupPRDaemon

2018-01-18 Thread Michal Privoznik
Again, for hotplug we need to be able to spawn just one process. Not all of them. Expose the static function we already have for that. Signed-off-by: Michal Privoznik --- src/qemu/qemu_process.c | 9 + src/qemu/qemu_process.h | 4 2 files changed, 13

[libvirt] [PATCH 11/14] qemu_domain: Introduce qemuDomainGetPRUsageCount

2018-01-18 Thread Michal Privoznik
For hotplug, we will need to know how many disks use given pr-manager so that we know if to plug it too (for the first usage) or unlpug it (for the last one). Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 26 ++ src/qemu/qemu_domain.h

[libvirt] [PATCH 07/14] qemu: Generate cmd line at startup

2018-01-18 Thread Michal Privoznik
This is the easier part. All we need to do here is put -object pr-manger-helper,id=$alias,path=$socketPath and then just reference the object in -drive file.pr-manger=$alias. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c| 59

[libvirt] [PATCH 10/14] qemu: Track PR daemons PIDs in status XML

2018-01-18 Thread Michal Privoznik
We need to keep track of spawned processes so that we can kill them when qemu process dies. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 130 + 1 file changed, 130 insertions(+) diff --git

[libvirt] [PATCH 09/14] qemu: Start PR daemons on domain startup

2018-01-18 Thread Michal Privoznik
Before we exec() qemu we have to spawn pr-helper processes for all managed reservations (well, technically there can only one). The only caveat there is that we should place the process into the same namespace and cgroup as qemu (so that it shares the same view of the system). But we can do that

[libvirt] [PATCH 03/14] qemu: Introduce pr-manager-helper capability

2018-01-18 Thread Michal Privoznik
The capability tracks if qemu has pr-manager-helper object. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH 08/14] qemu: Introduce pr_helper to qemu.conf

2018-01-18 Thread Michal Privoznik
Just like we allow users overriding path to bridge-helper detected at compile time we can allow them to override path to qemu-pr-helper. Signed-off-by: Michal Privoznik --- m4/virt-driver-qemu.m4 | 5 + src/qemu/libvirtd_qemu.aug | 1 +

[libvirt] [PATCH 01/14] virstoragefile: Introduce virStoragePRDef

2018-01-18 Thread Michal Privoznik
This is a definition that holds information on SCSI persistent reservation settings. The XML part looks like this: If @managed is set to 'yes' then the is not parsed. This design was agreed on here: https://www.redhat.com/archives/libvir-list/2017-November/msg01005.html

[libvirt] [PATCH 05/14] qemu: Generate alias for pr-helper

2018-01-18 Thread Michal Privoznik
While we're not generating the command line just yet (look for the next commit), we can generate the alias for pr-manager. A domain can have up to one managed pr-manager (in which case socket path is decided by libvirt and pr-helper is spawned by libvirt too), but up to ndisks of unmanaged ones

[libvirt] [PATCH 06/14] qemu: Store prAlias and prPath in status XML

2018-01-18 Thread Michal Privoznik
Now that we generate pr-manger alias and socket path store them in status XML so that they are preserved across daemon restarts. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 72 -- 1 file changed, 70

[libvirt] [PATCH 02/14] qemuDomainDiskChangeSupported: Deny changing reservations

2018-01-18 Thread Michal Privoznik
Couple of reasons for that: a) there's no monitor command to change path where the pr-helper connects to, or b) there's no monitor command to introduce a new pr-helper for a disk that already exists. Signed-off-by: Michal Privoznik --- src/libvirt_private.syms | 1 +

[libvirt] [PATCH 04/14] qemu_domain: Introduce qemuDomainDiskPRObject

2018-01-18 Thread Michal Privoznik
This is an extended definition of virStoragePRDef because it contains runtime information (like path to pr helper socket, its pid and alias). Since these are driver dependant we should have a driver specific structure instead of putting all of that into driver agnostic structure. Signed-off-by:

[libvirt] [PATCH 00/14] Basic implementation of persistent reservations

2018-01-18 Thread Michal Privoznik
QEMU added support for SCSI persistent reservations. The way QEMU implemented that makes it slightly harder for libvirt to adapt to - it's a small binary that needs to start before qemu so that it can connect to it. Basically, what libvirt does is: 1) start qemu-pr-helper (the small binary from

Re: [libvirt] [PATCH RESEND v1 1/2] i386: Add Intel Processor Trace feature support

2018-01-18 Thread Paolo Bonzini
On 18/01/2018 15:37, Eduardo Habkost wrote: > On Thu, Jan 18, 2018 at 02:39:57PM +0100, Paolo Bonzini wrote: >> On 18/01/2018 14:24, Eduardo Habkost wrote: >>> However, if there's a simple way to make it possible to migrate >>> between hosts with different CPUID[14h] data, it would be even >>>

Re: [libvirt] [PATCH RESEND v1 1/2] i386: Add Intel Processor Trace feature support

2018-01-18 Thread Eduardo Habkost
On Thu, Jan 18, 2018 at 02:39:57PM +0100, Paolo Bonzini wrote: > On 18/01/2018 14:24, Eduardo Habkost wrote: > > However, if there's a simple way to make it possible to migrate > > between hosts with different CPUID[14h] data, it would be even > > better. With the current KVM intel-pt

Re: [libvirt] [PATCH 01/17] cpu: add CPU features for indirect branch prediction protection

2018-01-18 Thread Jiri Denemark
On Wed, Jan 17, 2018 at 10:27:58 -0600, Eric Blake wrote: > On 01/09/2018 04:45 PM, Jiri Denemark wrote: > > From: Paolo Bonzini > > > > Added in QEMU commits TBD and TBD. > > I'm assuming the TBD will be resolved before you push? Oops, I completely forgot about the TBDs

Re: [libvirt] [PATCH 00/17] CPU models and features for Spectre, CVE-2017-5715

2018-01-18 Thread Jiri Denemark
On Wed, Jan 17, 2018 at 17:07:22 +0100, Jiri Denemark wrote: > On Wed, Jan 10, 2018 at 10:52:29 +0100, Pavel Hrdina wrote: > > On Tue, Jan 09, 2018 at 11:45:13PM +0100, Jiri Denemark wrote: > > > This is the libvirt's part of the changes related to CVE-2017-5715. The > > > new models can be used

Re: [libvirt] Test failures in libvirt RHEL-6.2.AUS errata job

2018-01-18 Thread Jiri Denemark
On Thu, Jan 18, 2018 at 06:57:20 -0500, Jingjing Shao wrote: > Hi admin, > > I met the error as below in the in libvirt RHEL-6.2.AUS errata job, can you > help to check it ? > > === > 1 of 54 tests failed > (2 tests were not run) > Please report to

Re: [libvirt] [PATCH RESEND v1 1/2] i386: Add Intel Processor Trace feature support

2018-01-18 Thread Paolo Bonzini
On 18/01/2018 14:24, Eduardo Habkost wrote: > However, if there's a simple way to make it possible to migrate > between hosts with different CPUID[14h] data, it would be even > better. With the current KVM intel-pt implementation, what > happens if the CPUID[14h] data seen by the guest doesn't

Re: [libvirt] [PATCH] Add Eduardo Otubo to Planet Virt-Tools

2018-01-18 Thread Daniel P. Berrange
On Thu, Jan 18, 2018 at 02:24:01PM +0100, Eduardo Otubo wrote: > Adding Eduardo Otubo's blog information and avatar to config.ini at > Planet Virt-Tools. > > Signed-ff-by: Eduardo Otubo > --- > updater/virt-tools/config.ini | 6 ++ >

[libvirt] [PATCH] Add Eduardo Otubo to Planet Virt-Tools

2018-01-18 Thread Eduardo Otubo
Adding Eduardo Otubo's blog information and avatar to config.ini at Planet Virt-Tools. Signed-ff-by: Eduardo Otubo --- updater/virt-tools/config.ini | 6 ++ updater/virt-tools/images/otubo.png | Bin 0 -> 10597 bytes 2 files changed, 6 insertions(+) create mode

Re: [libvirt] [PATCH RESEND v1 1/2] i386: Add Intel Processor Trace feature support

2018-01-18 Thread Eduardo Habkost
On Thu, Jan 18, 2018 at 05:33:53AM +, Kang, Luwei wrote: > > > > > > > On Mon, Jan 15, 2018 at 12:04:55 -0200, Eduardo Habkost wrote: > > > > > > > > CCing libvirt developers. > > > > > > > ... > > > > > > > > This case is slightly more problematic, however: the new > > > > > > > > feature is

[libvirt] Test failures in libvirt RHEL-6.2.AUS errata job

2018-01-18 Thread Jingjing Shao
Hi admin, I met the error as below in the in libvirt RHEL-6.2.AUS errata job, can you help to check it ? === 1 of 54 tests failed (2 tests were not run) Please report to libvir-list@redhat.com === make[1]: *** [check-TESTS]

Re: [libvirt] [PATCH V3] nodedev: Fix failing to parse PCI address for non-PCI network devices

2018-01-18 Thread Erik Skultety
On Wed, Jan 17, 2018 at 10:46:32AM -0700, Jim Fehlig wrote: > Commit 8708ca01c added virNetDevSwitchdevFeature() to check if a network > device has Switchdev capabilities. virNetDevSwitchdevFeature() attempts > to retrieve the PCI device associated with the network device, ignoring > non-PCI

[libvirt] [PATCH] Raise the frame limit for tests

2018-01-18 Thread Ján Tomko
After the latest CPU additions, the build fails with clang: cputest.c:905:1: error: stack frame size of 26136 bytes in function 'mymain' [-Werror,-Wframe-larger-than=] Raise the relaxed limit which is used for tests. --- m4/virt-compile-warnings.m4 | 2 +- 1 file changed, 1 insertion(+), 1

Re: [libvirt] [PATCH 2/3] nodedev: update mdev_types caps before dumpxml

2018-01-18 Thread Erik Skultety
On Thu, Jan 18, 2018 at 02:09:14AM +, Wuzongyong (Euler Dept) wrote: > Would you push this two patches before release of 4.0.0? Well, I don't think it's that critical, in fact I think we can easily wait until 4.1, especially since we're in RC2, I'd rather not push anything unnecessary just