2009-01-05 14:05:29 +00:00
|
|
|
#
|
2009-11-10 14:53:20 +00:00
|
|
|
# General private symbols. Add symbols here, and see Makefile.am for
|
|
|
|
# more details.
|
2009-01-05 14:05:29 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2010-05-21 04:23:48 +00:00
|
|
|
# bitmap.h
|
|
|
|
virBitmapAlloc;
|
|
|
|
virBitmapFree;
|
|
|
|
virBitmapSetBit;
|
|
|
|
virBitmapClearBit;
|
|
|
|
virBitmapGetBit;
|
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# buf.h
|
|
|
|
virBufferVSprintf;
|
|
|
|
virBufferEscapeString;
|
|
|
|
virBufferAdd;
|
|
|
|
virBufferAddChar;
|
|
|
|
virBufferContentAndReset;
|
|
|
|
virBufferError;
|
2009-09-10 13:21:10 +00:00
|
|
|
virBufferURIEncodeString;
|
2009-12-09 23:00:50 +00:00
|
|
|
virBufferFreeAndReset;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# caps.h
|
|
|
|
virCapabilitiesAddGuest;
|
|
|
|
virCapabilitiesAddGuestDomain;
|
|
|
|
virCapabilitiesAddGuestFeature;
|
|
|
|
virCapabilitiesAddHostMigrateTransport;
|
|
|
|
virCapabilitiesAddHostNUMACell;
|
|
|
|
virCapabilitiesAddHostFeature;
|
|
|
|
virCapabilitiesDefaultGuestArch;
|
|
|
|
virCapabilitiesDefaultGuestEmulator;
|
|
|
|
virCapabilitiesDefaultGuestMachine;
|
|
|
|
virCapabilitiesFormatXML;
|
|
|
|
virCapabilitiesFree;
|
2009-06-29 10:41:56 +00:00
|
|
|
virCapabilitiesFreeNUMAInfo;
|
2009-01-05 14:05:29 +00:00
|
|
|
virCapabilitiesNew;
|
|
|
|
virCapabilitiesSetMacPrefix;
|
2009-03-02 20:19:13 +00:00
|
|
|
virCapabilitiesGenerateMac;
|
2009-06-16 15:27:33 +00:00
|
|
|
virCapabilitiesSetEmulatorRequired;
|
|
|
|
virCapabilitiesIsEmulatorRequired;
|
2009-07-23 17:31:34 +00:00
|
|
|
virCapabilitiesAllocMachines;
|
|
|
|
virCapabilitiesFreeMachines;
|
2009-12-18 13:44:55 +00:00
|
|
|
virCapabilitiesSetHostCPU;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# conf.h
|
|
|
|
virConfNew;
|
|
|
|
virConfReadFile;
|
|
|
|
virConfReadMem;
|
|
|
|
virConfFree;
|
|
|
|
virConfFreeValue;
|
|
|
|
virConfGetValue;
|
|
|
|
virConfSetValue;
|
|
|
|
virConfWriteFile;
|
|
|
|
virConfWriteMem;
|
|
|
|
|
|
|
|
|
Move all shared utility files to src/util/
* src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
src/qparams.h, src/stats_linux.c, src/stats_linux.h,
src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
into src/util/
* daemon/Makefile.am: Add -Isrc/util/ to build flags
* src/Makefile.am: Add -Isrc/util/ to build flags and update for
moved files
* src/libvirt_private.syms: Export cgroup APIs since they're now
in util rather than linking directly to drivers
* src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
when built under PROXY
* proxy/Makefile.am: Update for changed file locations. Remove
bogus build of event.c
* tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
2009-09-16 15:28:46 +00:00
|
|
|
# cgroup.h
|
|
|
|
virCgroupForDomain;
|
|
|
|
virCgroupForDriver;
|
|
|
|
virCgroupRemove;
|
|
|
|
virCgroupFree;
|
|
|
|
virCgroupAddTask;
|
2009-10-07 13:26:23 +00:00
|
|
|
virCgroupSetMemory;
|
|
|
|
virCgroupGetMemoryUsage;
|
Move all shared utility files to src/util/
* src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
src/qparams.h, src/stats_linux.c, src/stats_linux.h,
src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
into src/util/
* daemon/Makefile.am: Add -Isrc/util/ to build flags
* src/Makefile.am: Add -Isrc/util/ to build flags and update for
moved files
* src/libvirt_private.syms: Export cgroup APIs since they're now
in util rather than linking directly to drivers
* src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
when built under PROXY
* proxy/Makefile.am: Update for changed file locations. Remove
bogus build of event.c
* tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
2009-09-16 15:28:46 +00:00
|
|
|
virCgroupSetCpuShares;
|
|
|
|
virCgroupGetCpuShares;
|
|
|
|
virCgroupDenyDevicePath;
|
|
|
|
virCgroupAllowDevicePath;
|
|
|
|
virCgroupDenyAllDevices;
|
|
|
|
virCgroupAllowDeviceMajor;
|
|
|
|
virCgroupControllerTypeToString;
|
|
|
|
virCgroupControllerTypeFromString;
|
|
|
|
virCgroupGetCpuacctUsage;
|
2009-09-21 14:31:22 +00:00
|
|
|
virCgroupGetFreezerState;
|
|
|
|
virCgroupSetFreezerState;
|
2010-10-12 14:50:53 +00:00
|
|
|
virCgroupSetMemoryHardLimit;
|
|
|
|
virCgroupGetMemoryHardLimit;
|
|
|
|
virCgroupSetMemorySoftLimit;
|
|
|
|
virCgroupGetMemorySoftLimit;
|
|
|
|
virCgroupSetSwapHardLimit;
|
|
|
|
virCgroupGetSwapHardLimit;
|
Move all shared utility files to src/util/
* src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
src/qparams.h, src/stats_linux.c, src/stats_linux.h,
src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
into src/util/
* daemon/Makefile.am: Add -Isrc/util/ to build flags
* src/Makefile.am: Add -Isrc/util/ to build flags and update for
moved files
* src/libvirt_private.syms: Export cgroup APIs since they're now
in util rather than linking directly to drivers
* src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
when built under PROXY
* proxy/Makefile.am: Update for changed file locations. Remove
bogus build of event.c
* tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
2009-09-16 15:28:46 +00:00
|
|
|
|
|
|
|
|
Adds CPU selection infrastructure
Each driver supporting CPU selection must fill in host CPU capabilities.
When filling them, drivers for hypervisors running on the same node as
libvirtd can use cpuNodeData() to obtain raw CPU data. Other drivers,
such as VMware, need to implement their own way of getting such data.
Raw data can be decoded into virCPUDefPtr using cpuDecode() function.
When implementing virConnectCompareCPU(), a hypervisor driver can just
call cpuCompareXML() function with host CPU capabilities.
For each guest for which a driver supports selecting CPU models, it must
set the appropriate feature in guest's capabilities:
virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0)
Actions needed when a domain is being created depend on whether the
hypervisor understands raw CPU data (currently CPUID for i686, x86_64
architectures) or symbolic names has to be used.
Typical use by hypervisors which prefer CPUID (such as VMware and Xen):
- convert guest CPU configuration from domain's XML into a set of raw
data structures each representing one of the feature policies:
cpuEncode(conn, architecture, guest_cpu_config,
&forced_data, &required_data, &optional_data,
&disabled_data, &forbidden_data)
- create a mask or whatever the hypervisor expects to see and pass it
to the hypervisor
Typical use by hypervisors with symbolic model names (such as QEMU):
- get raw CPU data for a computed guest CPU:
cpuGuestData(conn, host_cpu, guest_cpu_config, &data)
- decode raw data into virCPUDefPtr with a possible restriction on
allowed model names:
cpuDecode(conn, guest, data, n_allowed_models, allowed_models)
- pass guest->model and guest->features to the hypervisor
* src/cpu/cpu.c src/cpu/cpu.h src/cpu/cpu_generic.c
src/cpu/cpu_generic.h src/cpu/cpu_map.c src/cpu/cpu_map.h
src/cpu/cpu_x86.c src/cpu/cpu_x86.h src/cpu/cpu_x86_data.h
* configure.in: check for CPUID instruction
* src/Makefile.am: glue the new files in
* src/libvirt_private.syms: add new private symbols
* po/POTFILES.in: add new cpu files containing translatable strings
2009-12-18 15:02:11 +00:00
|
|
|
# cpu.h
|
2010-01-25 17:27:56 +00:00
|
|
|
cpuBaseline;
|
|
|
|
cpuBaselineXML;
|
Adds CPU selection infrastructure
Each driver supporting CPU selection must fill in host CPU capabilities.
When filling them, drivers for hypervisors running on the same node as
libvirtd can use cpuNodeData() to obtain raw CPU data. Other drivers,
such as VMware, need to implement their own way of getting such data.
Raw data can be decoded into virCPUDefPtr using cpuDecode() function.
When implementing virConnectCompareCPU(), a hypervisor driver can just
call cpuCompareXML() function with host CPU capabilities.
For each guest for which a driver supports selecting CPU models, it must
set the appropriate feature in guest's capabilities:
virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0)
Actions needed when a domain is being created depend on whether the
hypervisor understands raw CPU data (currently CPUID for i686, x86_64
architectures) or symbolic names has to be used.
Typical use by hypervisors which prefer CPUID (such as VMware and Xen):
- convert guest CPU configuration from domain's XML into a set of raw
data structures each representing one of the feature policies:
cpuEncode(conn, architecture, guest_cpu_config,
&forced_data, &required_data, &optional_data,
&disabled_data, &forbidden_data)
- create a mask or whatever the hypervisor expects to see and pass it
to the hypervisor
Typical use by hypervisors with symbolic model names (such as QEMU):
- get raw CPU data for a computed guest CPU:
cpuGuestData(conn, host_cpu, guest_cpu_config, &data)
- decode raw data into virCPUDefPtr with a possible restriction on
allowed model names:
cpuDecode(conn, guest, data, n_allowed_models, allowed_models)
- pass guest->model and guest->features to the hypervisor
* src/cpu/cpu.c src/cpu/cpu.h src/cpu/cpu_generic.c
src/cpu/cpu_generic.h src/cpu/cpu_map.c src/cpu/cpu_map.h
src/cpu/cpu_x86.c src/cpu/cpu_x86.h src/cpu/cpu_x86_data.h
* configure.in: check for CPUID instruction
* src/Makefile.am: glue the new files in
* src/libvirt_private.syms: add new private symbols
* po/POTFILES.in: add new cpu files containing translatable strings
2009-12-18 15:02:11 +00:00
|
|
|
cpuCompare;
|
|
|
|
cpuCompareXML;
|
|
|
|
cpuDataFree;
|
|
|
|
cpuDecode;
|
|
|
|
cpuEncode;
|
|
|
|
cpuGuestData;
|
|
|
|
cpuNodeData;
|
2010-03-23 08:32:50 +00:00
|
|
|
cpuUpdate;
|
Adds CPU selection infrastructure
Each driver supporting CPU selection must fill in host CPU capabilities.
When filling them, drivers for hypervisors running on the same node as
libvirtd can use cpuNodeData() to obtain raw CPU data. Other drivers,
such as VMware, need to implement their own way of getting such data.
Raw data can be decoded into virCPUDefPtr using cpuDecode() function.
When implementing virConnectCompareCPU(), a hypervisor driver can just
call cpuCompareXML() function with host CPU capabilities.
For each guest for which a driver supports selecting CPU models, it must
set the appropriate feature in guest's capabilities:
virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0)
Actions needed when a domain is being created depend on whether the
hypervisor understands raw CPU data (currently CPUID for i686, x86_64
architectures) or symbolic names has to be used.
Typical use by hypervisors which prefer CPUID (such as VMware and Xen):
- convert guest CPU configuration from domain's XML into a set of raw
data structures each representing one of the feature policies:
cpuEncode(conn, architecture, guest_cpu_config,
&forced_data, &required_data, &optional_data,
&disabled_data, &forbidden_data)
- create a mask or whatever the hypervisor expects to see and pass it
to the hypervisor
Typical use by hypervisors with symbolic model names (such as QEMU):
- get raw CPU data for a computed guest CPU:
cpuGuestData(conn, host_cpu, guest_cpu_config, &data)
- decode raw data into virCPUDefPtr with a possible restriction on
allowed model names:
cpuDecode(conn, guest, data, n_allowed_models, allowed_models)
- pass guest->model and guest->features to the hypervisor
* src/cpu/cpu.c src/cpu/cpu.h src/cpu/cpu_generic.c
src/cpu/cpu_generic.h src/cpu/cpu_map.c src/cpu/cpu_map.h
src/cpu/cpu_x86.c src/cpu/cpu_x86.h src/cpu/cpu_x86_data.h
* configure.in: check for CPUID instruction
* src/Makefile.am: glue the new files in
* src/libvirt_private.syms: add new private symbols
* po/POTFILES.in: add new cpu files containing translatable strings
2009-12-18 15:02:11 +00:00
|
|
|
|
|
|
|
|
2009-12-18 13:44:55 +00:00
|
|
|
# cpu_conf.h
|
|
|
|
virCPUDefFree;
|
|
|
|
virCPUDefParseXML;
|
|
|
|
virCPUDefFormat;
|
|
|
|
virCPUDefFormatBuf;
|
|
|
|
virCPUDefAddFeature;
|
2010-03-23 08:34:04 +00:00
|
|
|
virCPUDefCopy;
|
2009-12-18 13:44:55 +00:00
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# datatypes.h
|
|
|
|
virGetDomain;
|
2009-05-20 14:26:49 +00:00
|
|
|
virGetInterface;
|
2009-01-05 14:05:29 +00:00
|
|
|
virGetNetwork;
|
|
|
|
virGetStoragePool;
|
|
|
|
virGetStorageVol;
|
2009-08-14 19:42:19 +00:00
|
|
|
virGetSecret;
|
2009-04-17 19:12:37 +00:00
|
|
|
virUnrefStorageVol;
|
2009-01-05 14:05:29 +00:00
|
|
|
virGetNodeDevice;
|
|
|
|
virUnrefDomain;
|
2009-03-02 20:19:13 +00:00
|
|
|
virUnrefConnect;
|
2009-08-14 19:42:19 +00:00
|
|
|
virUnrefSecret;
|
2009-07-10 11:18:12 +00:00
|
|
|
virGetStream;
|
|
|
|
virUnrefStream;
|
2010-03-25 17:46:02 +00:00
|
|
|
virGetNWFilter;
|
|
|
|
virUnrefNWFilter;
|
2010-03-31 20:33:13 +00:00
|
|
|
virGetDomainSnapshot;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# domain_conf.h
|
|
|
|
virDiskNameToBusDeviceIndex;
|
|
|
|
virDiskNameToIndex;
|
|
|
|
virDomainAssignDef;
|
|
|
|
virDomainConfigFile;
|
|
|
|
virDomainCpuSetFormat;
|
|
|
|
virDomainCpuSetParse;
|
|
|
|
virDomainChrDefFree;
|
|
|
|
virDomainChrTypeFromString;
|
|
|
|
virDomainChrTypeToString;
|
|
|
|
virDomainDefFormat;
|
|
|
|
virDomainDefFree;
|
|
|
|
virDomainDefParseFile;
|
|
|
|
virDomainDefParseNode;
|
|
|
|
virDomainDefParseString;
|
|
|
|
virDomainDeleteConfig;
|
|
|
|
virDomainDeviceDefFree;
|
|
|
|
virDomainDeviceDefParse;
|
2009-03-02 17:39:43 +00:00
|
|
|
virDomainDeviceTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainDiskBusTypeToString;
|
|
|
|
virDomainDiskDefFree;
|
|
|
|
virDomainDiskDeviceTypeToString;
|
2009-08-14 09:31:36 +00:00
|
|
|
virDomainDiskInsert;
|
|
|
|
virDomainDiskInsertPreAlloced;
|
2010-08-23 09:31:26 +00:00
|
|
|
virDomainDiskRemove;
|
2009-12-22 16:53:20 +00:00
|
|
|
virDomainDiskDefAssignAddress;
|
2009-12-02 19:15:38 +00:00
|
|
|
virDomainControllerInsert;
|
|
|
|
virDomainControllerInsertPreAlloced;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainFindByID;
|
|
|
|
virDomainFindByName;
|
|
|
|
virDomainFindByUUID;
|
2009-04-22 14:26:50 +00:00
|
|
|
virDomainGetRootFilesystem;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainGraphicsTypeFromString;
|
2010-03-22 18:44:58 +00:00
|
|
|
virDomainGraphicsTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainGraphicsDefFree;
|
2009-04-24 12:19:00 +00:00
|
|
|
virDomainHostdevDefFree;
|
2009-08-14 07:31:10 +00:00
|
|
|
virDomainHostdevModeTypeToString;
|
|
|
|
virDomainHostdevSubsysTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainInputDefFree;
|
|
|
|
virDomainLifecycleTypeFromString;
|
|
|
|
virDomainLifecycleTypeToString;
|
|
|
|
virDomainLoadAllConfigs;
|
|
|
|
virDomainNetDefFree;
|
2009-07-17 21:08:34 +00:00
|
|
|
virDomainNetTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainRemoveInactive;
|
|
|
|
virDomainSaveXML;
|
|
|
|
virDomainSaveConfig;
|
2009-06-12 11:38:50 +00:00
|
|
|
virDomainSaveStatus;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainSoundDefFree;
|
|
|
|
virDomainSoundModelTypeFromString;
|
|
|
|
virDomainSoundModelTypeToString;
|
2010-07-15 13:02:42 +00:00
|
|
|
virDomainMemballoonModelTypeFromString;
|
|
|
|
virDomainMemballoonModelTypeToString;
|
2009-10-21 12:26:38 +00:00
|
|
|
virDomainWatchdogModelTypeFromString;
|
|
|
|
virDomainWatchdogModelTypeToString;
|
|
|
|
virDomainWatchdogActionTypeFromString;
|
|
|
|
virDomainWatchdogActionTypeToString;
|
2009-07-06 13:54:44 +00:00
|
|
|
virDomainVideoDefFree;
|
|
|
|
virDomainVideoTypeToString;
|
|
|
|
virDomainVideoTypeFromString;
|
|
|
|
virDomainVideoDefaultRAM;
|
|
|
|
virDomainVideoDefaultType;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainVirtTypeToString;
|
|
|
|
virDomainFSDefFree;
|
|
|
|
virDomainObjLock;
|
|
|
|
virDomainObjUnlock;
|
2009-01-19 21:06:26 +00:00
|
|
|
virDomainStateTypeToString;
|
|
|
|
virDomainStateTypeFromString;
|
2009-11-02 18:37:38 +00:00
|
|
|
virDomainObjIsDuplicate;
|
Convert virDomainObjListPtr to use a hash of domain objects
The current virDomainObjListPtr object stores domain objects in
an array. This means that to find a particular objects requires
O(n) time, and more critically acquiring O(n) mutex locks.
The new impl replaces the array with a virHashTable, keyed off
UUID. Finding a object based on UUID is now O(1) time, and only
requires a single mutex lock. Finding by name/id is unchanged
in complexity.
In changing this, all code which iterates over the array had
to be updated to use a hash table iterator function callback.
Several of the functions which were identically duplicating
across all drivers were pulled into domain_conf.c
* src/conf/domain_conf.h, src/conf/domain_conf.c: Change
virDomainObjListPtr to use virHashTable. Add a initializer
method virDomainObjListInit, and rename virDomainObjListFree
to virDomainObjListDeinit, since its not actually freeing
the container, only its contents. Also add some convenient
methods virDomainObjListGetInactiveNames,
virDomainObjListGetActiveIDs and virDomainObjListNumOfDomains
which can be used to implement the correspondingly named
public API entry points in drivers
* src/libvirt_private.syms: Export new methods from domain_conf.h
* src/lxc/lxc_driver.c, src/opennebula/one_driver.c,
src/openvz/openvz_conf.c, src/openvz/openvz_driver.c,
src/qemu/qemu_driver.c, src/test/test_driver.c,
src/uml/uml_driver.c, src/vbox/vbox_tmpl.c: Update all code
to deal with hash tables instead of arrays for domains
2009-10-09 11:33:51 +00:00
|
|
|
virDomainObjListGetInactiveNames;
|
|
|
|
virDomainObjListGetActiveIDs;
|
|
|
|
virDomainObjListNumOfDomains;
|
|
|
|
virDomainObjListInit;
|
|
|
|
virDomainObjListDeinit;
|
2009-10-15 11:30:26 +00:00
|
|
|
virDomainObjRef;
|
|
|
|
virDomainObjUnref;
|
2009-11-30 18:35:58 +00:00
|
|
|
virDomainDeviceAddressIsValid;
|
|
|
|
virDomainDevicePCIAddressIsValid;
|
|
|
|
virDomainDeviceInfoIsSet;
|
2009-12-07 19:28:05 +00:00
|
|
|
virDomainControllerTypeToString;
|
|
|
|
virDomainControllerDefFree;
|
Properly support SCSI drive hotplug
The current SCSI hotplug support attaches a brand new SCSI controller
for every disk. This is broken because the semantics differ from those
used when starting the VM initially. In the latter case, each SCSI
controller is filled before a new one is added.
If the user specifies an high drive index (sdazz) then at initial
startup, many intermediate SCSI controllers may be added with no
drives.
This patch changes SCSI hotplug so that it exactly matches the
behaviour of initial startup. First the SCSI controller number is
determined for the drive to be hotplugged. If any controller upto
and including that controller number is not yet present, it is
attached. Then finally the drive is attached to the last controller.
NB, this breaks SCSI hotunplug, because there is no 'drive_del'
command in current QEMU. Previous SCSI hotunplug was broken in
any case because it was unplugging the entire controller, not
just the drive in question.
A future QEMU will allow proper SCSI hotunplug of a drive.
This patch is derived from work done by Wolfgang Mauerer on disk
controllers.
* src/qemu/qemu_driver.c: Fix SCSI hotplug to add a drive to
the correct controller, instead of just attaching a new
controller.
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h,
src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Add
support for 'drive_add' command
2009-12-09 17:57:09 +00:00
|
|
|
virDomainDeviceAddressTypeToString;
|
2010-02-18 16:52:03 +00:00
|
|
|
virDomainDefAddImplicitControllers;
|
2010-01-06 10:35:30 +00:00
|
|
|
virDomainDefClearPCIAddresses;
|
2010-01-08 15:53:53 +00:00
|
|
|
virDomainDefClearDeviceAliases;
|
2010-01-27 15:10:34 +00:00
|
|
|
virDomainDeviceInfoIterate;
|
2010-02-02 17:22:03 +00:00
|
|
|
virDomainClockOffsetTypeToString;
|
|
|
|
virDomainClockOffsetTypeFromString;
|
2010-03-24 15:32:10 +00:00
|
|
|
virDomainDiskErrorPolicyTypeToString;
|
2010-03-30 11:44:22 +00:00
|
|
|
virDomainTimerNameTypeToString;
|
|
|
|
virDomainTimerNameTypeFromString;
|
2010-03-31 17:03:54 +00:00
|
|
|
virDomainTimerTrackTypeToString;
|
|
|
|
virDomainTimerTrackTypeFromString;
|
2010-03-30 11:44:22 +00:00
|
|
|
virDomainTimerTickpolicyTypeToString;
|
|
|
|
virDomainTimerTickpolicyTypeFromString;
|
|
|
|
virDomainTimerModeTypeToString;
|
|
|
|
virDomainTimerModeTypeFromString;
|
2010-04-02 14:41:30 +00:00
|
|
|
virDomainSnapshotObjListGetNames;
|
|
|
|
virDomainSnapshotObjListNum;
|
|
|
|
virDomainSnapshotFindByName;
|
|
|
|
virDomainSnapshotObjListRemove;
|
|
|
|
virDomainSnapshotHasChildren;
|
|
|
|
virDomainSnapshotObjUnref;
|
|
|
|
virDomainSnapshotDefParseString;
|
|
|
|
virDomainSnapshotDefFormat;
|
|
|
|
virDomainSnapshotAssignDef;
|
2010-05-20 09:36:24 +00:00
|
|
|
virDomainObjAssignDef;
|
2010-06-24 14:06:43 +00:00
|
|
|
virDomainChrDefForeach;
|
2010-06-14 17:09:15 +00:00
|
|
|
virDomainDiskDefForeachPath;
|
2010-07-14 17:02:04 +00:00
|
|
|
virDomainChrConsoleTargetTypeToString;
|
2010-03-30 11:44:22 +00:00
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
# domain_event.h
|
|
|
|
virDomainEventCallbackListAdd;
|
2010-03-18 14:20:53 +00:00
|
|
|
virDomainEventCallbackListAddID;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainEventCallbackListFree;
|
|
|
|
virDomainEventCallbackListRemove;
|
2010-03-18 14:20:53 +00:00
|
|
|
virDomainEventCallbackListRemoveID;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainEventCallbackListRemoveConn;
|
|
|
|
virDomainEventCallbackListMarkDelete;
|
2010-03-18 14:20:53 +00:00
|
|
|
virDomainEventCallbackListMarkDeleteID;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainEventCallbackListPurgeMarked;
|
2010-03-18 14:20:53 +00:00
|
|
|
virDomainEventCallbackListCount;
|
|
|
|
virDomainEventCallbackListCountID;
|
|
|
|
virDomainEventCallbackListEventID;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainEventQueueNew;
|
|
|
|
virDomainEventQueueFree;
|
|
|
|
virDomainEventQueuePop;
|
|
|
|
virDomainEventQueuePush;
|
|
|
|
virDomainEventNew;
|
|
|
|
virDomainEventNewFromDom;
|
|
|
|
virDomainEventNewFromObj;
|
|
|
|
virDomainEventNewFromDef;
|
2010-03-18 15:25:38 +00:00
|
|
|
virDomainEventRebootNewFromDom;
|
|
|
|
virDomainEventRebootNewFromObj;
|
2010-03-18 18:28:15 +00:00
|
|
|
virDomainEventRTCChangeNewFromDom;
|
|
|
|
virDomainEventRTCChangeNewFromObj;
|
Add support for an explicit watchdog event
This introduces a new event type
VIR_DOMAIN_EVENT_ID_WATCHDOG
This event includes the action that is about to be taken
as a result of the watchdog triggering
typedef enum {
VIR_DOMAIN_EVENT_WATCHDOG_NONE = 0,
VIR_DOMAIN_EVENT_WATCHDOG_PAUSE,
VIR_DOMAIN_EVENT_WATCHDOG_RESET,
VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF,
VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN,
VIR_DOMAIN_EVENT_WATCHDOG_DEBUG,
} virDomainEventWatchdogAction;
Thus there is a new callback definition for this event type
typedef void (*virConnectDomainEventWatchdogCallback)(virConnectPtr conn,
virDomainPtr dom,
int action,
void *opaque);
* daemon/remote.c: Dispatch watchdog events to client
* examples/domain-events/events-c/event-test.c: Watch for
watchdog events
* include/libvirt/libvirt.h.in: Define new watchdg event ID
and callback signature
* src/conf/domain_event.c, src/conf/domain_event.h,
src/libvirt_private.syms: Extend API to handle watchdog events
* src/qemu/qemu_driver.c: Connect to the QEMU monitor event
for watchdogs and emit a libvirt watchdog event
* src/remote/remote_driver.c: Receive and dispatch watchdog
events to application
* src/remote/remote_protocol.x: Wire protocol definition for
watchdog events
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
src/qemu/qemu_monitor_json.c: Watch for WATCHDOG event
from QEMU monitor
2010-03-18 19:07:48 +00:00
|
|
|
virDomainEventWatchdogNewFromDom;
|
|
|
|
virDomainEventWatchdogNewFromObj;
|
Add support for an explicit IO error event
This introduces a new event type
VIR_DOMAIN_EVENT_ID_IO_ERROR
This event includes the action that is about to be taken
as a result of the watchdog triggering
typedef enum {
VIR_DOMAIN_EVENT_IO_ERROR_NONE = 0,
VIR_DOMAIN_EVENT_IO_ERROR_PAUSE,
VIR_DOMAIN_EVENT_IO_ERROR_REPORT,
} virDomainEventIOErrorAction;
In addition it has the source path of the disk that had the
error and its unique device alias. It does not include the
target device name (/dev/sda), since this would preclude
triggering IO errors from other file backed devices (eg
serial ports connected to a file)
Thus there is a new callback definition for this event type
typedef void (*virConnectDomainEventIOErrorCallback)(virConnectPtr conn,
virDomainPtr dom,
const char *srcPath,
const char *devAlias,
int action,
void *opaque);
This is currently wired up to the QEMU block IO error events
* daemon/remote.c: Dispatch IO error events to client
* examples/domain-events/events-c/event-test.c: Watch for
IO error events
* include/libvirt/libvirt.h.in: Define new IO error event ID
and callback signature
* src/conf/domain_event.c, src/conf/domain_event.h,
src/libvirt_private.syms: Extend API to handle IO error events
* src/qemu/qemu_driver.c: Connect to the QEMU monitor event
for block IO errors and emit a libvirt IO error event
* src/remote/remote_driver.c: Receive and dispatch IO error
events to application
* src/remote/remote_protocol.x: Wire protocol definition for
IO error events
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
src/qemu/qemu_monitor_json.c: Watch for BLOCK_IO_ERROR event
from QEMU monitor
2010-03-18 19:37:44 +00:00
|
|
|
virDomainEventIOErrorNewFromDom;
|
|
|
|
virDomainEventIOErrorNewFromObj;
|
Add support for another explicit IO error event
This introduces a new event type
VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
This event is the same as the previous VIR_DOMAIN_ID_IO_ERROR
event, but also includes a string describing the cause of
the event.
Thus there is a new callback definition for this event type
typedef void (*virConnectDomainEventIOErrorReasonCallback)(virConnectPtr conn,
virDomainPtr dom,
const char *srcPath,
const char *devAlias,
int action,
const char *reason,
void *opaque);
This is currently wired up to the QEMU block IO error events
* daemon/remote.c: Dispatch IO error events to client
* examples/domain-events/events-c/event-test.c: Watch for
IO error events
* include/libvirt/libvirt.h.in: Define new IO error event ID
and callback signature
* src/conf/domain_event.c, src/conf/domain_event.h,
src/libvirt_private.syms: Extend API to handle IO error events
* src/qemu/qemu_driver.c: Connect to the QEMU monitor event
for block IO errors and emit a libvirt IO error event
* src/remote/remote_driver.c: Receive and dispatch IO error
events to application
* src/remote/remote_protocol.x: Wire protocol definition for
IO error events
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
src/qemu/qemu_monitor_json.c: Watch for BLOCK_IO_ERROR event
from QEMU monitor
2010-03-18 19:37:44 +00:00
|
|
|
virDomainEventIOErrorReasonNewFromDom;
|
|
|
|
virDomainEventIOErrorReasonNewFromObj;
|
Add domain events for graphics network clients
This introduces a new event type
VIR_DOMAIN_EVENT_ID_GRAPHICS
The same event can be emitted in 3 scenarios
typedef enum {
VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = 0,
VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE,
VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT,
} virDomainEventGraphicsPhase;
Connect/disconnect are triggered at socket accept/close.
The initialize phase is immediately after the protocol
setup and authentication has completed. ie when the
client is authorized and about to start interacting with
the graphical desktop
This event comes with *a lot* of potential information
- IP address, port & address family of client
- IP address, port & address family of server
- Authentication scheme (arbitrary string)
- Authenticated subject identity. A subject may have
multiple identities with some authentication schemes.
For example, vencrypt+sasl results in a x509dname
and saslUsername identities.
This results in a very complicated callback :-(
typedef enum {
VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4,
VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6,
} virDomainEventGraphicsAddressType;
struct _virDomainEventGraphicsAddress {
int family;
const char *node;
const char *service;
};
typedef struct _virDomainEventGraphicsAddress virDomainEventGraphicsAddress;
typedef virDomainEventGraphicsAddress *virDomainEventGraphicsAddressPtr;
struct _virDomainEventGraphicsSubject {
int nidentity;
struct {
const char *type;
const char *name;
} *identities;
};
typedef struct _virDomainEventGraphicsSubject virDomainEventGraphicsSubject;
typedef virDomainEventGraphicsSubject *virDomainEventGraphicsSubjectPtr;
typedef void (*virConnectDomainEventGraphicsCallback)(virConnectPtr conn,
virDomainPtr dom,
int phase,
virDomainEventGraphicsAddressPtr local,
virDomainEventGraphicsAddressPtr remote,
const char *authScheme,
virDomainEventGraphicsSubjectPtr subject,
void *opaque);
The wire protocol is similarly complex
struct remote_domain_event_graphics_address {
int family;
remote_nonnull_string node;
remote_nonnull_string service;
};
const REMOTE_DOMAIN_EVENT_GRAPHICS_IDENTITY_MAX = 20;
struct remote_domain_event_graphics_identity {
remote_nonnull_string type;
remote_nonnull_string name;
};
struct remote_domain_event_graphics_msg {
remote_nonnull_domain dom;
int phase;
remote_domain_event_graphics_address local;
remote_domain_event_graphics_address remote;
remote_nonnull_string authScheme;
remote_domain_event_graphics_identity subject<REMOTE_DOMAIN_EVENT_GRAPHICS_IDENTITY_MAX>;
};
This is currently implemented in QEMU for the VNC graphics
protocol, but designed to be usable with SPICE graphics in
the future too.
* daemon/remote.c: Dispatch graphics events to client
* examples/domain-events/events-c/event-test.c: Watch for
graphics events
* include/libvirt/libvirt.h.in: Define new graphics event ID
and callback signature
* src/conf/domain_event.c, src/conf/domain_event.h,
src/libvirt_private.syms: Extend API to handle graphics events
* src/qemu/qemu_driver.c: Connect to the QEMU monitor event
for VNC events and emit a libvirt graphics event
* src/remote/remote_driver.c: Receive and dispatch graphics
events to application
* src/remote/remote_protocol.x: Wire protocol definition for
graphics events
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
src/qemu/qemu_monitor_json.c: Watch for VNC_CONNECTED,
VNC_INITIALIZED & VNC_DISCONNETED events from QEMU monitor
2010-03-19 13:27:45 +00:00
|
|
|
virDomainEventGraphicsNewFromDom;
|
|
|
|
virDomainEventGraphicsNewFromObj;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainEventFree;
|
|
|
|
virDomainEventDispatchDefaultFunc;
|
|
|
|
virDomainEventDispatch;
|
|
|
|
virDomainEventQueueDispatch;
|
|
|
|
|
2010-06-21 18:18:31 +00:00
|
|
|
# domain_nwfilter.h
|
|
|
|
virDomainConfNWFilterRegister;
|
|
|
|
virDomainConfNWFilterInstantiate;
|
|
|
|
virDomainConfNWFilterTeardown;
|
|
|
|
virDomainConfVMNWFilterTeardown;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2009-11-03 22:11:01 +00:00
|
|
|
# ebtables.h
|
|
|
|
ebtablesAddForwardAllowIn;
|
|
|
|
ebtablesAddForwardPolicyReject;
|
|
|
|
ebtablesContextNew;
|
|
|
|
ebtablesRemoveForwardAllowIn;
|
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# event.h
|
|
|
|
virEventAddHandle;
|
|
|
|
virEventAddTimeout;
|
|
|
|
virEventRemoveHandle;
|
|
|
|
virEventRemoveTimeout;
|
|
|
|
virEventUpdateHandle;
|
|
|
|
virEventUpdateTimeout;
|
|
|
|
|
|
|
|
|
|
|
|
# hash.h
|
|
|
|
virHashAddEntry;
|
|
|
|
virHashCreate;
|
|
|
|
virHashForEach;
|
|
|
|
virHashFree;
|
|
|
|
virHashLookup;
|
|
|
|
virHashRemoveEntry;
|
|
|
|
virHashRemoveSet;
|
|
|
|
virHashSearch;
|
|
|
|
virHashSize;
|
|
|
|
|
|
|
|
|
2010-03-26 14:49:45 +00:00
|
|
|
# hooks.h
|
|
|
|
virHookCall;
|
|
|
|
virHookInitialize;
|
|
|
|
virHookPresent;
|
|
|
|
|
|
|
|
|
2009-07-15 17:34:04 +00:00
|
|
|
# interface_conf.h
|
|
|
|
virInterfaceDefFormat;
|
|
|
|
virInterfaceDefParseFile;
|
|
|
|
virInterfaceDefParseString;
|
2009-09-10 13:21:10 +00:00
|
|
|
virInterfaceDefParseNode;
|
2009-07-15 17:34:04 +00:00
|
|
|
virInterfaceDefFree;
|
2009-09-10 13:21:10 +00:00
|
|
|
virInterfaceFindByName;
|
|
|
|
virInterfaceFindByMACString;
|
|
|
|
virInterfaceAssignDef;
|
|
|
|
virInterfaceRemove;
|
|
|
|
virInterfaceObjLock;
|
|
|
|
virInterfaceObjUnlock;
|
|
|
|
virInterfaceObjListFree;
|
|
|
|
|
2009-07-15 17:34:04 +00:00
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# iptables.h
|
|
|
|
iptablesAddForwardAllowCross;
|
|
|
|
iptablesAddForwardAllowIn;
|
|
|
|
iptablesAddForwardAllowOut;
|
|
|
|
iptablesAddForwardAllowRelatedIn;
|
|
|
|
iptablesAddForwardMasquerade;
|
|
|
|
iptablesAddForwardRejectIn;
|
|
|
|
iptablesAddForwardRejectOut;
|
2010-07-13 02:59:58 +00:00
|
|
|
iptablesAddOutputFixUdpChecksum;
|
2009-01-05 14:05:29 +00:00
|
|
|
iptablesAddTcpInput;
|
|
|
|
iptablesAddUdpInput;
|
|
|
|
iptablesContextFree;
|
|
|
|
iptablesContextNew;
|
|
|
|
iptablesRemoveForwardAllowCross;
|
|
|
|
iptablesRemoveForwardAllowIn;
|
|
|
|
iptablesRemoveForwardAllowOut;
|
|
|
|
iptablesRemoveForwardAllowRelatedIn;
|
|
|
|
iptablesRemoveForwardMasquerade;
|
|
|
|
iptablesRemoveForwardRejectIn;
|
|
|
|
iptablesRemoveForwardRejectOut;
|
2010-07-13 02:59:58 +00:00
|
|
|
iptablesRemoveOutputFixUdpChecksum;
|
2009-01-05 14:05:29 +00:00
|
|
|
iptablesRemoveTcpInput;
|
|
|
|
iptablesRemoveUdpInput;
|
|
|
|
|
|
|
|
|
2010-04-26 13:56:03 +00:00
|
|
|
# dnsmasq.h
|
|
|
|
dnsmasqContextNew;
|
|
|
|
dnsmasqContextFree;
|
|
|
|
dnsmasqAddDhcpHost;
|
|
|
|
dnsmasqSave;
|
|
|
|
dnsmasqDelete;
|
|
|
|
dnsmasqReload;
|
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# libvirt_internal.h
|
|
|
|
virDrvSupportsFeature;
|
|
|
|
virDomainMigratePrepare;
|
|
|
|
virDomainMigratePerform;
|
|
|
|
virDomainMigrateFinish;
|
|
|
|
virDomainMigratePrepare2;
|
|
|
|
virDomainMigrateFinish2;
|
2009-09-30 10:51:54 +00:00
|
|
|
virDomainMigratePrepareTunnel;
|
2009-01-05 14:05:29 +00:00
|
|
|
virRegisterDriver;
|
2009-07-21 14:02:16 +00:00
|
|
|
virRegisterInterfaceDriver;
|
2009-01-05 14:05:29 +00:00
|
|
|
virRegisterNetworkDriver;
|
|
|
|
virRegisterStorageDriver;
|
|
|
|
virRegisterDeviceMonitor;
|
2009-09-10 13:21:10 +00:00
|
|
|
virRegisterSecretDriver;
|
2010-03-25 17:46:02 +00:00
|
|
|
virRegisterNWFilterDriver;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
2009-11-03 18:59:18 +00:00
|
|
|
# json.h
|
|
|
|
virJSONValueFree;
|
|
|
|
virJSONValueNewString;
|
|
|
|
virJSONValueNewStringLen;
|
|
|
|
virJSONValueNewNumberInt;
|
|
|
|
virJSONValueNewNumberUint;
|
|
|
|
virJSONValueNewNumberLong;
|
|
|
|
virJSONValueNewNumberUlong;
|
|
|
|
virJSONValueNewNumberDouble;
|
|
|
|
virJSONValueNewBoolean;
|
|
|
|
virJSONValueNewNull;
|
|
|
|
virJSONValueNewArray;
|
|
|
|
virJSONValueNewObject;
|
|
|
|
virJSONValueObjectAppend;
|
|
|
|
virJSONValueObjectAppendString;
|
|
|
|
virJSONValueObjectAppendNumberInt;
|
|
|
|
virJSONValueObjectAppendNumberUint;
|
|
|
|
virJSONValueObjectAppendNumberLong;
|
|
|
|
virJSONValueObjectAppendNumberUlong;
|
|
|
|
virJSONValueObjectAppendNumberDouble;
|
|
|
|
virJSONValueObjectAppendBoolean;
|
|
|
|
virJSONValueObjectAppendNull;
|
|
|
|
virJSONValueArrayAppend;
|
|
|
|
virJSONValueObjectHasKey;
|
|
|
|
virJSONValueObjectGet;
|
|
|
|
virJSONValueArraySize;
|
|
|
|
virJSONValueArrayGet;
|
|
|
|
virJSONValueGetString;
|
|
|
|
virJSONValueGetNumberInt;
|
|
|
|
virJSONValueGetNumberUint;
|
|
|
|
virJSONValueGetNumberLong;
|
|
|
|
virJSONValueGetNumberUlong;
|
|
|
|
virJSONValueGetNumberDouble;
|
|
|
|
virJSONValueGetBoolean;
|
|
|
|
virJSONValueIsNull;
|
|
|
|
virJSONValueObjectGetString;
|
|
|
|
virJSONValueObjectGetNumberInt;
|
|
|
|
virJSONValueObjectGetNumberUint;
|
|
|
|
virJSONValueObjectGetNumberLong;
|
|
|
|
virJSONValueObjectGetNumberUlong;
|
|
|
|
virJSONValueObjectGetNumberDouble;
|
|
|
|
virJSONValueObjectGetBoolean;
|
|
|
|
virJSONValueObjectIsNull;
|
|
|
|
virJSONValueFromString;
|
|
|
|
virJSONValueToString;
|
|
|
|
|
|
|
|
|
2009-06-26 15:08:04 +00:00
|
|
|
# logging.h
|
|
|
|
virLogMessage;
|
2009-08-06 13:45:50 +00:00
|
|
|
virLogGetNbFilters;
|
|
|
|
virLogGetNbOutputs;
|
2009-10-08 15:05:01 +00:00
|
|
|
virLogGetFilters;
|
|
|
|
virLogGetOutputs;
|
2009-08-06 13:45:50 +00:00
|
|
|
virLogGetDefaultPriority;
|
2009-06-26 15:08:04 +00:00
|
|
|
virLogSetDefaultPriority;
|
2009-08-06 13:55:07 +00:00
|
|
|
virLogSetFromEnv;
|
2009-06-26 15:08:04 +00:00
|
|
|
virLogDefineFilter;
|
|
|
|
virLogDefineOutput;
|
2009-08-06 13:55:07 +00:00
|
|
|
virLogParseDefaultPriority;
|
2009-06-26 15:08:04 +00:00
|
|
|
virLogParseFilters;
|
|
|
|
virLogParseOutputs;
|
|
|
|
virLogStartup;
|
|
|
|
virLogShutdown;
|
|
|
|
virLogReset;
|
2010-02-03 16:12:57 +00:00
|
|
|
virLogLock;
|
|
|
|
virLogUnlock;
|
2009-06-26 15:08:04 +00:00
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# memory.h
|
|
|
|
virAlloc;
|
|
|
|
virAllocN;
|
|
|
|
virReallocN;
|
|
|
|
virFree;
|
|
|
|
|
|
|
|
|
2009-10-30 15:36:04 +00:00
|
|
|
# network.h
|
|
|
|
virSocketAddrIsNetmask;
|
|
|
|
virSocketCheckNetmask;
|
2009-11-02 14:42:47 +00:00
|
|
|
virSocketFormatAddr;
|
|
|
|
virSocketGetPort;
|
2009-10-30 15:36:04 +00:00
|
|
|
virSocketGetRange;
|
|
|
|
virSocketParseAddr;
|
|
|
|
virSocketParseIpv4Addr;
|
|
|
|
virSocketParseIpv6Addr;
|
2009-11-02 14:42:47 +00:00
|
|
|
virSocketSetPort;
|
2009-10-30 15:36:04 +00:00
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# network_conf.h
|
|
|
|
virNetworkAssignDef;
|
2009-01-20 22:36:10 +00:00
|
|
|
virNetworkConfigFile;
|
2009-01-05 14:05:29 +00:00
|
|
|
virNetworkDefFormat;
|
|
|
|
virNetworkDefFree;
|
|
|
|
virNetworkDefParseFile;
|
|
|
|
virNetworkDefParseNode;
|
|
|
|
virNetworkDefParseString;
|
|
|
|
virNetworkDeleteConfig;
|
|
|
|
virNetworkFindByName;
|
|
|
|
virNetworkFindByUUID;
|
|
|
|
virNetworkLoadAllConfigs;
|
|
|
|
virNetworkObjListFree;
|
|
|
|
virNetworkDefParseNode;
|
|
|
|
virNetworkRemoveInactive;
|
|
|
|
virNetworkSaveConfig;
|
2009-03-02 17:37:03 +00:00
|
|
|
virNetworkSetBridgeName;
|
2009-01-05 14:05:29 +00:00
|
|
|
virNetworkObjLock;
|
|
|
|
virNetworkObjUnlock;
|
2010-05-27 15:44:31 +00:00
|
|
|
virNetworkObjIsDuplicate;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# nodeinfo.h
|
2009-06-03 13:28:02 +00:00
|
|
|
nodeGetInfo;
|
|
|
|
nodeCapsInitNUMA;
|
|
|
|
nodeGetCellsFreeMemory;
|
|
|
|
nodeGetFreeMemory;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# node_device_conf.h
|
2009-10-01 18:53:43 +00:00
|
|
|
virNodeDeviceHasCap;
|
2009-01-05 14:05:29 +00:00
|
|
|
virNodeDeviceObjRemove;
|
|
|
|
virNodeDevCapTypeToString;
|
|
|
|
virNodeDeviceFindByName;
|
2009-11-12 21:48:24 +00:00
|
|
|
virNodeDeviceFindBySysfsPath;
|
2009-01-05 14:05:29 +00:00
|
|
|
virNodeDeviceObjListFree;
|
|
|
|
virNodeDeviceDefFree;
|
|
|
|
virNodeDevCapsDefFree;
|
|
|
|
virNodeDeviceDefFormat;
|
2009-02-24 14:55:45 +00:00
|
|
|
virNodeDeviceDefParseString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virNodeDeviceObjLock;
|
|
|
|
virNodeDeviceObjUnlock;
|
|
|
|
virNodeDeviceAssignDef;
|
2009-10-14 19:47:10 +00:00
|
|
|
virNodeDeviceGetWWNs;
|
|
|
|
virNodeDeviceGetParentHost;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
2010-03-25 17:46:09 +00:00
|
|
|
# nwfilter_conf.h
|
|
|
|
virNWFilterPoolLoadAllConfigs;
|
|
|
|
virNWFilterPoolObjAssignDef;
|
|
|
|
virNWFilterPoolObjSaveDef;
|
|
|
|
virNWFilterPoolObjFindByName;
|
|
|
|
virNWFilterPoolObjFindByUUID;
|
|
|
|
virNWFilterPoolObjLock;
|
|
|
|
virNWFilterPoolObjUnlock;
|
|
|
|
virNWFilterPoolObjRemove;
|
|
|
|
virNWFilterDefFree;
|
|
|
|
virNWFilterDefParseString;
|
|
|
|
virNWFilterPoolObjDeleteDef;
|
|
|
|
virNWFilterPoolObjListFree;
|
|
|
|
virNWFilterDefFormat;
|
|
|
|
virNWFilterChainSuffixTypeToString;
|
|
|
|
virNWFilterRuleActionTypeToString;
|
2010-03-25 17:46:12 +00:00
|
|
|
virNWFilterRuleProtocolTypeToString;
|
2010-03-25 17:46:09 +00:00
|
|
|
virNWFilterJumpTargetTypeToString;
|
|
|
|
virNWFilterRegisterCallbackDriver;
|
|
|
|
virNWFilterTestUnassignDef;
|
|
|
|
virNWFilterConfLayerInit;
|
|
|
|
virNWFilterConfLayerShutdown;
|
nwfilter: Support for learning a VM's IP address
This patch implements support for learning a VM's IP address. It uses
the pcap library to listen on the VM's backend network interface (tap)
or the physical ethernet device (macvtap) and tries to capture packets
with source or destination MAC address of the VM and learn from DHCP
Offers, ARP traffic, or first-sent IPv4 packet what the IP address of
the VM's interface is. This then allows to instantiate the network
traffic filtering rules without the user having to provide the IP
parameter somewhere in the filter description or in the interface
description as a parameter. This only supports to detect the parameter
IP, which is for the assumed single IPv4 address of a VM. There is not
support for interfaces that may have multiple IP addresses (IP
aliasing) or IPv6 that may then require more than one valid IP address
to be detected. A VM can have multiple independent interfaces that each
uses a different IP address and in that case it will be attempted to
detect each one of the address independently.
So, when for example an interface description in the domain XML has
looked like this up to now:
<interface type='bridge'>
<source bridge='mybridge'/>
<model type='virtio'/>
<filterref filter='clean-traffic'>
<parameter name='IP' value='10.2.3.4'/>
</filterref>
</interface>
you may omit the IP parameter:
<interface type='bridge'>
<source bridge='mybridge'/>
<model type='virtio'/>
<filterref filter='clean-traffic'/>
</interface>
Internally I am walking the 'tree' of a VM's referenced network filters
and determine with the given variables which variables are missing. Now,
the above IP parameter may be missing and this causes a libvirt-internal
thread to be started that uses the pcap library's API to listen to the
backend interface (in case of macvtap to the physical interface) in an
attempt to determine the missing IP parameter. If the backend interface
disappears the thread terminates assuming the VM was brought down. In
case of a macvtap device a timeout is being used to wait for packets
from the given VM (filtering by VM's interface MAC address). If the VM's
macvtap device disappeared the thread also terminates. In all other
cases it tries to determine the IP address of the VM and will then apply
the rules late on the given interface, which would have happened
immediately if the IP parameter had been explicitly given. In case an
error happens while the firewall rules are applied, the VM's backend
interface is 'down'ed preventing it to communicate. Reasons for failure
for applying the network firewall rules may that an ebtables/iptables
command failes or OOM errors. Essentially the same failure reasons may
occur as when the firewall rules are applied immediately on VM start,
except that due to the late application of the filtering rules the VM
now is already running and cannot be hindered anymore from starting.
Bringing down the whole VM would probably be considered too drastic.
While a VM's IP address is attempted to be determined only limited
updates to network filters are allowed. In particular it is prevented
that filters are modified in such a way that they would introduce new
variables.
A caveat: The algorithm does not know which one is the appropriate IP
address of a VM. If the VM spoofs an IP address in its first ARP traffic
or IPv4 packets its filtering rules will be instantiated for this IP
address, thus 'locking' it to the found IP address. So, it's still
'safer' to explicitly provide the IP address of a VM's interface in the
filter description if it is known beforehand.
* configure.ac: detect libpcap
* libvirt.spec.in: require libpcap[-devel] if qemu is built
* src/internal.h: add the new ATTRIBUTE_PACKED define
* src/Makefile.am src/libvirt_private.syms: add the new modules and symbols
* src/nwfilter/nwfilter_learnipaddr.[ch]: new module being added
* src/nwfilter/nwfilter_driver.c src/conf/nwfilter_conf.[ch]
src/nwfilter/nwfilter_ebiptables_driver.[ch]
src/nwfilter/nwfilter_gentech_driver.[ch]: plu the new functionality in
* tests/nwfilterxml2xmltest: extend testing
2010-04-07 21:02:18 +00:00
|
|
|
virNWFilterLockFilterUpdates;
|
|
|
|
virNWFilterUnlockFilterUpdates;
|
2010-10-07 10:37:31 +00:00
|
|
|
virNWFilterPrintStateMatchFlags;
|
nwfilter: resolve deadlock between VM ops and filter update
This is from a bug report and conversation on IRC where Soren reported that while a filter update is occurring on one or more VMs (due to a rule having been edited for example), a deadlock can occur when a VM referencing a filter is started.
The problem is caused by the two locking sequences of
qemu driver, qemu domain, filter # for the VM start operation
filter, qemu_driver, qemu_domain # for the filter update operation
that obviously don't lock in the same order. The problem is the 2nd lock sequence. Here the qemu_driver lock is being grabbed in qemu_driver:qemudVMFilterRebuild()
The following solution is based on the idea of trying to re-arrange the 2nd sequence of locks as follows:
qemu_driver, filter, qemu_driver, qemu_domain
and making the qemu driver recursively lockable so that a second lock can occur, this would then lead to the following net-locking sequence
qemu_driver, filter, qemu_domain
where the 2nd qemu_driver lock has been ( logically ) eliminated.
The 2nd part of the idea is that the sequence of locks (filter, qemu_domain) and (qemu_domain, filter) becomes interchangeable if all code paths where filter AND qemu_domain are locked have a preceding qemu_domain lock that basically blocks their concurrent execution
So, the following code paths exist towards qemu_driver:qemudVMFilterRebuild where we now want to put a qemu_driver lock in front of the filter lock.
-> nwfilterUndefine() [ locks the filter ]
-> virNWFilterTestUnassignDef()
-> virNWFilterTriggerVMFilterRebuild()
-> qemudVMFilterRebuild()
-> nwfilterDefine()
-> virNWFilterPoolAssignDef() [ locks the filter ]
-> virNWFilterTriggerVMFilterRebuild()
-> qemudVMFilterRebuild()
-> nwfilterDriverReload()
-> virNWFilterPoolLoadAllConfigs()
->virNWFilterPoolObjLoad()
-> virNWFilterPoolAssignDef() [ locks the filter ]
-> virNWFilterTriggerVMFilterRebuild()
-> qemudVMFilterRebuild()
-> nwfilterDriverStartup()
-> virNWFilterPoolLoadAllConfigs()
->virNWFilterPoolObjLoad()
-> virNWFilterPoolAssignDef() [ locks the filter ]
-> virNWFilterTriggerVMFilterRebuild()
-> qemudVMFilterRebuild()
Qemu is not the only driver using the nwfilter driver, but also the UML driver calls into it. Therefore qemuVMFilterRebuild() can be exchanged with umlVMFilterRebuild() along with the driver lock of qemu_driver that can now be a uml_driver. Further, since UML and Qemu domains can be running on the same machine, the triggering of a rebuild of the filter can touch both types of drivers and their domains.
In the patch below I am now extending each nwfilter callback driver with functions for locking and unlocking the (VM) driver (UML, QEMU) and introduce new functions for locking all registered callback drivers and unlocking them. Then I am distributing the lock-all-cbdrivers/unlock-all-cbdrivers call into the above call paths. The last shown callpath starting with nwfilterDriverStart() is problematic since it is initialize before the Qemu and UML drives are and thus a lock in the path would result in a NULL pointer attempted to be locked -- the call to virNWFilterTriggerVMFilterRebuild() is never called, so we never lock either the qemu_driver or the uml_driver in that path. Therefore, only the first 3 paths now receive calls to lock and unlock all callback drivers. Now that the locks are distributed where it matters I can remove the qemu_driver and uml_driver lock from qemudVMFilterRebuild() and umlVMFilterRebuild() and not requiring the recursive locks.
For now I want to put this out as an RFC patch. I have tested it by 'stretching' the critical section after the define/undefine functions each lock the filter so I can (easily) concurrently execute another VM operation (suspend,start). That code is in this patch and if you want you can de-activate it. It seems to work ok and operations are being blocked while the update is being done.
I still also want to verify the other assumption above that locking filter and qemu_domain always has a preceding qemu_driver lock.
2010-10-13 14:33:26 +00:00
|
|
|
virNWFilterCallbackDriversLock;
|
|
|
|
virNWFilterCallbackDriversUnlock;
|
2010-03-25 17:46:09 +00:00
|
|
|
|
|
|
|
|
2010-04-23 16:39:08 +00:00
|
|
|
# nwfilter_params.h
|
2010-03-25 17:46:09 +00:00
|
|
|
virNWFilterHashTableCreate;
|
|
|
|
virNWFilterHashTableFree;
|
|
|
|
virNWFilterHashTablePut;
|
|
|
|
virNWFilterHashTablePutAll;
|
|
|
|
virNWFilterHashTableRemoveEntry;
|
|
|
|
|
|
|
|
|
2009-03-02 16:18:11 +00:00
|
|
|
# pci.h
|
|
|
|
pciGetDevice;
|
|
|
|
pciFreeDevice;
|
|
|
|
pciDettachDevice;
|
|
|
|
pciReAttachDevice;
|
2010-01-20 20:53:59 +00:00
|
|
|
pciWaitForDeviceCleanup;
|
2009-03-02 16:18:11 +00:00
|
|
|
pciResetDevice;
|
2009-08-17 14:05:23 +00:00
|
|
|
pciDeviceSetManaged;
|
|
|
|
pciDeviceGetManaged;
|
|
|
|
pciDeviceListNew;
|
|
|
|
pciDeviceListFree;
|
|
|
|
pciDeviceListAdd;
|
|
|
|
pciDeviceListDel;
|
2009-08-14 13:20:40 +00:00
|
|
|
pciDeviceFileIterate;
|
2009-10-27 17:30:16 +00:00
|
|
|
pciDeviceListCount;
|
|
|
|
pciDeviceListGet;
|
|
|
|
pciDeviceListSteal;
|
2009-12-22 17:21:15 +00:00
|
|
|
pciDeviceIsAssignable;
|
2009-08-14 13:20:40 +00:00
|
|
|
|
2009-03-02 16:18:11 +00:00
|
|
|
|
2009-11-16 15:22:34 +00:00
|
|
|
# processinfo.h
|
|
|
|
virProcessInfoSetAffinity;
|
|
|
|
virProcessInfoGetAffinity;
|
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# qparams.h
|
|
|
|
qparam_get_query;
|
|
|
|
qparam_query_parse;
|
|
|
|
free_qparam_set;
|
|
|
|
|
2009-09-01 15:27:46 +00:00
|
|
|
# secret_conf.h
|
|
|
|
virSecretDefFree;
|
|
|
|
virSecretDefParseString;
|
|
|
|
virSecretDefParseFile;
|
|
|
|
virSecretDefFormat;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2009-08-14 19:48:55 +00:00
|
|
|
|
2009-03-03 09:44:41 +00:00
|
|
|
# security.h
|
2009-04-03 10:55:51 +00:00
|
|
|
virSecurityDriverVerify;
|
2009-03-03 09:44:41 +00:00
|
|
|
virSecurityDriverStartup;
|
|
|
|
virSecurityDriverInit;
|
|
|
|
virSecurityDriverSetDOI;
|
|
|
|
virSecurityDriverGetDOI;
|
|
|
|
virSecurityDriverGetModel;
|
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# storage_conf.h
|
|
|
|
virStoragePoolDefFormat;
|
|
|
|
virStoragePoolDefFree;
|
2009-06-22 16:41:34 +00:00
|
|
|
virStoragePoolDefParseString;
|
|
|
|
virStoragePoolDefParseFile;
|
|
|
|
virStoragePoolDefParseNode;
|
2009-01-05 14:05:29 +00:00
|
|
|
virStoragePoolLoadAllConfigs;
|
|
|
|
virStoragePoolObjAssignDef;
|
|
|
|
virStoragePoolObjClearVols;
|
|
|
|
virStoragePoolObjDeleteDef;
|
|
|
|
virStoragePoolObjFindByName;
|
|
|
|
virStoragePoolObjFindByUUID;
|
|
|
|
virStoragePoolObjListFree;
|
|
|
|
virStoragePoolObjRemove;
|
|
|
|
virStoragePoolObjSaveDef;
|
|
|
|
virStoragePoolSourceFree;
|
2009-10-15 15:58:35 +00:00
|
|
|
virStoragePoolDefParseSourceString;
|
2009-10-15 15:41:53 +00:00
|
|
|
virStoragePoolSourceListNewSource;
|
2009-01-05 14:05:29 +00:00
|
|
|
virStoragePoolSourceListFormat;
|
|
|
|
virStorageVolDefFindByKey;
|
|
|
|
virStorageVolDefFindByName;
|
|
|
|
virStorageVolDefFindByPath;
|
|
|
|
virStorageVolDefFormat;
|
|
|
|
virStorageVolDefFree;
|
2009-06-22 16:41:34 +00:00
|
|
|
virStorageVolDefParseFile;
|
|
|
|
virStorageVolDefParseString;
|
|
|
|
virStorageVolDefParseNode;
|
2009-01-05 14:05:29 +00:00
|
|
|
virStoragePoolFormatDiskTypeToString;
|
|
|
|
virStoragePoolFormatFileSystemTypeToString;
|
|
|
|
virStoragePoolFormatFileSystemNetTypeToString;
|
|
|
|
virStoragePoolTypeFromString;
|
2009-06-26 16:18:59 +00:00
|
|
|
virStoragePartedFsTypeTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virStoragePoolObjLock;
|
|
|
|
virStoragePoolObjUnlock;
|
2010-05-27 11:41:30 +00:00
|
|
|
virStoragePoolObjIsDuplicate;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2009-09-08 11:33:35 +00:00
|
|
|
# storage_encryption_conf.h
|
2009-08-19 19:50:10 +00:00
|
|
|
virStorageEncryptionFree;
|
|
|
|
virStorageEncryptionParseNode;
|
|
|
|
virStorageEncryptionFormat;
|
2009-08-14 18:06:59 +00:00
|
|
|
virStorageGenerateQcowPassphrase;
|
2009-08-19 19:50:10 +00:00
|
|
|
|
2009-09-25 13:20:13 +00:00
|
|
|
# storage_file.h
|
|
|
|
virStorageFileFormatTypeToString;
|
|
|
|
virStorageFileFormatTypeFromString;
|
2010-06-15 13:58:10 +00:00
|
|
|
virStorageFileProbeFormat;
|
|
|
|
virStorageFileProbeFormatFromFD;
|
2009-09-29 08:41:23 +00:00
|
|
|
virStorageFileGetMetadata;
|
2009-09-29 08:34:48 +00:00
|
|
|
virStorageFileGetMetadataFromFD;
|
Don't reset user/group/security label on shared filesystems during migrate
When QEMU runs with its disk on NFS, and as a non-root user, the
disk is chownd to that non-root user. When migration completes
the last step is shutting down the QEMU on the source host. THis
normally resets user/group/security label. This is bad when the
VM was just migrated because the file is still in use on the dest
host. It is thus neccessary to skip the reset step for any files
found to be on a shared filesystem
* src/libvirt_private.syms: Export virStorageFileIsSharedFS
* src/util/storage_file.c, src/util/storage_file.h: Add a new
method virStorageFileIsSharedFS() to determine if a file is
on a shared filesystem (NFS, GFS, OCFS2, etc)
* src/qemu/qemu_driver.c: Tell security driver not to reset
disk labels on migration completion
* src/qemu/qemu_security_dac.c, src/qemu/qemu_security_stacked.c,
src/security/security_selinux.c, src/security/security_driver.h,
src/security/security_apparmor.c: Add ability to skip disk
restore step for files on shared filesystems.
2010-05-13 15:49:22 +00:00
|
|
|
virStorageFileIsSharedFS;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2009-01-15 19:56:05 +00:00
|
|
|
# threads.h
|
|
|
|
virMutexInit;
|
|
|
|
virMutexDestroy;
|
|
|
|
virMutexLock;
|
|
|
|
virMutexUnlock;
|
|
|
|
|
|
|
|
virCondInit;
|
|
|
|
virCondDestroy;
|
|
|
|
virCondWait;
|
2009-11-03 18:40:15 +00:00
|
|
|
virCondWaitUntil;
|
2009-01-15 19:56:05 +00:00
|
|
|
virCondSignal;
|
|
|
|
virCondBroadcast;
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# util.h
|
|
|
|
virFileReadAll;
|
2009-02-13 19:13:06 +00:00
|
|
|
virFileWriteStr;
|
2009-01-05 14:05:29 +00:00
|
|
|
virStrToLong_i;
|
|
|
|
virStrToLong_ll;
|
|
|
|
virStrToLong_ull;
|
|
|
|
virStrToLong_ui;
|
2009-07-09 13:11:21 +00:00
|
|
|
virStrToDouble;
|
2009-01-05 14:05:29 +00:00
|
|
|
virFileLinkPointsTo;
|
2009-04-01 10:26:22 +00:00
|
|
|
virFileResolveLink;
|
2009-01-05 14:05:29 +00:00
|
|
|
saferead;
|
|
|
|
safewrite;
|
2009-03-20 12:17:56 +00:00
|
|
|
safezero;
|
2010-10-12 11:35:25 +00:00
|
|
|
virHexToBin;
|
2009-01-05 14:05:29 +00:00
|
|
|
virMacAddrCompare;
|
|
|
|
virEnumFromString;
|
|
|
|
virEnumToString;
|
|
|
|
virEventAddHandle;
|
|
|
|
virEventRemoveHandle;
|
|
|
|
virExec;
|
2009-05-11 13:34:37 +00:00
|
|
|
virExecDaemonize;
|
2009-02-05 16:27:17 +00:00
|
|
|
virSetCloseExec;
|
2009-01-20 16:36:34 +00:00
|
|
|
virSetNonBlock;
|
2009-01-05 14:05:29 +00:00
|
|
|
virFormatMacAddr;
|
2009-01-07 10:43:16 +00:00
|
|
|
virGetHostname;
|
2009-01-05 14:05:29 +00:00
|
|
|
virParseMacAddr;
|
|
|
|
virFileDeletePid;
|
2009-06-11 13:18:56 +00:00
|
|
|
virFindFileInPath;
|
2009-01-05 14:05:29 +00:00
|
|
|
virFileExists;
|
|
|
|
virFileHasSuffix;
|
|
|
|
virFileLinkPointsTo;
|
|
|
|
virFileMakePath;
|
2009-10-08 14:55:58 +00:00
|
|
|
virFileAbsPath;
|
2009-01-05 14:05:29 +00:00
|
|
|
virFileOpenTty;
|
|
|
|
virFileReadLimFD;
|
|
|
|
virFilePid;
|
|
|
|
virFileReadPid;
|
|
|
|
virFileLinkPointsTo;
|
2010-05-20 15:41:31 +00:00
|
|
|
virFileSanitizePath;
|
2009-01-05 14:05:29 +00:00
|
|
|
virParseNumber;
|
2010-03-30 14:15:13 +00:00
|
|
|
virParseVersionString;
|
2010-03-26 10:50:10 +00:00
|
|
|
virPipeReadUntilEOF;
|
2009-01-05 14:05:29 +00:00
|
|
|
virAsprintf;
|
|
|
|
virRun;
|
|
|
|
virSkipSpaces;
|
2009-01-06 17:46:46 +00:00
|
|
|
virKillProcess;
|
2009-01-22 19:41:48 +00:00
|
|
|
virGetUserDirectory;
|
2009-07-10 10:40:04 +00:00
|
|
|
virGetUserName;
|
2009-07-15 21:25:01 +00:00
|
|
|
virGetUserID;
|
|
|
|
virGetGroupID;
|
Support configuration of huge pages in guests
Add option to domain XML for
<memoryBacking>
<hugepages/>
</memoryBacking>
* configure.in: Add check for mntent.h
* qemud/libvirtd_qemu.aug, qemud/test_libvirtd_qemu.aug, src/qemu.conf
Add 'hugetlbfs_mount' config parameter
* src/qemu_conf.c, src/qemu_conf.h: Check for -mem-path flag in QEMU,
and pass it when hugepages are requested.
Load hugetlbfs_mount config parameter, search for mount if not given.
* src/qemu_driver.c: Free hugetlbfs_mount/path parameter in driver shutdown.
Create directory for QEMU hugepage usage, chowning if required.
* docs/formatdomain.html.in: Document memoryBacking/hugepages elements
* docs/schemas/domain.rng: Add memoryBacking/hugepages elements to schema
* src/util.c, src/util.h, src/libvirt_private.syms: Add virFileFindMountPoint
helper API
* tests/qemuhelptest.c: Add -mem-path constants
* tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c: Add tests for hugepage
handling
* tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml,
tests/qemuxml2argvdata/qemuxml2argv-hugepages.args: Data files for
hugepage tests
2009-08-25 14:05:18 +00:00
|
|
|
virFileFindMountPoint;
|
2009-09-10 13:21:10 +00:00
|
|
|
virFileWaitForDevices;
|
2009-09-15 10:11:10 +00:00
|
|
|
virFileMatchesNameSuffix;
|
2009-09-23 14:23:47 +00:00
|
|
|
virArgvToString;
|
2009-09-15 10:11:10 +00:00
|
|
|
|
2010-04-13 14:57:11 +00:00
|
|
|
# interface.h
|
|
|
|
ifaceCtrl;
|
|
|
|
ifaceCheck;
|
|
|
|
ifaceGetIndex;
|
add 802.1Qbh and 802.1Qbg handling
This patch that adds support for configuring 802.1Qbg and 802.1Qbh
switches. The 802.1Qbh part has been successfully tested with real
hardware. The 802.1Qbg part has only been tested with a (dummy)
server that 'behaves' similarly to how we expect lldpad to 'behave'.
The following changes were made during the development of this patch:
- Merging Scott's v13-pre1 patch
- Fixing endptr related bug while using virStrToLong_ui() pointed out
by Jim Meyering
- Addressing Jim Meyering's comments to v11
- requiring mac address to the vpDisassociateProfileId() function to
pass it further to the 802.1Qbg disassociate part (802.1Qbh untouched)
- determining pid of lldpad daemon by reading it from /var/run/libvirt.pid
(hardcode as is hardcode alson in lldpad sources)
- merging netlink send code for kernel target and user space target
(lldpad) using one function nlComm() to send the messages
- adding a select() after the sending and before the reading of the
netlink response in case lldpad doesn't respond and so we don't hang
- when reading the port status, in case of 802.1Qbg, no status may be
received while things are 'in progress' and only at the end a status
will be there.
- when reading the port status, use the given instanceId and vf to pick
the right IFLA_VF_PORT among those nested under IFLA_VF_PORTS.
- never sending nor parsing IFLA_PORT_SELF type of messages in the
802.1Qbg case
- iterating over the elements in a IFLA_VF_PORTS to pick the right
IFLA_VF_PORT by either IFLA_PORT_PROFILE and given profileId
(802.1Qbh) or IFLA_PORT_INSTANCE_UUID and given instanceId (802.1Qbg)
and reading the current status in IFLA_PORT_RESPONSE.
- recycling a previous patch that adds functionality to interface.c to
- get the vlan identifier on an interface
- get the flags of an interface and some convenience function to
check whether an interface is 'up' or not (not currently used here)
- adding function to determine the root physical interface of an
interface. For example if a macvtap is linked to eth0.100, it will
find eth0. Also adding a function that finds the vlan on the 'way to
the root physical interface'
- conveying the root physical interface name and index in case of 802.1Qbg
- conveying mac address of macvlan device and vlan identifier in
IFLA_VFINFO_LIST[ IFLA_VF_INFO[ IFLA_VF_MAC(mac), IFLA_VF_VLAN(vlan) ] ]
to (future) lldpad via netlink
- To enable build with --without-macvtap rename the
[dis|]associatePortProfileId functions, prepend 'vp' before their
name and make them non-static functions.
- Renaming variable multicast to nltarget_kernel and inverting
the logic
- Addressing Jim Meyering's comments; this also touches existing
code for example for correcting indentation of break statements or
simplification of switch statements.
- Renamed occurrencvirVirtualPortProfileDef to virVirtualPortProfileParamses
- 802.1Qbg part prepared for sending a RTM_SETLINK and getting
processing status back plus a subsequent RTM_GETLINK to
get IFLA_PORT_RESPONSE.
Note: This interface for 802.1Qbg may still change
- [David Allan] move getPhysfn inside IFLA_VF_PORT_MAX to avoid
compiler
warning when latest if_link.h isn't available
- move from Stefan's 802.1Qb{g|h} XML v8 to v9
- move hostuuid and vf index calcs to inside doPortProfileOp8021Qbh
- remove debug fprintfs
- use virGetHostUUID (thanks Stefan!)
- fix compile issue when latest if_link.h isn't available
- change poll timeout to 10s, at 1/8 intervals
- if polling times out, log msg and return -ETIMEDOUT
- Add Stefan's code for getPortProfileStatus
- Poll for up to 2 secs for port-profile status, at 1/8 sec intervals:
- if status indicates error, abort openMacvtapTap
- if status indicates success, exit polling
- if status is "in-progress" after 2 secs of polling, exit
polling loop silently, without error
My patch finishes out the 802.1Qbh parts, which Stefan had mostly complete.
I've tested using the recent kernel updates for VF_PORT netlink msgs and
enic for Cisco's 10G Ethernet NIC. I tested many VMs, each with several
direct interfaces, each configured with a port-profile per the XML. VM-to-VM,
and VM-to-external work as expected. VM-to-VM on same host (using same NIC)
works same as VM-to-VM where VMs are on diff hosts. I'm able to change
settings on the port-profile while the VM is running to change the virtual
port behaviour. For example, adjusting a QoS setting like rate limit. All
VMs with interfaces using that port-profile immediatly see the effect of the
change to the port-profile.
I don't have a SR-IOV device to test so source dev is a non-SR-IOV device,
but most of the code paths include support for specifing the source dev and
VF index. We'll need to complete this by discovering the PF given the VF
linkdev. Once we have the PF, we'll also have the VF index. All this info-
mation is available from sysfs.
2010-06-03 01:35:22 +00:00
|
|
|
ifaceGetFlags;
|
|
|
|
ifaceIsUp;
|
|
|
|
ifaceGetVlanID;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2009-08-14 13:19:32 +00:00
|
|
|
# usb.h
|
|
|
|
usbGetDevice;
|
2010-03-04 11:48:16 +00:00
|
|
|
usbFindDevice;
|
2009-08-14 13:19:32 +00:00
|
|
|
usbFreeDevice;
|
2010-03-04 11:48:16 +00:00
|
|
|
usbDeviceGetBus;
|
|
|
|
usbDeviceGetDevno;
|
2009-08-14 13:19:32 +00:00
|
|
|
usbDeviceFileIterate;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
# uuid.h
|
|
|
|
virUUIDFormat;
|
|
|
|
virUUIDGenerate;
|
|
|
|
virUUIDParse;
|
2010-05-25 14:33:51 +00:00
|
|
|
virSetHostUUIDStr;
|
|
|
|
virGetHostUUID;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# virterror_internal.h
|
|
|
|
virReportErrorHelper;
|
|
|
|
virErrorMsg;
|
2009-09-10 13:21:10 +00:00
|
|
|
virRaiseErrorFull;
|
2009-01-20 17:13:33 +00:00
|
|
|
virReportSystemErrorFull;
|
|
|
|
virReportOOMErrorFull;
|
2009-02-05 16:10:07 +00:00
|
|
|
virStrerror;
|
2010-01-09 01:38:55 +00:00
|
|
|
virSetError;
|
2010-04-13 18:02:46 +00:00
|
|
|
virDispatchError;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# xml.h
|
2009-11-26 17:57:00 +00:00
|
|
|
virXPathBoolean;
|
2009-01-05 14:05:29 +00:00
|
|
|
virXPathLong;
|
|
|
|
virXPathNode;
|
|
|
|
virXPathNodeSet;
|
|
|
|
virXPathString;
|
|
|
|
virXMLPropString;
|
2009-03-03 09:44:41 +00:00
|
|
|
virXPathStringLimit;
|
2009-12-04 18:24:25 +00:00
|
|
|
virXPathBoolean;
|
|
|
|
virXPathNumber;
|
|
|
|
virXPathULong;
|
2010-02-02 17:49:09 +00:00
|
|
|
virXPathLongLong;
|
2009-12-04 18:24:25 +00:00
|
|
|
virXPathULongLong;
|
|
|
|
virXPathLongHex;
|
|
|
|
virXPathULongHex;
|