Re: [ovirt-devel] Re: device compatibility interface for live migration with assigned devices

2020-08-20 Thread Jason Wang
On 2020/8/20 下午8:27, Cornelia Huck wrote: On Wed, 19 Aug 2020 17:28:38 +0800 Jason Wang wrote: On 2020/8/19 下午4:13, Yan Zhao wrote: On Wed, Aug 19, 2020 at 03:39:50PM +0800, Jason Wang wrote: On 2020/8/19 下午2:59, Yan Zhao wrote: On Wed, Aug 19, 2020 at 02:57:34PM +0800, Jason Wang wrote:

[PATCH] Modify virCPUarmCompare to perform compare actions

2020-08-20 Thread Zhenyu Zheng
Modify virCPUarmCompare in cpu_arm.c to perform actual compare actions. Compare host cpu vendor and model info with guest cpu as initial implementation, as most ARM clouds uses host-passthrogh mode. Signed-off-by: Zhenyu Zheng --- src/cpu/cpu_arm.c | 188 +

Re: [PATCH] Xen: Improve parsing of PCI addresses in config converter

2020-08-20 Thread Daniel Henrique Barboza
On 8/10/20 8:14 PM, Jim Fehlig wrote: There was a report on libvirt-users [1] about the domxml to/from native converter in the Xen driver not handling PCI addresses without a domain specification. This patch improves parsing of PCI addresses in the converter and allows PCI addresses with only

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Jim Fehlig
On 8/20/20 2:07 PM, Jim Fehlig wrote: On 8/20/20 12:01 PM, Daniel P. Berrangé wrote: On Thu, Aug 20, 2020 at 11:42:45AM -0600, Jim Fehlig wrote: On 8/20/20 10:54 AM, Mark Mielke wrote: On Thu, Aug 20, 2020 at 11:48 AM Christian Ehrhardt mailto:christian.ehrha...@canonical.com>> wrote: On

[RFC] qemu: Check for changes in qemu modules directory

2020-08-20 Thread Jim Fehlig
Add a configuration option for specifying location of the qemu modules directory, defaulting to /usr/lib64/qemu. Then use this location to check for changes in the directory, indicating that a qemu module has changed and capabilities need to be reprobed. Signed-off-by: Jim Fehlig --- This is a m

Re: [libvirt PATCH] RFC: Add support for vDPA network devices

2020-08-20 Thread Laine Stump
On 8/18/20 2:37 PM, Jonathon Jongsma wrote: vDPA network devices allow high-performance networking in a virtual machine by providing a wire-speed data path. These devices require a vendor-specific host driver but the data path follows the virtio specification. The support for vDPA devices was re

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Mark Mielke
On Thu, Aug 20, 2020 at 2:01 PM Daniel P. Berrangé wrote: > IIUC, Mark's point is that an RPM update won't replace the file in-placec. > It will write out a new temporary file and then rename over the top of the > old file, which should trigger an update on the directory mtime. > Yep, correct.

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Jim Fehlig
On 8/20/20 12:01 PM, Daniel P. Berrangé wrote: On Thu, Aug 20, 2020 at 11:42:45AM -0600, Jim Fehlig wrote: On 8/20/20 10:54 AM, Mark Mielke wrote: On Thu, Aug 20, 2020 at 11:48 AM Christian Ehrhardt mailto:christian.ehrha...@canonical.com>> wrote: On Thu, Aug 20, 2020 at 5:15 PM Mark Miel

Re: [PATCH] lxc: Add TPM passthrough option for LXC driver

