Re: [libvirt] [Qemu-devel] [PATCH v5 12/12] suspend: add qmp events
by Gerd Hoffmann
On 02/17/12 18:33, Luiz Capitulino wrote:
> On Wed, 15 Feb 2012 11:28:21 +0100
> Gerd Hoffmann <kraxel(a)redhat.com> wrote:
>
>> Send qmp events on suspend and wakeup so libvirt
>> has a chance to track the vm state.
[ added libvirt to Cc:, leaving full context.
this is about qmp events when the guest enters/leaves s3 ].
>> Signed-off-by: Gerd Hoffmann <kraxel(a)redhat.com>
>> ---
>> monitor.c | 6 ++++++
>> monitor.h | 2 ++
>> vl.c | 15 +++++++++++++++
>> 3 files changed, 23 insertions(+), 0 deletions(-)
>>
>> diff --git a/monitor.c b/monitor.c
>> index aadbdcb..e6f5fad 100644
>> --- a/monitor.c
>> +++ b/monitor.c
>> @@ -485,6 +485,12 @@ void monitor_protocol_event(MonitorEvent event, QObject *data)
>> case QEVENT_BLOCK_JOB_CANCELLED:
>> event_name = "BLOCK_JOB_CANCELLED";
>> break;
>> + case QEVENT_SUSPEND:
>> + event_name = "SUSPEND";
>> + break;
>> + case QEVENT_WAKEUP:
>> + event_name = "WAKEUP";
>> + break;
>> default:
>> abort();
>> break;
>> diff --git a/monitor.h b/monitor.h
>> index b72ea07..9df3bab 100644
>> --- a/monitor.h
>> +++ b/monitor.h
>> @@ -38,6 +38,8 @@ typedef enum MonitorEvent {
>> QEVENT_SPICE_DISCONNECTED,
>> QEVENT_BLOCK_JOB_COMPLETED,
>> QEVENT_BLOCK_JOB_CANCELLED,
>> + QEVENT_SUSPEND,
>> + QEVENT_WAKEUP,
>> QEVENT_MAX,
>> } MonitorEvent;
>>
>> diff --git a/vl.c b/vl.c
>> index bfdcb7c..570ea05 100644
>> --- a/vl.c
>> +++ b/vl.c
>> @@ -1416,6 +1416,7 @@ static void qemu_system_suspend(void)
>> {
>> pause_all_vcpus();
>> notifier_list_notify(&suspend_notifiers, NULL);
>> + monitor_protocol_event(QEVENT_SUSPEND, NULL);
>> is_suspended = true;
>> }
>>
>> @@ -1436,12 +1437,26 @@ void qemu_register_suspend_notifier(Notifier *notifier)
>>
>> void qemu_system_wakeup_request(WakeupReason reason)
>> {
>> + static const char *names[] = {
>> + [QEMU_WAKEUP_REASON_OTHER] = "other",
>> + [QEMU_WAKEUP_REASON_RTC] = "rtc",
>> + [QEMU_WAKEUP_REASON_PMTIMER] = "pmtimer",
>
> Is the reason really important for mngt? Can we just leave it out?
I assumed the wakeup reason could be useful, but dunno.
Zapping the code is no problem of course.
Lets ask mgmt aka libvirt folks ;)
cheers,
Gerd
>> + };
>> + const char *name;
>> + QObject *data;
>> +
>> if (!is_suspended) {
>> return;
>> }
>> if (!(wakeup_reason_mask & (1 << reason))) {
>> return;
>> }
>> +
>> + name = (reason < ARRAY_SIZE(names)) ? names[reason] : "unknown";
>> + data = qobject_from_jsonf("{ 'reason': %s }", name);
>> + monitor_protocol_event(QEVENT_WAKEUP, data);
>> + qobject_decref(data);
>> +
>> notifier_list_notify(&wakeup_notifiers, &reason);
>> reset_requested = 1;
>> qemu_notify_event();
>
12 years, 10 months
[libvirt] [PATCH] virsh: Enhance list command to ease creation of shell scripts
by Peter Krempa
This patch adds new options to the "virsh list" command enabling
filtering of persistent and transient domains along with the option to
print only UUIDs or names of domains instead of printing the table.
Option --name prints domain names (one per line) instead of the default
table. Similarly --uuid prints domain's UUID. The option --table is
an alias for the default behavior.
Aditionaly --persistent and/or --transient may be specified to filter
the output of domains.
---
tools/virsh.c | 176 ++++++++++++++++++++++++++++++++++++++++--------------
tools/virsh.pod | 20 ++++++-
2 files changed, 148 insertions(+), 48 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index 66ba61c..10160de 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -888,6 +888,11 @@ static const vshCmdInfo info_list[] = {
static const vshCmdOptDef opts_list[] = {
{"inactive", VSH_OT_BOOL, 0, N_("list inactive domains")},
{"all", VSH_OT_BOOL, 0, N_("list inactive & active domains")},
+ {"transient", VSH_OT_BOOL, 0, N_("list transient domains")},
+ {"persistent", VSH_OT_BOOL, 0, N_("list persistent domains")},
+ {"uuid", VSH_OT_BOOL, 0, N_("list uuid's only")},
+ {"name", VSH_OT_BOOL, 0, N_("list domain names only")},
+ {"table", VSH_OT_BOOL, 0, N_("list table (default)")},
{"managed-save", VSH_OT_BOOL, 0,
N_("mark domains with managed save state")},
{"title", VSH_OT_BOOL, 0, N_("show short domain description")},
@@ -905,13 +910,41 @@ cmdList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
char **names = NULL;
int maxname = 0;
bool managed = vshCommandOptBool(cmd, "managed-save");
- bool desc = vshCommandOptBool(cmd, "title");
+ bool optTitle = vshCommandOptBool(cmd, "title");
+ bool optTable = vshCommandOptBool(cmd, "table");
+ bool optUUID = vshCommandOptBool(cmd, "uuid");
+ bool optName = vshCommandOptBool(cmd, "name");
+ bool optPersistent = vshCommandOptBool(cmd, "persistent");
+ bool optTransient = vshCommandOptBool(cmd, "transient");
+ bool persistUsed = true;
+ virDomainPtr dom = NULL;
char *title;
+ char uuid[VIR_UUID_STRING_BUFLEN];
int state;
+ int persistent;
bool ret = false;
inactive |= all;
+ /* process arguments */
+ if (!optPersistent && !optTransient) {
+ optPersistent = true;
+ optTransient = true;
+ persistUsed = false;
+ }
+
+ if ((optTable && optName) ||
+ (optTable && optUUID) ||
+ (optName && optUUID)) {
+ vshError(ctl, "%s",
+ _("Only one argument from --table, --name and --uuid"
+ "may be specified."));
+ return false;
+ }
+
+ if (!optUUID && !optName)
+ optTable = true;
+
if (!vshConnectionUsability(ctl, ctl->conn))
return false;
@@ -924,14 +957,15 @@ cmdList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
if (maxid) {
ids = vshMalloc(ctl, sizeof(int) * maxid);
- if ((maxid = virConnectListDomains(ctl->conn, &ids[0], maxid)) < 0) {
+ if ((maxid = virConnectListDomains(ctl->conn, ids, maxid)) < 0) {
vshError(ctl, "%s", _("Failed to list active domains"));
goto cleanup;
}
- qsort(&ids[0], maxid, sizeof(int), idsorter);
+ qsort(ids, maxid, sizeof(int), idsorter);
}
}
+
if (inactive) {
maxname = virConnectNumOfDefinedDomains(ctl->conn);
if (maxname < 0) {
@@ -941,7 +975,9 @@ cmdList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
if (maxname) {
names = vshMalloc(ctl, sizeof(char *) * maxname);
- if ((maxname = virConnectListDefinedDomains(ctl->conn, names, maxname)) < 0) {
+ if ((maxname = virConnectListDefinedDomains(ctl->conn,
+ names,
+ maxname)) < 0) {
vshError(ctl, "%s", _("Failed to list inactive domains"));
goto cleanup;
}
@@ -950,77 +986,125 @@ cmdList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
}
}
- if (desc) {
- vshPrintExtra(ctl, "%-5s %-30s %-10s %s\n", _("Id"), _("Name"), _("State"), _("Title"));
- vshPrintExtra(ctl, "-----------------------------------------------------------\n");
- } else {
- vshPrintExtra(ctl, " %-5s %-30s %s\n", _("Id"), _("Name"), _("State"));
- vshPrintExtra(ctl, "----------------------------------------------------\n");
+ /* print table header in legacy mode */
+ if (optTable) {
+ vshPrintExtra(ctl, " %-5s %-30s %-10s",
+ _("Id"), _("Name"), _("State"));
+ if (optTitle)
+ vshPrintExtra(ctl, "%-20s", _("Title"));
+
+ vshPrintExtra(ctl, "\n"
+ "-----------------------------------------------------------\n");
}
for (i = 0; i < maxid; i++) {
- virDomainPtr dom = virDomainLookupByID(ctl->conn, ids[i]);
+ dom = virDomainLookupByID(ctl->conn, ids[i]);
/* this kind of work with domains is not atomic operation */
if (!dom)
continue;
- if (desc) {
- if (!(title = vshGetDomainDescription(ctl, dom, true, 0)))
+ if (persistUsed) {
+ persistent = virDomainIsPersistent(dom);
+ if (persistent < 0) {
+ vshError(ctl, "%s",
+ _("Failed to determine domain's persistent state"));
goto cleanup;
+ }
- vshPrint(ctl, "%-5d %-30s %-10s %s\n",
- virDomainGetID(dom),
- virDomainGetName(dom),
- _(vshDomainStateToString(vshDomainState(ctl, dom, NULL))),
- title);
- VIR_FREE(title);
- } else {
- vshPrint(ctl, " %-5d %-30s %s\n",
- virDomainGetID(dom),
- virDomainGetName(dom),
- _(vshDomainStateToString(vshDomainState(ctl, dom, NULL))));
+ if ((persistent && !optPersistent) ||
+ (!persistent && !optTransient)) {
+ virDomainFree(dom);
+ dom = NULL;
+ continue;
+ }
}
+
+ if (optTable) {
+ vshPrint(ctl, " %-5d %-30s %-10s",
+ virDomainGetID(dom),
+ virDomainGetName(dom),
+ _(vshDomainStateToString(vshDomainState(ctl, dom, NULL))));
+
+ if (optTitle) {
+ if (!(title = vshGetDomainDescription(ctl, dom, true, 0)))
+ goto cleanup;
+
+ vshPrint(ctl, "%-20s", title);
+ VIR_FREE(title);
+ }
+
+ vshPrint(ctl, "\n");
+ } else if (optUUID) {
+ if (virDomainGetUUIDString(dom, uuid) < 0) {
+ vshError(ctl, "%s",
+ _("Failed to get domain's UUID"));
+ goto cleanup;
+ }
+ vshPrint(ctl, "%s\n", uuid);
+ } else if (optName) {
+ vshPrint(ctl, "%s\n", virDomainGetName(dom));
+ }
+
virDomainFree(dom);
+ dom = NULL;
}
+
for (i = 0; i < maxname; i++) {
- virDomainPtr dom = virDomainLookupByName(ctl->conn, names[i]);
+ dom = virDomainLookupByName(ctl->conn, names[i]);
/* this kind of work with domains is not atomic operation */
- if (!dom) {
- VIR_FREE(names[i]);
+ if (!dom)
continue;
- }
- state = vshDomainState(ctl, dom, NULL);
- if (managed && state == VIR_DOMAIN_SHUTOFF &&
- virDomainHasManagedSaveImage(dom, 0) > 0)
- state = -2;
+ if (!optPersistent) {
+ virDomainFree(dom);
+ dom = NULL;
+ continue;
+ }
- if (desc) {
- if (!(title = vshGetDomainDescription(ctl, dom, true, 0)))
- goto cleanup;
+ if (optTable) {
+ state = vshDomainState(ctl, dom, NULL);
+ if (managed && state == VIR_DOMAIN_SHUTOFF &&
+ virDomainHasManagedSaveImage(dom, 0) > 0)
+ state = -2;
- vshPrint(ctl, "%-5s %-30s %-10s %s\n",
- "-",
- names[i],
- state == -2 ? _("saved") : _(vshDomainStateToString(state)),
- title);
- VIR_FREE(title);
- } else {
- vshPrint(ctl, " %-5s %-30s %s\n",
+ vshPrint(ctl, " %-5s %-30s %-10s",
"-",
names[i],
state == -2 ? _("saved") : _(vshDomainStateToString(state)));
- }
- virDomainFree(dom);
- VIR_FREE(names[i]);
+ if (optTitle) {
+ if (!(title = vshGetDomainDescription(ctl, dom, true, 0)))
+ goto cleanup;
+
+ vshPrint(ctl, "%-20s", title);
+ VIR_FREE(title);
+ }
+
+ vshPrint(ctl, "\n");
+ } else if (optUUID) {
+ if (virDomainGetUUIDString(dom, uuid) < 0) {
+ vshError(ctl, "%s",
+ _("Failed to get domain's UUID"));
+ goto cleanup;
+ }
+ vshPrint(ctl, "%s\n", uuid);
+ } else if (optName) {
+ vshPrint(ctl, "%s\n", names[i]);
+ }
+
+ virDomainFree(dom);
+ dom = NULL;
}
ret = true;
cleanup:
+ if (dom)
+ virDomainFree(dom);
VIR_FREE(ids);
+ for (i = 0; i < maxname; i++)
+ VIR_FREE(names[i]);
VIR_FREE(names);
return ret;
}
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 0d5a41d..aa29c00 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -280,6 +280,8 @@ The XML also show the NUMA topology information if available.
Inject NMI to the guest.
=item B<list> [I<--inactive> | I<--all>] [I<--managed-save>] [I<--title>]
+ [I<--name> | <I--table> | <I--uuid>] [I<--persistent>]
+ [I<--transient>]
Prints information about existing domains. If no options are
specified it prints out information about running domains.
@@ -348,10 +350,24 @@ crashed.
If I<--managed-save> is specified, then domains that have managed save
state (only possible if they are in the B<shut off> state) will
-instead show as B<saved> in the listing.
+instead show as B<saved> in the listing. This flag is usable only with the
+default I<--table> output.
+
+If I<--name> is specified, domain names are printed instead of the table
+formated one per line. If I<--uuid> is specified domain's UUID's are printed
+instead of names. Flag I<--table> specifies that the legacy table-formated
+output should be used. This is the default. All of these are mutually
+exclusive.
+
+Flag I<--persistent> specifies that persistent domains should be printed.
+Similarly I<--transiet> enables output of transient domains. These flags
+may be combined. Default behavior is as though both were specifiedi (Although
+if any of these flags is specified, the check for the persistence state is done
+and may fail. If none of these flags is specified, the check is skipped).
If I<--title> is specified, then the domain note is printed. The output then
-the output looks as follows.
+the output looks as follows. This flag is usable only with the default
+I<--table> output.
B<virsh> list --title
Id Name State Title
--
1.7.3.4
12 years, 10 months
[libvirt] [PATCH] configure: Define program name if not found
by Michal Privoznik
AC_CHECK_PROG checks for program in given path. However, if it doesn't
exists, [variable] is set to [value-if-not-found]. We don't want this
to be the empty string in case of 'modprobe' and 'scrub' as we want to
fallback to runtime detection.
---
configure.ac | 4 ++--
src/util/pci.c | 5 -----
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4493b94..732f4fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -211,11 +211,11 @@ AC_PATH_PROG([UDEVADM], [udevadm], [],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
AC_PATH_PROG([UDEVSETTLE], [udevsettle], [],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
-AC_PATH_PROG([MODPROBE], [modprobe], [],
+AC_PATH_PROG([MODPROBE], [modprobe], [modprobe],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
AC_PATH_PROG([OVSVSCTL], [ovs-vsctl], [ovs-vsctl],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
-AC_PATH_PROG([SCRUB], [scrub], [],
+AC_PATH_PROG([SCRUB], [scrub], [scrub],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
AC_DEFINE_UNQUOTED([DNSMASQ],["$DNSMASQ"],
diff --git a/src/util/pci.c b/src/util/pci.c
index 633dcd8..c660e8d 100644
--- a/src/util/pci.c
+++ b/src/util/pci.c
@@ -40,11 +40,6 @@
#include "virterror_internal.h"
#include "virfile.h"
-/* avoid compilation breakage on some systems */
-#ifndef MODPROBE
-# define MODPROBE "modprobe"
-#endif
-
#define PCI_SYSFS "/sys/bus/pci/"
#define PCI_ID_LEN 10 /* "XXXX XXXX" */
#define PCI_ADDR_LEN 13 /* "XXXX:XX:XX.X" */
--
1.7.3.4
12 years, 10 months
[libvirt] [PATCH] util: Fix virFileAccessibleAs return path from parent
by Michal Privoznik
Despite documentation, if we do fork() parent always returns -1
even if file is accessible. Which is wrong obviously.
---
src/util/util.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/util/util.c b/src/util/util.c
index 3406b7b..04a0e79 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -724,8 +724,12 @@ virFileAccessibleAs(const char *path, int mode,
return -1;
}
- errno = status;
- return -1;
+ if (!status) {
+ errno = status;
+ return -1;
+ }
+
+ return 0;
}
/* child.
--
1.7.3.4
12 years, 10 months
[libvirt] [PATCH 0/2] VMware Workstation domainXMLFromNative support
by Jean-Baptiste Rouault
These patches add domainXMLFromNative to the vmware driver
and add support for more network configurations in vmx files
Jean-Baptiste Rouault (2):
vmware: implement domainXMLFromNative
vmx: Better Workstation vmx handling
src/vmware/vmware_driver.c | 31 +++++++++++++++++++++++++++++++
src/vmx/vmx.c | 29 ++++++++++++++++++-----------
2 files changed, 49 insertions(+), 11 deletions(-)
--
1.7.9
12 years, 10 months
[libvirt] Fwd: a question about sanlock
by Alex Jia
Hi Daniel,
Thanks for your quick reply, from safety point of view, yes,
libvirt should exit, but, your alternative solution is more
friendly for users, however, I haven't any idea about this now,
maybe, others want to do this, so forward it to libvirt-list.
Thanks & Regards,
Alex
----- Forwarded Message -----
From: "Daniel P. Berrange" <berrange(a)redhat.com>
To: "Alex Jia" <ajia(a)redhat.com>
Cc: libvirt-users(a)redhat.com
Sent: Wednesday, February 22, 2012 4:19:28 PM
Subject: Re: [libvirt] a question about sanlock
On Wed, Feb 22, 2012 at 02:04:09AM -0500, Alex Jia wrote:
> Hi Daniel,
> I got a question about lock manager, if I enable 'sanlock' in qemu.conf and
> uncomment 'auto_disk_leases = 1' in qemu-sanlock.conf then restart libvirtd
> service, libvirtd will be dead, I know I should also uncomment 'host_id = 1'
> in qemu-sanlock.conf, because I enable 'auto_disk_leases'. The question is
> the libvirtd must die due to a error users configuration? or could we give
> some warning information instead of libvirtd die?
I think this is a safety issue - if someone is deploying libvirt in an
scenario where they want locking, then we must be very careful not to
accidentally run without locking. So if someone accidentally mis-configures
one of their libvirtd instances to not have any host_id parameter, I felt
the only safe thing todo was to exit. An alternative would be to allow
libvirtd to start, but then make sure it refuses to start any guests.
I'm happy to take patches for the latter if someone wants to...
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
12 years, 10 months
[libvirt] Effect of cluster size on read write performance
by Pankaj Rawat
Hi all
The cluster -size increase write performance when the qcow2 image is not
expanded , surely with increase in cluster_size the disk space used
increases but that is not my concern.
Can anyone tell what is the effect of cluster size on read and write
performance on qcow2 image after expantion?
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NECHCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NECHCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
-----------------------------------------------------------------------------------------------------------------------
12 years, 10 months
[libvirt] virtio-win-0.1-22 balloon install fails on 2008R2
by sean darcy
Trying to install the virtio-win-0.1-22.iso balloon driver on Windows
2008R2:
E:\Wlh\amd64>x:\microsoft\WinDDK\7600.16385.win7_wdk.100208-1538\tools\devcon\amd64\devcon.exe
install BALLOON.inf PCI\VEN_1AF4&DEV_1002&SUBSYS_00051AF4&REV_00
Device node created. Install is complete when drivers are installed...
Updating drivers for PCI\VEN_1AF4 from E:\Wlh\amd64\BALLOON.inf.
devcon.exe failed.
'DEV_1002' is not recognized as an internal or external command,
operable program or batch file.
'SUBSYS_00051AF4' is not recognized as an internal or external command,
operable program or batch file.
'REV_00' is not recognized as an internal or external command,
operable program or batch file.
Any help appreciated.
sean
12 years, 10 months
[libvirt] [PATCH] esx: Correctly disable HTTP Expect header usage of libcurl
by Matthias Bolte
Adding "Expect:" to the header list stops libcurl from sending a
Expect header at all.
Before, a dummy Expect header was added that might confuse HTTP
proxies and result in HTTP error code 417 being reported.
---
src/esx/esx_vi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index 14ad50a..6004aac 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -293,14 +293,14 @@ esxVI_CURL_Connect(esxVI_CURL *curl, esxUtil_ParsedUri *parsedUri)
"Content-Type: text/xml; charset=UTF-8");
/*
- * Add a dummy expect header to stop CURL from waiting for a response code
+ * Add an empty expect header to stop CURL from waiting for a response code
* 100 (Continue) from the server before continuing the POST operation.
* Waiting for this response would slowdown each communication with the
* server by approx. 2 sec, because the server doesn't send the expected
* 100 (Continue) response and the wait times out resulting in wasting
* approx. 2 sec per POST operation.
*/
- curl->headers = curl_slist_append(curl->headers, "Expect: nothing");
+ curl->headers = curl_slist_append(curl->headers, "Expect:");
if (curl->headers == NULL) {
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, "%s",
--
1.7.4.1
12 years, 10 months
[libvirt] [PATCH 0/6] (informational) conf support for <interface type='hostdev'>
by Laine Stump
This series of patches enhances the domain parser/formatter code to
support a sort of "intelligent hostdev", i.e. PCI passthrough where
device-type specific initialization is done prior to assigning the
device to the guest, in particular to allow setting the MAC address
and do 802.1QbX setup for network devices.
Rather than adding all of the device-type specific config to
<hostdev>, I accomplish this through adding a new type of <interface>
element, type='hostdev'. When an interface is type='hostdev' the
following is changed:
* in the toplevel device, the managed attribute can be specified
(with identical results as when it's specified in a <hostdev>
* The <source> element can specify a pci address or usb address,
just as can be done in <hostdev>. One notable difference is that
the type of the address is specified directly in the source
<address> element, rather than as an attribute of the toplevel
device (that's how it's done for <hostdev>, but for <interface>,
the toplevel element's type attribute is already used).
These patches include only the parser/formatter, test (for
domainschematest, and qemuxml2xmltest only), and doc changes; they
still need to be hooked into the domain's device lists (a type=hostdev
interface will reside in both the interface list (for configuration
and memory management) and hostdev list (for attach/detach, and
tracking of which devices are assigned)). I don't intend to push these
patches until that part is also done, but some other people are doing
work that depends on the changes to config format and data structures,
so I'm sending these patches now both to unblock them, as well as to
get feedback from everyone else on what needs to be changed.
The first 4 patches are just setup for the real new code - they
reorder and refactor existing code to allow greater re-use of existing
code and easier plugin of the new code. Patch 5/6 is just a couple of
lines, and patch 6/6 provides the new functionality.
12 years, 10 months