[libvirt] [PATCH RESEND v3.2 00/10] Implementation of QEMU vhost-scsi
by Eric Farman
[NOTE: Resending after a week, and rebased to apply to master after
last week's application of commit 22d94ca4]
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].
Host setup via targetcli (SCSI LUN(s) are already defined to host):
# targetcli
targetcli shell version 2.1.fb35
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.
/> backstores/block create name=disk1 write_back=false \
dev=/dev/disk/by-id/dm-name-36005076306ffc7630000000000002211
Created block storage object disk1 using
/dev/disk/by-id/dm-name-36005076306ffc7630000000000002211.
/> vhost/ create
Created target naa.5001405df3e54061.
Created TPG 1.
/> vhost/naa.5001405df3e54061/tpg1/luns create /backstores/block/disk1
Created LUN 0.
/> exit
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_host'>
<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
Changelog:
v3.2:
- Rebase
- Rebased to current master (8 November)
- Minor changes to (new file) src/util/virhost.c for make syntax-check
v3.1: https://www.redhat.com/archives/libvir-list/2016-October/msg01324.html
- Rebase
- Rebased to current master (31 October)
- Included the prereq patch for the subsystem type in switch statements (oops!)
v3: https://www.redhat.com/archives/libvir-list/2016-October/msg01201.html
- Rebase
- Rebased to current master (26 October)
- Comments
- Added an early patch to do some additional typecasting in the
switch statements of hostdev.subsys.type
- Did some reordering of patches, to hopefully flow better
- Implemented an activeHostHostdevs list, which is used by the
cgroup and security codepaths
- doc changes -- s/2.2/2.5/ and s/HBI/HBA/
- Added a "none" protocol type for scsi_host hostdevs (which is invalid)
- Restored the apparmor and selinux codepaths that got lost from v1
- Added a proper check for a valid scsi_host protocol, and saving that
value within the HostdevDef struct
- Fixed a compiler warning with call to virDomainPCIAddressEnsureAddr
- Removed the rest of vhostfdSize, since multiple fd's are not allowed
by QEMU
- Fixed cleanup of vhostfd in error from building -device string
- Moved the "conf" chunk from "hotplug" patch to "introduce" patch
- Added xml2xml test
- Added a proper calculation of "address" in virDomainAuditHostdev
- Added a virFileExists check before open(/dev/vhost-scsi)
- Addressed a number of lines >80 characters
- Things *NOT* done (later?)
- Investigation/tie-in with virsh nodedev-list stuff
- Implementation of 'num_queues', 'max_sectors', and 'cmd_per_lun'
(Need to research these in the virtio space, before figuring out
how to apply to vhost-scsi)
- Dropping the "naa." prefix of wwn
- Split the "tests" patch into earlier patches
- Other
v2.1: https://www.redhat.com/archives/libvir-list/2016-September/msg00148.html
v2: https://www.redhat.com/archives/libvir-list/2016-August/msg01028.html
v1: https://www.redhat.com/archives/libvir-list/2016-July/msg01004.html
[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 (10):
Cleanup switch statements on the hostdev subsystem type
qemu: Introduce vhost-scsi capability
Introduce a "scsi_host" hostdev type
util: Management routines for scsi_host devices
qemu: Add vhost-scsi string for -device parameter
qemu: Allow hotplug of vhost-scsi device
conf: Wire up the vhost-scsi connection from/to XML
security: Include vhost-scsi in security labels
tests: Introduce basic vhost-scsi test
docs: Add vhost-scsi
docs/formatdomain.html.in | 24 ++
docs/schemas/domaincommon.rng | 23 ++
po/POTFILES.in | 1 +
src/Makefile.am | 1 +
src/conf/domain_audit.c | 7 +
src/conf/domain_conf.c | 102 ++++++-
src/conf/domain_conf.h | 18 ++
src/libvirt_private.syms | 19 ++
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_cgroup.c | 50 +++-
src/qemu/qemu_command.c | 79 ++++++
src/qemu/qemu_command.h | 5 +
src/qemu/qemu_domain_address.c | 10 +
src/qemu/qemu_hostdev.c | 41 +++
src/qemu/qemu_hostdev.h | 8 +
src/qemu/qemu_hotplug.c | 160 +++++++++++
src/security/security_apparmor.c | 24 +-
src/security/security_dac.c | 46 ++++
src/security/security_selinux.c | 51 +++-
src/util/virhost.c | 299 +++++++++++++++++++++
src/util/virhost.h | 72 +++++
src/util/virhostdev.c | 155 +++++++++++
src/util/virhostdev.h | 16 ++
tests/domaincapsschemadata/full.xml | 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 +
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 +
.../qemuxml2argv-hostdev-scsi-vhost-scsi.args | 24 ++
.../qemuxml2argv-hostdev-scsi-vhost-scsi.xml | 41 +++
tests/qemuxml2argvmock.c | 9 +
tests/qemuxml2argvtest.c | 3 +
.../qemuxml2xmlout-hostdev-scsi-vhost-scsi.xml | 1 +
tests/qemuxml2xmltest.c | 3 +
42 files changed, 1293 insertions(+), 14 deletions(-)
create mode 100644 src/util/virhost.c
create mode 100644 src/util/virhost.h
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-vhost-scsi.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-vhost-scsi.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-vhost-scsi.xml
--
1.9.1
8 years, 1 month
[libvirt] [PATCH v2 0/3] Gathering network interface statistics with openvswitch
by Mehdi Abaakouk
Hi,
The new code have been moved to virnetdevopenvswitch.c
I have also sent the refactoring of virstat.c
Regards,
Mehdi Abaakouk (3):
Gathering vhostuser interface stats with ovs
virstat: fix signature of virstat helper
Move virstat.c code to virnetdevtap.c
src/Makefile.am | 1 -
src/libvirt_private.syms | 5 +-
src/libxl/libxl_driver.c | 4 +-
src/lxc/lxc_driver.c | 3 +-
src/openvz/openvz_driver.c | 4 +-
src/qemu/qemu_driver.c | 31 +++++--
src/uml/uml_driver.c | 1 -
src/util/virnetdevopenvswitch.c | 106 ++++++++++++++++++++++++
src/util/virnetdevopenvswitch.h | 4 +
src/util/virnetdevtap.c | 143 ++++++++++++++++++++++++++++++++
src/util/virnetdevtap.h | 3 +
src/util/virstats.c | 178 ----------------------------------------
src/util/virstats.h | 31 -------
src/xen/xen_hypervisor.c | 4 +-
14 files changed, 288 insertions(+), 230 deletions(-)
delete mode 100644 src/util/virstats.c
delete mode 100644 src/util/virstats.h
--
2.10.2
8 years, 1 month
[libvirt] [PATCH 00/14] Another round of CPU driver changes
by Jiri Denemark
This is another step in revisiting all APIs provided by the cpu driver
and making them a bit more sane. As with the previous round(s), the
updated APIs will gain virCPU prefix so that they can be easily
distinguished from the ones that still need some work.
Jiri Denemark (14):
cpu: Rename cpuGetModels
cpu: Rename and document cpuModelIsAllowed
cpu: Rename cpuDataParse
cpu: Rename cpuDataFormat
cputest: Don't use preferred model for minimum match CPUs
cputest: Don't use unsupported preferred model
cputest: Don't use preferred model with forbidden fallback
cputest: Don't use superfluous preferred model
cputest: Don't use preferred CPU model at all
cpu: Make models array in virCPUTranslate constant
cputest: Don't test cpuGuestData
cpu: Introduce virCPUConvertLegacy API
cpu: Avoid adding <vendor> to custom CPUs
cpu: Drop cpuGuestData
src/conf/cpu_conf.c | 28 ++++-
src/conf/cpu_conf.h | 3 +-
src/cpu/cpu.c | 115 +++++++++++----------
src/cpu/cpu.h | 50 ++++-----
src/cpu/cpu_arm.c | 12 +--
src/cpu/cpu_ppc64.c | 45 +++-----
src/cpu/cpu_s390.c | 1 -
src/cpu/cpu_x86.c | 36 ++-----
src/libvirt_private.syms | 8 +-
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_process.c | 6 +-
src/test/test_driver.c | 2 +-
tests/cputest.c | 104 ++++++++-----------
.../ppc64-host+guest,ppc_models-result.xml | 2 -
.../ppc64-host+guest-legacy,ppc_models-result.xml | 2 -
.../cputestdata/x86-host+guest,model486-result.xml | 16 ++-
.../x86-host+guest,models,Penryn-result.xml | 13 ---
.../x86-host+guest,models,qemu64-result.xml | 13 ---
tests/cputestdata/x86-host+guest,models-result.xml | 16 +--
tests/cputestdata/x86-host+guest-result.xml | 18 ++--
... => x86-host+host+host-model,models-result.xml} | 3 +-
tests/cputestdata/x86-host+min.xml | 1 -
tests/cputestdata/x86-host+penryn-force-result.xml | 5 +-
tests/cputestdata/x86-host+pentium3.xml | 1 -
.../x86-host+strict-force-extra-result.xml | 31 +++---
...-host-Haswell-noTSX+Haswell,haswell-result.xml} | 4 +-
...Haswell-noTSX+Haswell-noTSX,haswell-result.xml} | 2 +-
...86-host-Haswell-noTSX+Haswell-noTSX-result.xml} | 2 +-
.../x86-host-better+pentium3,core2duo-result.xml | 21 ----
.../x86-host-better+pentium3,pentium3-result.xml | 30 ------
.../x86-host-better+pentium3-result.xml | 27 +++--
tests/cputestdata/x86-host-worse+guest-result.xml | 18 +++-
tests/qemumonitorjsontest.c | 2 +-
34 files changed, 273 insertions(+), 368 deletions(-)
delete mode 100644 tests/cputestdata/x86-host+guest,models,Penryn-result.xml
delete mode 100644 tests/cputestdata/x86-host+guest,models,qemu64-result.xml
rename tests/cputestdata/{x86-host+host+host-model,models,Penryn-result.xml => x86-host+host+host-model,models-result.xml} (89%)
rename tests/cputestdata/{x86-host-Haswell-noTSX+Haswell-noTSX,haswell,Haswell-noTSX-result.xml => x86-host-Haswell-noTSX+Haswell,haswell-result.xml} (77%)
rename tests/cputestdata/{x86-host-Haswell-noTSX+Haswell,haswell,Haswell-result.xml => x86-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml} (77%)
rename tests/cputestdata/{x86-host-Haswell-noTSX+Haswell-noTSX,Haswell-noTSX-result.xml => x86-host-Haswell-noTSX+Haswell-noTSX-result.xml} (64%)
delete mode 100644 tests/cputestdata/x86-host-better+pentium3,core2duo-result.xml
delete mode 100644 tests/cputestdata/x86-host-better+pentium3,pentium3-result.xml
--
2.10.2
8 years, 1 month
[libvirt] [PATCH v2 00/19] Redo website layout and branding
by Daniel P. Berrange
The current libvirt website design dates from 2008 and
has not changed significantly since. Compared to
contemporary open source project websites it looks
pretty dated and cluttered.
This series incrementally changes the website to have
a completely new layout and branding.
Since the original adobe illustrator files are long
since lost, this series introduces a newly created
variant of the libvirt logo with Inkscape as an SVG
file.
The libvirt logo used a specific font with angled tops
to letters like "l", "b" and "t" - this is the "Overpass"
font, made available by Red Hat under an open source
font license. The re-branding makes use of webfont
support so that we can use this font across the entire
libvirt website for a consistent look.
The colors of the website CSS now exactly match the
colors used in the logo in most places.
The bigger change is in the layout, with the huge
left hand sitemap nav bar being removed to give more
space to the main content. The front page now directly
links to the key pages that were shown to be highly
visited in the apache web logs. Most of the rest of
the links are now available from the "docs.html" page
linked from "Learn" in the top nav bar.
Another key change is that the download page now
covers all language bindings, test suites, docs
released by the project, not merely the core C
library.
Finally a new page "contribute.html" is added as the
source of information useful to people wishing to get
involved in the libvirt project.
View the new site here
v2: https://berrange.fedorapeople.org/libvirt-new-website-v2/
v1: https://berrange.fedorapeople.org/libvirt-new-website/
Changed in v2:
- Fix use of monospace font for code/pre blocks
- Set max page width to 60em, to avoid body content
getting really long lines on wide monitors
- Extend footer links to include email and irc
links on all pages
- Use the normal weight Overpass font for body
content
- Re-create logos to avoid anti-aliasing by inkscape
for cripser look
- Add some content to the XML format page
- Misc typos
- Fix hiding of 'home' text in top banner logo
- Provide improved SVG files for logo and PNG
rendered versions in standard sizes
- Replace 'made with libvirt' logo with a new
'libvirt powered' logo on apps.html page
Daniel P. Berrange (19):
docs: use overpass font for website
docs: add master SVG for libvirt logo
docs: switch to new website banner
docs: redo style of front page
docs: provide new style logos for the apps page
docs: add footer to all pages
docs: simplify style for headers
docs: add page describing contribution to libvirt
docs: add three core links in the header bar
docs: remove todo page
docs: remove related links page
Revert "syntax-check: Enforce <code> inside <dt> elements"
docs: rewrite content on front page to be more useful
docs: expand downloads page to cover all modules
docs: add some improved styling to contact page
docs: fill out docs page with useful links
docs: remove navigation sidebar from pages
docs: remove outdated or duplicated content
docs: add some content to the XML format main page
cfg.mk | 20 +-
docs/404.html.in | 5 -
docs/Makefile.am | 76 ++-
docs/apps.html.in | 7 +-
docs/archdomain.html.in | 7 -
docs/archnetwork.html.in | 54 --
docs/archnode.html.in | 7 -
docs/archstorage.html.in | 32 --
docs/contact.html.in | 4 +-
docs/contribute.html.in | 140 ++++++
docs/deployment.html.in | 50 --
docs/docs.html.in | 163 ++++++-
docs/downloads.html.in | 435 ++++++++++++++---
docs/fonts/LICENSE.md | 90 ++++
docs/fonts/hinted-Overpass-Bold.woff | Bin 0 -> 48136 bytes
docs/fonts/hinted-Overpass-BoldItalic.woff | Bin 0 -> 51008 bytes
docs/fonts/hinted-Overpass-Italic.woff | Bin 0 -> 51908 bytes
docs/fonts/hinted-Overpass-Light.woff | Bin 0 -> 49452 bytes
docs/fonts/hinted-Overpass-LightItalic.woff | Bin 0 -> 51752 bytes
docs/fonts/hinted-Overpass-Reg.woff | Bin 0 -> 48144 bytes
docs/fonts/stylesheet.css | 55 +++
docs/format.html.in | 36 +-
docs/formatsnapshot.html.in | 6 +-
docs/generic.css | 4 +-
docs/hvsupport.pl | 3 -
docs/index.html.in | 163 +++----
docs/intro.html.in | 13 -
docs/js/jquery-3.1.1.min.js | 4 +
docs/js/jquery.rss.min.js | 11 +
docs/js/moment.min.js | 7 +
docs/libvirt-header-bg.png | Bin 1136 -> 0 bytes
docs/libvirt-header-logo.png | Bin 25945 -> 0 bytes
docs/libvirt-net-logical.fig | 159 ------
docs/libvirt-net-logical.png | Bin 11243 -> 0 bytes
docs/libvirt-net-physical.fig | 139 ------
docs/libvirt-net-physical.png | Bin 11336 -> 0 bytes
docs/libvirt.css | 328 ++++++++-----
docs/libvirtLogo.png | Bin 33698 -> 0 bytes
docs/libvirtLogo404.png | Bin 32442 -> 0 bytes
docs/logos/README | 86 ++++
docs/logos/logo-banner-dark-256.png | Bin 0 -> 16093 bytes
docs/logos/logo-banner-dark-800.png | Bin 0 -> 64715 bytes
docs/logos/logo-banner-dark.svg | 655 +++++++++++++++++++++++++
docs/logos/logo-banner-light-256.png | Bin 0 -> 16106 bytes
docs/logos/logo-banner-light-800.png | Bin 0 -> 64942 bytes
docs/logos/logo-banner-light.svg | 651 ++++++++++++++++++++++++
docs/logos/logo-base.svg | 698 ++++++++++++++++++++++++++
docs/logos/logo-square-128.png | Bin 0 -> 20074 bytes
docs/logos/logo-square-192.png | Bin 0 -> 38361 bytes
docs/logos/logo-square-256.png | Bin 0 -> 52107 bytes
docs/logos/logo-square-96.png | Bin 0 -> 13749 bytes
docs/logos/logo-square-powered-128.png | Bin 0 -> 21521 bytes
docs/logos/logo-square-powered-192.png | Bin 0 -> 41246 bytes
docs/logos/logo-square-powered-256.png | Bin 0 -> 55839 bytes
docs/logos/logo-square-powered-96.png | Bin 0 -> 14683 bytes
docs/logos/logo-square-powered.svg | 732 +++++++++++++++++++++++++++
docs/logos/logo-square.svg | 733 ++++++++++++++++++++++++++++
docs/madeWith.png | Bin 4545 -> 0 bytes
docs/main.css | 1 +
docs/page.xsl | 111 ++---
docs/pending.html.in | 10 -
docs/relatedlinks.html.in | 88 ----
docs/remote.html.in | 2 +-
docs/search.php.in | 2 -
docs/sitemap.html.in | 490 -------------------
docs/todo.cfg-example | 26 -
docs/todo.pl | 125 -----
67 files changed, 4788 insertions(+), 1640 deletions(-)
delete mode 100644 docs/archdomain.html.in
delete mode 100644 docs/archnetwork.html.in
delete mode 100644 docs/archnode.html.in
delete mode 100644 docs/archstorage.html.in
create mode 100644 docs/contribute.html.in
delete mode 100644 docs/deployment.html.in
create mode 100644 docs/fonts/LICENSE.md
create mode 100644 docs/fonts/hinted-Overpass-Bold.woff
create mode 100644 docs/fonts/hinted-Overpass-BoldItalic.woff
create mode 100644 docs/fonts/hinted-Overpass-Italic.woff
create mode 100644 docs/fonts/hinted-Overpass-Light.woff
create mode 100644 docs/fonts/hinted-Overpass-LightItalic.woff
create mode 100644 docs/fonts/hinted-Overpass-Reg.woff
create mode 100644 docs/fonts/stylesheet.css
delete mode 100644 docs/intro.html.in
create mode 100644 docs/js/jquery-3.1.1.min.js
create mode 100644 docs/js/jquery.rss.min.js
create mode 100644 docs/js/moment.min.js
delete mode 100644 docs/libvirt-header-bg.png
delete mode 100644 docs/libvirt-header-logo.png
delete mode 100644 docs/libvirt-net-logical.fig
delete mode 100644 docs/libvirt-net-logical.png
delete mode 100644 docs/libvirt-net-physical.fig
delete mode 100644 docs/libvirt-net-physical.png
delete mode 100644 docs/libvirtLogo.png
delete mode 100644 docs/libvirtLogo404.png
create mode 100644 docs/logos/README
create mode 100644 docs/logos/logo-banner-dark-256.png
create mode 100644 docs/logos/logo-banner-dark-800.png
create mode 100644 docs/logos/logo-banner-dark.svg
create mode 100644 docs/logos/logo-banner-light-256.png
create mode 100644 docs/logos/logo-banner-light-800.png
create mode 100644 docs/logos/logo-banner-light.svg
create mode 100644 docs/logos/logo-base.svg
create mode 100644 docs/logos/logo-square-128.png
create mode 100644 docs/logos/logo-square-192.png
create mode 100644 docs/logos/logo-square-256.png
create mode 100644 docs/logos/logo-square-96.png
create mode 100644 docs/logos/logo-square-powered-128.png
create mode 100644 docs/logos/logo-square-powered-192.png
create mode 100644 docs/logos/logo-square-powered-256.png
create mode 100644 docs/logos/logo-square-powered-96.png
create mode 100644 docs/logos/logo-square-powered.svg
create mode 100644 docs/logos/logo-square.svg
delete mode 100644 docs/madeWith.png
delete mode 100644 docs/pending.html.in
delete mode 100644 docs/relatedlinks.html.in
delete mode 100644 docs/sitemap.html.in
delete mode 100644 docs/todo.cfg-example
delete mode 100755 docs/todo.pl
--
2.9.3
8 years, 1 month
[libvirt] [PATCH] qemu: Redefine the "unlimited" memory limits one more time
by Viktor Mihajlovski
With kernel 3.18 (since commit 3e32cb2e0a12b6915056ff04601cf1bb9b44f967) the
"unlimited" value for cgroup memory limits has changed once again as its byte
value is now computed from a page counter.
The new "unlimited" value reported by the cgroup fs is therefore 2**51-1 pages
which is (VIR_DOMAIN_MEMORY_PARAM_UNLIMITED - 3072). This results e.g. in virsh
memtune displaying 9007199254740988 instead of unlimited for the limits.
This patch deals with the rounding issue by scaling the byte values reported
by the kernel and the PARAM_UNLIMITED value to page size and comparing those.
See also libvirt commit 231656bbeb9e4d3bedc44362784c35eee21cf0f4 for the
history for kernel 3.12 and before.
Signed-off-by: Viktor Mihajlovski <mihajlov(a)linux.vnet.ibm.com>
---
src/util/vircgroup.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 24917e7..df92ec6 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -2542,7 +2542,7 @@ virCgroupGetMemoryHardLimit(virCgroupPtr group, unsigned long long *kb)
goto cleanup;
*kb = limit_in_bytes >> 10;
- if (*kb > VIR_DOMAIN_MEMORY_PARAM_UNLIMITED)
+ if (*kb >> 4 >= VIR_DOMAIN_MEMORY_PARAM_UNLIMITED >> 4)
*kb = VIR_DOMAIN_MEMORY_PARAM_UNLIMITED;
ret = 0;
@@ -2604,7 +2604,7 @@ virCgroupGetMemorySoftLimit(virCgroupPtr group, unsigned long long *kb)
goto cleanup;
*kb = limit_in_bytes >> 10;
- if (*kb > VIR_DOMAIN_MEMORY_PARAM_UNLIMITED)
+ if (*kb >> 4 >= VIR_DOMAIN_MEMORY_PARAM_UNLIMITED >> 4)
*kb = VIR_DOMAIN_MEMORY_PARAM_UNLIMITED;
ret = 0;
@@ -2666,7 +2666,7 @@ virCgroupGetMemSwapHardLimit(virCgroupPtr group, unsigned long long *kb)
goto cleanup;
*kb = limit_in_bytes >> 10;
- if (*kb > VIR_DOMAIN_MEMORY_PARAM_UNLIMITED)
+ if (*kb >> 4 >= VIR_DOMAIN_MEMORY_PARAM_UNLIMITED >> 4)
*kb = VIR_DOMAIN_MEMORY_PARAM_UNLIMITED;
ret = 0;
--
1.9.1
8 years, 1 month
[libvirt] [PATCH 0/4] qemu: Assign static slot numbers for memory devices and fix alias generator
by Peter Krempa
See patch 4 for explanation of the bug.
Peter Krempa (4):
conf: Allow specifying only the slot number for hotpluggable memory
qemu: process: detect if dimm aliases are broken on reconnect
qemu: Assign slots to memory devices prior to usage
qemu: Generate memory device aliases according to slot number
src/conf/domain_conf.c | 18 +++--
src/qemu/qemu_alias.c | 27 +++++--
src/qemu/qemu_alias.h | 3 +-
src/qemu/qemu_command.c | 3 +-
src/qemu/qemu_domain.h | 3 +
src/qemu/qemu_domain_address.c | 91 ++++++++++++++++++++++
src/qemu/qemu_domain_address.h | 4 +
src/qemu/qemu_hotplug.c | 7 +-
src/qemu/qemu_process.c | 25 ++++++
.../qemuxml2argv-hugepages-numa.args | 2 +-
.../qemuxml2argv-memory-hotplug-dimm-addr.args | 2 +
.../qemuxml2argv-memory-hotplug-dimm-addr.xml | 11 ++-
.../qemuxml2argv-memory-hotplug-dimm.args | 4 +-
.../qemuxml2argv-memory-hotplug-ppc64-nonuma.args | 4 +-
tests/qemuxml2argvtest.c | 2 +-
.../qemuxml2xmlout-memory-hotplug-dimm.xml | 2 +
16 files changed, 184 insertions(+), 24 deletions(-)
--
2.10.2
8 years, 1 month
[libvirt] [PATCH v2 00/15] qemu: Add QMP introspection and gluster debug support
by Peter Krempa
Now that the release is out, I fixed the few things pointed out.
Andrea Bolognani (5):
tests: qemucaps: Update ppc64 replies for qemu 2.6.0 release
tests: qemucaps: Update aarch64 gicv2 replies for qemu 2.6.0 release
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on ppc64le
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64
gicv2
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64
gicv3
Pavel Hrdina (3):
tests: qemucaps: Add QMP introspection data for qemu 2.5.0 on x86
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on x86
tests: qemucaps: Add QMP introspection data for qemu 2.7.0 on x86
Peter Krempa (4):
util: json: add helper to iterate and steal members of json array
qemu: monitor: Add code to retrieve and store QMP schema data
tests: qemucaps: Temporarily remove 'query-qmp-schema' from test data
qemu: capabilities: Add support for QMP schema introspection
Prasanna Kumar Kalever (3):
qemu: capabilities: Detect support for gluster debug setting
qemu: conf: add option for tuning debug logging level
qemu: command: Add debug option for gluster volumes
src/libvirt_private.syms | 1 +
src/qemu/libvirtd_qemu.aug | 3 +
src/qemu/qemu.conf | 20 +
src/qemu/qemu_capabilities.c | 193 +
src/qemu/qemu_capabilities.h | 4 +
src/qemu/qemu_command.c | 19 +-
src/qemu/qemu_command.h | 1 +
src/qemu/qemu_conf.c | 3 +
src/qemu/qemu_conf.h | 1 +
src/qemu/qemu_hotplug.c | 6 +-
src/qemu/qemu_monitor.c | 11 +
src/qemu/qemu_monitor.h | 2 +
src/qemu/qemu_monitor_json.c | 67 +
src/qemu/qemu_monitor_json.h | 3 +
src/util/virjson.c | 54 +
src/util/virjson.h | 6 +
.../qemuargv2xml-disk-drive-network-gluster.args | 7 +-
.../qemucapabilitiesdata/caps_2.5.0.x86_64.replies | 7545 ++++++++++++++++++
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 +
.../caps_2.6.0-gicv2.aarch64.replies | 8036 ++++++++++++++++++-
.../caps_2.6.0-gicv2.aarch64.xml | 3 +-
.../caps_2.6.0-gicv3.aarch64.replies | 8007 ++++++++++++++++++-
.../caps_2.6.0-gicv3.aarch64.xml | 1 +
.../caps_2.6.0.ppc64le.replies | 8026 ++++++++++++++++++-
tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 5 +-
.../qemucapabilitiesdata/caps_2.6.0.x86_64.replies | 8005 +++++++++++++++++++
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.7.0.x86_64.replies | 8356 ++++++++++++++++++++
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 2 +
.../qemuxml2argv-disk-drive-network-gluster.args | 12 +-
tests/qemuxml2argvtest.c | 3 +-
31 files changed, 48356 insertions(+), 48 deletions(-)
--
2.10.2
8 years, 1 month
[libvirt] [PATCH v4 0/6] Newer ivshmem models
by Martin Kletzander
v4:
- Incorporated John's review
v3:
- https://www.redhat.com/archives/libvir-list/2016-September/msg01232.html
Martin Kletzander (6):
conf, qemu: Add support for shmem model
conf, qemu: Add newer shmem models
qemu: Add capabilities for ivshmem-{plain,doorbell}
qemu: Save various defaults for shmem
qemu: Support newer ivshmem device variants
qemu: Add support for hot/cold-(un)plug of shmem devices
docs/formatdomain.html.in | 12 +
docs/schemas/domaincommon.rng | 11 +
src/conf/domain_conf.c | 46 +++-
src/conf/domain_conf.h | 10 +
src/libvirt_private.syms | 2 +
src/qemu/qemu_capabilities.c | 5 +
src/qemu/qemu_capabilities.h | 4 +
src/qemu/qemu_command.c | 111 ++++++++-
src/qemu/qemu_command.h | 10 +
src/qemu/qemu_domain.c | 54 +++++
src/qemu/qemu_driver.c | 39 +++-
src/qemu/qemu_hotplug.c | 248 ++++++++++++++++++++-
src/qemu/qemu_hotplug.h | 6 +
.../caps_2.6.0-gicv2.aarch64.xml | 2 +
.../caps_2.6.0-gicv3.aarch64.xml | 2 +
tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 2 +
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 2 +
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 2 +
tests/qemuhotplugtest.c | 21 ++
.../qemuhotplug-ivshmem-doorbell-detach.xml | 7 +
.../qemuhotplug-ivshmem-doorbell.xml | 4 +
.../qemuhotplug-ivshmem-plain-detach.xml | 6 +
.../qemuhotplug-ivshmem-plain.xml | 3 +
...muhotplug-base-live+ivshmem-doorbell-detach.xml | 1 +
.../qemuhotplug-base-live+ivshmem-doorbell.xml | 65 ++++++
.../qemuhotplug-base-live+ivshmem-plain-detach.xml | 1 +
.../qemuhotplug-base-live+ivshmem-plain.xml | 58 +++++
.../qemuxml2argv-shmem-plain-doorbell.args | 43 ++++
...m.xml => qemuxml2argv-shmem-plain-doorbell.xml} | 16 +-
tests/qemuxml2argvdata/qemuxml2argv-shmem.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-shmem.xml | 2 +
tests/qemuxml2argvtest.c | 3 +
...xml => qemuxml2xmlout-shmem-plain-doorbell.xml} | 18 +-
tests/qemuxml2xmloutdata/qemuxml2xmlout-shmem.xml | 9 +
tests/qemuxml2xmltest.c | 1 +
35 files changed, 798 insertions(+), 30 deletions(-)
create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-doorbell-detach.xml
create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-doorbell.xml
create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-plain-detach.xml
create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-plain.xml
create mode 120000 tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell-detach.xml
create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml
create mode 120000 tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain-detach.xml
create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-shmem-plain-doorbell.args
copy tests/qemuxml2argvdata/{qemuxml2argv-shmem.xml => qemuxml2argv-shmem-plain-doorbell.xml} (80%)
copy tests/qemuxml2xmloutdata/{qemuxml2xmlout-shmem.xml => qemuxml2xmlout-shmem-plain-doorbell.xml} (82%)
--
2.10.1
8 years, 1 month
[libvirt] [PATCH] Fix scheduler support check
by Martin Kletzander
Commit 94cc577807ba tried fixing build on systems that did not have
SCHED_BATCH or SCHED_IDLE defined. But instead of changing it to
conditional support, it rather completely disabled the support for
setting any scheduler. Since then, such old systems are not
supported, but rather than reverting that commit, let's change that to
the conditional support. That way any addition to the list of
schedulers can follow the same style so that we're consistent in the
future.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Notes:
Of course there are various ways how to address that, I went with
case. Also defining undefined SCHED_* to -1 makes some gnulib
syntax-check go haywire.
src/util/virprocess.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index 718c4a2664e1..39d6b30c40f2 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -1183,7 +1183,7 @@ virProcessExitWithStatus(int status)
exit(value);
}
-#if HAVE_SCHED_SETSCHEDULER && defined(SCHED_BATCH) && defined(SCHED_IDLE)
+#if HAVE_SCHED_SETSCHEDULER
static int
virProcessSchedTranslatePolicy(virProcessSchedPolicy policy)
@@ -1196,10 +1196,18 @@ virProcessSchedTranslatePolicy(virProcessSchedPolicy policy)
return SCHED_BATCH;
case VIR_PROC_POLICY_IDLE:
+# ifdef SCHED_IDLE
return SCHED_IDLE;
+# else
+ return -1;
+# endif
case VIR_PROC_POLICY_FIFO:
+# ifdef SCHED_FIFO
return SCHED_FIFO;
+# else
+ return -1;
+# endif
case VIR_PROC_POLICY_RR:
return SCHED_RR;
@@ -1225,6 +1233,13 @@ virProcessSetScheduler(pid_t pid,
if (!policy)
return 0;
+ if (pol < 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Scheduler '%s' is not supported on this platform"),
+ virProcessSchedPolicyTypeToString(policy));
+ return -1;
+ }
+
if (pol == SCHED_FIFO || pol == SCHED_RR) {
int min = 0;
int max = 0;
--
2.10.2
8 years, 1 month
[libvirt] [PATCH] Gathering network interface statistics with openvswitch
by Mehdi Abaakouk
Hi,
To follow up, my question about vhostuser/ovs interfaces statistics.
This is my porposal to implement this feature.
Regards,
Mehdi Abaakouk (1):
virstats: Gathering net interface stats with ovs
src/util/virstats.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 96 insertions(+), 3 deletions(-)
--
2.10.2
8 years, 1 month