Re: [libvirt] [PATCH 00/19] Add vhost-user-gpu support

2019-08-22 Thread Cole Robinson
On 8/1/19 5:28 AM, Marc-André Lureau wrote: > Hi > > On Wed, Jun 5, 2019 at 2:32 PM wrote: >> >> From: Marc-André Lureau >> >> Hi, >> >> This series of patches adds support for running virtio GPUs in >> seperate processes, thanks to vhost-user backend. >> >> The QEMU support landed for 4.1. Ther

Re: [libvirt] [PATCH v2 7/9] qemu: add helper for getting full FSInfo

2019-08-22 Thread Daniel Henrique Barboza
This patch fails to compile in my env throwing this error:   CC   qemuagenttest.o qemuagenttest.c: In function 'testQemuAgentGetFSInfoCommon.constprop': qemuagenttest.c:242:5: error: 'ret_def' may be used uninitialized in this function [-Werror=maybe-uninitialized]   242 | virDomainDef

Re: [libvirt] [PATCH v2 4/9] qemu: add helper function for querying OS info

2019-08-22 Thread Daniel Henrique Barboza
On 8/21/19 7:15 PM, Jonathon Jongsma wrote: This function queries the guest operating system information and adds the returned information to an array of typed parameters with field names intended to be returned in virDomainGetGuestInfo(). Signed-off-by: Jonathon Jongsma Code looks good, b

Re: [libvirt] RFC: revival of hotplug/unplug for PCI Multifunction devices in QEMU guests

2019-08-22 Thread Daniel Henrique Barboza
Hi Daniel, On 6/19/19 4:31 AM, Daniel P. Berrangé wrote: On Tue, Jun 18, 2019 at 03:04:40PM -0300, Daniel Henrique Barboza wrote: Hi, This is labeled as RFC but it's more like a FYI to let people know and comment beforehand. Shiva sent a 28 patch series last year that implements hotplug/unplug

Re: [libvirt] [PATCH] mdev: point user to mdevctl for missing devices

2019-08-22 Thread Jonathon Jongsma
On Tue, 2019-08-20 at 08:44 +0200, Erik Skultety wrote: > On Mon, Aug 19, 2019 at 02:30:05PM -0500, Jonathon Jongsma wrote: > > When a host is rebooted, any mediated devices that were previously > > configured will disappear. There have been requests for libvirt to > > handle persisting these media

[libvirt] [PATCH 2/6] virSecuritySELinuxSetFileconImpl: Drop @optional argument

2019-08-22 Thread Michal Privoznik
The only thing that the @optional argument does is that it makes the function return 1 instead of 0 if setting SELinux context failed in a non-critical fashion. Drop the argument then and return 1 in that case. This enables caller to learn if SELinux context was set or not. Signed-off-by: Michal P

[libvirt] [PATCH 5/6] security_selinux: Drop virSecuritySELinuxSetFileconHelper

2019-08-22 Thread Michal Privoznik
This function is no longer needed because after previous commits it's just an alias to virSecuritySELinuxSetFilecon. Signed-off-by: Michal Privoznik --- src/security/security_selinux.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/src/security/s

[libvirt] [PATCH 6/6] security_selinux: Play nicely with network FS that only emulates SELinux

