[libvirt] Release of libvirt-1.2.1
by Daniel Veillard
As scheduled I just tagged the git tree and pushed the tarball and rpms
to the usual place:
ftp://libvirt.org/libvirt/
the next relase is planned at the end of February.
This is a bug fix release, we never had that many security advisories
closed in a single release, and there is a lot of various bug fixes so
users are really invited to upgrate to the new version !
One clearly identified new feature and a reasonable number of
improvements too, so not just bugfixes though :)
Features:
- network events API (Cédric Bosdonnat)
Security:
- CVE-2014-0028 event: filter global events by domain:getattr ACL (Eric Blake)
- CVE-2014-1447-2 Really don't crash if a connection closes early (Jiri Denemark)
- CVE-2014-1447-1 Don't crash if a connection closes early (Jiri Denemark)
- CVE-2013-6458-4 qemu: Fix job usage in virDomainGetBlockIoTune (Jiri Denemark)
- CVE-2013-6458-3 qemu: Fix job usage in qemuDomainBlockJobImpl (Jiri Denemark)
- CVE-2013-6458-2 qemu: Avoid using stale data in virDomainGetBlockInfo (Jiri Denemark)
- CVE-2013-6458-1 qemu: Do not access stale data in virDomainBlockStats (Jiri Denemark)
- CVE-2013-6457 libxl: avoid crashing if calling `virsh numatune' on inactive domain (Dario Faggioli)
- CVE-2013-6436: fix crash in lxcDomainGetMemoryParameters (Martin Kletzander)
Documentation:
- mention maintenance branches (Eric Blake)
- Fix docs for PMWakeup/PMSuspend callback types (Claudio Bley)
- storage: fs: Fix comment for virStorageBackendFileSystemDelete (Peter Krempa)
- Clarify documentation on possible return values in case of errors (Claudio Bley)
- Add Documentation fields to systemd service files (Guido Günther)
- add LXC multi console command docs and a example (Chen Hanxiao)
- maint: fix comment typos in qemu numa code (Eric Blake)
- return paragraph must be last (Eric Blake)
- fix layout of code snippets (Eric Blake)
- improve event-related documentation (Eric Blake)
- virsh: man: Mention that volumes need to be in storage pool for undefine (Peter Krempa)
- fix address type for disks (Martin Kletzander)
- qemu: fix typo PCi => PCI (Martin Kletzander)
- tools: Fix virsh connect man page (Jiri Denemark)
- fix a typo in libvirt.h (Chen Hanxiao)
- fix recent typo (Eric Blake)
- Enhance memoryBacking/locked documentation (Jiri Denemark)
- fix double articles bug (Wang Yufei)
- Explicitly declaring that nodedev-destroy only works for vHBA (Osier Yang)
- fix some typos (Eric Blake)
- fix typo in previous patch (Eric Blake)
- fix typos in libvirt.h.in (Chen Hanxiao)
Portability:
- build: fix build on mingw with winpthreads (Eric Blake)
- BSD: implement nodeGetMemoryStats (Roman Bogorodskiy)
- build: fix bootstrap with older autoconf (Eric Blake)
- AArch64: Porting of armv7l conditons to run qemu for aarch64. (Pranavkumar Sawargaonkar)
- vmware: os x support is broken (Denis Kondratenko)
- tests: fix syntax in previous patch (Eric Blake)
- aarch64: Fix sysinfo test. (Richard W.M. Jones)
- aarch64: Disable -fstack-protector. (Richard W.M. Jones)
- virnettlscontexttest fails with GNUTLS 3.0.28 (Cédric Bosdonnat)
- Fix build when default python is python3 (Lénaïc Huard)
- specfile: fix make rpm when with_driver_modules is 1 (Laine Stump)
- object: require maximal alignment in base class (Eric Blake)
- configure: Resolve compile issue in configure.ac (Adam Walters)
Bug Fixes:
- qemu: Avoid operations on NULL monitor if VM fails early (Peter Krempa)
- Fix coverity complain in commandtest.c (Pavel Hrdina)
- Fix memory leak in securityselinuxlabeltest.c (Pavel Hrdina)
- Fix possible memory leak in util/virxml.c (Pavel Hrdina)
- Fix possible memory leak in phyp_driver.c (Pavel Hrdina)
- Fix memory leak in openvz_conf.c (Pavel Hrdina)
- Fix memory leak in testDomainCreateXMLMixed() (Nehal J Wani)
- schema: fix idmap validation (Eric Blake)
- event: don't queue NULL event on OOM (Eric Blake)
- virt-login-shell: fix regressions in behavior (Eric Blake)
- storage: fix crash when listing volumes or undefining a pool (Martin Kletzander)
- qemuBuildNicDevStr: Set vectors= on Multiqueue (Michal Privoznik)
- libxl: Fix devid init in libxlMakeNicList (Stefan Bader)
- LXC: create monitor socket under selinux context of domain (Gao feng)
- virsh: Use inactive definition when removing disk from config (Peter Krempa)
- virsh: Don't use legacy API if --current is used on device hot(un)plug (Peter Krempa)
- virConnect(Un)registerCloseCallback: Unlock @conn prior to error dispatch (Michal Privoznik)
- Allow to install apparmor profiles (Guido Günther)
- Fix bridge configuration when OUTPUT policy is DROP on the host (Lénaïc Huard)
- lxc_controller: Don't leak @name (Michal Privoznik)
- qemu: Fix job usage in qemuDomainBlockCopy (Jiri Denemark)
- Fix segmentation fault when accessing default qemu machine type (Yudai Yamagish)
- event: make deregister return value match docs (Eric Blake)
- qemuProcessStop: Don't overwrite any errors (Michal Privoznik)
- Fix argument order of qemuMigrationPerformJob(). (Minoru Usui)
- libxl: Fix initialization of nictype in libxl_device_nic (Jim Fehlig)
- qemu: range check numa memory placement mode (Peter Krempa)
- Fix explicit usage of default video PCI slots (Ján Tomko)
- maint: avoid nested public calls (Eric Blake)
- event: don't overwrite registration error message (Eric Blake)
- tests: sysinfotest: Actual/expected were swapped in error message. (Richard W.M. Jones)
- domain: don't try to interpret <driver> as virtio config for hostdev interfaces (Laine Stump)
- virkeycode: Allow ANSI_A (Michal Privoznik)
- interface: Take interface status into account when starting and destroying (Michal Privoznik)
- event-test: Unregister close callback (Michal Privoznik)
- qemu: re-add hostdev interfaces to hostdev array on libvirtd restart (Laine Stump)
- qemu: avoid duplicate security label restore on hostdev attach failure (Laine Stump)
- qemu: properly set MaxMemLock when hotplugging with VFIO (Laine Stump)
- PanicCheckABIStability: Need to check for existence (John Ferlan)
- libxl: fix segfault when domain create fail (Bamvor Jian Zhang)
- Fix crash in lxcDomainSetMemoryParameters (Martin Kletzander)
- storage: fix bogus target in gluster volume xml (Eric Blake)
- Fix crash in virsystemdtest with dbus 1.7.6 (Cédric Bosdonnat)
- Fix race leading to crash when setting up dbus watches (Daniel P. Berrange)
- libxl: libxl_get_max_cpus returning a libxl error from 4.4 onward (Dario Faggioli)
- virsh: domain: Fix undefine with storage of 'volume' disks (Peter Krempa)
- qemu: ask for -enable-fips when FIPS is required (Eric Blake)
- configure: make --with-test-suite work (Martin Kletzander)
- Fix memory leak in virObjectEventCallbackListRemoveID() (Nehal J Wani)
- qemu: check for reboot-timeout on monitor (Martin Kletzander)
- lxc: return -1 if failed to kill lxc process (Chen Hanxiao)
- Add another missing % on %{_libdir} macro (Laine Stump)
- Add missing % on %{_libdir} macro in RPM (Daniel P. Berrange)
- storage: fix omitted slash in gluster volume URI (Eric Blake)
- qemu_process: Read errors from child (Michal Privoznik)
- qemu: hotplug: Fix adding USB devices to the driver list (Cole Robinson)
- qemu: hotplug: Fix double free on USB collision (Cole Robinson)
- qemu: hotplug: Only label hostdev after checking device conflicts (Cole Robinson)
- lxcContainerMountFSDevPTS: Unify @ret usage pattern (Chen Hanxiao)
- conf: Fix XML formatting of RNG device info (Peter Krempa)
- qemu: snapshot: Fix incorrect disk type for auto-generated disks (Peter Krempa)
- virThreadPoolFree: Set n(Prio)Workers after the pool is locked (Michal Privoznik)
- qemuAgentDispose: Reset lastError (Wangyufei (James))
- Fix memory leak in qemuBuildDriveStr() (Nehal J Wani)
- Don't overwrite errors from virConfReadFile (Daniel P. Berrange)
- virThreadPoolFree: Join worker threads (Michal Privoznik)
- qemu: fix live pinning to memory node on NUMA system (Shivaprasad G Bhat)
- storage_driver: Resolve Coverity CHECKED_RETURN warning (John Ferlan)
- bridge_driver: Resolve Coverity CHECKED_RETURN warning (John Ferlan)
- virnetserverclient: Fix conditional change HAVE_SASL to WITH_SASL (John Ferlan)
- virnetserverclient: Remove Coverity DEADCODE warning (John Ferlan)
- nwfilter: Remove Coverity DEADCODE warning (John Ferlan)
- qemu: report error on attempt to live change virtio-net queues (Laine Stump)
- daemon: Run virStateCleanup conditionally (Michal Privoznik)
- qemu: default to vfio for nodedev-detach (Laine Stump)
- Ensure to zero out the virDomainBlockJobInfo arg (Daniel P. Berrange)
- snapshot: conf: Fix NULL dereference when <driver> element is empty (Peter Krempa)
Improvements:
- event: wire up RPC for server-side network event filtering (Eric Blake)
- event: add notion of remoteID for filtering client network events (Eric Blake)
- event: track callbackID on daemon side of RPC (Eric Blake)
- tests: be more explicit on qcow2 versions in virstoragetest (Eric Blake)
- Add Gao feng to the committers list (Gao feng)
- maint: ignore transient files during tests (Eric Blake)
- storage: FS: Tweak some comments and fix typos (Peter Krempa)
- Exercise the ABI stability check code in test suite (Daniel P. Berrange)
- storage: Improve error message when a storage backend is missing (Peter Krempa)
- storage: lvm: Avoid forward decl of virStorageBackendLogicalDeleteVol (Peter Krempa)
- maint: improve VIR_ERR_INVALID_DOMAIN_SNAPSHOT usage (Eric Blake)
- maint: improve VIR_ERR_INVALID_NWFILTER usage (Eric Blake)
- maint: improve VIR_ERR_INVALID_STREAM usage (Eric Blake)
- maint: improve VIR_ERR_INVALID_SECRET usage (Eric Blake)
- maint: improve VIR_ERR_INVALID_NODE_DEVICE usage (Eric Blake)
- maint: improve VIR_ERR_INVALID_STORAGE_VOL usage (Eric Blake)
- maint: improve VIR_ERR_INVALID_STORAGE_POOL usage (Eric Blake)
- test driver: Add authentication to test driver. (Richard W.M. Jones)
- maint: improve VIR_ERR_INVALID_INTERFACE usage (Eric Blake)
- event: clean up client side RPC code (Eric Blake)
- Make sure AC_ARG_WITH is always executed (Guido Günther)
- maint: improve VIR_ERR_INVALID_NETWORK usage (Eric Blake)
- conf: trivial typo fix (Martin Kletzander)
- maint: inline VIR_IS*_DOMAIN macro (Eric Blake)
- maint: improve VIR_ERR_INVALID_DOMAIN usage (Eric Blake)
- event: make network events easier to use without casts (Eric Blake)
- event: don't turn offline domain into global event (Eric Blake)
- event: don't allow mix of old- and new-style registration (Eric Blake)
- event: properly filter count of remaining events (Eric Blake)
- Read PCI class from sysfs class file instead of config space. (Thadeu Lima de Souza Cascardo)
- event: tighten scope of object_event (Eric Blake)
- event: don't let old-style events clobber per-domain events (Eric Blake)
- event: rename confusing variable in test, remote drivers (Eric Blake)
- event: share state driver between test:///default connections (Eric Blake)
- lxc_controller: Fix error message on missing --handshakefd (Michal Privoznik)
- maint: inline VIR_IS_CONNECT macro (Eric Blake)
- maint: Fix messy include of libvirt_internal.h (Peter Krempa)
- maint: improve VIR_ERR_INVALID_CONN usage (Eric Blake)
- maint: improve VIR_ERR_OPERATION_DENIED usage (Eric Blake)
- qemu: Clean up qemuDomainSetNumaParameters (Peter Krempa)
- storage: Use VIR_DELETE_ELEMENT instead of open coding (Peter Krempa)
- event: use newer array management macros (Eric Blake)
- event: use bool in more places (Eric Blake)
- maint: improve VIR_ERR_NO_SUPPORT usage (Eric Blake)
- event: remove unneeded virObjectEventGetEventID (Eric Blake)
- event: fix doc typos, and doc more public methods (Eric Blake)
- maint: reset error on entrance to public API (Eric Blake)
- maint: improve error condition style in public API (Eric Blake)
- maint: split long lines in invalidArg errors (Eric Blake)
- maint: move debug statements first in public API (Eric Blake)
- maint: improve debug of libvirt-{qemu,lxc} apis (Eric Blake)
- maint: consistent formatting in libvirt.c (Eric Blake)
- event: improve public API docs (Eric Blake)
- tests: virnetsockettest: Print the error if getifaddrs fails. (Richard W.M. Jones)
- maint: update to latest gnulib (Eric Blake)
- maint: fix typo in error message (Eric Blake)
- interface: Introduce netcfInterfaceObjIsActive (Michal Privoznik)
- examples: Resurrect domsuspend example (Michal Privoznik)
- libxl: correctly handle affinity reset in virDomainPinVcpu[Flags] (Dario Faggioli)
- libxl: implement virDomainPinVcpuFlags (Dario Faggioli)
- libxl: implement virDomainGetVcpuPinInfo (Dario Faggioli)
- virt-login-shell: clean up usage (Eric Blake)
- storage: Avoid forward declaration of virStorageVolDelete (Peter Krempa)
- storage: Add gluster pool filter and fix virsh pool listing (Peter Krempa)
- snapshot: schema: Split out snapshot disk driver definition (Peter Krempa)
- Remove redefinition of bool type when --enable-test-locking (Daniel P. Berrange)
- Set the 'container_ttys' env variable for LXC consoles (Daniel P. Berrange)
- storage: resize vol against real allocated size (Michal Privoznik)
- Support transient attribute on vmware disks (Wout Mertens)
- LXC: Change incorrect error report in lxcContainerPivotRoot (Gao feng)
- Add debug output when registering event handlers (Daniel P. Berrange)
- Remove the event namespace concept (Daniel P. Berrange)
- Associate a dispatch function with the event objects (Daniel P. Berrange)
- Introduce abstract virNetworkEvent class (Daniel P. Berrange)
- Add 'detail' arg to network lifecycle event internals (Daniel P. Berrange)
- Update event demo program to support network events too (Daniel P. Berrange)
- Move examples/domain-events/event-c to examples/object-events (Daniel P. Berrange)
- qemu: add support for -device pvpanic (Hu Tao)
- conf: add support for panic device (Hu Tao)
- conf: introduce generic ISA address (Hu Tao)
- Bump version to 1.2.1 for new dev cycle (Daniel P. Berrange)
- rename virBlkioDeviceWeightPtr to virBlkioDevicePtr (Gao feng)
- rename virBlkioDeviceWeightArrayClear to virBlkioDeviceArrayClear (Gao feng)
- rename virDomainBlkioDeviceWeightParseXML to virDomainBlkioDeviceParseXML (Gao feng)
- storage: show gluster option in virsh --version=long (Eric Blake)
- Added default case with error for object event dispatching (Cédric Bosdonnat)
- Fixed indentation in src/conf/*_event* (Cédric Bosdonnat)
- Added network events to the bridged network driver (Cédric Bosdonnat)
- Add network events to the remote driver (Cédric Bosdonnat)
- Add network events unit tests (Cédric Bosdonnat)
- test driver: implemented network events (Cédric Bosdonnat)
- Added Network events API and virNetworkEventLifecycle. (Cédric Bosdonnat)
- storage_backend_rbd: rename "stat" variable (Michael Chapman)
- If we do not specify a readonly mount, we don't need to re-mount it again. (Chen Hanxiao)
- daemon/remote.c: renamed remoteDispatchDomainEventSend (Cédric Bosdonnat)
- test driver: renamed testDomainEventQueue into testObjectEventQueue (Cédric Bosdonnat)
- Extracted common parts of domain_event.[ch] to object_event.[ch] (Cédric Bosdonnat)
- Split the virObjectEvent and virDomainEvent* to separate them after (Cédric Bosdonnat)
- Renamed virDomainEventTimer to virObjectEventTimer (Cédric Bosdonnat)
- Add object event namespaces for the event IDs (Cédric Bosdonnat)
- Use virObjectEventPtr instead of virDomainEventPtr (Cédric Bosdonnat)
- Create virDomainEventDeviceRemoved and remove the huge union (Cédric Bosdonnat)
- Create virDomainEventBalloonChange to get rid of the huge union (Cédric Bosdonnat)
- Create virDomainEventTrayChange to get rid of the huge union (Cédric Bosdonnat)
- Create virDomainEventDiskChange to get rid of the huge union (Cédric Bosdonnat)
- Create virDomainEventBlockJob to get rid of the huge union (Cédric Bosdonnat)
- Create virDomainEventGraphics to get rid of the huge union (Cédric Bosdonnat)
- Create virDomainEventIOError to get rid of the huge union (Cédric Bosdonnat)
- Create virDomainEventWatchdog to get rid of the huge union (Cédric Bosdonnat)
- Create virDomainEventRTCChange to get rid of the huge union (Cédric Bosdonnat)
- Renamed virDomainEventNewInternal to virDomainEventNew (Cédric Bosdonnat)
- Renamed virDomainEventNew* to virDomainEventLifecycleNew* (Cédric Bosdonnat)
- Create virDomainEventLifecycle to start removing the huge union (Cédric Bosdonnat)
- virObject-ified virDomainEvent (Cédric Bosdonnat)
- Created virObjectEventStateRegisterID (Cédric Bosdonnat)
- Renamed virDomainEventCallbackList* to virObjectEventCallbackList* (Cédric Bosdonnat)
- Renamed virDomainEventState to virObjectEventState (Cédric Bosdonnat)
- Renamed virDomainEventQueue to virObjectEventQueue (Cédric Bosdonnat)
- Renamed virDomainMeta to virObjectMeta (Cédric Bosdonnat)
- Rename virDomainEventCallback to virObjectEventCallback (Cédric Bosdonnat)
- Added domain start/stop/define/undefine event unit tests (Cédric Bosdonnat)
- spec: clean up libvirtd and virtlockd service mgmt (Michael Chapman)
- virtlockd: use common exit path when out-of-memory (Michael Chapman)
- virtlockd: improve initscripts (Michael Chapman)
- virtlockd: improve systemd units (Michael Chapman)
- conf: don't format memtune with unlimited values (Martin Kletzander)
- qemu: Fix minor inconsistency in error message (Martin Kletzander)
- qemu: Report VIR_DOMAIN_MEMORY_PARAM_UNLIMITED properly (Martin Kletzander)
- cgroups: Redefine what "unlimited" means wrt memory limits (Martin Kletzander)
- spec: move driver-specific files to driver subpackages (Jim Fehlig)
- spec: Define hypervisor-specific files together (Jim Fehlig)
- spec: Conditionally specify some hypervisor-specific files (Jim Fehlig)
- spec: Fix files list when building without driver modules (Jim Fehlig)
- spec: Only add libvirt-daemon pre install script if building with qemu (Jim Fehlig)
- spec: Fix unconditional references of nwfilter (Jim Fehlig)
- Cgroup: Replace 'newpath' with 'newPath' (Zhou Yimin)
- Add qxl ram size to ABI stability check (Ján Tomko)
- qemu: Improve error when setting invalid count of vcpus via agent (Peter Krempa)
- qemu: hotplug: Mark 2 private functions as static (Cole Robinson)
- qemu: Fix indentation in qemuTranslateDiskSourcePool (Peter Krempa)
- domainsnapshotxml2xmltest: Add test case for empty driver element (Peter Krempa)
- domainsnapshotxml2xmltest: Add existing files as new tests (Peter Krempa)
- domainsnapshotxml2xml: Move files with conflicting names (Peter Krempa)
- domainsnapshotxml2xmltest: Allow for better testing of snapshots (Peter Krempa)
- domainsnapshotxml2xmltest: Clean up labels and use bool instead of int (Peter Krempa)
- maint: Kill usage of atoi() (Peter Krempa)
- src: Align make output (Michal Privoznik)
- tests: add forgotten boot-strict test files (Laine Stump)
- qemu: add "-boot strict" to commandline whenever possible (Laine Stump)
- qemu: snapshots: Declare supported and unsupported snapshot configs (Peter Krempa)
- qemu: Clear old translated pool source (Peter Krempa)
- qemu: Refactor disk source string formatting (Peter Krempa)
- qemu: Unify formatting of RBD sources (Peter Krempa)
- qemu: Split out NBD command generation (Peter Krempa)
- qemu: Migrate sheepdog source generation into common function (Peter Krempa)
- qemu: Use qemuBuildNetworkDriveURI to handle http/ftp and friends (Peter Krempa)
- qemu: Simplify call pattern of qemuBuildDriveURIString (Peter Krempa)
- qemu: Split out formatting of network disk source URI (Peter Krempa)
- qemu: Refactor qemuTranslateDiskSourcePool (Peter Krempa)
- virsh: improve grammar in error message (Eric Blake)
- qemu: snapshot: Add functions similar to disk source pool translation (Peter Krempa)
- qemu: snapshot: Touch up error message (Peter Krempa)
- conf: Add helper do clear disk source authentication struct (Peter Krempa)
- qemu: snapshot: Detect internal snapshots also for sheepdog and RBD (Peter Krempa)
- conf: Add functions to copy and free network disk source definitions (Peter Krempa)
- snapshot: conf: Use common parsing and formatting functions for source (Peter Krempa)
- conf: Export disk source formatter and parser (Peter Krempa)
- conf: Split out seclabel formating code for disk source (Peter Krempa)
- conf: Clean up virDomainDiskSourceDefFormatInternal (Peter Krempa)
- conf: Support disk source formatting without needing a virDomainDiskDefPtr (Peter Krempa)
- tests: Fix comment for fake storage pool driver (Peter Krempa)
- qemuxml2argv: Add test for disk type='volume' with iSCSI pools (Peter Krempa)
- qemuxml2argv: Add test to verify correct usage of disk type="volume" (Peter Krempa)
- test: Implement fake storage pool driver in qemuxml2argv test (Peter Krempa)
- util: Use new array management macros (Osier Yang)
Cleanups:
- storage: Break long lines and clean up spaces in storage backend header (Peter Krempa)
- event: fix typo in previous patch (Eric Blake)
- Remove stray semicolon after pragma macros (Daniel P. Berrange)
- examples: Remove broken bad example (Peter Krempa)
Thanks everybody who contributed to the release in some way, be it
with bug reports, ideas, patches, reviews, docs or localizations !
Enjoy !
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
10 years, 10 months
[libvirt] [PATCH 0/2] v5: spice: expose the disable file transfer option
by Francesco Romani
Changes v4:
Addressed Christophe's comment and changed the error value.
Addressed Michal's comment and changed the capability is detected
(thanks for the hint on query-command-line-output, I was looking
in the wrong place).
Changes v5:
rebased and squashed (hopefully right this time).
Francesco Romani (2):
spice: detect if qemu can disable file transfer
spice: expose the QEMU disable file transfer option
docs/formatdomain.html.in | 8 +++++
docs/schemas/domaincommon.rng | 11 ++++++
src/conf/domain_conf.c | 31 ++++++++++++++++-
src/conf/domain_conf.h | 10 ++++++
src/libvirt_private.syms | 2 ++
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 9 +++++
tests/qemucapabilitiesdata/caps_1.6.0-1.caps | 1 +
tests/qemucapabilitiesdata/caps_1.6.50-1.caps | 1 +
...emuxml2argv-graphics-spice-agent-file-xfer.args | 9 +++++
...qemuxml2argv-graphics-spice-agent-file-xfer.xml | 40 ++++++++++++++++++++++
.../qemuxml2argv-graphics-spice.args | 5 +--
.../qemuxml2argv-graphics-spice.xml | 1 +
tests/qemuxml2argvtest.c | 9 ++++-
15 files changed, 136 insertions(+), 4 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-agent-file-xfer.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-agent-file-xfer.xml
--
1.8.4.2
10 years, 10 months
[libvirt] [PATCH] fix driver lost after detached a node device
by Jincheng Miao
If nodedev-detach with '--driver', it does not check whether host
currentlly supports vfio passthrough. That will cause the detached
node device failed to bind to vfio driver when iommu is off:
"kernel: vfio-pci: probe of 0000:01:00.0 failed with error -22"
https://bugzilla.redhat.com/show_bug.cgi?id=1046919
So it should check passthrough support before set stub driver.
---
src/qemu/qemu_driver.c | 33 ++++++++++++++++++++++++---------
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index ebb77dc..0e0b170 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -10793,6 +10793,8 @@ qemuNodeDeviceDetachFlags(virNodeDevicePtr dev,
int ret = -1;
virNodeDeviceDefPtr def = NULL;
char *xml = NULL;
+ bool supportsPassthroughKVM = qemuHostdevHostSupportsPassthroughLegacy();
+ bool supportsPassthroughVFIO = qemuHostdevHostSupportsPassthroughVFIO();
virCheckFlags(0, -1);
@@ -10815,22 +10817,35 @@ qemuNodeDeviceDetachFlags(virNodeDevicePtr dev,
goto cleanup;
if (!driverName) {
- /* prefer vfio */
- if (qemuHostdevHostSupportsPassthroughVFIO())
+ /* decide a driver, prefer vfio */
+ if (supportsPassthroughVFIO)
driverName = "vfio";
- else if (qemuHostdevHostSupportsPassthroughLegacy())
+ else if (supportsPassthroughKVM)
driverName = "kvm";
+ else {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("neither VFIO nor kvm device assignment is "
+ "currently supported on this system"));
+ goto cleanup;
+ }
}
- if (!driverName) {
- virReportError(VIR_ERR_INVALID_ARG, "%s",
- _("neither VFIO nor kvm device assignment is "
- "currently supported on this system"));
- goto cleanup;
- } else if (STREQ(driverName, "vfio")) {
+ if (STREQ(driverName, "vfio")) {
+ if (!supportsPassthroughVFIO) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("VFIO device assignment is currently not "
+ "supported on this system"));
+ goto cleanup;
+ }
if (virPCIDeviceSetStubDriver(pci, "vfio-pci") < 0)
goto cleanup;
} else if (STREQ(driverName, "kvm")) {
+ if (!supportsPassthroughKVM) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("kvm device assignment is currently not "
+ "supported on this system"));
+ goto cleanup;
+ }
if (virPCIDeviceSetStubDriver(pci, "pci-stub") < 0)
goto cleanup;
} else {
--
1.8.3.1
10 years, 10 months
[libvirt] [PATCH] qemu: remove memset params array to zero in qemuDomainGetPercpuStats
by Gao feng
the array params is allocated by VIR_ALLOC_N in cmdCPUStats.
it had been set to zero. No need to reset it to zero again,
and this reset here is incorrect too, nparams * ncpus is the
array length not the size of params array.
Signed-off-by: Gao feng <gaofeng(a)cn.fujitsu.com>
---
src/qemu/qemu_driver.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 9f71160..7a329f0 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -15820,7 +15820,6 @@ qemuDomainGetPercpuStats(virDomainObjPtr vm,
if (virCgroupGetCpuacctPercpuUsage(priv->cgroup, &buf))
goto cleanup;
pos = buf;
- memset(params, 0, nparams * ncpus);
/* return percpu cputime in index 0 */
param_idx = 0;
--
1.8.4.2
10 years, 10 months
[libvirt] [PATCH 0/4] CVE-2014-0028: domain events vs. ACL filtering
by Eric Blake
I have pushed the following series to the master branch, as well as
the the backport of patch 4 to all branches impacted by the CVE
(v1.1.0 onwards). Basically, when ACLs permit fine-grained control
of what domains a user can manage, a user that was denied
domain:getattr for a particular domain, or denied
connect:search_domains in general, could use the event registration
API to gain access to domains that should have been hidden from that
user. The patch was reviewed offlist during the time when the
vulnerability was under embargo.
In the process of fixing this, I made quite a few improvements to
the underlying mechanisms for events. Among other things, I
want to switch libvirt over to using server-side filtering rather
than the current implementation of client-side filtering, for
increased efficiency in the case where a hypervisor hosts many
guests but the client only cares about events on a small subset of
those guests. The existing RPC calls for domain events did not
allow this, but the brand new network events had not yet had their
RPC baked with a formal release. At one point, I had tried making
the use of connect:search_networks conditional on whether a
non-NULL network had been requested, which requires server-side
filtering. The final incarnation of the CVE fix no longer bypasses
connect:search_networks for a NULL network, so the first three
patches are now technically unrelated to the CVE fix; but as the
work is already done and reviewed and as it is easier to avoid
bloat in the RPC protocol by getting it right from the beginning,
I still pushed those patches to the master branch. NOTE: if you
were testing network events with libvirt.git or with the 1.2.1
release candidates, you must ensure that you match your client's
use of libvirt.so with the libvirtd - early users of network
events are unable to communicate with the RPC wire representation
that will actually be in 1.2.1 as a result of this series.
I will also be posting a followup series, for application after
1.2.1 is released, which adds server-side filtering of domain
events, as the counterpart of the network event filtering
added in this series. There, we already have existing RPC code
baked into releases, so there is no longer a rush to get the
patches in before a release freezes a mistake.
Eric Blake (4):
event: track callbackID on daemon side of RPC
event: add notion of remoteID for filtering client network events
event: wire up RPC for server-side network event filtering
event: filter global events by domain:getattr ACL [CVE-2014-0028]
daemon/libvirtd.h | 7 +-
daemon/remote.c | 131 +++++++++++++++++--------
src/access/viraccessperm.h | 6 +-
src/conf/domain_event.c | 38 ++++++-
src/conf/domain_event.h | 10 +-
src/conf/network_event.c | 69 ++++++++++++-
src/conf/network_event.h | 18 +++-
src/conf/object_event.c | 212 ++++++++++++++++++++++++++++++++--------
src/conf/object_event.h | 30 +++---
src/conf/object_event_private.h | 31 ++++++
src/libvirt_private.syms | 1 -
src/libxl/libxl_driver.c | 2 +
src/lxc/lxc_driver.c | 2 +
src/network/bridge_driver.c | 1 +
src/qemu/qemu_driver.c | 2 +
src/remote/remote_driver.c | 86 +++++++++-------
src/remote/remote_protocol.x | 23 ++---
src/remote_protocol-structs | 9 +-
src/test/test_driver.c | 6 +-
src/uml/uml_driver.c | 2 +
src/vbox/vbox_tmpl.c | 4 +-
src/xen/xen_driver.c | 2 +
22 files changed, 527 insertions(+), 165 deletions(-)
--
1.8.4.2
10 years, 10 months
[libvirt] [PATCH 0/5] server-side filtering of domain events
by Eric Blake
This work was originally done with the thought that the fix
for CVE-2014-0028 would require server-side filtering to
make the check of connect:search_domains conditional on
whether the user passed NULL or a domain when registering
for an event. The final version of the CVE fix no longer
needs the conditional behavior, so there is no longer a rush
to get this in to 1.2.1; but for 1.2.2, the code changes
offer a nice efficiency gain for the use case of libvirtd
managing lots of domains while a client only cares about
events from a small subset of domains.
While this will not be in 1.2.1 proper, I also tested that
the entire series can be backported without breaking the .so
versioning, if any downstream distro wants to include the
efficiency gain as part of their value added maintenance of
an older version.
Eric Blake (5):
event: dynamically manage server-side RPC domain events
event: server RPC protocol tweaks for domain lifecycle events
event: prepare client to track domain callbackID
event: client RPC protocol tweaks for domain lifecycle events
event: convert remaining domain events to new style
daemon/libvirtd.h | 3 +-
daemon/remote.c | 801 +++++++++++++++++++++++++++++-----------
src/conf/domain_event.c | 78 +++-
src/conf/domain_event.h | 22 ++
src/conf/network_event.c | 6 +-
src/conf/object_event.c | 31 +-
src/conf/object_event_private.h | 6 +-
src/libvirt_internal.h | 7 +-
src/remote/remote_driver.c | 784 ++++++++++++++++++++++++++++++++-------
src/remote/remote_protocol.x | 192 +++++++++-
src/remote_protocol-structs | 92 +++++
11 files changed, 1649 insertions(+), 373 deletions(-)
--
1.8.4.2
10 years, 10 months
[libvirt] [PATCH] BSD: implement nodeGetCPUStats
by Roman Bogorodskiy
I had doubts how to implement that. Looks like the current
implementation is tied to Linux CPU metrics:
user nice system idle iowait
That list is hardcoded into virsh-host.c. FreeBSD has a slightly
different set of metrics:
user nice system intr idle
I.e. it's interrupt time instead of i/o time. I decided to go without
virsh-host.c modification and used VIR_NODE_CPU_STATS_UTILIZATION.
If you know better way of doing that, I'm open for suggestions.
Roman Bogorodskiy (1):
BSD: implement nodeGetCPUStats
src/nodeinfo.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
--
1.8.4.3
10 years, 10 months
[libvirt] [PATCHv2] tests: be more explicit on qcow2 versions in virstoragetest
by Eric Blake
While working on v1.0.5-maint (the branch in use on Fedora 19)
with the host at Fedora 20, I got a failure in virstoragetest.
I traced it to the fact that we were using qemu-img to create a
qcow2 file, but qemu-img changed from creating v2 files by
default in F19 to creating v3 files in F20. Rather than leaving
it up to qemu-img, it is better to write the test to force
testing of BOTH file formats (better code coverage and all).
This patch alone does not fix all the failures in v1.0.5-maint;
for that, we must decide to either teach the older branch to
understand v3 files, or to reject them outright as unsupported.
But for upstream, making the test less dependent on changing
qemu-img defaults is always a good thing.
* tests/virstoragetest.c (testPrepImages): Simplify creation of
raw file; check if qemu supports compat and if so use it.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
v2: rebase to latest; still asking for inclusion in 1.2.1
tests/virstoragetest.c | 32 +++++++++++++++++++++++---------
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index e5c73f5..db0cf1c 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -87,6 +87,8 @@ testPrepImages(void)
{
int ret = EXIT_FAILURE;
virCommandPtr cmd = NULL;
+ char *buf = NULL;
+ bool compat = false;
qemuimg = virFindFileInPath("kvm-img");
if (!qemuimg)
@@ -94,6 +96,18 @@ testPrepImages(void)
if (!qemuimg)
goto skip;
+ /* See if qemu-img supports '-o compat=xxx'. If so, we force the
+ * use of both v2 and v3 files; if not, it is v2 only but the test
+ * still works. */
+ cmd = virCommandNewArgList(qemuimg, "create", "-f", "qcow2",
+ "-o?", "/dev/null", NULL);
+ virCommandSetOutputBuffer(cmd, &buf);
+ if (virCommandRun(cmd, NULL) < 0)
+ goto skip;
+ if (strstr(buf, "compat "))
+ compat = true;
+ VIR_FREE(buf);
+
if (virAsprintf(&absraw, "%s/raw", datadir) < 0 ||
virAsprintf(&absqcow2, "%s/qcow2", datadir) < 0 ||
virAsprintf(&abswrap, "%s/wrap", datadir) < 0 ||
@@ -111,10 +125,8 @@ testPrepImages(void)
goto cleanup;
}
- /* I'm lazy enough to use a shell one-liner instead of open/write/close */
- virCommandFree(cmd);
- cmd = virCommandNewArgList("sh", "-c", "printf %1024d 0 > raw", NULL);
- if (virCommandRun(cmd, NULL) < 0) {
+ if (virAsprintf(&buf, "%1024d", 0) < 0 ||
+ virFileWriteStr("raw", buf, 0600) < 0) {
fprintf(stderr, "unable to create raw file\n");
goto cleanup;
}
@@ -126,9 +138,10 @@ testPrepImages(void)
/* Create a qcow2 wrapping relative raw; later on, we modify its
* metadata to test other configurations */
virCommandFree(cmd);
- cmd = virCommandNewArgList(qemuimg, "create", "-f", "qcow2",
- "-obacking_file=raw,backing_fmt=raw", "qcow2",
- NULL);
+ cmd = virCommandNewArgList(qemuimg, "create", "-f", "qcow2", NULL);
+ virCommandAddArgFormat(cmd, "-obacking_file=raw,backing_fmt=raw%s",
+ compat ? ",compat=0.10" : "");
+ virCommandAddArg(cmd, "qcow2");
if (virCommandRun(cmd, NULL) < 0)
goto skip;
/* Make sure our later uses of 'qemu-img rebase' will work */
@@ -146,8 +159,8 @@ testPrepImages(void)
* can correctly avoid insecure probing. */
virCommandFree(cmd);
cmd = virCommandNewArgList(qemuimg, "create", "-f", "qcow2", NULL);
- virCommandAddArgFormat(cmd, "-obacking_file=%s,backing_fmt=qcow2",
- absqcow2);
+ virCommandAddArgFormat(cmd, "-obacking_file=%s,backing_fmt=qcow2%s",
+ absqcow2, compat ? ",compat=1.1" : "");
virCommandAddArg(cmd, "wrap");
if (virCommandRun(cmd, NULL) < 0)
goto skip;
@@ -172,6 +185,7 @@ testPrepImages(void)
ret = 0;
cleanup:
+ VIR_FREE(buf);
virCommandFree(cmd);
if (ret)
testCleanupImages();
--
1.8.4.2
10 years, 10 months
[libvirt] [PATCH] docs: mention maintenance branches
by Eric Blake
Mitre tried to assign us two separate CVEs for the fix for
https://bugzilla.redhat.com/show_bug.cgi?id=1047577, on the
grounds that the fixes were separated by more than an hour
and thus triggered different hourly snapshots. But we
explicitly do NOT want to treat transient security bugs as
CVEs if they can only be triggered by patches in libvirt.git
but where the problem is cleaned up before a formal release.
Meanwhile, I noticed that while our wiki mentioned maintenance
branches and releases, our formal documentation did not.
* docs/downloads.html.in: Contrast hourly snapshots with
maintenance branches.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Doc only, so suitable for 1.2.1 if it gets reviewed in time.
docs/downloads.html.in | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/docs/downloads.html.in b/docs/downloads.html.in
index 83b8751..ef03567 100644
--- a/docs/downloads.html.in
+++ b/docs/downloads.html.in
@@ -22,7 +22,9 @@
<p>
Once an hour, an automated snapshot is made from the git server
source tree. These snapshots should be usable, but we make no guarantees
- about their stability:
+ about their stability; furthermore, they should NOT be
+ considered formal releases, and they may have transient security
+ problems that will not be assigned a CVE:
</p>
<ul>
@@ -30,6 +32,27 @@
<li><a href="http://libvirt.org/sources/libvirt-git-snapshot.tar.gz">libvirt.org HTTP server</a></li>
</ul>
+ <h2><a name="maintenance">Maintenance releases</a></h2>
+ <p>
+ In the git repository are several stable maintenance branches,
+ matching the
+ pattern <code>v<i>major</i>.<i>minor</i>.<i>micro</i>-maint</code>;
+ these branches are forked off the corresponding
+ <code>v<i>major</i>.<i>minor</i>.<i>micro</i></code> formal
+ release, and may have further releases of the
+ form <code>v<i>major</i>.<i>minor</i>.<i>micro</i>.<i>rel</i></code>.
+ These maintenance branches should only contain bug fixes, and no
+ new features, backported from the master branch, and are
+ supported. These maintenance branches are considered during
+ CVE analysis.
+ </p>
+
+ <p>
+ For more details about contents of maintenance releases, see
+ <a href="http://wiki.libvirt.org/page/Maintenance_Releases">the
+ wiki page</a>.
+ </p>
+
<h2><a name="git">GIT source repository</a></h2>
<p>
--
1.8.4.2
10 years, 10 months