Re: [libvirt PATCH 3/3] qemu: respond to NETDEV_STREAM_DISCONNECTED event

2023-02-22 Thread Laine Stump
On 2/22/23 5:21 AM, Michal Prívozník wrote: On 2/22/23 01:35, Laine Stump wrote: When a QEMU netdev is of type "stream", if the socket it uses for connectivity to the host network gets closed, then QEMU will send a NETDEV_STREAM_DISCONNECTED event. We know that any stream netdev we'

Re: [PATCH] qemu: forbid updating any attributes of an interface with update-device

2023-02-21 Thread Laine Stump
On 2/21/23 4:20 AM, Martin Kletzander wrote: On Tue, Feb 21, 2023 at 09:11:11AM +0100, Martin Kletzander wrote: On Wed, Feb 15, 2023 at 04:06:41PM -0500, Laine Stump wrote: Changing any of the attributes of an 's would require removing and re-adding the interface for the new setting to take

[libvirt PATCH 1/3] qemu: capabilities: Introduce QEMU_CAPS_NETDEV_STREAM_RECONNECT

2023-02-21 Thread Laine Stump
From: Peter Krempa Detect that the 'stream' netdev backend supports reconnecting. Signed-off-by: Peter Krempa Signed-off-by: Laine Stump --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata

[libvirt PATCH 0/3] Support for restarting passt backend

2023-02-21 Thread Laine Stump
patch 3/3 handles (1). (patch 1/3 is a short guest appearance by pkrempa. Thanks pkrempa!). This resolves https://bugzilla.redhat.com/2172098 Along with Stefano's series fixing up selinux issues related to running the passt process, they make the passt backend very usable. Laine Stump (2):

[libvirt PATCH 2/3] qemu: add reconnect=5 to passt qemu commandline options when available

2023-02-21 Thread Laine Stump
support passt backend, but not reconnect) Signed-off-by: Laine Stump --- src/qemu/qemu_passt.c | 11 ++ .../net-user-passt.x86_64-7.2.0.args | 37 +++ .../net-user-passt.x86_64-latest.args | 2 +- tests/qemuxml2argvtest.c

[libvirt PATCH 3/3] qemu: respond to NETDEV_STREAM_DISCONNECTED event

2023-02-21 Thread Laine Stump
need to do is trim the 1st 4 characters from the netdev-id and look for the NetDef having that resulting trimmed string as its alias. (Contrast this to NIC_RX_FILTER_CHANGED, which is an event received for the guest side of the device, and so directly contains the device alias.) Resolves: https://bugz

[libvirt PATCH 0/2] A couple simple cleanups

2023-02-21 Thread Laine Stump
Noticed these while doing other work. Laine Stump (2): qemu: add check for QEMU_CAPS_NETDEV_STREAM during validation qemu: remove extraneous error log when qemuPasstStart() fails during hotplug src/qemu/qemu_hotplug.c | 5 +- src/qemu/qemu_validate.c

[libvirt PATCH 2/2] qemu: remove extraneous error log when qemuPasstStart() fails during hotplug

2023-02-21 Thread Laine Stump
qemuPasstStart() already logs any error that occurs, so having the caller log a generic error message only serves to obscure the actual problem. Fixes: a56f0168d576fa01cec204dc3c67d4d63ab8487f Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 5 + 1 file changed, 1 insertion(+), 4

[libvirt PATCH 1/2] qemu: add check for QEMU_CAPS_NETDEV_STREAM during validation

2023-02-21 Thread Laine Stump
't as easy to understand as a libvirt-generated error. Fixes: a56f0168d576fa01cec204dc3c67d4d63ab8487f Signed-off-by: Laine Stump --- src/qemu/qemu_validate.c | 6 ++ .../net-user-passt.x86_64-latest.xml | 61 +++ tests/qemuxml

Re: [PATCH] qemu: forbid updating any attributes of an interface with update-device

2023-02-21 Thread Laine Stump
On 2/21/23 3:11 AM, Martin Kletzander wrote: On Wed, Feb 15, 2023 at 04:06:41PM -0500, Laine Stump wrote: Changing any of the attributes of an 's would require removing and re-adding the interface for the new setting to take effect, so fail any update-device that changes anything in Resolves

Re: [PATCH] qemu: forbid updating any attributes of an interface with update-device

2023-02-20 Thread Laine Stump
Ping On 2/15/23 4:06 PM, Laine Stump wrote: Changing any of the attributes of an 's would require removing and re-adding the interface for the new setting to take effect, so fail any update-device that changes anything in Resolves: https://bugzilla.redhat.com/2169245 Signed-off-by: Laine

Re: [PATCH v2 5/5] qemu_passt: Let passt write the PID file

2023-02-16 Thread Laine Stump
starting/stopping fine for me all along (both before and after I changed the daemonizing) as long as selinux is disabled - still need to fix that). Signed-off-by: Michal Privoznik Reviewed-by: Laine Stump --- src/qemu/qemu_passt.c | 11 +++ 1 file changed, 7 insertions(+), 4

Re: [PATCH v2 0/5] qemu_passt: Fix issues with PID file

