[libvirt] Release of libvirt-1.2.17
by Daniel Veillard
So as planned I tagged it in git, development is open again, I signed
tarballs and rpms, they are at the usual place:
ftp://libvirt.org/libvirt/
I also made a libvirt-python-1.2.17 release which you can find at
ftp://libvirt.org/libvirt/python/
this is a rather large release, even if the Admin APIs didn't fully made it
there is 375 commits, lot of refactoring and code hardening, and a fair
amount of pure bug fixes:
Features:
- numerous improvements and refactoring of the parallels driver(Maxim Nestratov)
- hardening of vcpu code (Peter Krempa)
- hardening of migration code (Jiri Denemark)
Documentation:
- Fix typo incomaptible -> incompatible (Andrea Bolognani)
- docs: Clarification for when allowed to use 'lun' for "volume" (John Ferlan)
- docs: document when pcie-root/dmi-to-pci-bridge support was added (Laine Stump)
- docs: Fix trivial copy-paste error (Martin Kletzander)
- docs: Properly mark acl.html dependencies (Michal Privoznik)
- docs: Correct typos in scsi hostdev and address elements (Eric Farman)
- docs: Fix XML schema handling of LUN address in hostdev tag (Eric Farman)
- virNetSocketRemoveIOCallback: Be explicit about unref (Michal Privoznik)
- man: clarify usage of virsh blockcopy with --xml (Ján Tomko)
- docs: Clarify that attribute name is not used for vhostuser (Maxime Leroy)
- maint: document use of zanata for translations (Eric Blake)
- qemu: Capitalize "storage" in qemuDomainAttachUSBMassStorageDevice() (Andrea Bolognani)
- docs: php: remove reference to Red Hat (Ján Tomko)
- monitor: Move documentation for qemuMonitorGetBalloonInfo (Peter Krempa)
Portability:
- admin: Fix mingw build by reordering includes (Martin Kletzander)
- util: process: fix build on FreeBSD (Roman Bogorodskiy)
- util: Properly return error from virGetUserID and virGetGroupID stubs (Peter Krempa)
- build: silence ar warnings on rawhide (Eric Blake)
- util: process: @pid in virProcessSetAffinity's BSD impl is not unused (Peter Krempa)
- libxl: load on FreeBSD (Roman Bogorodskiy)
Bug Fixes:
- phyp: Resolve Coverity FORWARD_NULL (John Ferlan)
- util: Resolve Coverity FORWARD_NULL (John Ferlan)
- util: Resolve Coverity FORWARD_NULL (John Ferlan)
- util: Resolve Coverity FORWARD_NULL (John Ferlan)
- lxc: Don't pass a local variable address randomly (Michal Privoznik)
- qemu: Resolve Coverity DEADCODE (John Ferlan)
- qemu: Audit memory size with memory hotplug operations (Peter Krempa)
- qemu: Avoid using ".(null)" in UNIX socket path (Jiri Denemark)
- qemu: agent: Don't automatically disable CPU0 via guest agent (Peter Krempa)
- qemu: End job even if exiting monitor after OpenGraphics(FD) fails (Luyao Huang)
- qemu: properly free addresses on non-serial chardev unplug (Ján Tomko)
- qemu: fix address allocation on chardev attach (Luyao Huang)
- libxl: Set def->vcpus after successfully modifying live vcpu count (Jim Fehlig)
- libxl: don't remove persistent domain on start failure (Jim Fehlig)
- libxl: don't overwrite domain state from statedir config (Jim Fehlig)
- qemu: Add missing on_crash lifecycle type (John Ferlan)
- Use the correct symbol for 'onCrash' (John Ferlan)
- mpath: Don't allow more than one mpath pool at a time (John Ferlan)
- mpath: Update path in CheckPool function (John Ferlan)
- conf: Validate disk lun using correct types (John Ferlan)
- Storage: Introduce shadow vol for refresh while the main vol builds. (Prerna Saxena)
- conf: storage: Fix duplicate check for gluster pools (Peter Krempa)
- qemu: event: Properly handle spice events (Peter Krempa)
- Revert "Introduce QEMU_CAPS_ARM_VIRT_PCI" (Peter Krempa)
- qemu: Close the agent connection only on agent channel events (Peter Krempa)
- storage: Set correct vol->type at VolCreate (John Ferlan)
- qemu: Fix assignment of the default spicevmc channel name (Jiri Denemark)
- qemu: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- test: qemu: Make sure that wr_highest_offset_valid gets set properly (Peter Krempa)
- vz: Fix build after recent commit (Peter Krempa)
- qemuBuildMemoryBackendStr: Honour passed @pagesize (Michal Privoznik)
- qemuBuildMemoryBackendStr: Fix hugepages lookup process (Michal Privoznik)
- conf: Format scheduler priority when it is zero (Luyao Huang)
- qemu: Avoid removing persistent config if migration fails (Luyao Huang)
- scsi: Force error for SCSI pools on virStorageBackendSCSIFindLUs failure (John Ferlan)
- conf: Enforce scheduler name when parsing XML (Peter Krempa)
- qemu: caps: Fix syntax-check failure in version based capabilities (Peter Krempa)
- libxl: avoid freeing an uninitialised bitmap (Ian Campbell)
- virNetServerServiceClose: Don't leak sockets (Michal Privoznik)
- virNetSocket: Fix @watch corner case (Michal Privoznik)
- daemonSetupNetworking: Don't leak services (Michal Privoznik)
- scsi: Adjust return status from getBlockDevice (John Ferlan)
- qemuMigrationDriveMirror: Force raw format for NBD (Michal Privoznik)
- qemu: Jump to correct label in qemuDomainPinIOThread (Peter Krempa)
- conf: Fix virDomainObjGetDefs when getting persistent config on a live vm (Peter Krempa)
- rpc: Actually increase reference count on @srv in virNetDaemonAddServer (Peter Krempa)
- parallels: Fix false error messages in libvirt log (Mikhail Feoktistov)
- parallels: Fix initialization of buflen variable in each loop iteration (Mikhail Feoktistov)
- nodedev: update netdev feature bits before each dumpxml (Laine Stump)
- tests: Follow virnetserver to virnetdaemon transition (Michal Privoznik)
- daemon: Distribute admin_server.h (Michal Privoznik)
- daemon/Makefile: Add forgotten dependency (Michal Privoznik)
- util: virfile: Fix 'unknown cause' error if NFS mount point creation fails (Erik Skultety)
- util: Fix Coverity RESOURCE_LEAK (John Ferlan)
- storage: Generate correct parameters for CIFS (John Ferlan)
- rpc: Fix possible crash when MDNSAddEntry fails (Martin Kletzander)
- qemu: emulatorpin: Don't reset pinning when pinning to all cpus (Peter Krempa)
- storage: Disallow wiping an extended disk partition (John Ferlan)
- storage: Need to set secrettype for direct iscsi disk volume (John Ferlan)
- scsi: Need to translate disk source pool in config attach path (John Ferlan)
- network: escape quotes for dsmasq conf contents (Shivaprasad G Bhat)
- virsh: change-media: Fix behavior with --update without a source (Peter Krempa)
- rpc: Fix reference counting around virNetSocketAddIOCallback (Daniel P. Berrange)
- rpc: Don't use unrelated value as privateData of client (Daniel P. Berrange)
- mdns: Set error when failing due to missing avahi (Martin Kletzander)
- qemu: Update balloon info only if job is allowed (Peter Krempa)
- conf: Fix mistakes in pointer usage in virDomainObjGetDefs (Peter Krempa)
- check if console/channel PTY is null before attempting to open (Shivaprasad G Bhat)
- virnetdev: fix moving of 802.11 phys (Lubomir Rintel)
- util: process: Refactor and fix virProcessSetAffinity (Peter Krempa)
- util: Clear output broadcast address before filling it in (Martin Kletzander)
- virsh: Fix Ctrl-C behavior when watching a job (Jiri Denemark)
- libxl: Unbreak vcpu pinning (Peter Krempa)
- qemu: Fix possible crash in qemuProcessSetVcpuAffinities (Peter Krempa)
- qemu: Do not release device address on successful RNG attach (Luyao Huang)
- qemu: Need to return status of RNG device removal (Luyao Huang)
- test: fix IP address range failure test (Laine Stump)
- storage: RBD: do not return error when deleting non-existent volume (Erik Skultety)
- storage: Don't update volume objs list before we successfully create one (Erik Skultety)
- nwfilter: Fix sscanf off-by-one error in virNWFilterSnoopLeaseFileLoad (Erik Skultety)
- virsh: Fix printing of XML for pool-create-as (John Ferlan)
Improvements:
- conf: qemu: Taint VMs using custom device tree blob (Peter Krempa)
- conf: audit: Audit physical memory size rather than balloon request (Peter Krempa)
- libxl: honor domainGetXMLDesc() --inactive flag (Jim Fehlig)
- qemu: event: Clean up VNC monitor handling (Peter Krempa)
- qemuxml2argv: Remove Haswell CPU from unrelated tests (Jiri Denemark)
- Revert "Change livbirt version to 1.3.0 for the next release" (Martin Kletzander)
- Temporarily disable admin API (Martin Kletzander)
- spec: Remove admin package specification (Martin Kletzander)
- qemu: ignore assumptions about hotplug requirement when address is from config (Laine Stump)
- qemu: always permit PCI devices to be manually assigned to a PCIe bus (Laine Stump)
- qemu: refactor qemuBuildControllerDevStr to eliminate future duplicate code (Laine Stump)
- qemu: monitor: Remove qemuMonitorGetBlockExtent (Peter Krempa)
- qemu: Refactor qemuDomainGetBlockInfo (Peter Krempa)
- qemu: monitor: Open-code retrieval of wr_highest_offset (Peter Krempa)
- internal: Introduce virCheckNonEmptyStringArgGoto and reuse it (Peter Krempa)
- vz: add memory statistics (Nikolay Shirokovskiy)
- vz: add vcpu statistics (Nikolay Shirokovskiy)
- vz: cleanup, make in par net device lookup functions (Nikolay Shirokovskiy)
- vz: add net dev statistiscs (Nikolay Shirokovskiy)
- docs: Don't keep temporary files around (Michal Privoznik)
- test: Refactor testNodeGetCPUMap (Peter Krempa)
- test: Refactor vcpu pinning and vcpu info retrieval (Peter Krempa)
- test: Refactor testDomainSetVcpusFlags (Peter Krempa)
- test: Refactor test driver domain object retrieval (Peter Krempa)
- test: Drop locked access to testDriver->domains (Peter Krempa)
- test: Finalize removal of locking from driver->eventState (Peter Krempa)
- test: Refactor test driver event sending (Peter Krempa)
- test: Use atomic access to @nextDomID in struct virTestDriver (Peter Krempa)
- test: Annotate few fields of testDriver structure (Peter Krempa)
- test: Extract common parts of test driver data allocation (Peter Krempa)
- test: Extract code to free testDriver into testDriverFree (Peter Krempa)
- test: turn 'defaultConn' into a pointer (Peter Krempa)
- test: Rename testConn to testDriver (Peter Krempa)
- vz: Adapt to driver rename (Michal Privoznik)
- json: enhance parser test (Eric Blake)
- json: even stricter trailing garbage detection (Eric Blake)
- json: reject trailing garbage (Eric Blake)
- json: reject javascript comments (Eric Blake)
- json: cope with older yajl semantics (Eric Blake)
- vz: implementation of attach/detach network devices (Mikhail Feoktistov)
- Test for the new watchdog model diag288 (Boris Fiuczynski)
- Support for the new watchdog model diag288 (Boris Fiuczynski)
- Test for the new watchdog action inject-nmi (Boris Fiuczynski)
- Support for a new watchdog action inject-nmi (Boris Fiuczynski)
- vircapstest: Properly report error for failed tests (Michal Privoznik)
- conf: Adjust invalid secrettype setting during parse (John Ferlan)
- conf: improve the way we format blkiotune and cputune (Luyao Huang)
- Improve some errors for openconsole/channel (Luyao Huang)
- storage: Force setting of disk format type (John Ferlan)
- docs: Adjust Disk storage rng (John Ferlan)
- Convert SCSI logical unit from unsigned int to unsigned long long (Eric Farman)
- Print SCSI address attributes bus, target, unit as unsigned integer (Eric Farman)
- Read SCSI address attributes bus, target, unit as positive integer (Eric Farman)
- qemu: simplify json parsing (Eric Blake)
- json: make it easier to type-check when getting from object (Eric Blake)
- json: fully parse input string (Eric Blake)
- test: Switch to reference counting with testDomObjFromDomain (Peter Krempa)
- test: Reuse virDomainObjGetOneDef in testDomainGetVcpusFlags (Peter Krempa)
- virsh: blockcopy: Report error if the copy job fails (Peter Krempa)
- Introduce QEMU_CAPS_ARM_VIRT_PCI (Pavel Fedin)
- update sheepdog client] update sheepdog client path (Vasiliy Tolstov)
- qemu: cancel drive mirrors when p2p connection breaks (Jiri Denemark)
- qemu: Refactor qemuMigrationWaitForCompletion (Jiri Denemark)
- qemu: Don't pass redundant job name around (Jiri Denemark)
- qemu: Refactor qemuMigrationUpdateJobStatus (Jiri Denemark)
- qemu: Refactor qemuDomainGetJob{Info,Stats} (Jiri Denemark)
- qemu: Do not poll for spice migration status (Jiri Denemark)
- qemu_monitor: Wire up SPICE_MIGRATE_COMPLETED event (Jiri Denemark)
- qemu: Use domain condition for asyncAbort (Jiri Denemark)
- qemu: Cancel disk mirrors after libvirtd restart (Jiri Denemark)
- qemu: Refactor qemuMonitorBlockJobInfo (Jiri Denemark)
- qemu: Make qemuMigrationCancelDriveMirror usable without async job (Jiri Denemark)
- Pass domain object to private data formatter/parser (Jiri Denemark)
- qemu: Don't mess with disk->mirrorState (Jiri Denemark)
- qemu: Abort migration early if disk mirror failed (Jiri Denemark)
- qemu: Cancel storage migration in parallel (Jiri Denemark)
- qemu: Use domain condition for synchronous block jobs (Jiri Denemark)
- qemu: Properly report failed migration (Jiri Denemark)
- qemu: Introduce qemuBlockJobUpdate (Jiri Denemark)
- conf: Introduce per-domain condition variable (Jiri Denemark)
- lib: setvcpus: Remove bogus flag check (Peter Krempa)
- virsh: selective block device migration (Pavel Boldin)
- qemu: migration: selective block device migration (Pavel Boldin)
- util: add virTypedParamsAddStringList (Pavel Boldin)
- util: virTypedParams{Filter,GetStringList} (Pavel Boldin)
- util: multi-value parameters in virTypedParamsAdd* (Pavel Boldin)
- util: multi-value virTypedParameter (Pavel Boldin)
- virDomainDiskGetSource: Mark passed disk as 'const' (Michal Privoznik)
- conf: Move vcpu info parsing code into a separate function (Peter Krempa)
- qemu: 'privileged' flag is not really configuration (Peter Krempa)
- qemu: Reuse virDomainObjGetDefs in qemuDomainGetMemoryParameters (Peter Krempa)
- qemu: Refactor qemuDomainGetMemoryParameters (Peter Krempa)
- qemu: Refactor qemuDomainSetNumaParameters (Peter Krempa)
- qemu: Simplify qemuDomainSetInterfaceParameters by using virDomainObjGetDefs (Peter Krempa)
- qemu: Simplify qemuDomainGetVcpusFlags by using virDomainObjGetOneDef (Peter Krempa)
- qemu: Simplify qemuDomainGetEmulatorPinInfo by using virDomainObjGetOneDef (Peter Krempa)
- qemu: Simplify qemuDomainGetVcpuPinInfo by using virDomainObjGetOneDef (Peter Krempa)
- qemu: Simplify qemuDomainGetNumaParameters by using virDomainObjGetOneDef (Peter Krempa)
- qemu: Simplify qemuDomainGetInterfaceParameters by using virDomainObjGetOneDef (Peter Krempa)
- conf: Introduce helper to help getting correct def for getter functions (Peter Krempa)
- qemu: implement address for isa-serial (James Cowgill)
- qemu: Add a check for slot and base dimm address conflicts (Luyao Huang)
- daemon: Add the admin service to the admin server only if it was allocated (Peter Krempa)
- remove redundant condition (Ján Tomko)
- virSysinfo: Introduce SMBIOS type 2 support (Michal Privoznik)
- qemu: Report all supported machine types in capabilities (Jiri Denemark)
- tests: Sort EXTRA_DIST in the Makefile (Michal Privoznik)
- daemon: Don't just include admin RPC (Michal Privoznik)
- parallels: substitute parallels with vz spec file and Makefile (Maxim Nestratov)
- parallels: rename all parallels files and driver directory to vz (Maxim Nestratov)
- parallels: substitute parallels with vz in strings (Maxim Nestratov)
- parallels: change parallels prefixes to vz (Maxim Nestratov)
- virfile: virDirCreate: Insert blank lines to assure slightly better readability (Erik Skultety)
- util: virDirCreate: Child now exits with positive errno-code (Erik Skultety)
- lxc: set nosuid+nodev+noexec flags on /proc/sys mount (Eric W. Biederman)
- lxc: Rename daemon to dmn (Martin Kletzander)
- Revert "rpc: Add virNetServerGetNClients" (Martin Kletzander)
- Revert "admin: Add virAdmHello function" (Martin Kletzander)
- Change livbirt version to 1.3.0 for the next release (Martin Kletzander)
- Example virt-admin (Martin Kletzander)
- admin: Add virAdmHello function (Martin Kletzander)
- rpc: Add virNetServerGetNClients (Martin Kletzander)
- Add support for admin API in libvirt daemon (Martin Kletzander)
- Add configuration options for permissions on daemon's admin socket (Martin Kletzander)
- Add XML files with admin API specification (Martin Kletzander)
- Add libvirt-admin library (Martin Kletzander)
- Add admin error domain (Martin Kletzander)
- Build client headers for admin protocol (Martin Kletzander)
- Add admin protocol (Martin Kletzander)
- Teach gendispatch how to handle admin dispatching files (Martin Kletzander)
- tests: Adapt virnetservertest to daemon refactor (Martin Kletzander)
- Move daemon-related parts of virNetServer to virNetDaemon (Martin Kletzander)
- lxc: properly clean up qemu-nbd (Cédric Bosdonnat)
- Add virProcessGetPids to get all tasks of a process (Cédric Bosdonnat)
- storage: Adjust command arglist for gluster (John Ferlan)
- storage: Fix the schema and add tests for cifs pool (John Ferlan)
- configure: Remove check for pkcheck_supports_uid (Guido Günther)
- tests: Use libvirt properly with initialization and error dispatching (Martin Kletzander)
- Generate JSON with mDNS entries only when built --with-avahi (Martin Kletzander)
- build: Remove unnecessarily repeated rules for syms -> def (Martin Kletzander)
- qemu: monitor: Add memory balloon support for virtio-ccw (Boris Fiuczynski)
- getOldStyleBlockDevice: Adjust formatting (Michal Privoznik)
- getNewStyleBlockDevice: Adjust formatting (Michal Privoznik)
- qemu caps: spell queue (Ján Tomko)
- qemu: Do not support 'serial' scsi-block 'lun' devices (John Ferlan)
- virCapabilitiesDomainDataLookup: Produce saner error message (Michal Privoznik)
- libxl: Add timestamp to the libxl driver log. (Anthony PERARD)
- qemu: update netdevs of the same mac addrs correctly (zhang bo)
- virsysinfo: s/system/sysdef/ (Michal Privoznik)
- cmdNetworkList: Introduce --name, --uuid, --table (Michal Privoznik)
- cmdNetworkList: switch to FILTER (Michal Privoznik)
- qemuBuildDriveStr: s/virBufferEscapeString/virBufferAsprintf/ (Michal Privoznik)
- virQEMUCapsArch: openrisc vs or32 (Michal Privoznik)
- virSysinfoDef: Exempt SYSTEM variables (Michal Privoznik)
- virSysinfoDef: Exempt BIOS variables (Michal Privoznik)
- tests: Distribute virnetserverdata (Michal Privoznik)
- schema: use arch list from basictypes for os arch attribute (James Cowgill)
- util: add virJSONValueCopy (Martin Kletzander)
- qemu: add multiqueue vhost-user support (Maxime Leroy)
- qemu: Add capability for vhost-user multiqueue (Martin Kletzander)
- conf: Ignore multiqueue with one queue. (Martin Kletzander)
- util: Make virProcessGetAffinity more readable and fix coverity warning (Peter Krempa)
- apibuild: Generate macro/@string attribute (Jiri Denemark)
- rpc: add testing of RPC JSON (de)serialization (Daniel P. Berrange)
- rpc: add API for checking IPv4/6 availability (Daniel P. Berrange)
- rpc: allow selection of TCP address family (Daniel P. Berrange)
- virNumaSetPagePoolSize: Produce friendlier error message (Michal Privoznik)
- logical: Fix typo in error message (John Ferlan)
- conf: fix domaincommon.rng to accept network name with quotes (Shivaprasad G Bhat)
- parallels: treat block devices as disks for containers (Maxim Nestratov)
- parallels: report SATA bus type for container block devices disks (Maxim Nestratov)
- parallels: process '/' mount point correctly for containers (Maxim Nestratov)
- parallels: add isCt parameter to prlsdkGetDiskInfo and prlsdkAddDisk (Maxim Nestratov)
- parallels: add block device statistics to driver (Nikolay Shirokovskiy)
- qemu: caps: Advertise arm 32-on-64 KVM option (Cole Robinson)
- qemu: caps: qemu-system-aarch64 supports armv7l (Cole Robinson)
- qemu: command: Support arm 32-on-64 KVM with -cpu aarch64=off (Cole Robinson)
- parallels: return only success from PCS event handler (Nikolay Shirokovskiy)
- parallels: simplify event types discrimination (Nikolay Shirokovskiy)
- utiltest: Use int8_t instead of char. (Michal Privoznik)
- Turn qemuMonitorFindBalloonObjectPath into a void function (Ján Tomko)
- Do not access the domain definition in qemuMonitorFindBalloonObjectPath (Ján Tomko)
- Only call SetMemoryStatsPeriod for virtio memballoon (Ján Tomko)
- Check for balloon model in qemuDomainSetMemoryStatsPeriod (Ján Tomko)
- Only call qemuMonitorGetMemoryStats for virtio memballoon (Ján Tomko)
- Invert the condition in qemuDomainMemoryStats (Ján Tomko)
- Add endjob label to qemuDomainMemoryStats (Ján Tomko)
- Remove path argument from qemuMonitorJSONFindLinkPath (Ján Tomko)
- Introduce qemuMonitorJSONFindLinkPath (Ján Tomko)
- Move qemuMonitorFindObjectPath to qemu_monitor_json (Ján Tomko)
- rpc: Make virNetServerAddClient function dynamic (Daniel P. Berrange)
- storage: Add check for valid FS types in checkPool callback (John Ferlan)
- storage: FS backend adjust error message on error path (John Ferlan)
- storage: Refactor storage pool type checks (John Ferlan)
- qemu: Check for qemu capability when calling virDomainGetBlockIoTune() (Martin Kletzander)
- qemu: Refactor qemuDomainSetVcpusFlags by reusing virDomainObjGetDefs (Peter Krempa)
- qemu: Refactor qemuDomainGetEmulatorPinInfo by reusing virDomainObjGetDefs (Peter Krempa)
- qemu: Refactor qemuDomainPinEmulator by reusing virDomainObjGetDefs (Peter Krempa)
- qemu: Refactor qemuDomainGetVcpuPinInfo by reusing virDomainObjGetDefs (Peter Krempa)
- qemu: Refactor qemuDomainPinVcpuFlags by reusing virDomainObjGetDefs (Peter Krempa)
- qemu: Refactor qemuDomainSetBlkioParameters by reusing virDomainObjGetDefs (Peter Krempa)
- qemu: Refactor qemuDomainChgIOThread by reusing virDomainObjGetDefs (Peter Krempa)
- qemu: Refactor qemuDomainPinIOThread by reusing virDomainObjGetDefs (Peter Krempa)
- qemu: Refactor qemuDomainGetIOThreadInfo by reusing virDomainObjGetDefs (Peter Krempa)
- qemu: Refactor qemuDomainGetVcpusFlags by reusing virDomainObjGetDefs (Peter Krempa)
- qemu: Refactor qemuDomainSetMemoryStatsPeriod by reusing virDomainObjGetDefs (Peter Krempa)
- qemu: Refactor qemuDomainSetMemoryFlags by reusing virDomainObjGetDefs (Peter Krempa)
- conf: Add new helpers to resolve virDomainModificationImpact to domain defs (Peter Krempa)
- libxl: Don't remove vcpu pin definition in libxlDomainCleanup (Peter Krempa)
- Revert "cputune: Support cputune for xend driver" (Peter Krempa)
- qemu: libxl: vcpupin: Don't reset pinning when pinning to all pcpus (Peter Krempa)
- lib: virDomainPinIOThread: Remove spurious overflow check (Peter Krempa)
- conf: Store cpu count as unsigned int (Peter Krempa)
- qemu: Refactor qemuDomainGetInfo (Peter Krempa)
- qemu: Add helper to update domain balloon size and refactor usage places (Peter Krempa)
- qemu: process: Update current balloon state to maximum on vm startup (Peter Krempa)
- Always add 'console' matching the 'serial' device (Ján Tomko)
- qemu: process: Refactor setup of memory ballooning (Peter Krempa)
- qemu: monitor: Make qemuMonitorSetBalloon operate on unsinged long long (Peter Krempa)
- util: Add macro to overflow check integer assignments (Peter Krempa)
- libxl: Refactor libxlDomainGetVcpuPinInfo (Peter Krempa)
- libxl: Reuse virBitmapToData in libxlDomainSetVcpuAffinities (Peter Krempa)
- qemu: Refactor qemuDomainHelperGetVcpus by reusing virBitmapToDataBuf (Peter Krempa)
- qemu: Reuse virBitmapToDataBuf in qemuDomainGetEmulatorPinInfo (Peter Krempa)
- qemu: Use virBitmapToDataBuf in qemuDomainGetVcpuPinInfo (Peter Krempa)
- util: bitmap: Add virBitmapToDataBuf that does not allocate the buffer (Peter Krempa)
- conf: Move pinning information definition closer to the usage place (Peter Krempa)
- conf: Refactor emulatorpin handling (Peter Krempa)
- parallels: set virtType depending on driver name (Maxim Nestratov)
- parallels: recommend to connect to vz:///system when connection fails (Maxim Nestratov)
- parallels: increment the number of connection drivers (Maxim Nestratov)
- parallels: add a new vz connection driver and hypervisor structures (Maxim Nestratov)
- parallels: accept vz as a driver uri and name (Maxim Nestratov)
- parallels: add new guest capabilities assigned to vz driver (Maxim Nestratov)
- parallels: use newly introduced VIR_DOMAIN_VIRT_VZ (Maxim Nestratov)
- parallels: introduce vz driver constant and string (Maxim Nestratov)
- audit: Audit number of iothreads at domain startup (Luyao Huang)
- util: report all address range errors in virSocketAddrGetRange() (Laine Stump)
- network: cleanup range loop in networkDnsmasqConfContents (Laine Stump)
- network: validate DHCP ranges are completely within defined network (Laine Stump)
- Simplify virNodeCountThreadSiblings (Ján Tomko)
- Report errors in virNodeCountThreadSiblings (Ján Tomko)
- virsh: Move error messages inside vshCommandOpt*() functions (Andrea Bolognani)
- virsh: Pass vshControl to all vshCommandOpt*() calls (Andrea Bolognani)
- virsh: Make vshCommandOptScaledInt() use vshCommandOpt() (Andrea Bolognani)
- virsh: Improve vshCommandOptTimeoutToMs() (Andrea Bolognani)
- virsh: Use standard error messages in vshCommandOptTimeoutToMs() (Andrea Bolognani)
- tests: Add a bunch of new tests to virsh-optparse (Andrea Bolognani)
- maint: update to latest gnulib (Eric Blake)
- spec: fixes for recently introduced libxl conf files (Jim Fehlig)
- virsh: make negative values with vol-resize more convenient (Ján Tomko)
- qemu: Automatically add <panic> element for pSeries guests. (Andrea Bolognani)
- qemu: Allow panic device for pSeries guests (Andrea Bolognani)
- qemu: Improve error message for missing QEMU_CAPS_DEVICE_PANIC. (Andrea Bolognani)
- Post-release version bump to 1.2.17 (Daniel P. Berrange)
Cleanups:
- qemu: monitor: Fix indentation in qemuMonitorJSONGetOneBlockStatsInfo (Peter Krempa)
- vz_utils: Reformat (Michal Privoznik)
- vz_storage: Reformat (Michal Privoznik)
- vz_sdk: Reformat (Michal Privoznik)
- vz_network: Reformat (Michal Privoznik)
- vz_driver: Reformat (Michal Privoznik)
- test: Drop unused attribute @path from testDriver struct (Peter Krempa)
- test: Drop useless forward declaration (Peter Krempa)
- vz: fix syntax-check errors (Dmitry Guryanov)
- virQEMUCapsComputeCmdFlags: Indent correctly (Michal Privoznik)
- qemuMigrationBeginPhase: Fix function header indentation (Michal Privoznik)
- qemu: Fix double space in error message in qemuDomainGetVcpusFlags (Peter Krempa)
- libvirt.spec: Don't expect virt-admin in libvirt-admin yet (Michal Privoznik)
- netserver: Remove duplicate forward declaration (Martin Kletzander)
- Revert "Example virt-admin" (Martin Kletzander)
- apibuild: Fix indentation (Jiri Denemark)
- parallels: fix formatting errors in parallels driver (Dmitry Guryanov)
- storage: Remove extraneous @conn from function comments (John Ferlan)
- remote: fix odd comma operator (Eric Blake)
- maint: remove incorrect apostrophes from 'its' (Ján Tomko)
Thanks everybody for the help bringing those releases, be it with ideas
bug report, patches, doc, reviews, etc...
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/
9 years, 4 months
[libvirt] [PATCH] Revert "Introduce QEMU_CAPS_ARM_VIRT_PCI"
by Peter Krempa
The capability was not used up to the feature freeze.
This reverts commit 7f3515b4bb677d0ead1887547efc844e4761268a.
---
src/qemu/qemu_capabilities.c | 4 ----
src/qemu/qemu_capabilities.h | 1 -
2 files changed, 5 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index e7002a3..27686c3 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -287,7 +287,6 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"aarch64-off",
"vhost-user-multiqueue", /* 190 */
- "arm-virt-pci",
);
@@ -1337,9 +1336,6 @@ virQEMUCapsComputeCmdFlags(const char *help,
virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC_SHARE_POLICY);
}
- if (version >= 2003000)
- virQEMUCapsSet(qemuCaps, QEMU_CAPS_ARM_VIRT_PCI);
-
return 0;
}
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index f4180a8..30aa504 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -230,7 +230,6 @@ typedef enum {
QEMU_CAPS_DEVICE_PCI_SERIAL = 188, /* -device pci-serial */
QEMU_CAPS_CPU_AARCH64_OFF = 189, /* -cpu ...,aarch64=off */
QEMU_CAPS_VHOSTUSER_MULTIQUEUE = 190, /* vhost-user with -netdev queues= */
- QEMU_CAPS_ARM_VIRT_PCI = 191, /* ARM 'virt' machine has PCI bus */
QEMU_CAPS_LAST, /* this must always be the last item */
} virQEMUCapsFlags;
--
2.4.1
9 years, 4 months
[libvirt] [libvirt-glib PATCHv3 1/7] gobject: Simplify gvir_connection_list*() implementations
by Zeeshan Ali (Khattak)
Make use of virConnectListAll* functions to avoid making 4 calls and
hence avoid race conditions and complicated code.
---
libvirt-gobject/libvirt-gobject-connection.c | 203 ++++-----------------------
1 file changed, 28 insertions(+), 175 deletions(-)
diff --git a/libvirt-gobject/libvirt-gobject-connection.c b/libvirt-gobject/libvirt-gobject-connection.c
index cf073a5..1576906 100644
--- a/libvirt-gobject/libvirt-gobject-connection.c
+++ b/libvirt-gobject/libvirt-gobject-connection.c
@@ -680,48 +680,6 @@ void gvir_connection_close(GVirConnection *conn)
g_signal_emit(conn, signals[VIR_CONNECTION_CLOSED], 0);
}
-typedef gint (* CountFunction) (virConnectPtr vconn);
-typedef gint (* ListFunction) (virConnectPtr vconn, gchar **lst, gint max);
-
-static gchar ** fetch_list(virConnectPtr vconn,
- const char *name,
- CountFunction count_func,
- ListFunction list_func,
- GCancellable *cancellable,
- gint *length,
- GError **err)
-{
- gchar **lst = NULL;
- gint n = 0;
-
- if ((n = count_func(vconn)) < 0) {
- gvir_set_error(err, GVIR_CONNECTION_ERROR,
- 0,
- _("Unable to count %s"), name);
- goto error;
- }
-
- if (n) {
- if (g_cancellable_set_error_if_cancelled(cancellable, err))
- goto error;
-
- lst = g_new0(gchar *, n);
- if ((n = list_func(vconn, lst, n)) < 0) {
- gvir_set_error(err, GVIR_CONNECTION_ERROR,
- 0,
- _("Unable to list %s %d"), name, n);
- goto error;
- }
- }
-
- *length = n;
- return lst;
-
-error:
- g_free(lst);
- return NULL;
-}
-
/**
* gvir_connection_fetch_domains:
* @conn: a #GVirConnection
@@ -733,14 +691,11 @@ gboolean gvir_connection_fetch_domains(GVirConnection *conn,
{
GVirConnectionPrivate *priv;
GHashTable *doms;
- gchar **inactive = NULL;
- gint ninactive = 0;
- gint *active = NULL;
- gint nactive = 0;
+ virDomainPtr *domains = NULL;
+ gint ndomains = 0;
gboolean ret = FALSE;
gint i;
virConnectPtr vconn = NULL;
- GError *lerr = NULL;
g_return_val_if_fail(GVIR_IS_CONNECTION(conn), FALSE);
g_return_val_if_fail((cancellable == NULL) || G_IS_CANCELLABLE(cancellable),
@@ -761,81 +716,28 @@ gboolean gvir_connection_fetch_domains(GVirConnection *conn,
virConnectRef(vconn);
g_mutex_unlock(priv->lock);
- if (g_cancellable_set_error_if_cancelled(cancellable, err))
- goto cleanup;
-
- if ((nactive = virConnectNumOfDomains(vconn)) < 0) {
- gvir_set_error_literal(err, GVIR_CONNECTION_ERROR,
- 0,
- _("Unable to count domains"));
+ ndomains = virConnectListAllDomains(vconn, &domains, 0);
+ if (ndomains < 0) {
+ gvir_set_error(err, GVIR_CONNECTION_ERROR,
+ 0,
+ _("Failed to fetch list of domains"));
goto cleanup;
}
- if (nactive) {
- if (g_cancellable_set_error_if_cancelled(cancellable, err))
- goto cleanup;
-
- active = g_new(gint, nactive);
- if ((nactive = virConnectListDomains(vconn, active, nactive)) < 0) {
- gvir_set_error_literal(err, GVIR_CONNECTION_ERROR,
- 0,
- _("Unable to list domains"));
- goto cleanup;
- }
- }
if (g_cancellable_set_error_if_cancelled(cancellable, err))
goto cleanup;
- inactive = fetch_list(vconn,
- "Domains",
- virConnectNumOfDefinedDomains,
- virConnectListDefinedDomains,
- cancellable,
- &ninactive,
- &lerr);
- if (lerr) {
- g_propagate_error(err, lerr);
- lerr = NULL;
- goto cleanup;
- }
-
doms = g_hash_table_new_full(g_str_hash,
g_str_equal,
NULL,
g_object_unref);
- for (i = 0 ; i < nactive ; i++) {
- if (g_cancellable_set_error_if_cancelled(cancellable, err))
- goto cleanup;
-
- virDomainPtr vdom = virDomainLookupByID(vconn, active[i]);
+ for (i = 0 ; i < ndomains; i++) {
GVirDomain *dom;
- if (!vdom)
- continue;
dom = GVIR_DOMAIN(g_object_new(GVIR_TYPE_DOMAIN,
- "handle", vdom,
+ "handle", domains[i],
NULL));
- virDomainFree(vdom);
-
- g_hash_table_insert(doms,
- (gpointer)gvir_domain_get_uuid(dom),
- dom);
- }
-
- for (i = 0 ; i < ninactive ; i++) {
- if (g_cancellable_set_error_if_cancelled(cancellable, err))
- goto cleanup;
-
- virDomainPtr vdom = virDomainLookupByName(vconn, inactive[i]);
- GVirDomain *dom;
- if (!vdom)
- continue;
-
- dom = GVIR_DOMAIN(g_object_new(GVIR_TYPE_DOMAIN,
- "handle", vdom,
- NULL));
- virDomainFree(vdom);
g_hash_table_insert(doms,
(gpointer)gvir_domain_get_uuid(dom),
@@ -852,10 +754,11 @@ gboolean gvir_connection_fetch_domains(GVirConnection *conn,
ret = TRUE;
cleanup:
- g_free(active);
- for (i = 0 ; i < ninactive ; i++)
- g_free(inactive[i]);
- g_free(inactive);
+ if (ndomains > 0) {
+ for (i = 0 ; i < ndomains; i++)
+ virDomainFree(domains[i]);
+ free(domains);
+ }
return ret;
}
@@ -870,14 +773,11 @@ gboolean gvir_connection_fetch_storage_pools(GVirConnection *conn,
{
GVirConnectionPrivate *priv;
GHashTable *pools;
- gchar **inactive = NULL;
- gint ninactive = 0;
- gchar **active = NULL;
- gint nactive = 0;
+ virStoragePoolPtr *vpools = NULL;
+ gint npools = 0;
gboolean ret = FALSE;
gint i;
virConnectPtr vconn = NULL;
- GError *lerr = NULL;
g_return_val_if_fail(GVIR_IS_CONNECTION(conn), FALSE);
g_return_val_if_fail((cancellable == NULL) || G_IS_CANCELLABLE(cancellable),
@@ -901,77 +801,31 @@ gboolean gvir_connection_fetch_storage_pools(GVirConnection *conn,
if (g_cancellable_set_error_if_cancelled(cancellable, err))
goto cleanup;
- active = fetch_list(vconn,
- "Storage Pools",
- virConnectNumOfStoragePools,
- virConnectListStoragePools,
- cancellable,
- &nactive,
- &lerr);
- if (lerr) {
- g_propagate_error(err, lerr);
- lerr = NULL;
+ npools = virConnectListAllStoragePools(vconn, &vpools, 0);
+ if (npools < 0) {
+ gvir_set_error(err, GVIR_CONNECTION_ERROR,
+ 0,
+ _("Failed to fetch list of pools"));
goto cleanup;
}
if (g_cancellable_set_error_if_cancelled(cancellable, err))
goto cleanup;
- inactive = fetch_list(vconn,
- "Storage Pools",
- virConnectNumOfDefinedStoragePools,
- virConnectListDefinedStoragePools,
- cancellable,
- &ninactive,
- &lerr);
- if (lerr) {
- g_propagate_error(err, lerr);
- lerr = NULL;
- goto cleanup;
- }
-
pools = g_hash_table_new_full(g_str_hash,
g_str_equal,
NULL,
g_object_unref);
- for (i = 0 ; i < nactive ; i++) {
+ for (i = 0 ; i < npools; i++) {
if (g_cancellable_set_error_if_cancelled(cancellable, err))
goto cleanup;
- virStoragePoolPtr vpool;
GVirStoragePool *pool;
- vpool = virStoragePoolLookupByName(vconn, active[i]);
- if (!vpool)
- continue;
-
- pool = GVIR_STORAGE_POOL(g_object_new(GVIR_TYPE_STORAGE_POOL,
- "handle", vpool,
- NULL));
- virStoragePoolFree(vpool);
-
- g_hash_table_insert(pools,
- (gpointer)gvir_storage_pool_get_uuid(pool),
- pool);
- }
-
- for (i = 0 ; i < ninactive ; i++) {
- if (g_cancellable_set_error_if_cancelled(cancellable, err))
- goto cleanup;
-
- virStoragePoolPtr vpool;
- GVirStoragePool *pool;
-
- vpool = virStoragePoolLookupByName(vconn, inactive[i]);
- if (!vpool)
- continue;
-
pool = GVIR_STORAGE_POOL(g_object_new(GVIR_TYPE_STORAGE_POOL,
- "handle", vpool,
+ "handle", vpools[i],
NULL));
- virStoragePoolFree(vpool);
-
g_hash_table_insert(pools,
(gpointer)gvir_storage_pool_get_uuid(pool),
pool);
@@ -987,12 +841,11 @@ gboolean gvir_connection_fetch_storage_pools(GVirConnection *conn,
ret = TRUE;
cleanup:
- for (i = 0 ; i < nactive ; i++)
- g_free(active[i]);
- g_free(active);
- for (i = 0 ; i < ninactive ; i++)
- g_free(inactive[i]);
- g_free(inactive);
+ if (npools > 0) {
+ for (i = 0 ; i < npools; i++)
+ virStoragePoolFree(vpools[i]);
+ free(vpools);
+ }
return ret;
}
--
2.4.3
9 years, 4 months
[libvirt] ANNOUNCE: libvirt-sandbox "Dashti Margo" release 0.6.0
by Daniel P. Berrange
I pleased to announce the a new public release of libvirt-sandbox,
version 0.6.0, is now available for download
ftp://libvirt.org/libvirt/sandbox/
The packages are GPG signed with
Key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF (4096R)
The libvirt-sandbox package provides an API layer on top of libvirt-gobject
which facilitates the cration of application sandboxes using virtualization
technology. An application sandbox is a virtual machine or container that
runs a single application binary, directly from the host OS filesystem.
In other words there is no separate guest operating system install to build
or manager.
At this point in time libvirt-sandbox can create sandboxes using either LXC
or KVM, and should in theory be extendable to any libvirt driver.
This release contains a mixture of new features and bug fixes
- API/ABI in-compatible change, soname increased
- Prevent use of virt-sandbox-service as non-root upfront
- Fix misc memory leaks
- Block SIGHUP from the dhclient binary to prevent
accidental death if the controlling terminal is
closed & reopened
- Add support for re-creating libvirt XML from sandbox
config to facilitate upgrades
- Switch to standard gobject introspection autoconf macros
- Add ability to set filters on network interfaces
- Search /usr/lib instead of /lib for systemd unit
files, as the former is the canonical location even
when / and /usr are merged
- Only set SELinux labels on hosts that support SELinux
- Explicitly link to selinux, instead of relying on
indirect linkage
- Update compiler warning flags
- Fix misc docs comments
- Don't assume use of SELinux in virt-sandbox-service
- Fix path checks for SUSUE in virt-sandbox-service
- Add support for AppArmour profiles
- Mount /var after other FS to ensure host image is
available
- Ensure state/config dirs can be accessed when QEMU
is running non-root for qemu:///system
- Fix mounting of host images in QEMU sandboxes
- Mount images as ext4 instead of ext3
- Allow use of non-raw disk images as filesystem
mounts
- Check if required static libs are available at configure
time to prevent silent fallback to shared linking
- Require libvirt-glib >= 0.2.1
- Add support for loading lzma and gzip compressed kmods
- Check for support libvirt URIs when starting guests
to ensure clear error message upfront
- Add LIBVIRT_SANDBOX_INIT_DEBUG env variable to allow
debugging of kernel boot messages and sandbox init
process setup
- Add support for exposing block devices to sandboxes
with a predictable name under /dev/disk/by-tag/TAGNAME
- Use devtmpfs instead of tmpfs for auto-populating
/dev in QEMU sandboxes
- Allow setup of sandbox with custom root filesystem
instead of inheriting from host's root.
- Allow execution of apps from non-matched ld-linux.so
/ libc.so, eg executing F19 binaries on F22 host
- Use passthrough mode for all QEMU filesystems
Thanks to everyone who contributed to this release
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
9 years, 4 months
[libvirt] [PATCH v2 1/2] Fix nodeinfo output on PPC64 KVM hosts
by Shivaprasad G Bhat
The nodeinfo is reporting incorrect number of cpus and incorrect host
topology on PPC64 KVM hosts. The KVM hypervisor on PPC64 needs only
the primary thread in a core to be online, and the secondaries offlined.
While scheduling a guest in, the kvm scheduler wakes up the secondaries to
run in guest context.
The host scheduling of the guests happen at the core level(as only primary
thread is online). The kvm scheduler exploits as many threads of the core
as needed by guest. Further, starting POWER8, the processor allows splitting
a physical core into multiple subcores with 2 or 4 threads each. Again, only
the primary thread in a subcore is online in the host. The KVM-PPC
scheduler allows guests to exploit all the offline threads in the subcore,
by bringing them online when needed.
(Kernel patches on split-core http://www.spinics.net/lists/kvm-ppc/msg09121.html)
Recently with dynamic micro-threading changes in ppc-kvm, makes sure
to utilize all the offline cpus across guests, and across guests with
different cpu topologies.
(https://www.mail-archive.com/kvm@vger.kernel.org/msg115978.html)
Since the offline cpus are brought online in the guest context, it is safe
to count them as online. Nodeinfo today discounts these offline cpus from
cpu count/topology calclulation, and the nodeinfo output is not of any help
and the host appears overcommited when it is actually not.
The patch carefully counts those offline threads whose primary threads are
online. The host topology displayed by the nodeinfo is also fixed when the
host is in valid kvm state.
Test results with and without fix:
http://ur1.ca/mx25y
Signed-off-by: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com>
---
src/libvirt_private.syms | 1 +
src/nodeinfo.c | 87 ++++++++++++++++++++++++++++++++++++++++------
src/util/virarch.c | 35 +++++++++++++++++++
src/util/virarch.h | 2 +
4 files changed, 114 insertions(+), 11 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 1566d11..071fe6e 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1075,6 +1075,7 @@ virArchFromHost;
virArchFromString;
virArchGetEndian;
virArchGetWordSize;
+virArchPPCGetKvmHostCoreMode;
virArchToString;
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 2fafe2d..9d1dc84 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -428,25 +428,77 @@ virNodeParseNode(const char *node,
unsigned int cpu;
int online;
int direrr;
+ int lastonline;
+ virBitmapPtr nodecpus = NULL;
+ int threads_per_subcore = 1;
+ bool valid_ppc64_kvmhost_mode = false;
*threads = 0;
*cores = 0;
*sockets = 0;
+ if (ARCH_IS_PPC64(arch)) {
+ /* PPC-KVM needs the secondary threads of a core to be offline on the
+ * host. The kvm scheduler brings the secondary threads online in the
+ * guest context. Moreover, P8 processor has split-core capability
+ * where, there can be 1,2 or 4 subcores per core. The primaries of the
+ * subcores alone will be online on the host for a subcore in the
+ * host. Even though the actual threads per core for P8 processor is 8,
+ * depending on the subcores_per_core = 1, 2 or 4, the threads per
+ * subcore will vary accordingly to 8, 4 and 2 repectively.
+ * So, On host threads_per_core what is arrived at from sysfs in the
+ * current logic is actually the subcores_per_core. Threads per subcore
+ * can only be obtained from the kvm device. For example, on P8 wih 1
+ * core having 8 threads, sub_cores_percore=4, the threads 0,2,4 & 6
+ * will be online. The sysfs reflects this and in the current logic
+ * variable 'threads' will be 4 which is nothing but subcores_per_core.
+ * If the user tampers the cpu online/offline states using chcpu or other
+ * means, then it is an unsupported configuration for kvm.
+ * The code below tries to keep in mind
+ * - when the libvirtd is run inside a KVM guest or Phyp based guest.
+ * - Or on the kvm host where user manually tampers the cpu states to
+ * offline/online randomly.
+ */
+ valid_ppc64_kvmhost_mode = virArchPPCGetKvmHostCoreMode(&threads_per_subcore);
+ }
+
+ nodecpus = virBitmapNew(VIR_DOMAIN_CPUMASK_LEN);
+
if (!(cpudir = opendir(node))) {
virReportSystemError(errno, _("cannot opendir %s"), node);
goto cleanup;
}
- /* enumerate sockets in the node */
- CPU_ZERO(&sock_map);
while ((direrr = virDirRead(cpudir, &cpudirent, node)) > 0) {
if (sscanf(cpudirent->d_name, "cpu%u", &cpu) != 1)
continue;
+ if (virBitmapSetBit(nodecpus, cpu))
+ goto cleanup;
+ }
+
+ if (direrr < 0)
+ goto cleanup;
+
+ /* enumerate sockets in the node */
+ CPU_ZERO(&sock_map);
+ lastonline = -1;
+ for (cpu = 0; cpu < virBitmapSize(nodecpus); cpu++) {
+ if (!virBitmapIsBitSet(nodecpus, cpu))
+ continue;
+
if ((online = virNodeGetCpuValue(node, cpu, "online", 1)) < 0)
goto cleanup;
+ if (online && valid_ppc64_kvmhost_mode) {
+ if (lastonline != -1 &&
+ (cpu - lastonline) < threads_per_subcore) {
+ /* if any of secondaries online */
+ valid_ppc64_kvmhost_mode = false;
+ }
+ lastonline = cpu;
+ }
+
if (!online)
continue;
@@ -459,9 +511,6 @@ virNodeParseNode(const char *node,
sock_max = sock;
}
- if (direrr < 0)
- goto cleanup;
-
sock_max++;
/* allocate cpu maps for each socket */
@@ -472,14 +521,25 @@ virNodeParseNode(const char *node,
CPU_ZERO(&core_maps[i]);
/* iterate over all CPU's in the node */
- rewinddir(cpudir);
- while ((direrr = virDirRead(cpudir, &cpudirent, node)) > 0) {
- if (sscanf(cpudirent->d_name, "cpu%u", &cpu) != 1)
+ lastonline = -1;
+ for (cpu = 0; cpu < virBitmapSize(nodecpus); cpu++) {
+ if (!virBitmapIsBitSet(nodecpus, cpu))
continue;
if ((online = virNodeGetCpuValue(node, cpu, "online", 1)) < 0)
goto cleanup;
+ if (valid_ppc64_kvmhost_mode) {
+ if (online) {
+ lastonline = cpu;
+ } else if (lastonline != -1 &&
+ (cpu-lastonline) < threads_per_subcore) {
+ processors++; /* Count only those secondaries whose primary
+ subcore is online */
+ continue;
+ }
+ }
+
if (!online) {
(*offline)++;
continue;
@@ -513,9 +573,6 @@ virNodeParseNode(const char *node,
*threads = siblings;
}
- if (direrr < 0)
- goto cleanup;
-
/* finalize the returned data */
*sockets = CPU_COUNT(&sock_map);
@@ -528,6 +585,13 @@ virNodeParseNode(const char *node,
*cores = core;
}
+ if (valid_ppc64_kvmhost_mode) {
+ /* The actual host threads per core is
+ * multiple of the subcores_per_core(i.e variable *threads in this case)
+ * and threads_per_subcore.
+ */
+ *threads = *threads * threads_per_subcore;
+ }
ret = processors;
cleanup:
@@ -537,6 +601,7 @@ virNodeParseNode(const char *node,
ret = -1;
}
VIR_FREE(core_maps);
+ virBitmapFree(nodecpus);
return ret;
}
diff --git a/src/util/virarch.c b/src/util/virarch.c
index be48bcf..3717de0 100644
--- a/src/util/virarch.c
+++ b/src/util/virarch.c
@@ -25,8 +25,16 @@
#include "virlog.h"
#include "virarch.h"
+#include "virfile.h"
#include "verify.h"
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#if HAVE_LINUX_KVM_H
+# include <linux/kvm.h>
+#endif
+
VIR_LOG_INIT("util.arch");
/* The canonical names are used in XML documents. ie ABI sensitive */
@@ -182,3 +190,30 @@ virArch virArchFromHost(void)
return arch;
}
+
+bool virArchPPCGetKvmHostCoreMode(int *threads_per_subcore)
+{
+ int kvmfd;
+ bool valid_ppc64_kvmhost_mode = false;
+
+#if HAVE_LINUX_KVM_H
+ kvmfd = open("/dev/kvm", O_RDONLY);
+ if (kvmfd >= 0) {
+# ifdef KVM_CAP_PPC_SMT
+
+ valid_ppc64_kvmhost_mode = true;
+ /* For Phyp and KVM based guests the ioctl for KVM_CAP_PPC_SMT
+ * returns zero and both primary and secondary threads will be
+ * online.
+ */
+ *threads_per_subcore = ioctl(kvmfd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_SMT);
+ if (*threads_per_subcore == 0)
+ valid_ppc64_kvmhost_mode = false;
+
+# endif
+ }
+ VIR_FORCE_CLOSE(kvmfd);
+#endif
+
+ return valid_ppc64_kvmhost_mode;
+}
diff --git a/src/util/virarch.h b/src/util/virarch.h
index 3206ce2..6e196ff 100644
--- a/src/util/virarch.h
+++ b/src/util/virarch.h
@@ -102,4 +102,6 @@ virArch virArchFromString(const char *name);
virArch virArchFromHost(void);
+bool virArchPPCGetKvmHostCoreMode(int *threads_per_subcore);
+
#endif /* __VIR_ARCH_H__ */
9 years, 4 months
[libvirt] [sandbox] Get gvir_sandbox_util_guess_image_format search for the last '.'
by Cédric Bosdonnat
gvir_sandbox_util_guess_image_format is failing to find the extension
in paths like /tmp/tmp.mg0tQ1JLFl/mine.img
---
libvirt-sandbox/libvirt-sandbox-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt-sandbox/libvirt-sandbox-util.c b/libvirt-sandbox/libvirt-sandbox-util.c
index 6385291..d73fc8b 100644
--- a/libvirt-sandbox/libvirt-sandbox-util.c
+++ b/libvirt-sandbox/libvirt-sandbox-util.c
@@ -40,7 +40,7 @@ gint gvir_sandbox_util_guess_image_format(const gchar *path,
{
gchar *tmp;
- if ((tmp = strchr(path, '.')) == NULL) {
+ if ((tmp = g_strrstr(path, ".")) == NULL) {
g_set_error(error, GVIR_SANDBOX_UTIL_ERROR, 0,
_("Cannot identify file extension in '%s'"), path);
return -1;
--
2.1.4
9 years, 4 months
[libvirt] [PATCH] storage: add RBD support to disk source pool translation
by Thibault VINCENT
Hello,
We needed this to avoid redundancies when defining domains with RBD backends,
because monitor list and authentication secret could not be pulled from the
storage pool.
I didn't find any bit of documentation to update, actually it already implies
that disks with source type 'volume' would work with all kinds of backing
pools. But mpath, sheepdog, and gluster would still require an implementation
if it's possible.
Using RBD volumes this way still has a limitation, we cannot list snapshots in
libvirt pools. Whereas they could be accessed read-only if the domain is using
a network source explicitely with a 'snapshot' attribute.
How could we implement this so that snapshots are seen as pool volumes? There
are real use-cases for this like attaching to a VM a backup from it's own
disks. Also it would work the same way with ZFS snapshots, but AFAIK not for
LVM pools.
Cheers
Thibault VINCENT (1):
storage: add RBD support to generic disk source pool translation
src/storage/storage_driver.c | 49 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 48 insertions(+), 1 deletion(-)
--
2.1.4
9 years, 4 months
[libvirt] [PATCH] qemu: Resolve Coverity DEADCODE
by John Ferlan
Commit id 'f967e7a6' didn't place the closing parentheses quite right
causing DEADCODE errors since the rc setting/comparison was wrong.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 391190d..79338cf 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1586,7 +1586,7 @@ int qemuDomainAttachChrDevice(virQEMUDriverPtr driver,
if (qemuAssignDeviceChrAlias(vmdef, chr, -1) < 0)
goto cleanup;
- if ((rc = qemuDomainAttachChrDeviceAssignAddr(priv, chr) < 0))
+ if ((rc = qemuDomainAttachChrDeviceAssignAddr(priv, chr)) < 0)
goto cleanup;
if (rc == 1)
need_release = true;
--
2.1.0
9 years, 4 months
[libvirt] [PATCH 0/2][1.2.17] qemu: fix address allocation on chardev hotplug
by Ján Tomko
For bug https://bugzilla.redhat.com/show_bug.cgi?id=1230039
Patch 1/2 fixes a regression in channel device hotplug which was introduced
in the last release and I would like to get it fixed before the next one.
Patch 2/2 is not that important, but still a bugfix.
Luyao Huang (1):
qemu: fix address allocation on chardev attach
Ján Tomko (1):
qemu: properly free addresses on non-serial chardev unplug
src/qemu/qemu_command.c | 4 +++
src/qemu/qemu_hotplug.c | 78 +++++++++++++++++++++++++++----------------------
2 files changed, 47 insertions(+), 35 deletions(-)
--
2.3.6
9 years, 4 months
[libvirt] [PATCH] conf: qemu: Taint VMs using custom device tree blob
by Peter Krempa
Using a custom device tree image may cause unexpected behavior in
architectures that use this approach to detect platform devices. Since
usually the device tree is generated by qemu and thus it's not normally
used let's taint VMs using it to make it obvious as a possible source of
problems.
---
src/conf/domain_conf.c | 3 ++-
src/conf/domain_conf.h | 1 +
src/qemu/qemu_domain.c | 3 +++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 2c3b96b..9280a76 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -102,7 +102,8 @@ VIR_ENUM_IMPL(virDomainTaint, VIR_DOMAIN_TAINT_LAST,
"external-launch",
"host-cpu",
"hook-script",
- "cdrom-passthrough");
+ "cdrom-passthrough",
+ "custom-dtb");
VIR_ENUM_IMPL(virDomainVirt, VIR_DOMAIN_VIRT_LAST,
"qemu",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index aeba5a5..2bdbff1 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2305,6 +2305,7 @@ typedef enum {
VIR_DOMAIN_TAINT_HOST_CPU, /* Host CPU passthrough in use */
VIR_DOMAIN_TAINT_HOOK, /* Domain (possibly) changed via hook script */
VIR_DOMAIN_TAINT_CDROM_PASSTHROUGH,/* CDROM passthrough */
+ VIR_DOMAIN_TAINT_CUSTOM_DTB, /* Custom device tree blob was specifed */
VIR_DOMAIN_TAINT_LAST
} virDomainTaintFlags;
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 6213fd9..22ffa83 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2105,6 +2105,9 @@ void qemuDomainObjCheckTaint(virQEMUDriverPtr driver,
for (i = 0; i < obj->def->nnets; i++)
qemuDomainObjCheckNetTaint(driver, obj, obj->def->nets[i], logFD);
+ if (obj->def->os.dtb)
+ qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_CUSTOM_DTB, logFD);
+
virObjectUnref(cfg);
}
--
2.4.1
9 years, 4 months