[libvirt] Question about virtio-pci in Aarch64
by Kevin Zhao
Hi Cole && All,
Nice meeting you in the libvirt mail-list. Greetings from Linaro !!!
I am Kevin Zhao from Linaro and working for OpenStack on Aarch64.
Nowadays I find that the default "virtio" bus is "virtio-mmio" , not
"virtio-pci". Since virtio-mmio do not has the host plugged function ,
something is wrong with the function in OpenStack Nova.
Then I search and find some mail information as belows by Cole :-)
1)
https://www.redhat.com/archives/libvir-list/2015-December/msg00217.html
2)
https://www.redhat.com/archives/libvir-list/2016-March/msg00167.html
I see some efforts have been doing by you. Really thanks for your
efforts for Aarch64. And I have some small questions.
1. Is Libvirt planning to replace the default virtio-mmio to
virtio-pci for Aarch64?
2. If not , how can I change the xml file(generated by Virsh) for
virtio-pci so that Qemu can recognize it ?
Really big thanks for your help. Looking forwards to your response!
Best Regards,
Kevin Zhao
8 years, 3 months
[libvirt] [PATCH] networkxml2conftest: Don't leak dnsmasq capabilities
by Michal Privoznik
==18324== 32 bytes in 1 blocks are still reachable in loss record 41 of 114
==18324== at 0x4C2C070: calloc (vg_replace_malloc.c:623)
==18324== by 0x4EA479B: virAlloc (viralloc.c:144)
==18324== by 0x4EA674A: virBitmapNewQuiet (virbitmap.c:77)
==18324== by 0x4EA67F7: virBitmapNew (virbitmap.c:106)
==18324== by 0x4EC777D: dnsmasqCapsNewEmpty (virdnsmasq.c:801)
==18324== by 0x4EC781B: dnsmasqCapsNewFromBuffer (virdnsmasq.c:815)
==18324== by 0x407CF4: mymain (networkxml2conftest.c:99)
==18324== by 0x409CF0: virTestMain (testutils.c:982)
==18324== by 0x4080EA: main (networkxml2conftest.c:136)
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/networkxml2conftest.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c
index 11e08c0..69b55ed 100644
--- a/tests/networkxml2conftest.c
+++ b/tests/networkxml2conftest.c
@@ -128,6 +128,10 @@ mymain(void)
DO_TEST("dhcp6-nat-network", dhcpv6);
DO_TEST("dhcp6host-routed-network", dhcpv6);
+ virObjectUnref(dhcpv6);
+ virObjectUnref(full);
+ virObjectUnref(restricted);
+
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
--
2.8.4
8 years, 3 months
[libvirt] problem with rbd auth after switch to secret objects
by Jim Fehlig
Hi John,
I've been having problems with rbd auth since the change to using qemu's secret
objects. E.g. when hotplugging disk config
<disk type="network" device="disk">
<driver name="qemu" type="raw" cache="none"/>
<source protocol="rbd" name="volumes/volume-f9c33a0a-5313-44fc-9624-c3b09ed21a57">
<host name="xxx.xxx.xxx.xxx" port="6789"/>
</source>
<auth username="cinder">
<secret type="ceph" uuid="dcff478d-8021-42c4-b57a-98b5f5447e8f"/>
</auth>
<target bus="virtio" dev="vdb"/>
</disk>
libvirt issues the following monitor commands
2016-08-08 16:13:41.720+0000: 27504: info : qemuMonitorSend:1006 :
QEMU_MONITOR_SEND_MSG: mon=0x7f55c4000f50
msg={"execute":"object-add","arguments":{"qom-type":"secret","id":"virtio-disk1-secret0","props":{"data":"w6x17STyqO9tMEOpAJy9Mnx+B5R1qrsJBXZZn/uZCKU=","keyid":"masterKey0","iv":"ZAE6WkKf+jDIl9lJkXGsnQ==","format":"base64"}},"id":"libvirt-12"}
2016-08-08 16:13:41.722+0000: 27504: debug : qemuMonitorJSONCommandWithFd:296 :
Send command
'{"execute":"human-monitor-command","arguments":{"command-line":"drive_add dummy
file=rbd:volumes/volume-f9c33a0a-5313-44fc-9624-c3b09ed21a57:id=cinder:auth_supported=cephx\\;none:mon_host=xxx.xx.xxx.xxx\\:6789,password-secret=virtio-disk1-secret0,format=raw,if=none,id=drive-virtio-disk1,cache=none"},"id":"libvirt-13"}'
The latter fails with
2016-08-08 16:13:41.733+0000: 27499: debug : virJSONValueFromString:1604 :
string={"return": "error connecting\r\n", "id": "libvirt-13"}
Debugging in the qemu rbd code, I found that
secretid = qemu_opt_get(opts, "password-secret");
in $qemu-src/block/rbd.c:qemu_rbd_create() returns NULL. The NULL secretid is
later passed to qemu_rbd_set_auth(), which silently returns success when
secretid==NULL. Later, rados_connect() fails with "error connecting" since the
secret was not configured.
I'm not familiar with qemu option parsing, but it seems the
...,password-secret=xxx,... associates the password-secret option parsing with
the drive object, whereas it needs to be associated with the rbd "file" object?
As a quick hack test, I made the following change in libvirt and then was able
to successfully attach the disk
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 55df23d..eb478fb 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1287,7 +1287,7 @@ qemuBuildDriveSourceStr(virDomainDiskDefPtr disk,
virBufferAddLit(buf, ",");
if (secinfo && secinfo->type == VIR_DOMAIN_SECRET_INFO_TYPE_AES) {
- virBufferAsprintf(buf, "password-secret=%s,",
+ virBufferAsprintf(buf, "file.password-secret=%s,",
secinfo->s.aes.alias);
}
I suspect others (including yourself) have done this successfully without that
hack, so I'm not quite sure what the problem might be in my configuration. I'm
using libvirt.git master and qemu 2.6, but I didn't notice any post-2.6 patches
that would help on the qemu side.
Thanks for any suggestions.
Regards,
Jim
8 years, 3 months
[libvirt] [PATCH] util: Make virStringArrayHasString() const-correct
by Andrea Bolognani
The first argument should be const char ** instead of
char **, because this is a search function and as such it
doesn't, and shouldn't, alter the haystack in any way.
This change means we no longer have to cast arrays of
immutable strings to arrays of mutable strings; we still
have to do the opposite, though, but that's reasonable.
---
src/lxc/lxc_native.c | 5 +++--
src/qemu/qemu_capabilities.c | 4 ++--
src/qemu/qemu_monitor_json.c | 2 +-
src/qemu/qemu_process.c | 4 +++-
src/util/virstring.c | 3 ++-
src/util/virstring.h | 2 +-
tests/qemumonitorjsontest.c | 10 +++++-----
7 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c
index 4b22e2a..94fb659 100644
--- a/src/lxc/lxc_native.c
+++ b/src/lxc/lxc_native.c
@@ -299,7 +299,7 @@ lxcAddFstabLine(virDomainDefPtr def, lxcFstabPtr fstab)
type = VIR_DOMAIN_FS_TYPE_BLOCK;
/* Do we have ro in options? */
- readonly = virStringArrayHasString(options, "ro");
+ readonly = virStringArrayHasString((const char **) options, "ro");
if (lxcAddFSDef(def, type, src, dst, readonly, usage) < 0)
goto cleanup;
@@ -981,7 +981,8 @@ lxcSetCapDrop(virDomainDefPtr def, virConfPtr properties)
for (i = 0; i < VIR_DOMAIN_CAPS_FEATURE_LAST; i++) {
capString = virDomainCapsFeatureTypeToString(i);
- if (toDrop != NULL && virStringArrayHasString(toDrop, capString))
+ if (toDrop != NULL &&
+ virStringArrayHasString((const char **) toDrop, capString))
def->caps_features[i] = VIR_TRISTATE_SWITCH_OFF;
}
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 43e3ea7..1483217 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -2580,7 +2580,7 @@ virQEMUCapsProbeQMPTPM(virQEMUCapsPtr qemuCaps,
for (i = 0; i < ARRAY_CARDINALITY(virQEMUCapsTPMModelsToCaps); i++) {
const char *needle = virDomainTPMModelTypeToString(
virQEMUCapsTPMModelsToCaps[i].type);
- if (virStringArrayHasString(entries, needle))
+ if (virStringArrayHasString((const char **) entries, needle))
virQEMUCapsSet(qemuCaps,
virQEMUCapsTPMModelsToCaps[i].caps);
}
@@ -2594,7 +2594,7 @@ virQEMUCapsProbeQMPTPM(virQEMUCapsPtr qemuCaps,
for (i = 0; i < ARRAY_CARDINALITY(virQEMUCapsTPMTypesToCaps); i++) {
const char *needle = virDomainTPMBackendTypeToString(
virQEMUCapsTPMTypesToCaps[i].type);
- if (virStringArrayHasString(entries, needle))
+ if (virStringArrayHasString((const char **) entries, needle))
virQEMUCapsSet(qemuCaps, virQEMUCapsTPMTypesToCaps[i].caps);
}
}
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index d455adf..1df1e4a 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -5728,7 +5728,7 @@ qemuMonitorJSONGetMigrationCapability(qemuMonitorPtr mon,
if (qemuMonitorJSONGetMigrationCapabilities(mon, &capsList) < 0)
return -1;
- ret = virStringArrayHasString(capsList, cap);
+ ret = virStringArrayHasString((const char **) capsList, cap);
virStringFreeList(capsList);
return ret;
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 7481626..3ade190 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3151,6 +3151,7 @@ qemuProcessUpdateDevices(virQEMUDriverPtr driver,
{
qemuDomainObjPrivatePtr priv = vm->privateData;
virDomainDeviceDef dev;
+ const char **qemuDevices;
char **old;
char **tmp;
int ret = -1;
@@ -3163,9 +3164,10 @@ qemuProcessUpdateDevices(virQEMUDriverPtr driver,
if (qemuDomainUpdateDeviceList(driver, vm, QEMU_ASYNC_JOB_NONE) < 0)
goto cleanup;
+ qemuDevices = (const char **) priv->qemuDevices;
if ((tmp = old)) {
while (*tmp) {
- if (!virStringArrayHasString(priv->qemuDevices, *tmp) &&
+ if (!virStringArrayHasString(qemuDevices, *tmp) &&
virDomainDefFindDevice(vm->def, *tmp, &dev, false) == 0 &&
qemuDomainRemoveDevice(driver, vm, &dev) < 0) {
goto cleanup;
diff --git a/src/util/virstring.c b/src/util/virstring.c
index 0177a95..4a70620 100644
--- a/src/util/virstring.c
+++ b/src/util/virstring.c
@@ -210,7 +210,8 @@ virStringFreeListCount(char **strings,
bool
-virStringArrayHasString(char **strings, const char *needle)
+virStringArrayHasString(const char **strings,
+ const char *needle)
{
size_t i = 0;
diff --git a/src/util/virstring.h b/src/util/virstring.h
index 040771e..8854d5f 100644
--- a/src/util/virstring.h
+++ b/src/util/virstring.h
@@ -44,7 +44,7 @@ char *virStringJoin(const char **strings,
void virStringFreeList(char **strings);
void virStringFreeListCount(char **strings, size_t count);
-bool virStringArrayHasString(char **strings, const char *needle);
+bool virStringArrayHasString(const char **strings, const char *needle);
char *virStringGetFirstWithPrefix(char **strings, const char *prefix)
ATTRIBUTE_NONNULL(2);
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 544b569..9988754 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -999,7 +999,7 @@ testQemuMonitorJSONGetDeviceAliases(const void *data)
qemuMonitorTestPtr test = qemuMonitorTestNewSimple(true, xmlopt);
int ret = -1;
char **aliases = NULL;
- char **alias;
+ const char **alias;
const char *expected[] = {
"virtio-disk25", "video0", "serial0", "ide0-0-0", "usb", NULL };
@@ -1033,14 +1033,14 @@ testQemuMonitorJSONGetDeviceAliases(const void *data)
}
ret = 0;
- for (alias = aliases; *alias; alias++) {
- if (!virStringArrayHasString((char **) expected, *alias)) {
+ for (alias = (const char **) aliases; *alias; alias++) {
+ if (!virStringArrayHasString(expected, *alias)) {
fprintf(stderr, "got unexpected device alias '%s'\n", *alias);
ret = -1;
}
}
- for (alias = (char **) expected; *alias; alias++) {
- if (!virStringArrayHasString(aliases, *alias)) {
+ for (alias = expected; *alias; alias++) {
+ if (!virStringArrayHasString((const char **) aliases, *alias)) {
fprintf(stderr, "missing expected alias '%s'\n", *alias);
ret = -1;
}
--
2.7.4
8 years, 3 months
[libvirt] [PATCH v2 0/7] qemu: util: vz: some fixes and improvements
by Maxim Nestratov
v1-v2 changes:
- fixed "vz: reset errors after ignoring return values"
- added "vz: relax disk bus controller and device indices check"
Maxim Nestratov (6):
vz: get additional error information from job correctly
util: fix crash in virClassIsDerivedFrom for CloseCallbacks objects
vz: don't fail query domain info in case we don't have valid stats
handle
vz: reset errors after ignoring return values
vz: specify VIR_DOMAIN_NET_TYPE_NETWORK for routed networks
vz: relax disk bus controller and device indices check
Yuri Pudgorodskiy (1):
qemu: guest agent: introduce new error code VIR_ERR_AGENT_UNSYNCED
include/libvirt/virterror.h | 2 ++
src/qemu/qemu_agent.c | 6 +++---
src/util/virclosecallbacks.c | 3 +++
src/util/virerror.c | 6 ++++++
src/vz/vz_driver.c | 13 +++++++++----
src/vz/vz_sdk.c | 42 ++++++++++++++++++++++++------------------
src/vz/vz_utils.c | 8 --------
7 files changed, 47 insertions(+), 33 deletions(-)
--
1.8.3.1
8 years, 3 months
[libvirt] [PATCH] vz: add validation callbacks
by Mikhail Feoktistov
This patch fixes a bug which occurs when we check a bus and unit number
for a new attached disk. We should do this check in ValidadionCallback,
not in PostParse callback. Because in PostParse we have not initialized
disk->info.addr.drive struct yet.
Move part of code from domainPostParseCallback to domainValidateCallback
and part from devicesPostParseCallback to deviceValidateCallback.
PostParse callbacks are for modification data.
ValidateCallbacks are only for checks.
---
src/vz/vz_driver.c | 23 +++++++++++++++++++++--
src/vz/vz_utils.c | 2 +-
src/vz/vz_utils.h | 2 +-
3 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index b1b6d14..e9f9a17 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -232,6 +232,7 @@ vzConnectGetCapabilities(virConnectPtr conn)
xml = virCapabilitiesFormatXML(privconn->driver->caps);
return xml;
}
+
static int
vzDomainDefAddDefaultInputDevices(virDomainDefPtr def)
{
@@ -258,11 +259,19 @@ static int
vzDomainDefPostParse(virDomainDefPtr def,
virCapsPtr caps ATTRIBUTE_UNUSED,
unsigned int parseFlags ATTRIBUTE_UNUSED,
- void *opaque)
+ void *opaque ATTRIBUTE_UNUSED)
{
if (vzDomainDefAddDefaultInputDevices(def) < 0)
return -1;
+ return 0;
+}
+
+static int
+vzDomainDefValidate(const virDomainDef *def,
+ virCapsPtr caps ATTRIBUTE_UNUSED,
+ void *opaque)
+{
if (vzCheckUnsupportedControllers(def, opaque) < 0)
return -1;
@@ -284,6 +293,14 @@ vzDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
VIR_STRDUP(dev->data.net->model, "e1000") < 0)
return -1;
+ return 0;
+}
+
+static int
+vzDomainDeviceDefValidate(const virDomainDeviceDef *dev,
+ const virDomainDef *def,
+ void *opaque ATTRIBUTE_UNUSED)
+{
if (dev->type == VIR_DOMAIN_DEVICE_DISK)
return vzCheckUnsupportedDisk(def, dev->data.disk, opaque);
else if (dev->type == VIR_DOMAIN_DEVICE_GRAPHICS)
@@ -299,8 +316,10 @@ static virDomainXMLPrivateDataCallbacks vzDomainXMLPrivateDataCallbacksPtr = {
static virDomainDefParserConfig vzDomainDefParserConfig = {
.macPrefix = {0x42, 0x1C, 0x00},
- .devicesPostParseCallback = vzDomainDeviceDefPostParse,
.domainPostParseCallback = vzDomainDefPostParse,
+ .devicesPostParseCallback = vzDomainDeviceDefPostParse,
+ .domainValidateCallback = vzDomainDefValidate,
+ .deviceValidateCallback = vzDomainDeviceDefValidate,
};
static vzDriverPtr
diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c
index 312355d..eaf09f2 100644
--- a/src/vz/vz_utils.c
+++ b/src/vz/vz_utils.c
@@ -463,7 +463,7 @@ vzCheckUnsupportedDisk(const virDomainDef *def,
}
int
-vzCheckUnsupportedControllers(virDomainDefPtr def, vzCapabilitiesPtr vzCaps)
+vzCheckUnsupportedControllers(const virDomainDef *def, vzCapabilitiesPtr vzCaps)
{
size_t i, j;
virDomainControllerDefPtr controller;
diff --git a/src/vz/vz_utils.h b/src/vz/vz_utils.h
index d033f94..4b407ec 100644
--- a/src/vz/vz_utils.h
+++ b/src/vz/vz_utils.h
@@ -137,7 +137,7 @@ vzCheckUnsupportedDisk(const virDomainDef *def,
virDomainDiskDefPtr disk,
vzCapabilitiesPtr vzCaps);
int
-vzCheckUnsupportedControllers(virDomainDefPtr def,
+vzCheckUnsupportedControllers(const virDomainDef *def,
vzCapabilitiesPtr vzCaps);
int
vzGetDefaultSCSIModel(vzDriverPtr driver,
--
1.8.3.1
8 years, 3 months
[libvirt] [PATCH v2] vz: fixed race in vzDomainAttach/DettachDevice
by Olga Krishtal
While dettaching/attaching device in OpenStack, nova
calls vzDomainDettachDevice twice, because the update of the internal
configuration of the ct comes a bit latter than the update event.
As the result, we suffer from the second call to dettach the same device.
Signed-off-by: Olga Krishtal <okrishtal(a)virtuozzo.com>
---
src/vz/vz_driver.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index 2ed12db..26b14a2 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -1193,6 +1193,9 @@ static int vzDomainAttachDeviceFlags(virDomainPtr domain, const char *xml,
if (prlsdkAttachDevice(driver, dom, dev) < 0)
goto cleanup;
+ if (prlsdkUpdateDomain(driver, dom) < 0)
+ goto cleanup;
+
ret = 0;
cleanup:
virDomainDeviceDefFree(dev);
@@ -1245,6 +1248,9 @@ static int vzDomainDetachDeviceFlags(virDomainPtr domain, const char *xml,
if (prlsdkDetachDevice(driver, dom, dev) < 0)
goto cleanup;
+ if (prlsdkUpdateDomain(driver, dom) < 0)
+ goto cleanup;
+
ret = 0;
cleanup:
virDomainDeviceDefFree(dev);
--
1.8.3.1
8 years, 3 months
[libvirt] [PATCH 0/7] More syntax-check cleanups
by Ján Tomko
The first patch pulls the latest gnulibs to fetch the newest syntax-check
speedups.
Patch 2 is included since a gnulib update will trigger configure anyway.
The rest are mostly cleanups, the speed-ups they (might) provide are barely
measurable.
Ján Tomko (7):
maint: update to latest gnulib
configure.ac: drop checks for ETH flags
tests: fix the return value of test-wrap-argv
cfg.mk: use subst instead of tr
cfg.mk: drop redundant sc_prohibit_gethostby
cfg.mk: drop redundant sc_size_of_brackets
cfg.mk: join not_streq and not_strneq tests
.gnulib | 2 +-
build-aux/check-spacing.pl | 2 +-
cfg.mk | 35 +++++------------------------------
configure.ac | 5 -----
src/util/virnetdev.c | 20 ++++++++++----------
tests/test-wrap-argv.pl | 2 +-
tests/virstoragetest.c | 2 +-
7 files changed, 19 insertions(+), 49 deletions(-)
--
2.7.3
8 years, 3 months
[libvirt] [PATCH 0/7]
by Nikolay Shirokovskiy
filesystem pools inception
Filesystem pools is a facility to manage filesystems resources similar
to how storage pools manages volume resources. Furthermore new API follows
storage API closely where it makes sense. Uploading/downloading operations
are not defined yet as it is not obvious how to make it properly. I guess
we can use some kind of tar to make a stream from a filesystem. Please share
you thoughts on this particular issue.
The patchset provides 'dir' backend which simply expose directories in some
directory in host filesystem. The virsh commands are provided too. So it is
ready to play with, just replace 'pool' in xml descriptions and virsh commands
to 'fspool' and 'volume' to 'item'.
Olga Krishtal (7):
fspool: introduce filesystem pools API
fspool: usual driver based implementation of filesystem pools API
fspools: configuration and internal representation
fspools: acl support for filesystem pools
remote: filesystem pools driver implementation
fspool: default implementation of filesystem pools
virsh: filesystem pools commands
configure.ac | 33 +
daemon/Makefile.am | 4 +
daemon/libvirtd.c | 10 +
daemon/remote.c | 35 +
include/libvirt/libvirt-fs.h | 273 +++++
include/libvirt/libvirt.h | 1 +
include/libvirt/virterror.h | 8 +
po/POTFILES.in | 6 +
src/Makefile.am | 46 +
src/access/viraccessdriver.h | 12 +
src/access/viraccessdrivernop.c | 19 +
src/access/viraccessdriverpolkit.c | 47 +
src/access/viraccessdriverstack.c | 49 +
src/access/viraccessmanager.c | 31 +
src/access/viraccessmanager.h | 11 +
src/access/viraccessperm.c | 15 +-
src/access/viraccessperm.h | 124 +++
src/conf/fs_conf.c | 1624 +++++++++++++++++++++++++++
src/conf/fs_conf.h | 310 ++++++
src/datatypes.c | 154 +++
src/datatypes.h | 94 ++
src/driver-fs.h | 210 ++++
src/driver.h | 3 +
src/fs/fs_backend.h | 85 ++
src/fs/fs_backend_dir.c | 334 ++++++
src/fs/fs_backend_dir.h | 8 +
src/fs/fs_driver.c | 2164 ++++++++++++++++++++++++++++++++++++
src/fs/fs_driver.h | 10 +
src/libvirt-fs.c | 1715 ++++++++++++++++++++++++++++
src/libvirt.c | 28 +
src/libvirt_private.syms | 53 +
src/libvirt_public.syms | 46 +
src/remote/remote_driver.c | 72 +-
src/remote/remote_protocol.x | 522 ++++++++-
src/rpc/gendispatch.pl | 19 +-
src/util/virerror.c | 37 +
tools/Makefile.am | 4 +
tools/virsh-fspool.c | 1728 ++++++++++++++++++++++++++++
tools/virsh-fspool.h | 36 +
tools/virsh-item.c | 1274 +++++++++++++++++++++
tools/virsh-item.h | 37 +
tools/virsh.c | 4 +
tools/virsh.h | 9 +
43 files changed, 11294 insertions(+), 10 deletions(-)
create mode 100644 include/libvirt/libvirt-fs.h
create mode 100644 src/conf/fs_conf.c
create mode 100644 src/conf/fs_conf.h
create mode 100644 src/driver-fs.h
create mode 100644 src/fs/fs_backend.h
create mode 100644 src/fs/fs_backend_dir.c
create mode 100644 src/fs/fs_backend_dir.h
create mode 100644 src/fs/fs_driver.c
create mode 100644 src/fs/fs_driver.h
create mode 100644 src/libvirt-fs.c
create mode 100644 tools/virsh-fspool.c
create mode 100644 tools/virsh-fspool.h
create mode 100644 tools/virsh-item.c
create mode 100644 tools/virsh-item.h
--
1.8.3.1
8 years, 3 months
[libvirt] [PATCH v1 00/19] Implementation of QEMU vhost-scsi
by Eric Farman
This patch series provides a libvirt implementation of the vhost-scsi
interface in QEMU. As near as I can see, this was discussed upstream in
July 2014[1], and ended in a desire to replace a vhost-scsi controller
in favor of a hostdev element instead[2].
There is no capability check in this series for vhost-scsi in the underlying
QEMU. Using a recent QEMU built with --disable-vhost-scsi fails with "not a
valid device model name."
Host Filesystem Example:
# ls /sys/kernel/config/target/vhost/
discovery_auth naa.5001405df3e54061 version
# ls /sys/kernel/config/target/vhost/naa.5001405df3e54061/tpgt_1/lun/
lun_0
QEMU Example (snippet):
-device vhost-scsi-ccw,wwpn=naa.5001405df3e54061,devno=fe.0.1000
Libvirt Example (snippet):
<hostdev mode='subsystem' type='scsi'>
<source protocol='vhost' wwpn='naa.5001405df3e54061'/>
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x1000'/>
</hostdev>
Guest Viewpoint:
# lsscsi
[1:0:1:0] disk LIO-ORG disk0 4.0 /dev/sda
# dmesg | grep 1:
[ 6.065735] scsi host1: Virtio SCSI HBA
[ 6.093892] scsi 1:0:1:0: Direct-Access LIO-ORG disk0 4.0 PQ: 0 ANSI: 5
[ 6.313615] sd 1:0:1:0: Attached scsi generic sg0 type 0
[ 6.314981] sd 1:0:1:0: [sda] 29360128 512-byte logical blocks: (15.0 GB/14.0 GiB)
[ 6.317290] sd 1:0:1:0: [sda] Write Protect is off
[ 6.317566] sd 1:0:1:0: [sda] Mode Sense: 43 00 10 08
[ 6.317853] sd 1:0:1:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
[ 6.352722] sd 1:0:1:0: [sda] Attached SCSI disk
[1] http://www.redhat.com/archives/libvir-list/2014-July/msg01235.html
[2] http://www.redhat.com/archives/libvir-list/2014-July/msg01390.html
Eric Farman (19):
conf: Add definitions for "vhost" protocol in hostdev tags
util: Allow a vhost protocol for scsi hostdev
security: Allow a vhost protocol for scsi hostdev
qemu: Refactor qemuIsSharedHostdev for readability/extendability
qemu: Allow a vhost protocol for scsi hostdev
conf: Parse vhost-scsi XML tag
conf: Prevent use of shareable on vhost-scsi devices
qemu: Introduce vhost-scsi capability
qemu: Refactor qemuBuildHostdevCommandLine for non-vhost devices
qemu: Add vhost-scsi string for -device parameter
qemu: Add vhost-scsi to hostdev schema
docs: Add vhost-scsi to documentation
qemu: Refactor hotplug in preparation for vhost-scsi
qemu: Allow hotplug of vhost-scsi device
conf: Create vhost-scsi hostdev protocol in dumpxml
conf: Set up vhost-scsi hostdev to self-close source tag
tests: Introduce basic vhost-scsi test
conf: Do not create a virtio-scsi controller for vhost-scsi hostdev
qemu: Allow the specification of a vhost-scsi devno
docs/formatdomain.html.in | 16 +++
docs/schemas/domaincommon.rng | 12 +++
src/conf/domain_conf.c | 94 ++++++++++++++--
src/conf/domain_conf.h | 8 ++
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_cgroup.c | 5 +
src/qemu/qemu_command.c | 120 +++++++++++++++++++--
src/qemu/qemu_command.h | 6 ++
src/qemu/qemu_conf.c | 21 +++-
src/qemu/qemu_domain_address.c | 10 ++
src/qemu/qemu_hotplug.c | 76 +++++++++----
src/qemu/qemu_monitor.c | 21 ++++
src/qemu/qemu_monitor.h | 4 +
src/security/security_apparmor.c | 5 +-
src/security/security_dac.c | 10 +-
src/security/security_selinux.c | 10 +-
src/util/virhostdev.c | 13 ++-
src/util/virscsi.c | 26 +++++
src/util/virscsi.h | 1 +
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 +
.../caps_2.6.0-gicv2.aarch64.xml | 1 +
.../caps_2.6.0-gicv3.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 +
.../qemuxml2argv-hostdev-scsi-vhost-scsi.args | 24 +++++
.../qemuxml2argv-hostdev-scsi-vhost-scsi.xml | 33 ++++++
tests/qemuxml2argvmock.c | 12 +++
tests/qemuxml2argvtest.c | 3 +
35 files changed, 486 insertions(+), 58 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-vhost-scsi.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-vhost-scsi.xml
--
1.9.1
8 years, 3 months