[libvirt] [PATCH] parallels: fix compilation of parallels_storage.c
by Dmitry Guryanov
virConnect.privateData is void *, so we can't access
fields of parallelsConn, pointer to which is stored in
virConnect.privateData. So replace all occurences of
conn->privateData->storageState with privconn->storageState.
Signed-off-by: Dmitry Guryanov <dguryanov(a)parallels.com>
---
src/parallels/parallels_storage.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/parallels/parallels_storage.c b/src/parallels/parallels_storage.c
index e1b6ea8..882cbd0 100644
--- a/src/parallels/parallels_storage.c
+++ b/src/parallels/parallels_storage.c
@@ -72,8 +72,8 @@ parallelsStorageClose(virConnectPtr conn)
{
parallelsConnPtr privconn = conn->privateData;
- virStorageDriverStatePtr storageState = conn->privateData->storageState;
- conn->privateData->storageState = NULL;
+ virStorageDriverStatePtr storageState = privconn->storageState;
+ privconn->storageState = NULL;
parallelsStorageLock(storageState);
virStoragePoolObjListFree(&privconn->pools);
@@ -189,7 +189,7 @@ parallelsPoolCreateByPath(virConnectPtr conn, const char *path)
if (!(pool = virStoragePoolObjAssignDef(pools, def)))
goto error;
- if (virStoragePoolObjSaveDef(conn->privateData->storageState, pool, def) < 0) {
+ if (virStoragePoolObjSaveDef(privconn->storageState, pool, def) < 0) {
virStoragePoolObjRemove(pools, pool);
goto error;
}
@@ -404,7 +404,7 @@ parallelsPoolsAdd(virDomainObjPtr dom,
static int parallelsLoadPools(virConnectPtr conn)
{
parallelsConnPtr privconn = conn->privateData;
- virStorageDriverStatePtr storageState = conn->privateData->storageState;
+ virStorageDriverStatePtr storageState = privconn->storageState;
char *base = NULL;
size_t i;
@@ -461,6 +461,7 @@ parallelsStorageOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
+ parallelsConnPtr privconn = conn->privateData;
virStorageDriverStatePtr storageState;
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
@@ -475,7 +476,7 @@ parallelsStorageOpen(virConnectPtr conn,
return VIR_DRV_OPEN_ERROR;
}
- conn->privateData->storageState = storageState;
+ privconn->storageState = storageState;
parallelsStorageLock(storageState);
if (parallelsLoadPools(conn))
@@ -728,7 +729,7 @@ parallelsStoragePoolDefineXML(virConnectPtr conn,
if (!(pool = virStoragePoolObjAssignDef(&privconn->pools, def)))
goto cleanup;
- if (virStoragePoolObjSaveDef(conn->privateData->storageState, pool, def) < 0) {
+ if (virStoragePoolObjSaveDef(privconn->storageState, pool, def) < 0) {
virStoragePoolObjRemove(&privconn->pools, pool);
def = NULL;
goto cleanup;
--
1.9.3
10 years
[libvirt] [PATCHv3 00/16] Network configuration for lxc containers
by Cédric Bosdonnat
Hi all,
Here is a rebased version of v2. Nothing changed except the 'since' version number
in the added doc that has been updated.
--
Cedric
Cédric Bosdonnat (16):
Forgot to cleanup ifname_guest* in domain network def parsing
Domain conf: allow more than one IP address for net devices
LXC: set IP addresses to veth devices in the container
lxc conf2xml: convert IP addresses
Allow network capabilities hostdev to configure IP addresses
lxc conf2xml: convert ip addresses for hostdev NICs
Domain network devices can now have a <gateway> element
lxc conf2xml: convert lxc.network.ipv[46].gateway
LXC: use the new net devices gateway definition
LXC: honour network devices link state
Wrong place for virDomainNetIpsFormat
virNetDevSetIPv4Address: libnl implementation
Renamed virNetDevSetIPv4Address to virNetDevSetIPAddress
virNetDevAddRoute: implementation using netlink
virNetDevClearIPv4Address: netlink implementation
Renamed virNetDevClearIPv4Address to virNetDevClearIPAddress
docs/formatdomain.html.in | 39 +++
docs/schemas/domaincommon.rng | 55 +++-
src/conf/domain_conf.c | 214 +++++++++++++--
src/conf/domain_conf.h | 22 +-
src/libvirt_private.syms | 7 +-
src/lxc/lxc_container.c | 74 ++++-
src/lxc/lxc_native.c | 173 ++++++++----
src/network/bridge_driver.c | 4 +-
src/openvz/openvz_conf.c | 2 +-
src/openvz/openvz_driver.c | 6 +-
src/qemu/qemu_driver.c | 25 +-
src/qemu/qemu_hotplug.c | 6 +-
src/uml/uml_conf.c | 2 +-
src/util/virnetdev.c | 305 ++++++++++++++++++---
src/util/virnetdev.h | 12 +-
src/util/virnetlink.c | 38 +++
src/util/virnetlink.h | 2 +
src/vbox/vbox_common.c | 3 +-
src/xenconfig/xen_common.c | 15 +-
src/xenconfig/xen_sxpr.c | 12 +-
.../lxcconf2xmldata/lxcconf2xml-physnetwork.config | 4 +
tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml | 3 +
tests/lxcconf2xmldata/lxcconf2xml-simple.config | 4 +
tests/lxcconf2xmldata/lxcconf2xml-simple.xml | 3 +
tests/lxcxml2xmldata/lxc-hostdev.xml | 3 +
tests/lxcxml2xmldata/lxc-idmap.xml | 3 +
26 files changed, 880 insertions(+), 156 deletions(-)
--
1.8.4.5
10 years
[libvirt] [PATCH] qemu: add tun devices to cgroup ACL
by rongqing.li@windriver.com
From: Roy Li <rongqing.li(a)windriver.com>
When systemd is used as init, CGroup will be enabled by default, and
lead to virsh unable to start VM(which is using the tun/tap), since
virsh can not access /dev/net/tun device
Signed-off-by: Roy Li <rongqing.li(a)windriver.com>
---
src/qemu/qemu.conf | 3 ++-
src/qemu/qemu_cgroup.c | 2 +-
src/qemu/test_libvirtd_qemu.aug.in | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index c6db568..225cd0f 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -272,7 +272,8 @@
# "/dev/null", "/dev/full", "/dev/zero",
# "/dev/random", "/dev/urandom",
# "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
-# "/dev/rtc","/dev/hpet", "/dev/vfio/vfio"
+# "/dev/rtc","/dev/hpet", "/dev/vfio/vfio",
+# "/dev/net/tun"
#]
#
# RDMA migration requires the following extra files to be added to the list:
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 0e94cae..7c15c07 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -45,7 +45,7 @@ static const char *const defaultDeviceACL[] = {
"/dev/random", "/dev/urandom",
"/dev/ptmx", "/dev/kvm", "/dev/kqemu",
"/dev/rtc", "/dev/hpet", "/dev/vfio/vfio",
- NULL,
+ "/dev/net/tun", NULL,
};
#define DEVICE_PTY_MAJOR 136
#define DEVICE_SND_MAJOR 116
diff --git a/src/qemu/test_libvirtd_qemu.aug.in b/src/qemu/test_libvirtd_qemu.aug.in
index 30fd27e..2ab7a8d 100644
--- a/src/qemu/test_libvirtd_qemu.aug.in
+++ b/src/qemu/test_libvirtd_qemu.aug.in
@@ -48,6 +48,7 @@ module Test_libvirtd_qemu =
{ "9" = "/dev/rtc" }
{ "10" = "/dev/hpet" }
{ "11" = "/dev/vfio/vfio" }
+ { "12" = "/dev/net/tun" }
}
{ "save_image_format" = "raw" }
{ "dump_image_format" = "raw" }
--
2.1.0
10 years
[libvirt] [libvirt-python PATCH] fix examples
by Pavel Hrdina
The dhcpleases example had an old usage of print function. The formating
of leases record was also wrong.
The event-test example had an old usage of exceptions.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
examples/dhcpleases.py | 30 ++++++++++++++++++++----------
examples/event-test.py | 4 ++--
2 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/examples/dhcpleases.py b/examples/dhcpleases.py
index c172dc2..da51f52 100755
--- a/examples/dhcpleases.py
+++ b/examples/dhcpleases.py
@@ -6,8 +6,8 @@ import sys
import time
def usage():
- print "Usage: %s [URI] NETWORK" % sys.argv[0]
- print " Print leases info for a given virtual network"
+ print("Usage: %s [URI] NETWORK" % sys.argv[0])
+ print(" Print leases info for a given virtual network")
uri = None
network = None
@@ -24,18 +24,18 @@ else:
conn = libvirt.open(uri)
if conn == None:
- print "Unable to open connection to libvirt"
+ print("Unable to open connection to libvirt")
sys.exit(1)
try:
net = conn.networkLookupByName(network)
except libvirt.libvirtError:
- print "Network %s not found" % network
+ print("Network %s not found" % network)
sys.exit(0)
leases = net.DHCPLeases();
if (leases == None):
- print "Failed to get leases for %s" % net.name()
+ print("Failed to get leases for %s" % net.name())
sys.exit(0)
def toIPAddrType(addrType):
@@ -44,10 +44,20 @@ def toIPAddrType(addrType):
elif addrType == libvirt.VIR_IP_ADDR_TYPE_IPV6:
return "ipv6"
-print " {0:20} {1:18} {2:9} {3:25} {4:15} {5}".format("Expiry Time", "MAC address", "Protocol", "IP address", "Hostname", "Client ID or DUID")
-print "-"*115
+print(" {0:20} {1:18} {2:9} {3:25} {4:15} {5}".format("Expiry Time",
+ "MAC address",
+ "Protocol",
+ "IP address",
+ "Hostname",
+ "Client ID or DUID"))
+print("-"*115)
for lease in leases:
- print " {0:20}".format(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(lease['expirytime']))),
- print "{0:18} {1:9}".format(lease['mac'], toIPAddrType(lease['type'])),
- print "{0:<25} {1:15} {2}".format("{}/{}".format(lease['ipaddr'], lease['prefix']), lease['hostname'], lease['clientid'])
+ print(" {0:20} {1:18} {2:9} {3:25} {4:15} {5}".format(
+ time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(lease['expirytime'])),
+ lease['mac'],
+ toIPAddrType(lease['type']),
+ "{}/{}".format(lease['ipaddr'], lease['prefix']),
+ lease['hostname'],
+ lease['clientid']
+ ))
diff --git a/examples/event-test.py b/examples/event-test.py
index 6cc33ce..452f659 100755
--- a/examples/event-test.py
+++ b/examples/event-test.py
@@ -220,7 +220,7 @@ class virEventLoopPure:
t.set_last_fired(now)
t.dispatch()
- except (os.error, select.error), e:
+ except (os.error, select.error) as e:
if e.args[0] != errno.EINTR:
raise
finally:
@@ -576,7 +576,7 @@ def usage():
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], "hdl", ["help", "debug", "loop"])
- except getopt.GetoptError, err:
+ except getopt.GetoptError as err:
# print help information and exit:
print(str(err)) # will print something like "option -a not recognized"
usage()
--
2.0.4
10 years
[libvirt] [PATCH 0/2] Add more duplicate scsi_host/fc_host adapter checks
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1159180
Currently libvirt only detects duplicate fc_host & scsi_host adapter sources
when the incoming source type definition is the same as the pool type. This
misses the even more oddball cases where a scsi_host/fc_host definition is
using a scsi_hostN where the type of the definition isn't the same as the
type of the pool. It's a fairly twisted and perhaps edge kind of case.
A 'fc_host' has two scsi_hostN values that need to be compared against
existing 'scsi_host' pools - first the fc_host "parent" scsi_hostN (if
it exists or was provided) and second the vHBA scsi_hostN as determined
from the wwnn/wwpn. If a 'fc_host' has a 'parent' attribute of a scsi_hostN
that's already in use by some 'scsi_host' pool or if it's vHBA (as created
via nodedev-create) was (for some unknown reason) used by someone for a
'scsi_host' pool, then we have a duplicate.
A 'scsi_host' conversely needs to check against using either the fc_host
'parent' or vHBA. If a 'scsi_host' is using a scsi_hostN of some existing
fc_host 'parent' attribute or vHBA, then we have a duplicate.
To make matters more complex, the 'fc_host' 'parent' attribute doesn't have
to be provided in the fc_host XML. If not provided, then it can be determined
if the vHBA already exists (either via nodedev-create or a running fc_host
pool). This means moving the code that was created for fc_host startup to
find the vHBA parent into the storage_backend_scsi code in order for it to
be used there instead. I did try moving into virutil with no success since
that code wasn't very happy to be calling the virNodeDevice* API's.
The only oddball case that cannot be tested for in this scenario is if
the incoming fc_host definition isn't using a nodedev-create'd vHBA and
it doesn't provide a 'parent' attribute, then it is possible that the
vportCreate startup code will find "an available" scsi_hostN that was
(again for some strange reason) already being used by some 'scsi_host' pool.
Added some more verbiage to the documentation to dissuade usage of a
'scsi_host' for an FC capable scsi_hostN as well as to encourage usage
of the 'parent' attribute in a mixed environment
John Ferlan (2):
storage: Move and rename getVhbaSCSIHostParent
storage: Add mixed fc_host/scsi_host duplicate adapter source checks
docs/formatstorage.html.in | 26 +++++-
src/conf/storage_conf.c | 178 ++++++++++++++++++++++++++++++++++++-
src/conf/storage_conf.h | 8 +-
src/libvirt_private.syms | 1 +
src/parallels/parallels_storage.c | 2 +-
src/storage/storage_backend_scsi.c | 66 +-------------
src/storage/storage_driver.c | 4 +-
7 files changed, 215 insertions(+), 70 deletions(-)
--
1.9.3
10 years
[libvirt] [PATCH v3 0/6] improve setting video memory
by Pavel Hrdina
As it was pointed out that QEMU needs that the video memory size should be
rounded to power of two this patch series introduces new macro to round number
to power of two. There are two special cases (more description in the commit
message).
This patch series also fixes few issues that I've found with using vram
attribute and possible some bugs (for example if you set vram for QXL to 0, we
pass the 0 to QEMU which is wrong and we shouldn't pass anything).
There were also wrong usage of primary 'qxl-vga' video device and secondary
'qxl' video device. We've been setting wrong primary/secondary parameters.
The main propose is to start using the vram attribute for other QEMU video
devices next to QXL and also introduce vgamem attribute to set the VGA
framebuffer for QXL video device.
v2: https://www.redhat.com/archives/libvir-list/2014-November/msg00525.html
v1: https://www.redhat.com/archives/libvir-list/2014-November/msg00024.html
Pavel Hrdina (6):
internal: add macro to round value to the next closest power of 2
video: cleanup usage of vram attribute and update documentation
QXL: fix setting ram and vram values for QEMU QXL device
caps: introduce new QEMU capability for vgamem_mb device property
qemu-command: use vram attribute for all video devices
qemu-command: introduce new vgamem attribute for QXL video device
bootstrap.conf | 1 +
docs/formatdomain.html.in | 68 ++++---
docs/schemas/domaincommon.rng | 5 +
src/conf/domain_conf.c | 41 +++-
src/conf/domain_conf.h | 4 +-
src/internal.h | 7 +
src/qemu/qemu_capabilities.c | 33 ++++
src/qemu/qemu_capabilities.h | 4 +
src/qemu/qemu_command.c | 74 ++++++-
src/qemu/qemu_domain.c | 18 ++
src/xen/xen_driver.c | 2 +-
tests/qemucapabilitiesdata/caps_1.2.2-1.caps | 4 +
tests/qemucapabilitiesdata/caps_1.2.2-1.replies | 206 ++++++++++++++++++-
tests/qemucapabilitiesdata/caps_1.3.1-1.caps | 4 +
tests/qemucapabilitiesdata/caps_1.3.1-1.replies | 218 ++++++++++++++++++++-
tests/qemucapabilitiesdata/caps_1.4.2-1.caps | 4 +
tests/qemucapabilitiesdata/caps_1.4.2-1.replies | 218 ++++++++++++++++++++-
tests/qemucapabilitiesdata/caps_1.5.3-1.caps | 4 +
tests/qemucapabilitiesdata/caps_1.5.3-1.replies | 218 ++++++++++++++++++++-
tests/qemucapabilitiesdata/caps_1.6.0-1.caps | 4 +
tests/qemucapabilitiesdata/caps_1.6.0-1.replies | 218 ++++++++++++++++++++-
tests/qemucapabilitiesdata/caps_1.6.50-1.caps | 4 +
tests/qemucapabilitiesdata/caps_1.6.50-1.replies | 218 ++++++++++++++++++++-
tests/qemucapabilitiesdata/caps_2.1.1-1.caps | 4 +
tests/qemucapabilitiesdata/caps_2.1.1-1.replies | 218 ++++++++++++++++++++-
...qemuhotplug-console-compat-2+console-virtio.xml | 2 +-
.../qemuxml2argv-console-compat-2.xml | 2 +-
.../qemuxml2argv-controller-order.xml | 2 +-
.../qemuxml2argv-graphics-listen-network.xml | 2 +-
.../qemuxml2argv-graphics-listen-network2.xml | 2 +-
.../qemuxml2argv-graphics-sdl-fullscreen.xml | 2 +-
.../qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml | 2 +-
.../qemuxml2argv-graphics-spice-agentmouse.xml | 2 +-
.../qemuxml2argv-graphics-spice-compression.args | 2 +-
.../qemuxml2argv-graphics-spice-compression.xml | 4 +-
.../qemuxml2argv-graphics-spice-qxl-vga.xml | 4 +-
.../qemuxml2argv-graphics-spice-sasl.args | 4 +-
.../qemuxml2argv-graphics-spice-sasl.xml | 2 +-
.../qemuxml2argv-graphics-spice-timeout.xml | 2 +-
.../qemuxml2argv-graphics-spice.args | 4 +-
.../qemuxml2argv-graphics-spice.xml | 4 +-
.../qemuxml2argv-graphics-vnc-policy.xml | 2 +-
.../qemuxml2argv-graphics-vnc-sasl.xml | 2 +-
.../qemuxml2argv-graphics-vnc-socket.xml | 2 +-
.../qemuxml2argv-graphics-vnc-tls.xml | 2 +-
.../qemuxml2argv-graphics-vnc-websocket.xml | 2 +-
.../qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml | 2 +-
.../qemuxml2argv-net-bandwidth.xml | 2 +-
.../qemuxml2argv-pci-autoadd-addr.xml | 2 +-
.../qemuxml2argv-pci-autoadd-idx.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-pci-bridge.xml | 2 +-
.../qemuxml2argv-pcihole64-q35.args | 2 +-
.../qemuxml2argv-pcihole64-q35.xml | 2 +-
.../qemuxml2argvdata/qemuxml2argv-pseries-disk.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-q35.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-q35.xml | 2 +-
.../qemuxml2argv-serial-spiceport.args | 2 +-
.../qemuxml2argv-serial-spiceport.xml | 2 +-
.../qemuxml2argv-video-qxl-device-vgamem.args | 6 +
.../qemuxml2argv-video-qxl-device-vgamem.xml | 29 +++
.../qemuxml2argv-video-qxl-device.args | 6 +
.../qemuxml2argv-video-qxl-device.xml | 29 +++
.../qemuxml2argv-video-qxl-nodevice.args | 5 +
.../qemuxml2argv-video-qxl-nodevice.xml | 29 +++
.../qemuxml2argv-video-qxl-sec-device-vgamem.args | 8 +
.../qemuxml2argv-video-qxl-sec-device-vgamem.xml | 32 +++
.../qemuxml2argv-video-qxl-sec-device.args | 7 +
.../qemuxml2argv-video-qxl-sec-device.xml | 32 +++
.../qemuxml2argv-video-qxl-sec-nodevice.xml | 32 +++
.../qemuxml2argv-video-vga-device-vgamem.args | 6 +
.../qemuxml2argv-video-vga-device-vgamem.xml | 29 +++
.../qemuxml2argv-video-vga-device.args | 6 +
.../qemuxml2argv-video-vga-device.xml | 29 +++
.../qemuxml2argv-video-vga-nodevice.args | 5 +
.../qemuxml2argv-video-vga-nodevice.xml | 29 +++
tests/qemuxml2argvtest.c | 18 ++
.../qemuxml2xmlout-graphics-listen-network2.xml | 2 +-
.../qemuxml2xmlout-graphics-spice-timeout.xml | 2 +-
.../qemuxml2xmlout-pci-autoadd-addr.xml | 2 +-
.../qemuxml2xmlout-pci-autoadd-idx.xml | 2 +-
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml | 2 +-
tests/utiltest.c | 39 ++++
tests/virt-aa-helper-test | 2 +-
83 files changed, 2129 insertions(+), 134 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-qxl-device-vgamem.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-qxl-device-vgamem.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-qxl-device.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-qxl-device.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-qxl-nodevice.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-qxl-nodevice.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-qxl-sec-device-vgamem.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-qxl-sec-device-vgamem.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-qxl-sec-device.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-qxl-sec-device.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-qxl-sec-nodevice.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-vga-device-vgamem.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-vga-device-vgamem.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-vga-device.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-vga-device.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-vga-nodevice.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-vga-nodevice.xml
--
2.0.4
10 years
[libvirt] [PATCH v2 0/5] Allow time sync on domain resume
by Michal Privoznik
Diff to v1:
-Fixed issues raised by Peter
Michal Privoznik (5):
Introduce virDomainResumeFlags API
Implement virDomainResumeFlags in all drivers
qemu: Split qemuDomainSetTime into two functions
qemuDomainResumeFlags: Introduce VIR_DOMAIN_RESUME_SYNC_TIME
virsh: Implement virDomainResumeFlags
include/libvirt/libvirt-domain.h | 9 +++
src/driver-hypervisor.h | 5 ++
src/esx/esx_driver.c | 14 ++++-
src/hyperv/hyperv_driver.c | 14 ++++-
src/libvirt-domain.c | 50 ++++++++++++++++
src/libvirt_public.syms | 5 ++
src/libxl/libxl_driver.c | 14 ++++-
src/lxc/lxc_driver.c | 15 ++++-
src/openvz/openvz_driver.c | 13 ++++-
src/parallels/parallels_driver.c | 11 +++-
src/phyp/phyp_driver.c | 12 +++-
src/qemu/qemu_driver.c | 119 ++++++++++++++++++++++++++++-----------
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 13 ++++-
src/remote_protocol-structs | 5 ++
src/test/test_driver.c | 13 ++++-
src/vbox/vbox_common.c | 11 +++-
src/vmware/vmware_driver.c | 12 +++-
src/xen/xen_driver.c | 14 ++++-
src/xenapi/xenapi_driver.c | 21 ++++++-
tools/virsh-domain.c | 13 ++++-
tools/virsh.pod | 11 ++--
22 files changed, 339 insertions(+), 56 deletions(-)
--
2.0.4
10 years
[libvirt] [PATCH] qemu: Drop OVMF whitelist
by Michal Privoznik
As discussed on the upstream list, it's better not to make this
kind of predictions in libvirt. It may happen that qemu learns
how to enable OVMF on other architectures too and we shouldn't
try to chase that.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 9 +++------
src/qemu/qemu_command.c | 10 ----------
2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 4bd8a4d..56bd2d5 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3628,7 +3628,6 @@ virQEMUCapsGetDefaultMachine(virQEMUCapsPtr qemuCaps)
static int
virQEMUCapsFillDomainLoaderCaps(virQEMUCapsPtr qemuCaps,
virDomainCapsLoaderPtr capsLoader,
- virArch arch,
char **loader,
size_t nloader)
{
@@ -3656,8 +3655,7 @@ virQEMUCapsFillDomainLoaderCaps(virQEMUCapsPtr qemuCaps,
VIR_DOMAIN_CAPS_ENUM_SET(capsLoader->type,
VIR_DOMAIN_LOADER_TYPE_ROM);
- if (arch == VIR_ARCH_X86_64 &&
- virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE) &&
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE) &&
virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_FORMAT))
VIR_DOMAIN_CAPS_ENUM_SET(capsLoader->type,
VIR_DOMAIN_LOADER_TYPE_PFLASH);
@@ -3674,14 +3672,13 @@ virQEMUCapsFillDomainLoaderCaps(virQEMUCapsPtr qemuCaps,
static int
virQEMUCapsFillDomainOSCaps(virQEMUCapsPtr qemuCaps,
virDomainCapsOSPtr os,
- virArch arch,
char **loader,
size_t nloader)
{
virDomainCapsLoaderPtr capsLoader = &os->loader;
os->device.supported = true;
- if (virQEMUCapsFillDomainLoaderCaps(qemuCaps, capsLoader, arch,
+ if (virQEMUCapsFillDomainLoaderCaps(qemuCaps, capsLoader,
loader, nloader) < 0)
return -1;
return 0;
@@ -3777,7 +3774,7 @@ virQEMUCapsFillDomainCaps(virDomainCapsPtr domCaps,
domCaps->maxvcpus = maxvcpus;
- if (virQEMUCapsFillDomainOSCaps(qemuCaps, os, domCaps->arch,
+ if (virQEMUCapsFillDomainOSCaps(qemuCaps, os,
loader, nloader) < 0 ||
virQEMUCapsFillDomainDeviceDiskCaps(qemuCaps, disk) < 0 ||
virQEMUCapsFillDomainDeviceHostdevCaps(qemuCaps, hostdev) < 0)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 3d62d11..8ed7934 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7748,16 +7748,6 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd,
break;
case VIR_DOMAIN_LOADER_TYPE_PFLASH:
- /* UEFI is supported only for x86_64 currently */
- if (def->os.arch != VIR_ARCH_X86_64 &&
- def->os.arch != VIR_ARCH_ARMV7L &&
- def->os.arch != VIR_ARCH_AARCH64) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("pflash is not supported for %s guest architecture"),
- virArchToString(def->os.arch));
- goto cleanup;
- }
-
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("this QEMU binary doesn't support -drive"));
--
2.0.4
10 years
[libvirt] [PATCH 0/2] Add device-related code for TPM and panic devices
by Martin Kletzander
TPM and panic devices were added without the foundation code for
things like hot/cold-(un)plugging, ABI stability checking, etc. This
series adds that device-related code in order to properly handle those
devices, even though in some cases it just means outputting a better
error message.
Martin Kletzander (2):
conf: Add device-related code for TPM devices
conf: Add device-related code for panic devices
src/conf/domain_conf.c | 126 ++++++++++++++++++++++++++++++++++++++++--------
src/conf/domain_conf.h | 7 +++
src/qemu/qemu_driver.c | 12 +++++
src/qemu/qemu_hotplug.c | 2 +
4 files changed, 128 insertions(+), 19 deletions(-)
--
2.1.3
10 years