2023-02-16 Thread Laine Stump
On 2/16/23 8:32 AM, Michal Privoznik wrote: This is a v2 of: https://listman.redhat.com/archives/libvir-list/2023-February/237731.html diff to v1: - Merged patches that were ACKed in v1, - Dropped 4/4 from the original series (the one that sets --foreground), and implemented a different

Re: [PATCH v2 4/5] qemu_passt: Deduplicate passt killing code

2023-02-16 Thread Laine Stump
overwrite the original error). Therefore, move the internals of qemuPasstStop() into a separate function and call it from both places. Signed-off-by: Michal Privoznik Reviewed-by: Laine Stump --- src/qemu/qemu_passt.c | 23 +-- 1 file changed, 13 insertions(+), 10

Re: [PATCH v2 2/5] qemu_passt: Report passt's error on failed start

2023-02-16 Thread Laine Stump
the heavy lifting and switch to virCommandSetErrorBuffer() instead of reading error from an FD. Signed-off-by: Michal Privoznik Reviewed-by: Laine Stump (also a part of the reverted patch) --- src/qemu/qemu_passt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v2 3/5] qemu_passt: Make passt report errors to stderr whenever possible

2023-02-16 Thread Laine Stump
On 2/16/23 11:27 AM, Michal Prívozník wrote: On 2/16/23 17:07, Stefano Brivio wrote: On Thu, 16 Feb 2023 14:32:50 +0100 Michal Privoznik wrote: Passt has '--stderr' argument which makes it report error onto stderr rather to system log. Unfortunately, it's currently impossible to use both

Re: [PATCH v2 1/5] qemu_passt: Avoid double daemonizing passt

2023-02-16 Thread Laine Stump
On 2/16/23 8:32 AM, Michal Privoznik wrote: When passt is started, it daemonizes itself by default. There's no point in having our virCommand module daemonize it too. Signed-off-by: Michal Privoznik Reviewed-by: Laine Stump --- src/qemu/qemu_passt.c | 1 - 1 file changed, 1 deletion

Re: [PATCH v2 3/5] qemu_passt: Make passt report errors to stderr whenever possible

2023-02-16 Thread Laine Stump
This is all unnecessary. The issue with error messages has been fixed upstream in passt (along with other logging issues), and just serves to unnecessarily complicate the code. On 2/16/23 8:32 AM, Michal Privoznik wrote: Passt has '--stderr' argument which makes it report error onto stderr

[PATCH] qemu: forbid updating any attributes of an interface with update-device

2023-02-15 Thread Laine Stump
Changing any of the attributes of an 's would require removing and re-adding the interface for the new setting to take effect, so fail any update-device that changes anything in Resolves: https://bugzilla.redhat.com/2169245 Signed-off-by: Laine Stump --- src/conf/domain_conf.c | 14

Re: [PATCH] qemu_extdevice: Add a comment into qemuExtDevicesSetupCgroup()

2023-02-15 Thread Laine Stump
helpers into the CGroup. But when one reads just qemuExtDevicesSetupCgroup() it's easy to miss this hidden logic. Therefore, add a warning at the beginning of the function. Signed-off-by: Michal Privoznik Reviewed-by: Laine Stump Thanks for indulging me! --- src/qemu/qemu_extdevice.c | 3 +++ 1

Re: [PATCH 4/4] qemu_passt: Don't let passt fork off

2023-02-15 Thread Laine Stump
On 2/15/23 12:04 PM, Michal Prívozník wrote: On 2/15/23 08:50, Laine Stump wrote: On 2/14/23 8:02 AM, Stefano Brivio wrote: On Tue, 14 Feb 2023 12:51:22 +0100 Michal Privoznik wrote: When passt starts it tries to do some security measures to restrict itself. For instance, it creates its own

Re: [PATCH 4/4] qemu_passt: Don't let passt fork off

2023-02-14 Thread Laine Stump
On 2/14/23 8:02 AM, Stefano Brivio wrote: On Tue, 14 Feb 2023 12:51:22 +0100 Michal Privoznik wrote: When passt starts it tries to do some security measures to restrict itself. For instance, it creates its own namespaces, umounts basically everything, drops capabilities, forks off to further

Re: [PATCH 3/4] qemu_passt: Report error when getting passt PID failed

2023-02-14 Thread Laine Stump
On 2/14/23 6:51 AM, Michal Privoznik wrote: If qemuPasstGetPid() fails, or the passt's PID is -1 then qemuPasstSetupCgroup() returns early without any error message set. Report an appropriate error. Signed-off-by: Michal Privoznik Reviewed-by: Laine Stump --- src/qemu/qemu_passt.c | 5

Re: [PATCH 2/4] qemu_extdevice: Make qemuExtDevicesHasDevice() check def->nets

2023-02-14 Thread Laine Stump
-by: Laine Stump --- src/qemu/qemu_extdevice.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c index fdefe59215..47e97f3565 100644 --- a/src/qemu/qemu_extdevice.c +++ b/src/qemu/qemu_extdevice.c @@ -296,6 +296,17

Re: [PATCH 1/4] Revert "qemu: allow passt to self-daemonize"

