[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, 4 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, 4 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, 4 months
[libvirt] [PATCH 0/9] qemu: Reflect USB controller model in guest XML
by Andrea Bolognani
Patches 1-3 take care of some tiny nits; patches 4-7 clean
up the test suite and add some new test cases that cover
the code changed by subsequent patches.
Patch 8 implements the feature advertised in the subject :)
Patch 9 gets rid of some code that's no longer necessary
after the changes.
Andrea Bolognani (9):
tests: qemuxml2argv: Remove useless GIC flags
tests: qemuxml2argv: Fix usb-too-long-port-path-invalid
tests: qemuxml2xml: Fix disk-mirror
tests: qemuxml2xml: Use WHEN_BOTH for most tests
tests: qemuxml2xml: Pass capabilities to DO_TEST()
tests: qemuxml2xml: Use DO_TEST() for most tests
tests: qemuxml2xml: Add some USB test cases
qemu: domain: Reflect USB controller model in guest XML
qemu: command: Simplify USB controller model selection
src/qemu/qemu_command.c | 60 +-
src/qemu/qemu_domain.c | 20 +
tests/qemuxml2argvtest.c | 16 +-
.../qemuxml2xmlout-ppc64-usb-controller-legacy.xml | 31 +
.../qemuxml2xmlout-ppc64-usb-controller.xml | 31 +
.../qemuxml2xmlout-usb-controller-default-q35.xml | 37 +
.../qemuxml2xmlout-usb-controller-explicit-q35.xml | 37 +
.../qemuxml2xmlout-usb-controller.xml | 27 +
.../qemuxml2xmloutdata/qemuxml2xmlout-usb-none.xml | 25 +
.../qemuxml2xmlout-usb-piix3-controller.xml | 27 +
tests/qemuxml2xmltest.c | 932 ++++++++++-----------
11 files changed, 728 insertions(+), 515 deletions(-)
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-ppc64-usb-controller-legacy.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-ppc64-usb-controller.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-default-q35.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-explicit-q35.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-none.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-piix3-controller.xml
--
2.7.4
8 years, 4 months
[libvirt] [PATCH] admin: Fix the default uri for session daemon to libvirtd:///session
by Erik Skultety
Just like we decide on which URI we go with based on EUID for qemu in remote
driver, do a similar thing for admin except we do not spawn a daemon in this
case.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1356858
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
src/libvirt-admin.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/libvirt-admin.c b/src/libvirt-admin.c
index 4bf29b1..4552e84 100644
--- a/src/libvirt-admin.c
+++ b/src/libvirt-admin.c
@@ -176,10 +176,14 @@ virAdmGetDefaultURI(virConfPtr conf, char **uristr)
/* Since we can't probe connecting via any hypervisor driver as libvirt
* does, if no explicit URI was given and neither the environment
* variable, nor the configuration parameter had previously been set,
- * we set the default admin server URI to 'libvirtd://system'.
+ * we set the default admin server URI to 'libvirtd:///system' or
+ * 'libvirtd:///session' depending on the process's EUID.
*/
- if (VIR_STRDUP(*uristr, "libvirtd:///system") < 0)
- return -1;
+ if (geteuid() == 0 &&
+ VIR_STRDUP(*uristr, "libvirtd:///system") < 0)
+ return -1;
+ else if (VIR_STRDUP(*uristr, "libvirtd:///session") < 0)
+ return -1;
}
}
--
2.5.5
8 years, 4 months
[libvirt] [PATCH 0/2] vz: add getting job info for migration
by Nikolay Shirokovskiy
Nikolay Shirokovskiy (2):
vz: add getting job info for migration
vz: add vzDomainGetJobStats
src/vz/vz_driver.c | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++++
src/vz/vz_sdk.c | 31 +++++++++++++++
src/vz/vz_utils.c | 42 ++++++++++++++++----
src/vz/vz_utils.h | 17 +++++++-
4 files changed, 194 insertions(+), 9 deletions(-)
--
1.8.3.1
8 years, 4 months
[libvirt] [PATCH 0/5] Enable secure boot
by Michal Privoznik
We have UEFI enabled guests for a while now. But only recently
qemu introduced secure boot. We should reflect that in our code
too.
Michal Privoznik (5):
qemuBuildMachineCommandLine: Follow our pattern
Introduce SMM feature
Introduce @secure attribute to os loader element
qemu: Enable secure boot
qemu: Advertise OVMF_CODE.secboot.fd
docs/formatdomain.html.in | 13 ++++-
docs/schemas/domaincommon.rng | 17 +++++++
src/conf/domain_conf.c | 19 ++++++-
src/conf/domain_conf.h | 2 +
src/qemu/qemu_capabilities.c | 16 ++++++
src/qemu/qemu_capabilities.h | 4 ++
src/qemu/qemu_command.c | 58 ++++++++++++++--------
src/qemu/qemu_conf.c | 13 +++--
src/qemu/qemu_domain.c | 27 ++++++++++
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-bios-nvram-secure.args | 29 +++++++++++
.../qemuxml2argv-bios-nvram-secure.xml | 41 +++++++++++++++
.../qemuxml2argv-machine-smm-opt.args | 25 ++++++++++
.../qemuxml2argv-machine-smm-opt.xml | 28 +++++++++++
tests/qemuxml2argvtest.c | 14 ++++++
20 files changed, 284 insertions(+), 28 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-secure.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-secure.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-smm-opt.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-smm-opt.xml
--
2.8.4
8 years, 4 months
[libvirt] [PATCH RFC 0/8] qemu: allow disabling certain virtio revisions
by Ján Tomko
For https://bugzilla.redhat.com/show_bug.cgi?id=1227354
some users might want to adjust the QEMU defaults and disable
either virtio 0.9 or virtio 1.0 (spelled out as disable-legacy
and disable-modern on qemu command line).
This series uses a separate <virtio revision="x"> element
right under the relevant device element for consistency,
even though it might fit better in different subelemets for
some of them.
Ján Tomko (8):
Fix indentation
Add virtio revision attribute to memballoon
Add virtio revision attribute to disks
Add virtio revision attribute to controllers
Add virtio revision attribute to filesystems
Add virtio revision attribute to intefaces
Add virtio revision to rng devices
qemu: format options for enforcing virtio revisions
docs/formatdomain.html.in | 51 ++++++++++
docs/schemas/domaincommon.rng | 29 ++++++
src/conf/domain_conf.c | 72 +++++++++++++-
src/conf/domain_conf.h | 14 +++
src/qemu/qemu_command.c | 31 ++++++
.../qemuxml2argv-virtio-revision.args | 58 +++++++++++
.../qemuxml2argv-virtio-revision.xml | 107 +++++++++++++++++++++
tests/qemuxml2argvtest.c | 10 ++
.../qemuxml2xmlout-virtio-revision.xml | 107 +++++++++++++++++++++
tests/qemuxml2xmltest.c | 2 +
10 files changed, 480 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-revision.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-revision.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-virtio-revision.xml
--
2.7.3
8 years, 4 months
[libvirt] [PATCH v2 0/8] Introducing node device lifecycle event APIs
by Jovanka Gulicoska
Introducing implementation of node device event APIs. Code changes
follow network/storage pool event APIs.
Implemented functions: virNodeDeviceEventRegisterAny(),
virNodeDeviceEventDeregisterAny(), virNodeDeviceLifeCycleEventNew(),
introduced CREATED and DELETED.
There are also test as well as unittests for the new functions and signals.
This is part of a GSOC project: Asynchronous lifecycle events for storage objects
Jovanka Gulicoska (8):
Introduce node device lifecycle event APIs
conf: add node_device_event handling
test: implement node device lifecycle event APIs
remote: implement node device lifecycle event APIs
node_device: implement node device lifecycle event APIs
node_device: Implement event queue in udev
event-test: support node device lifecycle event APIs
virsh: Introduce nodedev-event command
daemon/libvirtd.h | 2 +
daemon/remote.c | 206 ++++++++++++++++++++++++++++++
examples/object-events/event-test.c | 68 ++++++++++
include/libvirt/libvirt-nodedev.h | 90 ++++++++++++++
po/POTFILES.in | 1 +
src/Makefile.am | 5 +
src/conf/node_device_conf.h | 4 +
src/conf/node_device_event.c | 234 +++++++++++++++++++++++++++++++++++
src/conf/node_device_event.h | 59 +++++++++
src/datatypes.h | 13 ++
src/driver-nodedev.h | 14 +++
src/libvirt-nodedev.c | 127 +++++++++++++++++++
src/libvirt_private.syms | 5 +
src/libvirt_public.syms | 6 +
src/node_device/node_device_driver.c | 42 +++++++
src/node_device/node_device_driver.h | 10 ++
src/node_device/node_device_udev.c | 46 +++++--
src/remote/remote_driver.c | 139 +++++++++++++++++++++
src/remote/remote_protocol.x | 43 ++++++-
src/remote_protocol-structs | 19 +++
src/test/test_driver.c | 48 +++++++
tests/objecteventtest.c | 72 +++++++++++
tools/virsh-nodedev.c | 182 +++++++++++++++++++++++++++
tools/virsh.pod | 18 +++
24 files changed, 1443 insertions(+), 10 deletions(-)
create mode 100644 src/conf/node_device_event.c
create mode 100644 src/conf/node_device_event.h
--
2.7.4
8 years, 4 months
[libvirt] [PATCH v4 0/4] perf: add more perf events support
by Qiaowei Ren
With current perf framework, this patchset refactor virPerfEventEnable()
for general purpose and add more perf events support based on this change,
including cache misses, cache references, cpu cycles, instrctions, etc..
Changes since v3:
* separate the patch into 4 patches.
* update virsh.pod for new perf events.
* introduce a static attr table that would be able to convert the
VIR_PERF_EVENT_* into their respective "attr.type" and "attr.config".
Qiaowei Ren (4):
perf: rename qemuDomainGetStatsPerfRdt()
perf: introduce a static attr table and refactor virPerfEventEnable()
for general purpose
perf: add more perf events support
perf: add description for new events in virsh.pod
docs/formatdomain.html.in | 24 ++++
docs/schemas/domaincommon.rng | 4 +
include/libvirt/libvirt-domain.h | 39 ++++++
src/libvirt-domain.c | 8 ++
src/qemu/qemu_driver.c | 23 ++--
src/util/virperf.c | 176 +++++++++++++++++-----------
src/util/virperf.h | 11 ++
tests/genericxml2xmlindata/generic-perf.xml | 4 +
tools/virsh.pod | 4 +
9 files changed, 211 insertions(+), 82 deletions(-)
--
1.9.1
8 years, 4 months