Re: device compatibility interface for live migration with assigned devices

2020-07-15 Thread Jason Wang
On 2020/7/14 上午7:29, Yan Zhao wrote: hi folks, we are defining a device migration compatibility interface that helps upper layer stack like openstack/ovirt/libvirt to check if two devices are live migration compatible. The "devices" here could be MDEVs, physical devices, or hybrid of the two.

Re: [RFC v2 1/1] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-07-15 Thread Jason Wang
On 2020/7/16 上午9:00, Peter Xu wrote: On Mon, Jul 13, 2020 at 12:04:16PM +0800, Jason Wang wrote: On 2020/7/10 下午9:30, Peter Xu wrote: On Fri, Jul 10, 2020 at 02:34:11PM +0800, Jason Wang wrote: On 2020/7/9 下午10:10, Peter Xu wrote: On Thu, Jul 09, 2020 at 01:58:33PM +0800, Jason Wang wrote:

Re: [RFC v2 1/1] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-07-15 Thread Peter Xu
On Mon, Jul 13, 2020 at 12:04:16PM +0800, Jason Wang wrote: > > On 2020/7/10 下午9:30, Peter Xu wrote: > > On Fri, Jul 10, 2020 at 02:34:11PM +0800, Jason Wang wrote: > > > On 2020/7/9 下午10:10, Peter Xu wrote: > > > > On Thu, Jul 09, 2020 at 01:58:33PM +0800, Jason Wang wrote: > > > > > > > - If we

Re: [PATCH 03/11] virDomainHostdevDefFormatSubsys: Split out formatting of PCI subsystem

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Peter Krempa wrote: Similarly to previous commit split out formatting of the PCI subsystem related stuff. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 74 ++ 1 file changed, 46 insertions(+), 28 deletions(-)

Re: [PATCH 02/11] virDomainHostdevDefFormatSubsys: Split out formatting of USB subsystem

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Peter Krempa wrote: Separate out bits related to USB so that the logic isn't entangled in multiple conditional statements. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 73 +- 1 file changed, 51 insertions(+), 22

Re: [PATCH 01/11] virDomainHostdevDefFormatSubsys: Use virXMLFormatElement

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Peter Krempa wrote: Refactor the formatter to the new multiple buffer based approach so that we can easily separate it into formatters per subsys type. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 65 ++ 1 file changed,

Re: [PATCH 17/18] qemu: caps: Enable QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: Enable it when regular QEMU_CAPS_BLOCKDEV is present. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 ++ .../caps_4.2.0.aarch64.xml| 1 + .../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 +

Re: [PATCH 12/18] qemu: capabilities: Add QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: We want to instantiate hostdevs via -blockdev too. Add a separate capability for them for a clean transition. The new capability will be enabled when QEMU_CAPS_BLOCKDEV is present once all code is prepared. What is the benefit here compared to using

Re: [PATCH 18/18] qemuBuildSCSIHostdevDrvStr: unexport

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: The function is no longer called from other modules. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_command.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc

Re: [PATCH 16/18] qemuDomainRemoveHostDevice: Use new infrastructure for (i)SCSI

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: Similarly to previous commits, modify the hostdev detach code to use blockdev infrastructure to detach (i)SCSI hostdevs. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 20 +++- 1 file changed, 3 insertions(+), 17 deletions(-)

Re: [PATCH 15/18] qemuDomainAttachHostSCSIDevice: Use new infrastructure

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: Similarly to command line creation, use the blockdev helpers when hotplugging an (i)SCSI hostdev. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 45 +++-- 1 file changed, 7 insertions(+), 38 deletions(-)

Re: [PATCH 14/18] qemuBuildHostdevSCSICommandLine: Use new infrastructure

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: In preparation for instantiating (i)SCSI hostdevs via -blockdev, refactor qemuBuildHostdevSCSICommandLine to use the new infrastructure which will do it automatically. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 44

Re: [PATCH 13/18] qemu: command: Create qemuBlockStorageSourceAttachData for (i)SCSI hostdevs

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: Add convertor for creating qemuBlockStorageSourceAttachData which will allow reusing the infrastructure which we have for attaching disks also for hostdevs. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 83