2019-08-22 Thread Michal Privoznik
There are some network file systems that do support XATTRs (e.g. gluster via FUSE). And they appear to support SELinux too. However, not really. Problem is, that it is impossible to change SELinux label of a file stored there, and yet we claim success (rightfully - hypervisor succeeds in opening th

[libvirt] [PATCH 4/6] security_selinux: Drop @optional from _virSecuritySELinuxContextItem

2019-08-22 Thread Michal Privoznik
Now, that we don't need to remember if setting context is 'optional' (the argument only made virSecuritySELinuxSetFileconImpl() return a different success code), we can drop it from the _virSecuritySELinuxContextItem structure as we don't need to remember it in transactions. Signed-off-by: Michal

[libvirt] [PATCH 1/6] virSecuritySELinuxGetProcessLabel: Fix comment

2019-08-22 Thread Michal Privoznik
This function has funny approach to retvals. Document them more clearly. Signed-off-by: Michal Privoznik --- src/security/security_selinux.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c in

[libvirt] [PATCH 0/6] security_selinux: Don't store XATTRs if FS fakes SELinux

2019-08-22 Thread Michal Privoznik
For full explanation see 6/6, but here's a digest: GlusterFS via FUSE supports XATTRs but doesn't allow any SELinux label change (which is fortunate for us because migrations work at least). However, we need to treat this situation as "don't remember any seclabels" because if the source sets XATTR

[libvirt] [PATCH 3/6] security_selinux: DropvirSecuritySELinuxSetFileconOptional()

2019-08-22 Thread Michal Privoznik
There is no real difference between virSecuritySELinuxSetFilecon() and virSecuritySELinuxSetFileconOptional(). Drop the latter in favour of the former. Signed-off-by: Michal Privoznik --- src/security/security_selinux.c | 53 ++--- 1 file changed, 22 insertions(+), 31

Re: [libvirt] [PATCH v3 2/2] security_util: Remove stale XATTRs

2019-08-22 Thread Jiri Denemark
On Thu, Aug 22, 2019 at 16:56:02 +0200, Michal Privoznik wrote: > It may happen that we leave some XATTRs behind. For instance, on > a sudden power loss, the host just shuts down without calling > restore on domain paths. This creates a problem, because when the > host starts up again, the XATTRs a

[libvirt] [PATCH v3 2/2] security_util: Remove stale XATTRs

2019-08-22 Thread Michal Privoznik
It may happen that we leave some XATTRs behind. For instance, on a sudden power loss, the host just shuts down without calling restore on domain paths. This creates a problem, because when the host starts up again, the XATTRs are there but they don't reflect the true state and this may result in li

Re: [libvirt] [PATCH v2 1/2] util: Introduce virhostuptime

2019-08-22 Thread Jiri Denemark
On Thu, Aug 22, 2019 at 13:15:32 +0200, Michal Privoznik wrote: > This module contains function to get host boot time. > > Signed-off-by: Michal Privoznik > --- > configure.ac | 1 + > src/libvirt_private.syms | 4 ++ > src/util/Makefile.inc.am | 2 + > src/util/virhostuptime.c |

Re: [libvirt] [PATCH v2 2/2] security_util: Remove stale XATTRs

2019-08-22 Thread Jiri Denemark
On Thu, Aug 22, 2019 at 13:15:33 +0200, Michal Privoznik wrote: > It may happen that we leave some XATTRs behind. For instance, on > a sudden power loss, the host just shuts down without calling > restore on domain paths. This creates a problem, because when the > host starts up again, the XATTRs a

Re: [libvirt] [PATCH] security: Don't increase XATTRs refcounter on failure

2019-08-22 Thread Martin Kletzander
On Thu, Aug 22, 2019 at 02:30:30PM +0200, Michal Privoznik wrote: If user has two domains, each have the same disk (configured for RW) but each runs with different seclabel then we deny start of the second domain because in order to do that we would need to relabel the disk but that would cut the

[libvirt] [PATCH] security: Don't increase XATTRs refcounter on failure

2019-08-22 Thread Michal Privoznik
If user has two domains, each have the same disk (configured for RW) but each runs with different seclabel then we deny start of the second domain because in order to do that we would need to relabel the disk but that would cut the first domain off. Even if we did not do that, qemu would fail to st

[libvirt] [BUG] When PLUG a bridge interface to an active VM, the generated LIVE and CONFIG mac address are different

2019-08-22 Thread Xu Yandong (Yandong Xu)
Hi, When plug a bridge interface to an active VM with both LIVE AND CONFIG flags, libvirt generate different mac address to LIVE and CONFIG instance, so After I reboot the VM, DHCP server doesn't assign the same IP address to the new bridge interface. Steps: 1. Having running VM ## virsh list I

Re: [libvirt] QEMU bitmap backup usability FAQ

2019-08-22 Thread Vladimir Sementsov-Ogievskiy
22.08.2019 0:19, John Snow wrote: > > > On 8/21/19 10:21 AM, Vladimir Sementsov-Ogievskiy wrote: >> [CC Nikolay] >> >> 21.08.2019 1:25, John Snow wrote: >>> Hi, downstream here at Red Hat I've been fielding some questions about >>> the usability and feature readiness of Bitmaps (and related featu

[libvirt] [PATCH v2 0/2] security: Deal with stale XATTRs

2019-08-22 Thread Michal Privoznik
v2 of: https://www.redhat.com/archives/libvir-list/2019-August/msg00520.html diff to v1: - use virOnce to obtain host boot time - switched to configure time check of getutxid - dropped host's UUID from timestamp Michal Prívozník (2): util: Introduce virhostuptime security_util: Remove stale

[libvirt] [PATCH v2 1/2] util: Introduce virhostuptime

2019-08-22 Thread Michal Privoznik
This module contains function to get host boot time. Signed-off-by: Michal Privoznik --- configure.ac | 1 + src/libvirt_private.syms | 4 ++ src/util/Makefile.inc.am | 2 + src/util/virhostuptime.c | 81 src/util/virhostuptime.h | 27 +

[libvirt] [PATCH v2 2/2] security_util: Remove stale XATTRs

2019-08-22 Thread Michal Privoznik
It may happen that we leave some XATTRs behind. For instance, on a sudden power loss, the host just shuts down without calling restore on domain paths. This creates a problem, because when the host starts up again, the XATTRs are there but they don't reflect the true state and this may result in li

Re: [libvirt] Fwd: libvirtd failing on MacOS in setgroups

2019-08-22 Thread Daniel P . Berrangé
On Wed, Aug 21, 2019 at 09:34:05PM +0300, Roman Bolshakov wrote: > On Wed, Aug 21, 2019 at 05:55:51PM +0100, Daniel P. Berrangé wrote: > > On Wed, Aug 21, 2019 at 12:47:03PM -0400, Marcus Furlong wrote: > > > On Wed, 21 Aug 2019 at 08:23, Daniel P. Berrangé > > > wrote: > > > > > > > > On Tue, Au