2020-08-20 Thread Daniel Henrique Barboza
On 8/16/20 1:16 PM, Julio Faracco wrote: There is no support to use TPM for passthrough for LXC libvirt driver this commit adds the option to use host TPM inside containers. " for LXC libvirt driver. This commit adds the option ..." Signed-off-by: Julio Faracco --- src/lxc/lxc_cgr

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Daniel P . Berrangé
On Thu, Aug 20, 2020 at 11:42:45AM -0600, Jim Fehlig wrote: > On 8/20/20 10:54 AM, Mark Mielke wrote: > > On Thu, Aug 20, 2020 at 11:48 AM Christian Ehrhardt > > > > wrote: > > > > On Thu, Aug 20, 2020 at 5:15 PM Mark Mielke >

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Jim Fehlig
On 8/20/20 10:54 AM, Mark Mielke wrote: On Thu, Aug 20, 2020 at 11:48 AM Christian Ehrhardt mailto:christian.ehrha...@canonical.com>> wrote: On Thu, Aug 20, 2020 at 5:15 PM Mark Mielke mailto:mark.mie...@gmail.com>> wrote: > On Thu, Aug 20, 2020 at 8:55 AM Christian Ehrhardt mailto

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Mark Mielke
On Thu, Aug 20, 2020 at 11:48 AM Christian Ehrhardt < christian.ehrha...@canonical.com> wrote: > On Thu, Aug 20, 2020 at 5:15 PM Mark Mielke wrote: > > On Thu, Aug 20, 2020 at 8:55 AM Christian Ehrhardt < > christian.ehrha...@canonical.com> wrote: > >> This was meant for upgrades, but if libvirt

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Christian Ehrhardt
On Thu, Aug 20, 2020 at 5:15 PM Mark Mielke wrote: > > On Thu, Aug 20, 2020 at 8:55 AM Christian Ehrhardt > wrote: >> >> On Thu, Aug 20, 2020 at 12:43 PM Martin Wilck wrote: >> > The simplest approach is to touch the qemu binaries. We discussed this >> > already. It has the drawback that it mak

Re: [libvirt PATCH v2 03/16] nodedev: Add ability to filter by active state

2020-08-20 Thread Erik Skultety
On Tue, Aug 18, 2020 at 09:47:53AM -0500, Jonathon Jongsma wrote: > Add two flag values for virConnectListAllNodeDevices() so that we can > list only node devices that are active or inactive. > > Signed-off-by: Jonathon Jongsma > --- ... > diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virno

Re: [libvirt PATCH v2 02/16] nodedev: introduce concept of 'active' node devices

2020-08-20 Thread Erik Skultety
On Tue, Aug 18, 2020 at 09:47:52AM -0500, Jonathon Jongsma wrote: > we will be able to define mediated devices that can be started or > stopped, so we need to be able to indicate whether the device is active > or not, similar to other resources (storage pools, domains, etc.) > > Signed-off-by: Jona

Re: [libvirt PATCH v2 01/16] tests: remove extra trailing semicolon

2020-08-20 Thread Erik Skultety
On Tue, Aug 18, 2020 at 09:47:51AM -0500, Jonathon Jongsma wrote: > The macro should not have a trailing semicolon so that when the macro is > used, the user can add a semicolon themselves. > > Signed-off-by: Jonathon Jongsma > --- Reviewed-by: Erik Skultety I'll merge this right away.

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Mark Mielke
On Thu, Aug 20, 2020 at 8:55 AM Christian Ehrhardt < christian.ehrha...@canonical.com> wrote: > On Thu, Aug 20, 2020 at 12:43 PM Martin Wilck wrote: > > The simplest approach is to touch the qemu binaries. We discussed this > > already. It has the drawback that it makes "rpm -V" complain about >

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Daniel P . Berrangé
On Thu, Aug 20, 2020 at 09:05:56AM -0600, Jim Fehlig wrote: > On 8/20/20 8:56 AM, Jim Fehlig wrote: > > On 8/20/20 6:54 AM, Christian Ehrhardt wrote: > > > On Thu, Aug 20, 2020 at 12:43 PM Martin Wilck wrote: > > > > > > > > On Thu, 2020-08-20 at 11:00 +0100, Daniel P. Berrangé wrote: > > > > >

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Jim Fehlig
On 8/20/20 8:56 AM, Jim Fehlig wrote: On 8/20/20 6:54 AM, Christian Ehrhardt wrote: On Thu, Aug 20, 2020 at 12:43 PM Martin Wilck wrote: On Thu, 2020-08-20 at 11:00 +0100, Daniel P. Berrangé wrote: On Wed, Aug 05, 2020 at 10:19:26AM +0200, Andrea Bolognani wrote: contents change. That sai

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Jim Fehlig
On 8/20/20 6:54 AM, Christian Ehrhardt wrote: On Thu, Aug 20, 2020 at 12:43 PM Martin Wilck wrote: On Thu, 2020-08-20 at 11:00 +0100, Daniel P. Berrangé wrote: On Wed, Aug 05, 2020 at 10:19:26AM +0200, Andrea Bolognani wrote: contents change. That said, if upgrading QEMU results in losing