2023-02-14 Thread Laine Stump
-off-by: Michal Privoznik Reviewed-by: Laine Stump --- src/qemu/qemu_passt.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_passt.c b/src/qemu/qemu_passt.c index f640a69c00..0f09bf3db8 100644 --- a/src/qemu/qemu_passt.c +++ b/src/qemu/qemu_passt.c

[libvirt PATCH] qemu: allow passt to self-daemonize

2023-02-08 Thread Laine Stump
itself; if it encounters an error and exits with a non-0 code, libvirt will see the code and know about the failure. We can then grab the output from stderr, log that so the "user" has some idea of what went wrong, and then fail the guest startup. Signed-off-by: Laine Stump ---

Re: [PATCH] .gitignore: Ignore cscope and other *tags files

2023-02-03 Thread Laine Stump
On 2/3/23 2:49 AM, Erik Skultety wrote: On Thu, Feb 02, 2023 at 02:02:13PM -0500, Laine Stump wrote: On 2/2/23 10:37 AM, Martin Kletzander wrote: Commit f7114e61dbc2 cleaned up way too much and now that I have cscope working again I noticed there are some files that ought to stay ignored

Re: [PATCH] .gitignore: Ignore cscope and other *tags files

2023-02-02 Thread Laine Stump
On 2/2/23 10:37 AM, Martin Kletzander wrote: Commit f7114e61dbc2 cleaned up way too much and now that I have cscope working again I noticed there are some files that ought to stay ignored. Signed-off-by: Martin Kletzander Reviewed-by-with-prejudice: Laine Stump I had sent a patch a year

[PATCH] docs: fix passt example

2023-01-18 Thread Laine Stump
Somehow I neglected to fully update the example for the interface passt backend when the design changed during development. This fixes the example to reflect what is in the code. Signed-off-by: Laine Stump --- docs/formatdomain.rst | 20 ++-- 1 file changed, 10 insertions(+), 10

[libvirt PATCH 3/3] tests: remove unused qemu .args file

2023-01-12 Thread Laine Stump
test file was accidentally added to the original patch. This patch removes it. Signed-off-by: Laine Stump --- tests/qemuxml2argvdata/net-user-passt.args | 34 -- 1 file changed, 34 deletions(-) delete mode 100644 tests/qemuxml2argvdata/net-user-passt.args diff --g

[libvirt PATCH 1/3] conf: remove attribute

2023-01-12 Thread Laine Stump
/upstream, and change the passt commandline creation to grab the name for --interface from source/dev. Signed-off-by: Laine Stump --- docs/formatdomain.rst | 9 + src/conf/domain_conf.c| 15 +-- src/conf/domain_conf.h| 1

[libvirt PATCH 0/3] Remove per danpb's request, and a couple small cleanups

2023-01-12 Thread Laine Stump
that you can get RC2 tagged. Laine Stump (3): conf: remove attribute qemu: remove commented-out option in passt qemu commandline setup tests: remove unused qemu .args file docs/formatdomain.rst | 9 +++--- src/conf/domain_conf.c | 15

[libvirt PATCH 2/3] qemu: remove commented-out option in passt qemu commandline setup

2023-01-12 Thread Laine Stump
This commented-out option was pointed out by jtomko during review, but I missed taking it out when addressing his comments. Signed-off-by: Laine Stump --- src/qemu/qemu_passt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_passt.c b/src/qemu/qemu_passt.c index b1215a1bba

Re: [libvirt PATCH 4/9] conf: add passt XML additions to schema

2023-01-12 Thread Laine Stump
On 1/11/23 1:33 PM, Daniel P. Berrangé wrote: On Sun, Jan 08, 2023 at 11:11:07PM -0500, Laine Stump wrote: Initial support for network devices using passt (https://passt.top) for the backend connection will require: * new attributes of the subelement: * "type" that can have

Re: [PATCH] NEWS: document addition of passt support

2023-01-10 Thread Laine Stump
On 1/10/23 4:12 AM, Martin Kletzander wrote: On Tue, Jan 10, 2023 at 01:40:58AM -0500, Laine Stump wrote: Signed-off-by: Laine Stump --- NEWS.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index fecca64344..768208ed03 100644 --- a/NEWS.rst +++ b/NEWS.rst

[PATCH] NEWS: document addition of passt support

2023-01-09 Thread Laine Stump
Signed-off-by: Laine Stump --- NEWS.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index fecca64344..768208ed03 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -23,6 +23,16 @@ v9.0.0 (unreleased) ``virDomainSnapshotDelete()``. Flags that allow deleting

Re: [libvirt PATCH 8/9] qemu: hook up passt config to qemu domains

2023-01-09 Thread Laine Stump
On 1/9/23 9:51 AM, Ján Tomko wrote: On a Monday in 2023, Laine Stump wrote: On 1/9/23 2:32 AM, Ján Tomko wrote: On a Sunday in 2023, Laine Stump wrote: +static char * +qemuPasstCreatePidFilename(virDomainObj *vm, +   virDomainNetDef *net) +{ +    qemuDomainObjPrivate

Re: [libvirt PATCH 8/9] qemu: hook up passt config to qemu domains

2023-01-09 Thread Laine Stump
On 1/9/23 2:32 AM, Ján Tomko wrote: On a Sunday in 2023, Laine Stump wrote: This consists of (1) adding the necessary args to the qemu commandline netdev option, and (2) starting a passt process prior to starting qemu, and making sure that it is terminated when it's no longer needed. Under

Re: [libvirt PATCH 7/9] qemu: add passtStateDir to qemu driver config

2023-01-09 Thread Laine Stump
On 1/9/23 2:23 AM, Ján Tomko wrote: On a Sunday in 2023, Laine Stump wrote: -- It seems a bit wasteful to allocate another string for this, since it is 100% always ${stateDir}/passt, but everyone else is doing this (e.g. slirpStateDir), so I'm just following along with the cult. Did you

Re: [libvirt PATCH 3/9] conf: put interface parsing/formatting separate functions

2023-01-08 Thread Laine Stump
On 1/9/23 1:47 AM, Ján Tomko wrote: On a Sunday in 2023, Laine Stump wrote: In preparation for adding more stuff to . Signed-off-by: Laine Stump --- I wanted virDomainNetBackendParseXML to simply take a virDomainNetBackend*, but there is a test case specifically checking to be sure

[libvirt PATCH 1/9] conf: rename virDomainNetBackend* to virDomainNetDriver*

2023-01-08 Thread Laine Stump
This fits better with the element containing the value (), and allows us to use virDomainNetBackend* for things in the element. Signed-off-by: Laine Stump --- src/conf/domain_conf.c| 8 src/conf/domain_conf.h| 14 +++--- src/qemu/qemu_interface.c | 8

[libvirt PATCH 5/9] conf: parse/format passt-related XML additions

2023-01-08 Thread Laine Stump
tcp ports 5000-5099 (with the exception of ports 5010-5029) to the host will be forwarded to port 1000-1099 on the guest. * incoming udp packets on port 10101 will be forwarded (unchanged) to the guest. Signed-off-by: Laine Stump --- docs/formatdomain.rst | 95 +++- sr

[libvirt PATCH 8/9] qemu: hook up passt config to qemu domains

2023-01-08 Thread Laine Stump
, but in case of some error where qemu is never started, or fails to startup completely, we need to terminate passt manually. Signed-off-by: Laine Stump --- meson.build | 1 + po/POTFILES | 1 + src/qemu/meson.build

[libvirt PATCH 9/9] specfile: require passt for the build if fedora >= 36 or rhel >= 9

2023-01-08 Thread Laine Stump
tall passt on an older version of Fedora or RHEL, it will still work (as long as it's installed somewhere in the path). Signed-off-by: Laine Stump --- libvirt.spec.in | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 6b8acf252e..d9529fc76c 1006

[libvirt PATCH 7/9] qemu: add passtStateDir to qemu driver config

2023-01-08 Thread Laine Stump
-- It seems a bit wasteful to allocate another string for this, since it is 100% always ${stateDir}/passt, but everyone else is doing this (e.g. slirpStateDir), so I'm just following along with the cult. Signed-off-by: Laine Stump --- src/qemu/qemu_conf.c | 2 ++ src/qemu/qemu_conf.h | 1

[libvirt PATCH 3/9] conf: put interface parsing/formatting separate functions

2023-01-08 Thread Laine Stump
In preparation for adding more stuff to . Signed-off-by: Laine Stump --- I wanted virDomainNetBackendParseXML to simply take a virDomainNetBackend*, but there is a test case specifically checking to be sure that backend/vhost isn't parsed if the interface isn't virtio. Silently Ignoring

[libvirt PATCH 2/9] conf: move anonymous backend struct from virDomainNetDef into its own struct

2023-01-08 Thread Laine Stump
This will allow us to call parser/formatter functions with a pointer to just the backend part. Signed-off-by: Laine Stump --- src/conf/domain_conf.h | 10 ++ src/conf/virconftypes.h | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.h b/src

[libvirt PATCH 6/9] qemu: new capability QEMU_CAPS_NETDEV_STREAM

2023-01-08 Thread Laine Stump
passt support requires "-netdev stream", which was added to QEMU in qemu-7.2.0. Signed-off-by: Laine Stump --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml | 1

[libvirt PATCH 4/9] conf: add passt XML additions to schema

2023-01-08 Thread Laine Stump
ogFile" (a path to a file that passt should use for its logging) * "upstream" (a netdev name, e.g. "eth0"). * a new subelement (described in more detail later) Signed-off-by: Laine Stump --- src/conf/schemas/domaincommon.rng | 65 +

[libvirt PATCH 0/9] Support libvirt-managed QEMU domain backed by a passt process

2023-01-08 Thread Laine Stump
all subset here are the things that seem most useful (and/or were specifically requested by prospective users of passt). It is always easier to add more stuff in the future than to remove "mistakes", so I tried to no go overboard. Laine Stump (9): conf: rename virDomainNetBackend* to vi

Re: [libvirt PATCH v3 02/18] qemu: Add functions for determining nbdkit availability

2022-12-12 Thread Laine Stump
On 12/12/22 2:41 AM, Peter Krempa wrote: On Fri, Dec 09, 2022 at 12:25:11 -0500, Laine Stump wrote: On 12/7/22 6:34 AM, Peter Krempa wrote: On Thu, Oct 20, 2022 at 16:58:53 -0500, Jonathon Jongsma wrote: + * + * Copyright (C) 2021 Red Hat, Inc. Also consider updating the year

Re: [libvirt PATCH v3 02/18] qemu: Add functions for determining nbdkit availability

2022-12-09 Thread Laine Stump
On 12/7/22 6:34 AM, Peter Krempa wrote: On Thu, Oct 20, 2022 at 16:58:53 -0500, Jonathon Jongsma wrote: + * + * Copyright (C) 2021 Red Hat, Inc. Also consider updating the year. For a long time I always updated the year in copyright notices when I changed a file (even still have an emacs

Re: [PATCH v2 0/2] virnetdevtap.c: Disallow pre-existing TAP devices

2022-12-08 Thread Laine Stump
insertions(+), 4 deletions(-) Reviewed-by: Laine Stump (As I was reviewing, I realized I only got half of the story about the FreeeBSD virNetDevTapCreate(), and there is actually a 2nd pre-existing bug - since FreeBSD creates the tap device by creating a device and then renaming

Re: [PATCH] virnetdevtap.c: Disallow pre-existing TAP devices

2022-12-08 Thread Laine Stump
ready returning an error if we try to make a new device with the same name as an existing device (rather than just returning a handle to the already-existing device as the API for tap devices does.) Reviewed-by: Laine Stump (but maybe 1) remove the chunk from virNetDevTapCreate() for FreeBSD, an

Re: [libvirt PATCH] qemu: fix memlock without vIOMMU

2022-11-18 Thread Laine Stump
def->iommu) +factor += nvfio; +else +factor += 1; +} -memKB = MAX(factor, 1) * virDomainDefGetMemoryTotal(def) + 1024 * 1024; +memKB = factor * virDomainDefGetMemoryTotal(def) + 1024 * 1024; } return memKB << 10; Reviewed-by: Laine Stump

Re: [PATCH 0/8] network: firewalld: native support for NAT/routed

2022-11-16 Thread Laine Stump
On 11/16/22 4:11 AM, Daniel P. Berrangé wrote: On Wed, Nov 16, 2022 at 09:40:41AM +0100, Michal Prívozník wrote: On 11/15/22 23:16, Eric Garver wrote: On Tue, Nov 15, 2022 at 11:03:21AM -0500, Laine Stump wrote: On 11/15/22 5:21 AM, Michal Prívozník wrote: On 11/10/22 17:31, Eric Garver

Re: [PATCH 3/8] network: firewalld: use native routed networks

2022-11-15 Thread Laine Stump
On 11/15/22 11:34 AM, Daniel P. Berrangé wrote: On Thu, Nov 10, 2022 at 11:31:47AM -0500, Eric Garver wrote: The firewalld backend for routed networks can now use a native implementation. The hybrid of iptables + firewalld is no longer necessary. When full native firewalld is in use there are

Re: [PATCH 0/8] network: firewalld: native support for NAT/routed

2022-11-15 Thread Laine Stump
On 11/15/22 12:55 PM, Daniel P. Berrangé wrote: On Thu, Nov 10, 2022 at 11:31:44AM -0500, Eric Garver wrote: This series further improves the firewalld backend by converting to a fully native implementation for NAT and routed networks. That is, there are no iptables rules added by libvirt when

Re: [PATCH 0/8] network: firewalld: native support for NAT/routed

2022-11-15 Thread Laine Stump
On 11/15/22 5:21 AM, Michal Prívozník wrote: On 11/10/22 17:31, Eric Garver wrote: This series further improves the firewalld backend by converting to a fully native implementation for NAT and routed networks. That is, there are no iptables rules added by libvirt when the running firewalld is

Re: how hotplug devices onto pcie-to-pci-bridge

2022-11-07 Thread Laine Stump
, and assigning each of the existing devices to one of these root ports - you won't need to figure out any pci addresses yourself. At 2022-11-08 02:53:55, "Laine Stump" wrote: On 11/6/22 3:28 AM, longguang.yue wrote: Hi, Laine Stump and Oleg Vasilev: 1.  Laine, what is 'conventional

Re: how hotplug devices onto pcie-to-pci-bridge

2022-11-07 Thread Laine Stump
On 11/6/22 3:28 AM, longguang.yue wrote: Hi, Laine Stump and Oleg Vasilev: 1.  Laine, what is 'conventional PCI device'? in my case they are all virtio device. A "conventional PCI" device is one that is designed to work with the original PCI spec, i.e. before PCI Express. A

Re: [PATCH] qemu: add pcie-to-pci-bridge for q35 machines

2022-11-04 Thread Laine Stump
On 11/4/22 11:05 AM, Andrea Bolognani wrote: On Fri, Nov 04, 2022 at 08:23:52PM +0600, Oleg Vasilev wrote: On 04.11.2022 20:19, Andrea Bolognani wrote: Additionally, after this change it would be impossible to create a q35 VM *without* the additional bridge. Most users of the q35 machine type

Re: [PATCH] qemu: add pcie-to-pci-bridge for q35 machines

2022-11-04 Thread Laine Stump
On 11/4/22 10:01 AM, Denis V. Lunev wrote: On 11/4/22 14:41, Daniel P. Berrangé wrote: On Fri, Nov 04, 2022 at 01:03:52PM +0100, Peter Krempa wrote: On Fri, Nov 04, 2022 at 16:43:00 +0600, Oleg Vasilev wrote: Hotplugging PCI devices on pc-i440fx machines is supported without additional

Re: how hotplug devices onto pcie-to-pci-bridge

2022-11-03 Thread Laine Stump
On 11/3/22 6:35 AM, longguang.yue wrote: Hi, all   I have add two pcie-to-pci-bridge controllers, how hotplug devices onto this two controllers?  and libvirt knows to plug onto pci-bridge when there are no pcie-ports. defaultly libvirt plugs devices onto pcie-port. Do you mean you want

Re: [PATCH v3 5/5] network: firewalld: add support for routed networks

2022-10-24 Thread Laine Stump
Hey Eric! I *finally* set things up to test this adequately, and it all looks good and is operating properly. The one nit I found with the content of the patches was that the new zone/policy files weren't added to the specfile, so I've done that. I'm now ready to push all the patches, but

Re: [libvirt PATCH] nodedev: switch to udev 'bind' events

2022-09-23 Thread Laine Stump
On 9/22/22 12:41 PM, Jonathon Jongsma wrote: On 9/22/22 3:59 AM, Erik Skultety wrote: On Tue, Sep 20, 2022 at 02:23:23PM -0500, Jonathon Jongsma wrote: Rather than listening to 'add' udev events, listen for 'bind' events instead. When we get an 'add' event, the sysfs tree for the device is

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-23 Thread Laine Stump
On 9/23/22 10:00 AM, Daniel P. Berrangé wrote: On Fri, Sep 23, 2022 at 10:46:21AM -0300, Jason Gunthorpe wrote: On Fri, Sep 23, 2022 at 02:35:20PM +0100, Daniel P. Berrangé wrote: On Fri, Sep 23, 2022 at 10:29:41AM -0300, Jason Gunthorpe wrote: On Fri, Sep 23, 2022 at 09:54:48AM +0100, Daniel

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-21 Thread Laine Stump
On 9/21/22 2:06 PM, Alex Williamson wrote: [Cc+ Steve, libvirt, Daniel, Laine] On Tue, 20 Sep 2022 16:56:42 -0300 Jason Gunthorpe wrote: On Tue, Sep 13, 2022 at 09:28:18AM +0200, Eric Auger wrote: Hi, On 9/13/22 03:55, Tian, Kevin wrote: We didn't close the open of how to get this merged

Re: [libvirt PATCH] nodedev: switch to udev 'bind' events

2022-09-21 Thread Laine Stump
-by: Jonathon Jongsma Reviewed-by: Laine Stump (I'm giving this based on the assumption that you've tried it out with a few examples of adding devices and they properly show up in virsh nodedev-list, etc. There is always the chance may be some odd case where the bind event isn't generated when

Re: [PATCH 37/37] virDomainNetDefParseXML: Drop prehistoric error workaround

2022-09-19 Thread Laine Stump
On 9/19/22 4:55 AM, Peter Krempa wrote: Apart from it being a long time ago the 'openvz' driver is also rarely used. Signed-off-by: Peter Krempa As the person who added this hack, I approve. Reviewed-by: Laine Stump --- src/conf/domain_conf.c | 20 1 file changed

Re: [libvirt PATCH] NEWS: memtion vdpa/vfio memlock bump in release notes

2022-08-26 Thread Laine Stump
fixes** + * qemu: increase memlock limit for a domain with multiple vfio/vdpa devices + +When multiple vfio or vdpa devices are assigned to a domain, the memory +limit "locked memory limit". With that tiny change Reviewed-by: Laine Stump and of course safe to push now, si

Re: [PATCH v2] util: basic support for VFIO variant drivers

2022-08-23 Thread Laine Stump
d Daniel's suggested implementations). Anyway, I can post the other patch if anyone is interested. On 8/11/22 1:00 AM, Laine Stump wrote: Before a PCI device can be assigned to a guest with VFIO, that device must be bound to the vfio-pci driver rather than to the device's normal driver. The vfio-

Re: [PATCH] lib: Don't check for retval for virCommandNew*()

2022-08-23 Thread Laine Stump
it's not really possible for those APIs to return NULL. Which is why they are even marked as ATTRIBUTE_NONNULL. But there are few places where we do check the retval which is a dead code effectively. Drop those checks. Signed-off-by: Michal Privoznik Reviewed-by: Laine Stump

Re: [libvirt PATCH] qemu: adjust memlock for multiple vfio/vdpa devices

2022-08-22 Thread Laine Stump
. Once those are fixed, Reviewed-by: Laine Stump Oh, and this definitely warrants an entry in the release notes. +int n = 0; + +for (i = 0; i < def->nnets; i++) { +if (virDomainNetGetActualType(def->nets[i]) == VIR_DOMAIN_NET_TYPE_VDP

[libvirt PATCH 16/16] util: don't use virFirewallRuleToString() to log the rule being applied

2022-08-22 Thread Laine Stump
of a failure when running it - from the point of view of *that* usage, we're just moving the call to virCommandToString *up* a few lines, i.e. we now only construct the commandline string once.) Signed-off-by: Laine Stump --- src/util/virfirewall.c | 11 +-- 1 file changed, 5 insertions(+), 6

[libvirt PATCH 13/16] util: replace g_snprintf with g_autofreed g_strdup_printf in viriptables.c

2022-08-22 Thread Laine Stump
Signed-off-by: Laine Stump --- src/util/viriptables.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/util/viriptables.c b/src/util/viriptables.c index e9886a200e..6275760de4 100644 --- a/src/util/viriptables.c +++ b/src/util/viriptables.c @@ -163,10

[libvirt PATCH 14/16] util: remove unused function virFirewallApplyRuleFirewallD()

2022-08-22 Thread Laine Stump
passthrough rules. Signed-off-by: Laine Stump --- src/util/virfirewall.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c index 3183e0aec7..0a9ba9ad5c 100644 --- a/src/util/virfirewall.c +++ b/src/util/virfirewall.c @@ -523,16 +523,6

[libvirt PATCH 02/16] esx: replace explicit virNetworkDefFree() with g_autoptr(virNetworkDef)

2022-08-22 Thread Laine Stump
Signed-off-by: Laine Stump --- src/esx/esx_network_driver.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c index 290c0ad56f..bf9630ce9d 100644 --- a/src/esx/esx_network_driver.c +++ b/src/esx

[libvirt PATCH 15/16] util: make virFirewallRuleToString() global

2022-08-22 Thread Laine Stump
having an unused static function in the next commit. (The arg list is also changed to include the name of the command as a separate argument rather than just assuming that it can be derived from the rule's layer (which is correct for iptables, but won't be correct for nftables)). Signed-off-by: Laine

[libvirt PATCH 06/16] vbox: replace explicit virNetworkDefFree() with g_autoptr(virNetworkDef)

2022-08-22 Thread Laine Stump
Signed-off-by: Laine Stump --- src/vbox/vbox_network.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vbox/vbox_network.c b/src/vbox/vbox_network.c index f687ebbf1a..885fd48321 100644 --- a/src/vbox/vbox_network.c +++ b/src/vbox/vbox_network.c @@ -374,7 +374,7

[libvirt PATCH 11/16] network: move driver state struct into bridge_driver_conf.h

2022-08-22 Thread Laine Stump
This is more similar to lxc and qemu drivers, where the driver state struct is defined along with a config struct in ${driver}_conf.h Signed-off-by: Laine Stump --- src/network/bridge_driver.c | 25 --- src/network/bridge_driver_conf.c | 56 +++ src

[libvirt PATCH 10/16] tests: remove superfluous cleanup: labels and ret return variables

2022-08-22 Thread Laine Stump
After converting virNetworkDef * to g_autoptr(virNetworkDef) the cleanup codepath was empty, so it has been removed. Signed-off-by: Laine Stump --- tests/networkxml2firewalltest.c | 12 tests/networkxml2xmlupdatetest.c | 5 ++--- 2 files changed, 6 insertions(+), 11 deletions

[libvirt PATCH 12/16] network: create separate config object for virNetworkDriverState

2022-08-22 Thread Laine Stump
be safely used until the config object is unrefed. Signed-off-by: Laine Stump --- po/POTFILES | 1 + src/network/bridge_driver.c | 184 +++ src/network/bridge_driver_conf.c | 111 ++- src/network/bridge_driver_conf.h | 31

[libvirt PATCH 08/16] conf: remove superfluous cleanup: labels and ret return variables

2022-08-22 Thread Laine Stump
After converting virNetworkDef * to g_autoptr(virNetworkDef) the cleanup codepath was empty, so it has been removed. Signed-off-by: Laine Stump --- src/conf/domain_conf.c | 23 +- src/conf/virnetworkobj.c | 51 ++-- 2 files changed, 35

[libvirt PATCH 03/16] network: replace explicit virNetworkDefFree() with g_autoptr(virNetworkDef)

2022-08-22 Thread Laine Stump
Signed-off-by: Laine Stump --- src/network/bridge_driver.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index f6538d2638..733abaa719 100644 --- a/src/network/bridge_driver.c +++ b/src

[libvirt PATCH 09/16] qemu: remove superfluous cleanup: labels and ret return variables

2022-08-22 Thread Laine Stump
After converting virNetworkDef * to g_autoptr(virNetworkDef) the cleanup codepath was empty, so it has been removed. Signed-off-by: Laine Stump --- src/qemu/qemu_process.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_process.c b/src

[libvirt PATCH 05/16] test driver: replace explicit virNetworkDefFree() with g_autoptr(virNetworkDef)

2022-08-22 Thread Laine Stump
Signed-off-by: Laine Stump --- src/test/test_driver.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 24ff6e8967..641a141b6a 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -5561,7 +5561,7

[libvirt PATCH 07/16] tests: replace explicit virNetworkDefFree() with g_autoptr(virNetworkDef)

2022-08-22 Thread Laine Stump
Signed-off-by: Laine Stump --- tests/networkxml2firewalltest.c | 3 +-- tests/networkxml2xmltest.c | 3 +-- tests/networkxml2xmlupdatetest.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c index

[libvirt PATCH 04/16] qemu: replace explicit virNetworkDefFree() with g_autoptr(virNetworkDef)

2022-08-22 Thread Laine Stump
Signed-off-by: Laine Stump --- src/qemu/qemu_process.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 5c8413a6b6..002eab43be 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4828,7 +4828,7

[libvirt PATCH 01/16] conf: replace explicit virNetworkDefFree() with g_autoptr(virNetworkDef)

2022-08-22 Thread Laine Stump
Signed-off-by: Laine Stump --- src/conf/domain_conf.c | 3 +-- src/conf/virnetworkobj.c | 21 + 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2fc94b40ef..f66a19311b 100644 --- a/src/conf/domain_conf.c

[libvirt PATCH 00/16] various network driver cleanups

2022-08-22 Thread Laine Stump
These all bubbled to the top of a series that adds support for an nftables backend to the network driver, but are valid patches by themselves, so I'm sending them separately to make the other series look shorter. Laine Stump (16): conf: replace explicit virNetworkDefFree() with g_autoptr

[PATCH v2] util: basic support for VFIO variant drivers

2022-08-10 Thread Laine Stump
ed later when there is a widely available driver / device combo we can use for testing. Signed-off-by: Laine Stump --- V1 here: https://listman.redhat.com/archives/libvir-list/2022-August/233327.html Change in V2: V1 used the output of modinfo to look for "vfio_pci" as an alias for a

Re: [PATCH] util: basic support for vendor-specific vfio drivers

2022-08-05 Thread Laine Stump
On 8/5/22 2:20 PM, Jason Gunthorpe wrote: On Fri, Aug 05, 2022 at 11:24:08AM -0600, Alex Williamson wrote: On Thu, 4 Aug 2022 21:11:07 -0300 Jason Gunthorpe wrote: On Thu, Aug 04, 2022 at 01:36:24PM -0600, Alex Williamson wrote: That is reasonable, but I'd say those three kernels only have

Re: [PATCH] util: basic support for vendor-specific vfio drivers

2022-08-05 Thread Laine Stump
On 8/5/22 2:56 PM, Alex Williamson wrote: On Fri, 5 Aug 2022 15:20:24 -0300 Jason Gunthorpe wrote: On Fri, Aug 05, 2022 at 11:24:08AM -0600, Alex Williamson wrote: On Thu, 4 Aug 2022 21:11:07 -0300 Jason Gunthorpe wrote: On Thu, Aug 04, 2022 at 01:36:24PM -0600, Alex Williamson wrote:

Re: [PATCH] util: basic support for vendor-specific vfio drivers

2022-08-05 Thread Laine Stump
On 8/5/22 5:40 AM, Daniel P. Berrangé wrote: On Mon, Aug 01, 2022 at 09:30:38AM -0400, Laine Stump wrote: On 8/1/22 7:58 AM, Erik Skultety wrote: Instead of calling an external program and then grepping its output which technically could change in the future, wouldn't it be better if we read

Re: [PATCH] util: basic support for vendor-specific vfio drivers

2022-08-04 Thread Laine Stump
On 8/4/22 2:36 PM, Jason Gunthorpe wrote: On Thu, Aug 04, 2022 at 12:18:26PM -0600, Alex Williamson wrote: On Thu, 4 Aug 2022 13:51:20 -0300 Jason Gunthorpe wrote: On Mon, Aug 01, 2022 at 09:49:28AM -0600, Alex Williamson wrote: Fortunately these new vendor/device-specific drivers can be

Re: [PATCH] util: basic support for vendor-specific vfio drivers

2022-08-01 Thread Laine Stump
On 8/1/22 7:58 AM, Erik Skultety wrote: On Mon, Aug 01, 2022 at 12:02:22AM -0400, Laine Stump wrote: Before a PCI device can be assigned to a guest with VFIO, that device must be bound to the vfio-pci driver rather than to the device's normal driver. The vfio-pci driver provides APIs

[PATCH] util: basic support for vendor-specific vfio drivers

2022-07-31 Thread Laine Stump
tra patch playing with driver names to my build just to test that everything was working as expected; that's okay for a patch as simple as this, but wouldn't be acceptable testing for anything more complex.) Signed-off-by: Laine Stump --- meson.build | 1 + src/hypervisor/virhos

[PATCH] qemu: don't call qemuMigrationSrcIsAllowedHostdev() from qemuMigrationDstPrepareFresh()

2022-07-27 Thread Laine Stump
is to simply remove the hardcoded check/fail from qemuMigrationDstPrepareFresh() and rely on QEMU to fail if it needs to. Fixes: 25883cd5f0b188f2417f294b7d219a77b219f7c2 Signed-off-by: Laine Stump --- src/qemu/qemu_migration.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/qemu

[PATCH 0/2] A couple of migration blocker query patches

2022-07-21 Thread Laine Stump
2nd patch takes advantage of this new query to skip the hardcoded check the makes any vfio assigned device a migration blocker. Once QEMU and the kernel get migration of (some) vfio devices sorted out, libvirt will allow migration of domains with those devices. Laine Stump (2): qemu: don't tr

<    1   2   3   4   5   6   7   8   9   10   >