Re: [PATCH 11/18] qemuBuildSCSIHostdevDevStr: Pass in backend alias

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: Don't (re)generate the backend alias (alias of the -drive backend for now) internally but rather pass it in. Later on it will be replaced by the nodename when blockdev is used depending on the capabilities. Signed-off-by: Peter Krempa ---

Re: [PATCH 10/18] qemuBuildHostdevCommandLine: Extract (i)SCSI code

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: Move all (i)SCSI related code into a new function named 'qemuBuildHostdevSCSICommandLine'. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 61 + 1 file changed, 38 insertions(+), 23 deletions(-)

Re: [PATCH 08/18] qemu: domain: Regenerate hostdev source private data

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: When upgrading from a libvirt which didn't format private data of a virStorageSource representing an iSCSI hostdev source, we might need to generate some internal data so that the code still works as if it was present in the status XML. Signed-off-by:

Re: [PATCH 09/18] qemu: hotplug: Don't regenerate iSCSI secret alias

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: We now store the alias of the secrets in the status XML so there's no need to generate it again. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) Reviewed-by: Ján Tomko

Re: [PATCH 07/18] qemuDomainSecretHostdevDestroy: Don't clear secinfo alias

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: We need the alias to deal with hot-unplug of the hostdev. Use qemuDomainSecretInfoDestroy which clears only the secrets and not the alias. The same function is used also for handling disk secrets. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c |

Re: [PATCH 06/18] qemustatusxml2xmltest: Add tests for iSCSI hostdev private data handling

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: Signed-off-by: Peter Krempa --- tests/qemustatusxml2xmldata/modern-in.xml | 18 ++ 1 file changed, 18 insertions(+) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 05/18] virDomainHostdevSubsysSCSIiSCSIDefParseXML: Parse private data of virStorageSource

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: We store the config of an iSCSI hostdev in a virStorageSource structure. Parse the private data portion. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 39 +-- 1 file changed, 29 insertions(+), 10

Re: [PATCH 04/18] virDomainHostdevDefFormatSubsys: Format private data for a virStorageSource

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: iSCSI subsystem hostdevs store the data as a virStorageSource. Format the private data part of the virStorageSource in the appropriate place. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 32 1 file changed, 20

Re: [PATCH 02/18] qemuBlockStorageSourceGetBackendProps: Allow skipping "discard":"unmap"

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: It doesn't make sense to format "discard" when doing a -blockdev backend of scsi-generic used with SCSI hostdevs. Add a way to skip it. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 8 src/qemu/qemu_block.h | 1 + 2 files changed, 9

Re: [PATCH 03/18] qemuBlockStorageSourceAttachData: Add field for ad-hoc storage node name

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: SCSI hostdevs don't have a virStorageSource associated with the backend in certain cases. Adding a separate field to hold memory for a copy of the nodename of the storage backend will allow reusing the blockdev machinery also for SCSI hostdevs.

Re: [PATCH 01/18] qemuBlockStorageSourceGetBackendProps: Convert boolean arguments to flags

2020-07-15 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: Upcoming commit will need to add another flag for the function so convert it to a bitwise-or'd array of flags to prevent having 4 booleans. false true false true false true false false false true true false true false false false false true true

Re: [PATCH 1/3] virNetSocketCheckProtocols: Separate out checking family via getaddrinfo()

2020-07-15 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: The virNetSocketCheckProtocols() function is supposed to tell caller whether IPv4 and/or IPv6 is supported on the system. In the initial round, it uses getifaddrs() to see if an interface has IPv4/IPv6 address assigned and then to double check IPv6

Re: [PATCH 0/3] Fix virnetsocket failure in IPv4 disabled environment

2020-07-15 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: This imperfection was reported by Andrea here: https://www.redhat.com/archives/libvir-list/2020-July/msg00753.html Michal Prívozník (3): virNetSocketCheckProtocols: Separate out checking family via getaddrinfo() virNetSocketCheckProtocols:

[libvirt PATCH] network: split out networkSetIPv6Sysctl

2020-07-15 Thread Ján Tomko
Refactor networkSetIPv6Sysctls to remove repetition and reuse of the 'field' variable. Signed-off-by: Ján Tomko --- src/network/bridge_driver.c | 71 ++--- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/src/network/bridge_driver.c

Re: [libvirt PATCH v2 05/15] network: use g_auto wherever appropriate

2020-07-15 Thread Laine Stump
On 7/15/20 11:10 AM, Ján Tomko wrote: On a Tuesday in 2020, Laine Stump wrote: This includes standard g_autofree() as well as other objects that have a cleanup function defined to use via g_autoptr (virCommand, virJSONValue) Signed-off-by: Laine Stump --- src/network/bridge_driver.c   |

Re: [libvirt-jenkins-ci PATCH 7/7] lcitool: Create and expose ccache wrappers

2020-07-15 Thread Andrea Bolognani
On Wed, 2020-07-15 at 16:57 +0100, Daniel P. Berrangé wrote: > On Fri, Mar 27, 2020 at 08:34:59PM +0100, Andrea Bolognani wrote: > > +commands.extend([ > > +"mkdir -p /usr/local/share/ccache-wrappers", > > +]) > > + > > +if cross_arch: > > +

Re: [libvirt-jenkins-ci PATCH 7/7] lcitool: Create and expose ccache wrappers

2020-07-15 Thread Daniel P . Berrangé
On Fri, Mar 27, 2020 at 08:34:59PM +0100, Andrea Bolognani wrote: > VM-based builds have used ccache by default for a very long time, > and now container-based builds will too. > > Signed-off-by: Andrea Bolognani > --- > guests/lcitool | 18 ++ > 1 file changed, 18 insertions(+)

Re: [libvirt PATCH v2 15/15] nwfilter: convert remaining VIR_FREE() to g_free()

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: Signed-off-by: Laine Stump --- src/nwfilter/nwfilter_dhcpsnoop.c | 16 src/nwfilter/nwfilter_driver.c| 10 +- src/nwfilter/nwfilter_ebiptables_driver.c | 2 +- src/nwfilter/nwfilter_gentech_driver.c| 6

Re: [libvirt PATCH v2 14/15] nwfilter: convert local pointers to use g_auto*

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: Signed-off-by: Laine Stump --- src/nwfilter/nwfilter_dhcpsnoop.c | 91 +++ src/nwfilter/nwfilter_ebiptables_driver.c | 75 +++ src/nwfilter/nwfilter_gentech_driver.c| 15 ++--

Re: [libvirt PATCH v2 08/15] nwfilter: remove unnecessary code from ebtablesGetSubChainInsts()

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: On failure, this function would clear out and free the list of subchains it had been called with. This is unnecessary, because the *only* caller of this function will also clear out and free the list of subchains if it gets a failure from

Re: [libvirt PATCH v2 13/15] nwfilter: replace VIR_ALLOC with g_new0

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: Signed-off-by: Laine Stump --- src/nwfilter/nwfilter_dhcpsnoop.c | 9 +++-- src/nwfilter/nwfilter_driver.c| 3 +-- src/nwfilter/nwfilter_ebiptables_driver.c | 3 +-- src/nwfilter/nwfilter_gentech_driver.c| 3 +--

Re: [libvirt PATCH v2 12/15] nwfilter: use standard label names when reasonable

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: Rather than having labels named exit, done, exit_snooprequnlock, skip_rename, etc, use the standard "cleanup" label. And instead of err_exit, malformed, tear_down_tmpebchains, use "error". Signed-off-by: Laine Stump --- src/nwfilter/nwfilter_dhcpsnoop.c

Re: [libvirt PATCH v2 11/15] nwfilter: transform logic in virNWFilterRuleInstSort to eliminate label

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: This rewrite of a nested conditional produces the same results, but eliminate a goto and corresponding label. Signed-off-by: Laine Stump --- src/nwfilter/nwfilter_ebiptables_driver.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-)

Re: [libvirt PATCH v2 09/15] nwfilter: clear nrules when resetting virNWFilterInst

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: It's possible/probable the callers to virNWFilterInstReset() make it unnecessary to set the object's nrules to 0 after freeing all its rules, but that same function is setting nfilters to 0, so let's do the same for the sake of consistency.

Re: [libvirt PATCH v2 10/15] nwfilter: define a typedef for struct ebtablesSubChainInst

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: Signed-off-by: Laine Stump --- src/nwfilter/nwfilter_ebiptables_driver.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

[PATCH v4 1/2] conf: add 'isa' controller type

2020-07-15 Thread Roman Bogorodskiy
Introduce 'isa' controller type. In domain XML it looks this way: ... ... Currently, this is needed for the bhyve driver to allow choosing a specific PCI address for that. In bhyve, this controller is used to attach serial ports and a boot ROM. Signed-off-by: Roman

[PATCH v4 2/2] bhyve: support 'isa' controller for LPC

2020-07-15 Thread Roman Bogorodskiy
Support modeling of the 'isa' controller for bhyve. User can manually define any PCI slot for the 'isa' controller, including PCI slot 1, but other devices are not allowed to use this address. When domain configuration requires the 'isa' controller to be present, automatically add it on domain

[PATCH v4 0/2] conf: add 'isa' controller type

2020-07-15 Thread Roman Bogorodskiy
No code changes, just re-arranged commits. Now commits are more granular than v3, but still less granular as v2. Specifically, now there are a 'conf' part as a separate commit and 'bhyve' part as a separate commit. My thought was that automatic addition of the 'isa' controller and controller index

Re: [libvirt PATCH v2 07/15] network: use g_free() in place of remaining VIR_FREE()

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: Signed-off-by: Laine Stump --- src/network/bridge_driver.c | 45 +++-- 1 file changed, 23 insertions(+), 22 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [libvirt PATCH v2 06/15] network: eliminate unnecessary labels

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: All these cleanup/error labels were reduced to having just "return ret" by a previous patch, so get rid of them and return directly. Signed-off-by: Laine Stump --- src/network/bridge_driver.c | 264 --

Re: [libvirt PATCH v2 05/15] network: use g_auto wherever appropriate

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: This includes standard g_autofree() as well as other objects that have a cleanup function defined to use via g_autoptr (virCommand, virJSONValue) Signed-off-by: Laine Stump --- src/network/bridge_driver.c | 206 ++

[libvirt PATCH] Partially revert "qemu: fix missing error reports in capabilities probing"

2020-07-15 Thread Daniel P . Berrangé
This partially reverts commit 5331c4804f4f419b9e75741084f926e52413d3a1. The original commit mistakenly thought virFileCacheLookup did not set an error. In fact the only case it doesn't set an error for is when the cache key is NULL. This in fact the fault of the caller for passing an invalid

Re: [libvirt PATCH] qemu: fix missing error reports in capabilities probing

2020-07-15 Thread Daniel P . Berrangé
On Mon, Jul 13, 2020 at 09:44:07PM +0200, Michal Privoznik wrote: > On 6/15/20 3:56 PM, Daniel P. Berrangé wrote: > > The "virsh domcapabilities --arch ppc64" command will fail with no > > error message set if qemu-system-ppc64 is not currently installed. > > > > This is because

Re: [libvirt PATCH v2 04/15] network: replace VIR_ALLOC/REALLOC with g_new0/g_renew

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: Signed-off-by: Laine Stump --- src/network/bridge_driver.c | 29 ++--- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 713763130b..ab359acdb5 100644

Re: [libvirt PATCH v2 03/15] define g_autoptr cleanup function for virNetworkDHCPLease

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: virNetworkDHCPLease and virNetworkDHCPLeaseFree() are declared in the public API file libvirt-network.h, and we can't pollute that with glib macro invocations, so put this in src/datatypes.h next to the other virNetwork items. Signed-off-by: Laine Stump

Re: [libvirt PATCH v2 02/15] util: define g_autoptr cleanups for a couple dnsmasq objects

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: Signed-off-by: Laine Stump --- src/util/virdnsmasq.h | 4 1 file changed, 4 insertions(+) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [libvirt PATCH v2 01/15] replace g_new() with g_new0() for consistency

2020-07-15 Thread Ján Tomko
On a Tuesday in 2020, Laine Stump wrote: g_new() is used in only 3 places. Switching them to g_new0() will do no harm, reduces confusion, and helps me sleep better at night knowing Sweet dreams. that all allocated memory is initialized to 0 :-) (Yes, I *know* that in all three cases the

Re: [PATCH 00/10] resolve hangs/crashes on libvirtd shutdown

2020-07-15 Thread Daniel P . Berrangé
On Wed, Jul 15, 2020 at 08:51:03AM +0300, Nikolay Shirokovskiy wrote: > > > On 14.07.2020 17:53, Daniel Henrique Barboza wrote: > > As far as code goes: > > > > > > Reviewed-by: Daniel Henrique Barboza > > > > > > About the design I have a question about the timeout. Patch 5/10 is setting

Re: [libvirt PATCH 9/9] rpc: use new virt-nc binary for remote tunnelling

2020-07-15 Thread Andrea Bolognani
On Wed, 2020-07-15 at 14:25 +0100, Daniel P. Berrangé wrote: > On Wed, Jul 15, 2020 at 02:25:14PM +0200, Andrea Bolognani wrote: > > Mh, that makes sense but I'm still wary of using "proxy" due to the > > potential for confusion, since in this case the proxy is on the > > opposite side of the

Re: [libvirt PATCH 9/9] rpc: use new virt-nc binary for remote tunnelling

2020-07-15 Thread Daniel P . Berrangé
On Wed, Jul 15, 2020 at 02:25:14PM +0200, Andrea Bolognani wrote: > On Wed, 2020-07-15 at 11:00 +0100, Daniel P. Berrangé wrote: > > On Fri, Jul 10, 2020 at 07:21:47PM +0200, Andrea Bolognani wrote: > > > Just a couple of comments about the UI: would it make sense to use > > > something like > > >

[PATCH 07/10] virStorageSourceFindByNodeName: Remove unused 'idx' argument

2020-07-15 Thread Peter Krempa
None of the callers actually use it. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c| 9 - src/util/virstoragefile.c | 16 +++- src/util/virstoragefile.h | 3 +-- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/src/qemu/qemu_domain.c

[PATCH 10/10] virDomainSetBlockThreshold: Mention that the event can be registered for

2020-07-15 Thread Peter Krempa
The infrastructure supports setting the threshold also for the . Mention it in the docs. https://bugzilla.redhat.com/show_bug.cgi?id=1807741 Signed-off-by: Peter Krempa --- src/libvirt-domain.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c

[PATCH 05/10] virDomainSetBlockThreshold: Clarify values of @dev the event is fired for

2020-07-15 Thread Peter Krempa
Top level image may get two events, one with the disk target (vda) and one with disk target with index (vda[3]) if the top level image has an index. Signed-off-by: Peter Krempa --- src/libvirt-domain.c | 4 1 file changed, 4 insertions(+) diff --git a/src/libvirt-domain.c

[PATCH 01/10] virDomainSetBlockThreshold: Document values of '@dev' better

2020-07-15 Thread Peter Krempa
Mention where to obtain the index and how it's treated. Signed-off-by: Peter Krempa --- src/libvirt-domain.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index fe4dab7cdf..ba30d18f65 100644 --- a/src/libvirt-domain.c +++

[PATCH 03/10] qemuDomainDiskBackingStoreGetName: Eliminate temp variable

2020-07-15 Thread Peter Krempa
We can return the formatted string directly. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 3d136a6b8a..cfdd9270da 100644 --- a/src/qemu/qemu_domain.c +++

[PATCH 02/10] qemuDomainDiskBackingStoreGetName: Remove unused argument

2020-07-15 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 1 - src/qemu/qemu_domain.h | 1 - src/qemu/qemu_process.c | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 4a2daffc0a..3d136a6b8a 100644 ---

[PATCH 06/10] qemuDomainDiskLookupByNodename: Remove unused 'idx'

2020-07-15 Thread Peter Krempa
All callers pass NULL as the value. Remove the argument. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 12 ++-- src/qemu/qemu_domain.h | 3 +-- src/qemu/qemu_process.c | 4 ++-- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_domain.c

[PATCH 08/10] qemuDomainDiskLookupByNodename: Look also for 'mirror' node names

2020-07-15 Thread Peter Krempa
When doing a block copy, there is another chain of images attached to a disk. Consider them as well when looking up a disk using nodename. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 8 1 file changed, 8 insertions(+) diff --git a/src/qemu/qemu_domain.c

[PATCH 09/10] qemuDomainGetStorageSourceByDevstr: Look also in 'mirror' chain

2020-07-15 Thread Peter Krempa
A disk can have a mirror, look also in it's backing chain. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 18fd445e30..ebf18a546e 100644 ---

[PATCH 00/10] Fix device names reported by 'write_threshold' event and add support for monitoring 'mirror'

2020-07-15 Thread Peter Krempa
Allow monitoring the 'mirror' image write threshold and also report correct aliases. Clean up some leftovers and improve docs while at it. Peter Krempa (10): virDomainSetBlockThreshold: Document values of '@dev' better qemuDomainDiskBackingStoreGetName: Remove unused argument

[PATCH 04/10] qemuProcessHandleBlockThreshold: Report correct indexes

2020-07-15 Thread Peter Krempa
The index returned by qemuDomainDiskLookupByNodename is the position in the backing chain rather than the index we report in the XML. Since with -blockdev they differ now and additionally the disk source also has an index we need to fix the 'threshold' evens we report: 1) If it's the top level

Re: [PATCH] Substitute security_context_t with char *

2020-07-15 Thread Andrea Bolognani
On Wed, 2020-07-15 at 13:45 +0200, Michal Privoznik wrote: > Historically, we've used security_context_t for variables passed > to libselinux APIs. But almost 7 years ago, libselinux developers > admitted in their API that in fact, it's just a 'char *' type > [1]. Ever since then the APIs accept

Re: [libvirt PATCH 9/9] rpc: use new virt-nc binary for remote tunnelling

2020-07-15 Thread Andrea Bolognani
On Wed, 2020-07-15 at 11:00 +0100, Daniel P. Berrangé wrote: > On Fri, Jul 10, 2020 at 07:21:47PM +0200, Andrea Bolognani wrote: > > Just a couple of comments about the UI: would it make sense to use > > something like > > > > qemu+ssh://host/system?tunnelcmd=virt-tunnel > > > > instead?

[PATCH 0/3] Fix virnetsocket failure in IPv4 disabled environment

2020-07-15 Thread Michal Privoznik
This imperfection was reported by Andrea here: https://www.redhat.com/archives/libvir-list/2020-July/msg00753.html Michal Prívozník (3): virNetSocketCheckProtocols: Separate out checking family via getaddrinfo() virNetSocketCheckProtocols: lookup IPv6 only if suspecting IPv6

[PATCH 2/3] virNetSocketCheckProtocols: lookup IPv6 only if suspecting IPv6

2020-07-15 Thread Michal Privoznik
There is not much sense trying to disprove host is IPv6 capable if we know after first round (getifaddrs()) that is is not. Signed-off-by: Michal Privoznik --- src/rpc/virnetsocket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rpc/virnetsocket.c

[PATCH 3/3] virNetSocketCheckProtocols: Confirm IPv4 by lookup too

2020-07-15 Thread Michal Privoznik
Historically, if we found an interface with an IPv6 address we did not blindly trust that host is IPv6 capable (as in we can successfully translate IPv4 addresses) but used getaddrinfo() to confirm it. Turns out, we have use the same argument for IPv4. For instance, in an namespace created by the

[PATCH 1/3] virNetSocketCheckProtocols: Separate out checking family via getaddrinfo()

2020-07-15 Thread Michal Privoznik
The virNetSocketCheckProtocols() function is supposed to tell caller whether IPv4 and/or IPv6 is supported on the system. In the initial round, it uses getifaddrs() to see if an interface has IPv4/IPv6 address assigned and then to double check IPv6 it uses getaddrinfo() to lookup IPv6 loopback

[PATCH] Substitute security_context_t with char *

2020-07-15 Thread Michal Privoznik
Historically, we've used security_context_t for variables passed to libselinux APIs. But almost 7 years ago, libselinux developers admitted in their API that in fact, it's just a 'char *' type [1]. Ever since then the APIs accept 'char *' instead, but they kept the old alias just for API

Re: [libvirt PATCH 0/2] tests: Don't assume IPv4 connectivity is available

2020-07-15 Thread Andrea Bolognani
On Wed, 2020-07-15 at 12:38 +0200, Michal Privoznik wrote: > On 7/14/20 10:32 PM, Andrea Bolognani wrote: > > I started looking into this after seeing > > > >FAIL: virnetsockettest > >== > > > >TEST: virnetsockettest > > 1) Socket TCP/IPv4 Accept

Re: [libvirt PATCH 0/2] tests: Don't assume IPv4 connectivity is available

2020-07-15 Thread Michal Privoznik
On 7/14/20 10:32 PM, Andrea Bolognani wrote: I started looking into this after seeing FAIL: virnetsockettest == TEST: virnetsockettest 1) Socket TCP/IPv4 Accept ... libvirt: XML-RPC error : Unable to resolve address '127.0.0.1' service

Re: Re: [RFC 01/21] build-aux: Add a tool to generate xml parse/format functions

2020-07-15 Thread Daniel P . Berrangé
On Wed, Jul 01, 2020 at 12:06:36AM +0800, Shi Lei wrote: > >On Wed, Jun 10, 2020 at 09:20:29AM +0800, Shi Lei wrote: > >> This tool is used to generate parsexml/formatbuf functions for structs. > >> It is based on libclang and its python-binding. > >> Some directives (such as genparse, xmlattr,

Re: [libvirt PATCH 9/9] rpc: use new virt-nc binary for remote tunnelling

2020-07-15 Thread Daniel P . Berrangé
On Fri, Jul 10, 2020 at 07:21:47PM +0200, Andrea Bolognani wrote: > On Thu, 2020-07-09 at 19:36 +0100, Daniel P. Berrangé wrote: > > This wires up support for using the new virt-nc binary with the ssh, > > libssh and libssh2 protocols. > > > > The new binary will be used preferentially if it is

Re: [libvirt PATCH 7/9] remote: introduce virtd-nc helper binary

2020-07-15 Thread Daniel P . Berrangé
On Fri, Jul 10, 2020 at 02:04:00PM +0200, Michal Privoznik wrote: > On 7/9/20 8:36 PM, Daniel P. Berrangé wrote: > > When accessing libvirtd over a SSH tunnel, the remote driver must spawn > > the remote 'nc' process, pointing it to the libvirtd socket path. This > > is problematic for a number of

Re: [GSoC][PATCH v4 4/4] qemu_domainjob: introduce `privateData` for `qemuDomainJobInfo`

2020-07-15 Thread Prathamesh Chavan
On Tue, Jul 14, 2020 at 10:25 PM Michal Privoznik wrote: > > On 7/14/20 5:14 PM, Prathamesh Chavan wrote: > > Currently, domainJobInfo also uses "stats" as one of the job specific > > parameters. To remove this dependency, a privateData structure is > > introduced. > > > > The plan is to even

Re: device compatibility interface for live migration with assigned devices

2020-07-15 Thread Alex Xu
Yan Zhao 于2020年7月15日周三 下午4:32写道: > On Tue, Jul 14, 2020 at 02:59:48PM -0600, Alex Williamson wrote: > > On Tue, 14 Jul 2020 18:19:46 +0100 > > "Dr. David Alan Gilbert" wrote: > > > > > * Alex Williamson (alex.william...@redhat.com) wrote: > > > > On Tue, 14 Jul 2020 11:21:29 +0100 > > > >

Re: device compatibility interface for live migration with assigned devices

2020-07-15 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 02:47:15PM -0600, Alex Williamson wrote: > On Tue, 14 Jul 2020 17:47:22 +0100 > Daniel P. Berrangé wrote: > > I'm sure OpenStack maintainers can speak to this more, as they've put > > alot of work into their scheduling engine to optimize the way it places > > VMs largely

RE: device compatibility interface for live migration with assigned devices

2020-07-15 Thread Feng, Shaohe
-Original Message- From: Zhao, Yan Y Sent: 2020骞�7���15��� 16:21 To: Alex Williamson Cc: Dr. David Alan Gilbert ; Daniel P. Berrang茅 ; de...@ovirt.org; openstack-disc...@lists.openstack.org; libvir-list@redhat.com; intel-gvt-...@lists.freedesktop.org; k...@vger.kernel.org;

Re: [libvirt PATCH 1/2] ci: Drop Debian 9 jobs

2020-07-15 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 07:59:07PM +0200, Andrea Bolognani wrote: > The esisting cross-compilation jobs are carefully redistributed existing. > among Debian 10 and Debian sid to ensure we don't use the latter > for aarch64, mipsel or mips64el, since those architectures are > currently broken. >

Re: [libvirt PATCH 2/2] ci: Drop Debian 9 containers

2020-07-15 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 07:59:08PM +0200, Andrea Bolognani wrote: > The corresponding libvirt-ci commit is 5abf5e7e2326. > > Signed-off-by: Andrea Bolognani > --- > .../libvirt-debian-9-cross-aarch64.Dockerfile | 128 -- > .../libvirt-debian-9-cross-armv6l.Dockerfile | 126

Re: device compatibility interface for live migration with assigned devices

2020-07-15 Thread Yan Zhao
On Tue, Jul 14, 2020 at 02:59:48PM -0600, Alex Williamson wrote: > On Tue, 14 Jul 2020 18:19:46 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Alex Williamson (alex.william...@redhat.com) wrote: > > > On Tue, 14 Jul 2020 11:21:29 +0100 > > > Daniel P. Berrangé wrote: > > > > > > > On

Re: device compatibility interface for live migration with assigned devices

2020-07-15 Thread Dr. David Alan Gilbert
* Alex Williamson (alex.william...@redhat.com) wrote: > On Tue, 14 Jul 2020 18:19:46 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Alex Williamson (alex.william...@redhat.com) wrote: > > > On Tue, 14 Jul 2020 11:21:29 +0100 > > > Daniel P. Berrangé wrote: > > > > > > > On Tue, Jul 14,

Re: device compatibility interface for live migration with assigned devices

2020-07-15 Thread Alex Xu
Alex Williamson 于2020年7月15日周三 上午5:00写道: > On Tue, 14 Jul 2020 18:19:46 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Alex Williamson (alex.william...@redhat.com) wrote: > > > On Tue, 14 Jul 2020 11:21:29 +0100 > > > Daniel P. Berrangé wrote: > > > > > > > On Tue, Jul 14, 2020 at 07:29:57AM

Re: device compatibility interface for live migration with assigned devices

2020-07-15 Thread Alex Xu
Alex Williamson 于2020年7月15日周三 上午12:16写道: > On Tue, 14 Jul 2020 11:21:29 +0100 > Daniel P. Berrangé wrote: > > > On Tue, Jul 14, 2020 at 07:29:57AM +0800, Yan Zhao wrote: > > > hi folks, > > > we are defining a device migration compatibility interface that helps > upper > > > layer stack like

[PATCH] Qemu: migration: Not bind RAM info with active migration status

2020-07-15 Thread Keqian Zhu
For that Qemu supports returning incoming migration info since its commit 65ace0604551 (migration: add postcopy total blocktime into query-migrate), which may contains active status, but without RAM info. Drop this binding relationship check in libvirt. Signed-off-by: Keqian Zhu ---

Re: [PATCH v5 0/3] tpm: Fix default choices for CRB and SPAPR dev models

2020-07-15 Thread Peter Krempa
On Tue, Jul 14, 2020 at 23:00:51 +0400, Marc-André Lureau wrote: > Hi > > On Fri, Jul 10, 2020 at 12:49 AM Stefan Berger > wrote: > > > From: Stefan Berger > > > > This series of patches adds an additional check for the SPAPR device model > > that prevents the choice of a TPM 1.2 backend and