[libvirt] [PATCH v2 0/2]impl separite module for hostdev passthrough
by Chunyan Liu
This patch series include two patches:
1/2 is the implementation of the hostdev passthrough common library.
To meet two purposes:
a. move qemu hostdev APIs to common library so that it could be used by all
hypervisor drivers.
b. maintain a global hostdev in-use state.
2/2 is the implementation of pci passthrough to libxl driver.
Using common library APIs to implement pci passthrough for libxl driver.
(Changes to qemu/lxc driver are not included yet. That could be done after common
library is confirmed.)
Changes to v1:
1/2:
* add scsi part to common library
* instead of hardcode, check for <driver name='kvm/vfio/xen'/> setting, call
virPCIDeviceSetStubDriver to set stub driver. For libxl driver, a <driver
name='xen' /> is needed.
* rebase to current libvirt changes
2/2:
* Add device-attach/detach a pci hostdev implementataion to libxl driver
Chunyan Liu (2):
add hostdev passthrough common library
add pci passthrough impl to libxl
po/POTFILES.in | 1 +
src/Makefile.am | 1 +
src/conf/domain_conf.c | 3 +-
src/conf/domain_conf.h | 1 +
src/libvirt.c | 5 +
src/libvirt_private.syms | 22 +-
src/libxl/libxl_conf.c | 106 +++
src/libxl/libxl_conf.h | 3 +-
src/libxl/libxl_driver.c | 250 +++++++-
src/util/virhostdevmanager.c | 1486 ++++++++++++++++++++++++++++++++++++++++++
src/util/virhostdevmanager.h | 109 +++
src/util/virpci.c | 17 +-
src/util/virpci.h | 7 +-
src/util/virscsi.c | 18 +-
src/util/virscsi.h | 4 +-
src/util/virusb.c | 19 +-
src/util/virusb.h | 4 +-
17 files changed, 2026 insertions(+), 30 deletions(-)
create mode 100644 src/util/virhostdevmanager.c
create mode 100644 src/util/virhostdevmanager.h
11 years, 11 months
[libvirt] [PATCH] configure: Remove unused brctl check
by Cole Robinson
brctl isn't used anywhere AFAICT
---
configure.ac | 2 --
1 file changed, 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5d1bc6b..59a3d6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -318,8 +318,6 @@ AC_PATH_PROG([DNSMASQ], [dnsmasq], [dnsmasq],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
AC_PATH_PROG([RADVD], [radvd], [radvd],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
-AC_PATH_PROG([BRCTL], [brctl], [brctl],
- [/sbin:/usr/sbin:/usr/local/sbin:$PATH])
AC_PATH_PROG([TC], [tc], [tc],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
AC_PATH_PROG([UDEVADM], [udevadm], [],
--
1.8.2.1
11 years, 11 months
[libvirt] [PATCH 0/2] libxl: compatibility fixes
by Jim Fehlig
This small series fixes some capatiblity issues in the libxl driver wrt
the legacy xen driver.
Jim Fehlig (2):
libxl: Report connect type as Xen
libxl: set bootloader for PV domains if not specified
src/libxl/libxl_conf.c | 13 +++++++++++--
src/libxl/libxl_conf.h | 1 +
src/libxl/libxl_driver.c | 2 +-
3 files changed, 13 insertions(+), 3 deletions(-)
--
1.7.7
11 years, 11 months
[libvirt] [PATCH] schema: simplify RNG pattern, remove superfluous <optional>
by Claudio Bley
Signed-off-by: Claudio Bley <cbley(a)av-test.de>
---
Just a minor nit which lets Emacs' nxml-mode fail when parsing
the corresponding RNC schema.
docs/schemas/domaincommon.rng | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 3cace35..1eb2f68 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -243,11 +243,9 @@
<optional>
<ref name="osbootkernel"/>
</optional>
- <optional>
- <zeroOrMore>
- <ref name="osbootdev"/>
- </zeroOrMore>
- </optional>
+ <zeroOrMore>
+ <ref name="osbootdev"/>
+ </zeroOrMore>
<optional>
<element name="bootmenu">
<attribute name="enable">
--
1.7.9.5
11 years, 11 months
[libvirt] [PATCH] nodedev: fix vport detection for FC HBA
by Ján Tomko
Use the host number as the host number when constructing the sysfs path
instead of the variable we are trying to fill.
https://bugzilla.redhat.com/show_bug.cgi?id=973543
---
Untested, but we do the same in virFindFCHostCapableVport
in src/util/virutil.c.
src/node_device/node_device_linux_sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/node_device/node_device_linux_sysfs.c b/src/node_device/node_device_linux_sysfs.c
index cb2f86e..d68c3bd 100644
--- a/src/node_device/node_device_linux_sysfs.c
+++ b/src/node_device/node_device_linux_sysfs.c
@@ -80,7 +80,7 @@ detect_scsi_host_caps(union _virNodeDevCapData *d)
d->scsi_host.flags |= VIR_NODE_DEV_CAP_FLAG_HBA_VPORT_OPS;
if (virReadFCHost(NULL,
- d->scsi_host.max_vports,
+ d->scsi_host.host,
"max_npiv_vports",
&max_vports) < 0) {
VIR_ERROR(_("Failed to read max_npiv_vports for host%d"),
@@ -89,7 +89,7 @@ detect_scsi_host_caps(union _virNodeDevCapData *d)
}
if (virReadFCHost(NULL,
- d->scsi_host.max_vports,
+ d->scsi_host.host,
"npiv_vports_inuse",
&vports) < 0) {
VIR_ERROR(_("Failed to read npiv_vports_inuse for host%d"),
--
1.8.1.5
11 years, 11 months
[libvirt] Can we allow users in 'qemu' group to skip polkit auth?
by Cole Robinson
There's a bug report filed against Fedora libvirt requesting a polkit rule be
installed that grants read/write libvirt access to all users in the 'qemu' group:
https://bugzilla.redhat.com/show_bug.cgi?id=957300
I'm inclined to agree with the reporter, and time has shown that many users
install custom polkit rules to grant their user passwordless access to libvirt
so this would definitely fill a need.
I'm sure there's plenty to consider here since we are talking about security.
Thoughts?
Thanks,
Cole
11 years, 11 months
[libvirt] Disabling bootmenu causes boot to skip over cdrom
by Keno Fischer
Hello,
I have domain with the following setup:
- 1 VirtIO Disk
- 1 VirtIO CDROM
- 2 IDE CDROMs
Now, depending on whether or not I have the bootmenu flag enabled, the boot
sequence skips over booting from CDROM entirely (it does work if the
bootmenu is enabled).
This started happening after I added the VirtIO CDROM. Is this a bug or am
I doing something wrong?
Thanks,
Keno Fischer
11 years, 11 months
[libvirt] [PATCH] doc: Explicitly document migration limitations on errors
by Peter Krempa
Migration of guests that are in error state for example because of I/O
errors may not be possible and encountering of such errors may lead to
cancellation of such migration. Document this behavior explicitly.
---
src/libvirt.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/libvirt.c b/src/libvirt.c
index 620dbdd..1bdd193 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -5196,7 +5196,10 @@ virDomainMigrateDirect(virDomainPtr domain,
* There are many limitations on migration imposed by the underlying
* technology - for example it may not be possible to migrate between
* different processors even with the same architecture, or between
- * different types of hypervisor.
+ * different types of hypervisor. A domain may not be migratable
+ * because of configuration or error states. A domain may become
+ * unmigratable during migration. This will cancel the ongoing
+ * migration.
*
* Returns the new domain object if the migration was successful,
* or NULL in case of error. Note that the new domain object
@@ -5423,7 +5426,10 @@ error:
* There are many limitations on migration imposed by the underlying
* technology - for example it may not be possible to migrate between
* different processors even with the same architecture, or between
- * different types of hypervisor.
+ * different types of hypervisor. A domain may not be migratable
+ * because of configuration or error states. A domain may become
+ * unmigratable during migration. This will cancel the ongoing
+ * migration.
*
* If the hypervisor supports it, @dxml can be used to alter
* host-specific portions of the domain XML that will be used on
@@ -5664,7 +5670,10 @@ error:
* There are many limitations on migration imposed by the underlying
* technology - for example it may not be possible to migrate between
* different processors even with the same architecture, or between
- * different types of hypervisor.
+ * different types of hypervisor. A domain may not be migratable
+ * because of configuration or error states. A domain may become
+ * unmigratable during migration. This will cancel the ongoing
+ * migration.
*
* Returns 0 if the migration succeeded, -1 upon error.
*/
@@ -5826,7 +5835,10 @@ error:
* There are many limitations on migration imposed by the underlying
* technology - for example it may not be possible to migrate between
* different processors even with the same architecture, or between
- * different types of hypervisor.
+ * different types of hypervisor. A domain may not be migratable
+ * because of configuration or error states. A domain may become
+ * unmigratable during migration. This will cancel the ongoing
+ * migration.
*
* Returns 0 if the migration succeeded, -1 upon error.
*/
--
1.8.2.1
11 years, 11 months