Re: [PATCH v2 07/17] libvirt-storage: Document volume upload/download stream format

2020-08-20 Thread Peter Krempa
On Thu, Aug 20, 2020 at 14:29:21 +0200, Michal Privoznik wrote: > On 8/20/20 10:35 AM, Peter Krempa wrote: > > On Tue, Jul 07, 2020 at 21:46:25 +0200, Michal Privoznik wrote: > > > For libvirt, the volume is just a binary blob and it doesn't > > > interpret data on volume upload/download. But as it

Re: [PATCH v2 13/17] virfdstream: Allow sparse stream vol-download

2020-08-20 Thread Peter Krempa
On Thu, Aug 20, 2020 at 15:31:28 +0200, Michal Privoznik wrote: > On 8/20/20 1:57 PM, Peter Krempa wrote: > > On Tue, Jul 07, 2020 at 21:46:31 +0200, Michal Privoznik wrote: > > > When handling sparse stream, a thread is executed. This thread > > > runs a read() or write() loop (depending what API

Re: [PATCH v2 13/17] virfdstream: Allow sparse stream vol-download

2020-08-20 Thread Michal Privoznik
On 8/20/20 1:57 PM, Peter Krempa wrote: On Tue, Jul 07, 2020 at 21:46:31 +0200, Michal Privoznik wrote: When handling sparse stream, a thread is executed. This thread runs a read() or write() loop (depending what API is called; in this case it's virStorageVolDownload() and this the thread run r

Re: device compatibility interface for live migration with assigned devices

2020-08-20 Thread Sean Mooney
On Thu, 2020-08-20 at 14:27 +0800, Yan Zhao wrote: > On Thu, Aug 20, 2020 at 06:16:28AM +0100, Sean Mooney wrote: > > On Thu, 2020-08-20 at 12:01 +0800, Yan Zhao wrote: > > > On Thu, Aug 20, 2020 at 02:29:07AM +0100, Sean Mooney wrote: > > > > On Thu, 2020-08-20 at 08:39 +0800, Yan Zhao wrote: > >

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Christian Ehrhardt
On Thu, Aug 20, 2020 at 12:43 PM Martin Wilck wrote: > > On Thu, 2020-08-20 at 11:00 +0100, Daniel P. Berrangé wrote: > > On Wed, Aug 05, 2020 at 10:19:26AM +0200, Andrea Bolognani wrote: > > > contents change. > > > > > > That said, if upgrading QEMU results in losing features, even > > > though

Re: [PATCH v2 08/17] virstring: Introduce virStringIsNull()

2020-08-20 Thread Peter Krempa
On Thu, Aug 20, 2020 at 14:36:15 +0200, Michal Privoznik wrote: > On 8/20/20 1:02 PM, Peter Krempa wrote: > > On Tue, Jul 07, 2020 at 21:46:26 +0200, Michal Privoznik wrote: > > > This function will be used to detect zero buffers (which are > > > going to be interpreted as hole in virStream later).

Re: [PATCH v2 08/17] virstring: Introduce virStringIsNull()

2020-08-20 Thread Michal Privoznik
On 8/20/20 1:02 PM, Peter Krempa wrote: On Tue, Jul 07, 2020 at 21:46:26 +0200, Michal Privoznik wrote: This function will be used to detect zero buffers (which are going to be interpreted as hole in virStream later). I shamelessly took inspiration from coreutils. Coreutils is proudly GPLv3 .

Re: [PATCH v2 07/17] libvirt-storage: Document volume upload/download stream format

2020-08-20 Thread Michal Privoznik
On 8/20/20 10:35 AM, Peter Krempa wrote: On Tue, Jul 07, 2020 at 21:46:25 +0200, Michal Privoznik wrote: For libvirt, the volume is just a binary blob and it doesn't interpret data on volume upload/download. But as it turns out, this unspoken assumption is not clear to our users. Document it exp

Re: [ovirt-devel] Re: device compatibility interface for live migration with assigned devices

2020-08-20 Thread Cornelia Huck
On Wed, 19 Aug 2020 17:28:38 +0800 Jason Wang wrote: > On 2020/8/19 下午4:13, Yan Zhao wrote: > > On Wed, Aug 19, 2020 at 03:39:50PM +0800, Jason Wang wrote: > >> On 2020/8/19 下午2:59, Yan Zhao wrote: > >>> On Wed, Aug 19, 2020 at 02:57:34PM +0800, Jason Wang wrote: > On 2020/8/19 上午11:30

Re: [PATCH v2 08/17] virstring: Introduce virStringIsNull()

2020-08-20 Thread Peter Krempa
On Thu, Aug 20, 2020 at 13:17:42 +0100, Daniel Berrange wrote: > On Thu, Aug 20, 2020 at 01:02:55PM +0200, Peter Krempa wrote: > > On Tue, Jul 07, 2020 at 21:46:26 +0200, Michal Privoznik wrote: > > > This function will be used to detect zero buffers (which are > > > going to be interpreted as hole

Re: [PATCH v2 08/17] virstring: Introduce virStringIsNull()

2020-08-20 Thread Daniel P . Berrangé
On Thu, Aug 20, 2020 at 01:02:55PM +0200, Peter Krempa wrote: > On Tue, Jul 07, 2020 at 21:46:26 +0200, Michal Privoznik wrote: > > This function will be used to detect zero buffers (which are > > going to be interpreted as hole in virStream later). > > > > I shamelessly took inspiration from core

Re: [PATCH v2 15/17] virfdstream: Emulate skip for block devices

2020-08-20 Thread Peter Krempa
On Tue, Jul 07, 2020 at 21:46:33 +0200, Michal Privoznik wrote: > This is similar to one of previous patches. > > When receiving stream (on virStorageVolUpload() and subsequent > virStreamSparseSendAll()) we may receive a hole. If the volume we > are saving the incoming data into is a regular file

Re: [PATCH v2 13/17] virfdstream: Allow sparse stream vol-download

2020-08-20 Thread Peter Krempa
On Tue, Jul 07, 2020 at 21:46:31 +0200, Michal Privoznik wrote: > When handling sparse stream, a thread is executed. This thread > runs a read() or write() loop (depending what API is called; in > this case it's virStorageVolDownload() and this the thread run > read() loop). The read() is handled

Re: [PATCH v2 12/17] virshStreamSkip: Emulate skip for block devices

2020-08-20 Thread Peter Krempa
On Tue, Jul 07, 2020 at 21:46:30 +0200, Michal Privoznik wrote: > This callback is called when the server sends us STREAM_HOLE > meaning there is no real data, only zeroes. For regular files > we would just seek() beyond EOF and ftruncate() to create the > hole. But for block devices this won't wor

Re: [PATCH v2 11/17] virsh: Track if vol-upload or vol-download work over a block device

2020-08-20 Thread Peter Krempa
On Tue, Jul 07, 2020 at 21:46:29 +0200, Michal Privoznik wrote: > We can't use virFileInData() with block devices, but we could use > new virFileInDataDetectZeroes(). But to decide we need to know if > the FD we are reading data from / writing data to is a block > device. Store this information in

Re: [PATCH v2 10/17] virsh: Pass virshStreamCallbackDataPtr to virshStreamSink() and virshStreamSkip()

2020-08-20 Thread Peter Krempa
On Tue, Jul 07, 2020 at 21:46:28 +0200, Michal Privoznik wrote: > These callback will need to know more that the FD they are > working on. Pass the structure that is passed to other stream > callbacks (e.g. virshStreamSource() or virshStreamSourceSkip()) > instead of inventing a new one. > > Signe

Re: [PATCH v2 08/17] virstring: Introduce virStringIsNull()

2020-08-20 Thread Peter Krempa
On Tue, Jul 07, 2020 at 21:46:26 +0200, Michal Privoznik wrote: > This function will be used to detect zero buffers (which are > going to be interpreted as hole in virStream later). > > I shamelessly took inspiration from coreutils. Coreutils is proudly GPLv3 ... > Signed-off-by: Michal Privozni

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Martin Wilck
On Thu, 2020-08-20 at 11:00 +0100, Daniel P. Berrangé wrote: > On Wed, Aug 05, 2020 at 10:19:26AM +0200, Andrea Bolognani wrote: > > contents change. > > > > That said, if upgrading QEMU results in losing features, even > > though > > you can recover them through additional steps I would argue th

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Daniel P . Berrangé
On Thu, Aug 20, 2020 at 12:31:15PM +0200, Martin Wilck wrote: > On Thu, 2020-08-20 at 10:57 +0100, Daniel P. Berrangé wrote: > > On Thu, Aug 20, 2020 at 11:32:03AM +0200, Martin Wilck wrote: > > > On Tue, 2020-08-18 at 15:15 -0600, Jim Fehlig wrote: > > > > On 8/5/20 2:19 AM, Andrea Bolognani wrote

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Martin Wilck
On Thu, 2020-08-20 at 10:57 +0100, Daniel P. Berrangé wrote: > On Thu, Aug 20, 2020 at 11:32:03AM +0200, Martin Wilck wrote: > > On Tue, 2020-08-18 at 15:15 -0600, Jim Fehlig wrote: > > > On 8/5/20 2:19 AM, Andrea Bolognani wrote: > > > > I guess we need to start checking the modules directory in

[PATCH] docs: add kbase entry for migrationinternals

2020-08-20 Thread Fangge Jin
Commit c051e56d27 added migrationinternals.rst in kbase, but the entry was missing. Signed-off-by: Fangge Jin --- docs/kbase.rst | 4 1 file changed, 4 insertions(+) diff --git a/docs/kbase.rst b/docs/kbase.rst index 78daaa5989..546be6785e 100644 --- a/docs/kbase.rst +++ b/docs/kbase.rst @

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Daniel P . Berrangé
On Wed, Aug 05, 2020 at 10:19:26AM +0200, Andrea Bolognani wrote: > On Wed, 2020-08-05 at 02:09 -0400, Mark Mielke wrote: > > Hi all: > > > > In testing qemu-5.1rc2 on my Fedora 32 home system, I found that > > the Fedora rawhide package has broken out both the QXL display > > device and the USB r

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Daniel P . Berrangé
On Thu, Aug 20, 2020 at 11:32:03AM +0200, Martin Wilck wrote: > On Tue, 2020-08-18 at 15:15 -0600, Jim Fehlig wrote: > > On 8/5/20 2:19 AM, Andrea Bolognani wrote: > > > > > > I guess we need to start checking the modules directory in addition > > > to the main QEMU binary, and regenerate capabili

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Martin Wilck
On Tue, 2020-08-18 at 15:15 -0600, Jim Fehlig wrote: > On 8/5/20 2:19 AM, Andrea Bolognani wrote: > > > > I guess we need to start checking the modules directory in addition > > to the main QEMU binary, and regenerate capabilities every time its > > contents change. > > We recently received repor

Re: Please revert f4be03b3 (libvirtaio: Drop object(*args, **kwargs)) for theoretical reasons

2020-08-20 Thread Daniel P . Berrangé
On Wed, Aug 19, 2020 at 11:32:10PM +0200, Wojtek Porczyk wrote: > Hi Philipp, > (Cc: Daniel, because IIUC you reviewed !16 which got this merged), > > I'm sorry I didn't notice this earlier, but the commit f4be03b3 dated > 2020-04-20 [0] is wrong. The super().__init__(*args, **kwargs) in > Callbac

Re: [PATCH] tools: fix libvirt-guests.sh text assignments

2020-08-20 Thread Michael Chapman
On Thu, 20 Aug 2020, Christian Ehrhardt wrote: > On Wed, Aug 19, 2020 at 12:15 PM Christian Ehrhardt > wrote: > > > > In libvirt 6.6 stopping guests with libvirt-guests.sh is broken. > > As soon as there is more than one guest one can see > > `systemctl stop libvirt-guests` faiing and in the log w

Re: [PATCH v2 07/17] libvirt-storage: Document volume upload/download stream format

2020-08-20 Thread Peter Krempa
On Tue, Jul 07, 2020 at 21:46:25 +0200, Michal Privoznik wrote: > For libvirt, the volume is just a binary blob and it doesn't > interpret data on volume upload/download. But as it turns out, > this unspoken assumption is not clear to our users. Document it > explicitly. > > Suggested in: https://

Re: [PATCH v2 06/17] virfdstream: Drop some needless labels

2020-08-20 Thread Peter Krempa
On Tue, Jul 07, 2020 at 21:46:24 +0200, Michal Privoznik wrote: > After previous cleanups, some labels in some functions have > nothing but 'return' statement in them. Drop the labels and > replace 'goto'-s with respective return statements. > > Signed-off-by: Michal Privoznik > --- > src/util/v

Re: [PATCH v2 04/17] virfdstream: Use g_new0() instead of VIR_ALLOC()

2020-08-20 Thread Peter Krempa
On Tue, Jul 07, 2020 at 21:46:22 +0200, Michal Privoznik wrote: > This switch allow us to save a few lines of code. > > Signed-off-by: Michal Privoznik > --- > src/util/virfdstream.c | 20 +++- > 1 file changed, 7 insertions(+), 13 deletions(-) Reviewed-by: Peter Krempa

Re: [PATCH v2 05/17] virfdstream: Use VIR_AUTOCLOSE()

2020-08-20 Thread Peter Krempa
On Tue, Jul 07, 2020 at 21:46:23 +0200, Michal Privoznik wrote: > Again, instead of closing FDs explicitly, we can automatically > close them when they go out of their respective scopes. > > Signed-off-by: Michal Privoznik > --- > src/util/virfdstream.c | 12 ++-- > 1 file changed, 6 ins

Re: [PATCH v2 03/17] virfdstream: Use autoptr for virFDStreamMsg

2020-08-20 Thread Peter Krempa
On Tue, Jul 07, 2020 at 21:46:21 +0200, Michal Privoznik wrote: > A cleanup function can be declared for virFDStreamMsg type so > that the structure doesn't have to be freed explicitly. > > Signed-off-by: Michal Privoznik > --- > src/util/virfdstream.c | 11 +-- > 1 file changed, 5 inser

Re: [PATCH v2 02/17] virFDStreamMsgQueuePush: Clear pointer to passed message

2020-08-20 Thread Peter Krempa
On Tue, Jul 07, 2020 at 21:46:20 +0200, Michal Privoznik wrote: > All callers of virFDStreamMsgQueuePush() have the same pattern: > they explicitly set @msg passed to NULL to avoid freeing it later > on. Well, the function can take address of the pointer and clear > it for them. > > Signed-off-by: