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-10-20 17:10:45 +00:00
|
|
|
# Keep this file sorted by header name, then by symbols with each header.
|
|
|
|
#
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2010-10-12 11:23:18 +00:00
|
|
|
# authhelper.h
|
|
|
|
virRequestPassword;
|
2010-10-20 17:10:45 +00:00
|
|
|
virRequestUsername;
|
2010-10-12 11:23:18 +00:00
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2010-05-21 04:23:48 +00:00
|
|
|
# bitmap.h
|
|
|
|
virBitmapAlloc;
|
|
|
|
virBitmapClearBit;
|
2010-10-20 17:10:45 +00:00
|
|
|
virBitmapFree;
|
2010-05-21 04:23:48 +00:00
|
|
|
virBitmapGetBit;
|
2010-10-20 17:10:45 +00:00
|
|
|
virBitmapSetBit;
|
2011-02-09 12:14:51 +00:00
|
|
|
virBitmapString;
|
2010-05-21 04:23:48 +00:00
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# buf.h
|
|
|
|
virBufferAdd;
|
|
|
|
virBufferAddChar;
|
2011-04-30 16:44:42 +00:00
|
|
|
virBufferAsprintf;
|
2009-01-05 14:05:29 +00:00
|
|
|
virBufferContentAndReset;
|
|
|
|
virBufferError;
|
2010-11-19 15:51:57 +00:00
|
|
|
virBufferEscapeSexpr;
|
2010-11-22 19:14:14 +00:00
|
|
|
virBufferEscapeString;
|
2009-12-09 23:00:50 +00:00
|
|
|
virBufferFreeAndReset;
|
2010-10-12 11:23:18 +00:00
|
|
|
virBufferStrcat;
|
2010-10-20 17:10:45 +00:00
|
|
|
virBufferURIEncodeString;
|
|
|
|
virBufferUse;
|
2011-04-30 16:44:42 +00:00
|
|
|
virBufferVasprintf;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# caps.h
|
|
|
|
virCapabilitiesAddGuest;
|
|
|
|
virCapabilitiesAddGuestDomain;
|
|
|
|
virCapabilitiesAddGuestFeature;
|
2010-10-20 17:10:45 +00:00
|
|
|
virCapabilitiesAddHostFeature;
|
2009-01-05 14:05:29 +00:00
|
|
|
virCapabilitiesAddHostMigrateTransport;
|
|
|
|
virCapabilitiesAddHostNUMACell;
|
2010-10-20 17:10:45 +00:00
|
|
|
virCapabilitiesAllocMachines;
|
2009-01-05 14:05:29 +00:00
|
|
|
virCapabilitiesDefaultGuestArch;
|
|
|
|
virCapabilitiesDefaultGuestEmulator;
|
|
|
|
virCapabilitiesDefaultGuestMachine;
|
|
|
|
virCapabilitiesFormatXML;
|
|
|
|
virCapabilitiesFree;
|
2010-10-20 17:10:45 +00:00
|
|
|
virCapabilitiesFreeMachines;
|
2009-06-29 10:41:56 +00:00
|
|
|
virCapabilitiesFreeNUMAInfo;
|
2009-03-02 20:19:13 +00:00
|
|
|
virCapabilitiesGenerateMac;
|
2009-06-16 15:27:33 +00:00
|
|
|
virCapabilitiesIsEmulatorRequired;
|
2010-10-20 17:10:45 +00:00
|
|
|
virCapabilitiesNew;
|
|
|
|
virCapabilitiesSetEmulatorRequired;
|
2009-12-18 13:44:55 +00:00
|
|
|
virCapabilitiesSetHostCPU;
|
2010-10-20 17:10:45 +00:00
|
|
|
virCapabilitiesSetMacPrefix;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
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
|
2010-10-20 17:10:45 +00:00
|
|
|
virCgroupAddTask;
|
|
|
|
virCgroupAllowDeviceMajor;
|
|
|
|
virCgroupAllowDevicePath;
|
|
|
|
virCgroupControllerTypeFromString;
|
|
|
|
virCgroupControllerTypeToString;
|
|
|
|
virCgroupDenyAllDevices;
|
|
|
|
virCgroupDenyDevicePath;
|
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
|
|
|
virCgroupForDomain;
|
|
|
|
virCgroupForDriver;
|
2011-07-21 07:12:55 +00:00
|
|
|
virCgroupForVcpu;
|
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
|
|
|
virCgroupFree;
|
2011-02-08 06:56:39 +00:00
|
|
|
virCgroupGetBlkioWeight;
|
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
|
|
|
virCgroupGetCpuShares;
|
2011-07-21 07:21:05 +00:00
|
|
|
virCgroupGetCpuCfsPeriod;
|
|
|
|
virCgroupGetCpuCfsQuota;
|
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
|
|
|
virCgroupGetCpuacctUsage;
|
2009-09-21 14:31:22 +00:00
|
|
|
virCgroupGetFreezerState;
|
2010-10-20 17:10:45 +00:00
|
|
|
virCgroupGetMemoryHardLimit;
|
|
|
|
virCgroupGetMemorySoftLimit;
|
|
|
|
virCgroupGetMemoryUsage;
|
2011-03-16 05:07:12 +00:00
|
|
|
virCgroupGetMemSwapHardLimit;
|
2011-02-22 17:33:59 +00:00
|
|
|
virCgroupKill;
|
|
|
|
virCgroupKillPainfully;
|
2011-03-16 05:07:12 +00:00
|
|
|
virCgroupKillRecursive;
|
2010-10-29 09:32:16 +00:00
|
|
|
virCgroupMounted;
|
2011-03-07 23:41:40 +00:00
|
|
|
virCgroupPathOfController;
|
2010-10-20 17:10:45 +00:00
|
|
|
virCgroupRemove;
|
2011-02-08 06:56:39 +00:00
|
|
|
virCgroupSetBlkioWeight;
|
2010-10-20 17:10:45 +00:00
|
|
|
virCgroupSetCpuShares;
|
2011-07-21 07:21:05 +00:00
|
|
|
virCgroupSetCpuCfsPeriod;
|
|
|
|
virCgroupSetCpuCfsQuota;
|
2009-09-21 14:31:22 +00:00
|
|
|
virCgroupSetFreezerState;
|
2010-10-20 17:10:45 +00:00
|
|
|
virCgroupSetMemory;
|
2010-10-12 14:50:53 +00:00
|
|
|
virCgroupSetMemoryHardLimit;
|
|
|
|
virCgroupSetMemorySoftLimit;
|
2011-03-16 05:07:12 +00:00
|
|
|
virCgroupSetMemSwapHardLimit;
|
2010-10-20 17:10:45 +00:00
|
|
|
|
|
|
|
|
2010-05-25 11:14:06 +00:00
|
|
|
# command.h
|
2011-03-22 22:22:37 +00:00
|
|
|
virCommandAbort;
|
2010-05-25 11:14:06 +00:00
|
|
|
virCommandAddArg;
|
2010-12-10 18:33:53 +00:00
|
|
|
virCommandAddArgBuffer;
|
2010-05-25 11:14:06 +00:00
|
|
|
virCommandAddArgFormat;
|
|
|
|
virCommandAddArgList;
|
|
|
|
virCommandAddArgPair;
|
|
|
|
virCommandAddArgSet;
|
2010-12-10 18:33:53 +00:00
|
|
|
virCommandAddEnvBuffer;
|
2011-05-05 20:32:52 +00:00
|
|
|
virCommandAddEnvFormat;
|
2010-05-25 11:14:06 +00:00
|
|
|
virCommandAddEnvPair;
|
|
|
|
virCommandAddEnvPass;
|
|
|
|
virCommandAddEnvPassCommon;
|
|
|
|
virCommandAddEnvString;
|
|
|
|
virCommandClearCaps;
|
|
|
|
virCommandDaemonize;
|
2011-05-06 14:37:36 +00:00
|
|
|
virCommandExec;
|
2010-05-25 11:14:06 +00:00
|
|
|
virCommandFree;
|
2010-11-22 13:31:35 +00:00
|
|
|
virCommandHandshakeNotify;
|
|
|
|
virCommandHandshakeWait;
|
2010-05-25 11:14:06 +00:00
|
|
|
virCommandNew;
|
|
|
|
virCommandNewArgList;
|
|
|
|
virCommandNewArgs;
|
|
|
|
virCommandNonblockingFDs;
|
|
|
|
virCommandPreserveFD;
|
2010-11-22 13:31:35 +00:00
|
|
|
virCommandRequireHandshake;
|
2010-05-25 11:14:06 +00:00
|
|
|
virCommandRun;
|
|
|
|
virCommandRunAsync;
|
|
|
|
virCommandSetErrorBuffer;
|
|
|
|
virCommandSetErrorFD;
|
|
|
|
virCommandSetInputBuffer;
|
|
|
|
virCommandSetInputFD;
|
|
|
|
virCommandSetOutputBuffer;
|
|
|
|
virCommandSetOutputFD;
|
|
|
|
virCommandSetPidFile;
|
|
|
|
virCommandSetPreExecHook;
|
|
|
|
virCommandSetWorkingDirectory;
|
|
|
|
virCommandToString;
|
|
|
|
virCommandTransferFD;
|
2011-03-22 17:55:45 +00:00
|
|
|
virCommandTranslateStatus;
|
2010-05-25 11:14:06 +00:00
|
|
|
virCommandWait;
|
|
|
|
virCommandWriteArgLog;
|
2011-05-10 18:42:59 +00:00
|
|
|
virFork;
|
2011-07-12 16:42:41 +00:00
|
|
|
virPidAbort;
|
|
|
|
virPidWait;
|
2011-05-10 18:42:59 +00:00
|
|
|
virRun;
|
2010-05-25 11:14:06 +00:00
|
|
|
|
|
|
|
|
2010-10-20 17:10:45 +00:00
|
|
|
# conf.h
|
|
|
|
virConfFree;
|
|
|
|
virConfFreeValue;
|
|
|
|
virConfGetValue;
|
|
|
|
virConfNew;
|
|
|
|
virConfReadFile;
|
|
|
|
virConfReadMem;
|
|
|
|
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
|
|
|
|
|
|
|
|
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;
|
2010-10-20 17:10:45 +00:00
|
|
|
cpuHasFeature;
|
2010-09-16 14:56:07 +00:00
|
|
|
cpuMapOverride;
|
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
|
|
|
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
|
|
|
|
virCPUDefAddFeature;
|
2010-03-23 08:34:04 +00:00
|
|
|
virCPUDefCopy;
|
2010-10-20 17:10:45 +00:00
|
|
|
virCPUDefFormat;
|
|
|
|
virCPUDefFormatBuf;
|
|
|
|
virCPUDefFree;
|
|
|
|
virCPUDefParseXML;
|
2009-12-18 13:44:55 +00:00
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# datatypes.h
|
|
|
|
virGetDomain;
|
2010-10-20 17:10:45 +00:00
|
|
|
virGetDomainSnapshot;
|
2009-05-20 14:26:49 +00:00
|
|
|
virGetInterface;
|
2010-10-20 17:10:45 +00:00
|
|
|
virGetNWFilter;
|
2009-01-05 14:05:29 +00:00
|
|
|
virGetNetwork;
|
2010-10-20 17:10:45 +00:00
|
|
|
virGetNodeDevice;
|
|
|
|
virGetSecret;
|
2009-01-05 14:05:29 +00:00
|
|
|
virGetStoragePool;
|
|
|
|
virGetStorageVol;
|
2010-10-20 17:10:45 +00:00
|
|
|
virGetStream;
|
2009-03-02 20:19:13 +00:00
|
|
|
virUnrefConnect;
|
2010-10-20 17:10:45 +00:00
|
|
|
virUnrefDomain;
|
|
|
|
virUnrefNWFilter;
|
2009-08-14 19:42:19 +00:00
|
|
|
virUnrefSecret;
|
2010-10-20 17:10:45 +00:00
|
|
|
virUnrefStorageVol;
|
2009-07-10 11:18:12 +00:00
|
|
|
virUnrefStream;
|
2010-10-20 17:10:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
# dnsmasq.h
|
|
|
|
dnsmasqAddDhcpHost;
|
2011-06-24 10:04:39 +00:00
|
|
|
dnsmasqAddHost;
|
2010-10-20 17:10:45 +00:00
|
|
|
dnsmasqContextFree;
|
|
|
|
dnsmasqContextNew;
|
|
|
|
dnsmasqDelete;
|
|
|
|
dnsmasqReload;
|
|
|
|
dnsmasqSave;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
Move qemu_audit.h helpers into shared code
The LXC and UML drivers can both make use of auditing. Move
the qemu_audit.{c,h} files to src/conf/domain_audit.{c,h}
* src/conf/domain_audit.c: Rename from src/qemu/qemu_audit.c
* src/conf/domain_audit.h: Rename from src/qemu/qemu_audit.h
* src/Makefile.am: Remove qemu_audit.{c,h}, add domain_audit.{c,h}
* src/qemu/qemu_audit.h, src/qemu/qemu_cgroup.c,
src/qemu/qemu_command.c, src/qemu/qemu_driver.c,
src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c,
src/qemu/qemu_process.c: Update for changed audit API names
2011-07-04 10:56:13 +00:00
|
|
|
# domain_audit.h
|
|
|
|
virDomainAuditCgroup;
|
|
|
|
virDomainAuditCgroupMajor;
|
|
|
|
virDomainAuditCgroupPath;
|
|
|
|
virDomainAuditDisk;
|
2011-07-04 11:00:33 +00:00
|
|
|
virDomainAuditFS;
|
Move qemu_audit.h helpers into shared code
The LXC and UML drivers can both make use of auditing. Move
the qemu_audit.{c,h} files to src/conf/domain_audit.{c,h}
* src/conf/domain_audit.c: Rename from src/qemu/qemu_audit.c
* src/conf/domain_audit.h: Rename from src/qemu/qemu_audit.h
* src/Makefile.am: Remove qemu_audit.{c,h}, add domain_audit.{c,h}
* src/qemu/qemu_audit.h, src/qemu/qemu_cgroup.c,
src/qemu/qemu_command.c, src/qemu/qemu_driver.c,
src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c,
src/qemu/qemu_process.c: Update for changed audit API names
2011-07-04 10:56:13 +00:00
|
|
|
virDomainAuditHostdev;
|
|
|
|
virDomainAuditMemory;
|
|
|
|
virDomainAuditNet;
|
|
|
|
virDomainAuditNetDevice;
|
|
|
|
virDomainAuditSecurityLabel;
|
|
|
|
virDomainAuditStart;
|
|
|
|
virDomainAuditStop;
|
|
|
|
virDomainAuditVcpu;
|
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# domain_conf.h
|
|
|
|
virDiskNameToBusDeviceIndex;
|
|
|
|
virDiskNameToIndex;
|
2011-06-26 08:09:00 +00:00
|
|
|
virDomainActualNetDefFree;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainAssignDef;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainChrConsoleTargetTypeFromString;
|
|
|
|
virDomainChrConsoleTargetTypeToString;
|
|
|
|
virDomainChrDefForeach;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainChrDefFree;
|
2011-04-14 16:05:14 +00:00
|
|
|
virDomainChrDefNew;
|
domain_conf: split source data out from ChrDef
This opens up the possibility of reusing the smaller ChrSourceDef
for both qemu monitor and a passthrough smartcard device.
* src/conf/domain_conf.h (_virDomainChrDef): Factor host
details...
(_virDomainChrSourceDef): ...into new struct.
(virDomainChrSourceDefFree): New prototype.
* src/conf/domain_conf.c (virDomainChrDefFree)
(virDomainChrDefParseXML, virDomainChrDefFormat): Split...
(virDomainChrSourceDefClear, virDomainChrSourceDefFree)
(virDomainChrSourceDefParseXML, virDomainChrSourceDefFormat):
...into new functions.
(virDomainChrDefParseTargetXML): Update clients to reflect type
split.
* src/vmx/vmx.c (virVMXParseSerial, virVMXParseParallel)
(virVMXFormatSerial, virVMXFormatParallel): Likewise.
* src/xen/xen_driver.c (xenUnifiedDomainOpenConsole): Likewise.
* src/xen/xend_internal.c (xenDaemonParseSxprChar)
(xenDaemonFormatSxprChr): Likewise.
* src/vbox/vbox_tmpl.c (vboxDomainDumpXML, vboxAttachSerial)
(vboxAttachParallel): Likewise.
* src/security/security_dac.c (virSecurityDACSetChardevLabel)
(virSecurityDACSetChardevCallback)
(virSecurityDACRestoreChardevLabel)
(virSecurityDACRestoreChardevCallback): Likewise.
* src/security/security_selinux.c (SELinuxSetSecurityChardevLabel)
(SELinuxSetSecurityChardevCallback)
(SELinuxRestoreSecurityChardevLabel)
(SELinuxSetSecurityChardevCallback): Likewise.
* src/security/virt-aa-helper.c (get_files): Likewise.
* src/lxc/lxc_driver.c (lxcVmStart, lxcDomainOpenConsole):
Likewise.
* src/uml/uml_conf.c (umlBuildCommandLineChr): Likewise.
* src/uml/uml_driver.c (umlIdentifyOneChrPTY, umlIdentifyChrPTY)
(umlDomainOpenConsole): Likewise.
* src/qemu/qemu_command.c (qemuBuildChrChardevStr)
(qemuBuildChrArgStr, qemuBuildCommandLine)
(qemuParseCommandLineChr): Likewise.
* src/qemu/qemu_domain.c (qemuDomainObjPrivateXMLFormat)
(qemuDomainObjPrivateXMLParse): Likewise.
* src/qemu/qemu_cgroup.c (qemuSetupChardevCgroup): Likewise.
* src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
* src/qemu/qemu_driver.c (qemudFindCharDevicePTYsMonitor)
(qemudFindCharDevicePTYs, qemuPrepareChardevDevice)
(qemuPrepareMonitorChr, qemudShutdownVMDaemon)
(qemuDomainOpenConsole): Likewise.
* src/qemu/qemu_command.h (qemuBuildChrChardevStr)
(qemuBuildChrArgStr): Delete, now that they are static.
* src/libvirt_private.syms (domain_conf.h): New exports.
* cfg.mk (useless_free_options): Update list.
* tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Update
tests.
2011-01-07 22:45:01 +00:00
|
|
|
virDomainChrSourceDefFree;
|
2011-02-04 02:23:31 +00:00
|
|
|
virDomainChrSpicevmcTypeFromString;
|
|
|
|
virDomainChrSpicevmcTypeToString;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainChrTcpProtocolTypeFromString;
|
|
|
|
virDomainChrTcpProtocolTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainChrTypeFromString;
|
|
|
|
virDomainChrTypeToString;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainClockOffsetTypeFromString;
|
|
|
|
virDomainClockOffsetTypeToString;
|
|
|
|
virDomainConfigFile;
|
|
|
|
virDomainControllerDefFree;
|
|
|
|
virDomainControllerInsert;
|
|
|
|
virDomainControllerInsertPreAlloced;
|
|
|
|
virDomainControllerModelTypeFromString;
|
|
|
|
virDomainControllerModelTypeToString;
|
|
|
|
virDomainControllerTypeToString;
|
|
|
|
virDomainCpuSetFormat;
|
|
|
|
virDomainCpuSetParse;
|
|
|
|
virDomainDefAddImplicitControllers;
|
2011-05-27 09:47:30 +00:00
|
|
|
virDomainDefCheckABIStability;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainDefClearDeviceAliases;
|
|
|
|
virDomainDefClearPCIAddresses;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainDefFormat;
|
|
|
|
virDomainDefFree;
|
|
|
|
virDomainDefParseFile;
|
|
|
|
virDomainDefParseNode;
|
|
|
|
virDomainDefParseString;
|
|
|
|
virDomainDeleteConfig;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainDeviceAddressIsValid;
|
|
|
|
virDomainDeviceAddressTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainDeviceDefFree;
|
|
|
|
virDomainDeviceDefParse;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainDeviceInfoIsSet;
|
|
|
|
virDomainDeviceInfoIterate;
|
|
|
|
virDomainDevicePCIAddressIsValid;
|
2009-03-02 17:39:43 +00:00
|
|
|
virDomainDeviceTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainDiskBusTypeToString;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainDiskCacheTypeFromString;
|
|
|
|
virDomainDiskCacheTypeToString;
|
|
|
|
virDomainDiskDefAssignAddress;
|
|
|
|
virDomainDiskDefForeachPath;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainDiskDefFree;
|
|
|
|
virDomainDiskDeviceTypeToString;
|
2010-04-21 14:28:21 +00:00
|
|
|
virDomainDiskErrorPolicyTypeFromString;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainDiskErrorPolicyTypeToString;
|
2011-04-22 03:09:32 +00:00
|
|
|
virDomainDiskIndexByName;
|
2009-08-14 09:31:36 +00:00
|
|
|
virDomainDiskInsert;
|
|
|
|
virDomainDiskInsertPreAlloced;
|
2010-04-21 14:28:21 +00:00
|
|
|
virDomainDiskIoTypeFromString;
|
|
|
|
virDomainDiskIoTypeToString;
|
2010-08-23 09:31:26 +00:00
|
|
|
virDomainDiskRemove;
|
2011-04-22 03:09:32 +00:00
|
|
|
virDomainDiskRemoveByName;
|
2010-10-12 11:23:18 +00:00
|
|
|
virDomainDiskTypeFromString;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainDiskTypeToString;
|
|
|
|
virDomainFSDefFree;
|
2011-07-22 11:11:12 +00:00
|
|
|
virDomainFSTypeFromString;
|
|
|
|
virDomainFSTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainFindByID;
|
|
|
|
virDomainFindByName;
|
|
|
|
virDomainFindByUUID;
|
2009-04-22 14:26:50 +00:00
|
|
|
virDomainGetRootFilesystem;
|
2011-05-26 14:15:54 +00:00
|
|
|
virDomainGraphicsAuthConnectedTypeFromString;
|
|
|
|
virDomainGraphicsAuthConnectedTypeToString;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainGraphicsDefFree;
|
2010-04-09 16:56:00 +00:00
|
|
|
virDomainGraphicsSpiceChannelModeTypeFromString;
|
|
|
|
virDomainGraphicsSpiceChannelModeTypeToString;
|
|
|
|
virDomainGraphicsSpiceChannelNameTypeFromString;
|
|
|
|
virDomainGraphicsSpiceChannelNameTypeToString;
|
2011-06-15 17:23:51 +00:00
|
|
|
virDomainGraphicsSpiceClipboardCopypasteTypeFromString;
|
|
|
|
virDomainGraphicsSpiceClipboardCopypasteTypeToString;
|
2011-04-14 08:44:20 +00:00
|
|
|
virDomainGraphicsSpiceImageCompressionTypeFromString;
|
2011-06-14 11:35:48 +00:00
|
|
|
virDomainGraphicsSpiceImageCompressionTypeToString;
|
2011-04-14 08:44:20 +00:00
|
|
|
virDomainGraphicsSpiceJpegCompressionTypeFromString;
|
|
|
|
virDomainGraphicsSpiceJpegCompressionTypeToString;
|
|
|
|
virDomainGraphicsSpicePlaybackCompressionTypeFromString;
|
|
|
|
virDomainGraphicsSpicePlaybackCompressionTypeToString;
|
2011-05-23 15:16:42 +00:00
|
|
|
virDomainGraphicsSpiceStreamingModeTypeFromString;
|
|
|
|
virDomainGraphicsSpiceStreamingModeTypeToString;
|
2011-04-14 08:44:20 +00:00
|
|
|
virDomainGraphicsSpiceZlibCompressionTypeFromString;
|
|
|
|
virDomainGraphicsSpiceZlibCompressionTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainGraphicsTypeFromString;
|
2010-03-22 18:44:58 +00:00
|
|
|
virDomainGraphicsTypeToString;
|
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;
|
2011-06-20 08:26:47 +00:00
|
|
|
virDomainIoEventFdTypeFromString;
|
|
|
|
virDomainIoEventFdTypeToString;
|
2011-05-18 16:20:53 +00:00
|
|
|
virDomainLeaseIndex;
|
|
|
|
virDomainLeaseInsert;
|
|
|
|
virDomainLeaseInsertPreAlloc;
|
|
|
|
virDomainLeaseInsertPreAlloced;
|
|
|
|
virDomainLeaseRemove;
|
|
|
|
virDomainLeaseRemoveAt;
|
2010-10-12 11:23:18 +00:00
|
|
|
virDomainLifecycleCrashTypeFromString;
|
|
|
|
virDomainLifecycleCrashTypeToString;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainLifecycleTypeFromString;
|
|
|
|
virDomainLifecycleTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainLoadAllConfigs;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainMemballoonModelTypeFromString;
|
|
|
|
virDomainMemballoonModelTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainNetDefFree;
|
2011-06-26 08:09:00 +00:00
|
|
|
virDomainNetGetActualBridgeName;
|
|
|
|
virDomainNetGetActualDirectDev;
|
|
|
|
virDomainNetGetActualDirectMode;
|
|
|
|
virDomainNetGetActualType;
|
|
|
|
virDomainNetGetActualDirectVirtPortProfile;
|
2011-05-27 07:01:47 +00:00
|
|
|
virDomainNetIndexByMac;
|
|
|
|
virDomainNetInsert;
|
|
|
|
virDomainNetRemoveByMac;
|
2009-07-17 21:08:34 +00:00
|
|
|
virDomainNetTypeToString;
|
2011-06-20 07:15:44 +00:00
|
|
|
virDomainNumatuneMemModeTypeFromString;
|
|
|
|
virDomainNumatuneMemModeTypeToString;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainObjAssignDef;
|
2011-04-22 03:07:56 +00:00
|
|
|
virDomainObjCopyPersistentDef;
|
2010-11-19 19:51:46 +00:00
|
|
|
virDomainObjGetPersistentDef;
|
2011-05-04 09:07:01 +00:00
|
|
|
virDomainObjGetState;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainObjIsDuplicate;
|
|
|
|
virDomainObjListDeinit;
|
|
|
|
virDomainObjListGetActiveIDs;
|
|
|
|
virDomainObjListGetInactiveNames;
|
|
|
|
virDomainObjListInit;
|
|
|
|
virDomainObjListNumOfDomains;
|
|
|
|
virDomainObjLock;
|
|
|
|
virDomainObjRef;
|
2011-04-22 03:07:56 +00:00
|
|
|
virDomainObjSetDefTransient;
|
2011-05-04 09:07:01 +00:00
|
|
|
virDomainObjSetState;
|
2011-05-04 10:40:59 +00:00
|
|
|
virDomainObjTaint;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainObjUnlock;
|
|
|
|
virDomainObjUnref;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainRemoveInactive;
|
|
|
|
virDomainSaveConfig;
|
2009-06-12 11:38:50 +00:00
|
|
|
virDomainSaveStatus;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainSaveXML;
|
2011-01-10 16:41:33 +00:00
|
|
|
virDomainSmartcardDefForeach;
|
|
|
|
virDomainSmartcardDefFree;
|
|
|
|
virDomainSmartcardTypeFromString;
|
|
|
|
virDomainSmartcardTypeToString;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainSnapshotAssignDef;
|
|
|
|
virDomainSnapshotDefFormat;
|
|
|
|
virDomainSnapshotDefFree;
|
|
|
|
virDomainSnapshotDefParseString;
|
|
|
|
virDomainSnapshotFindByName;
|
|
|
|
virDomainSnapshotHasChildren;
|
|
|
|
virDomainSnapshotObjListGetNames;
|
|
|
|
virDomainSnapshotObjListNum;
|
|
|
|
virDomainSnapshotObjListRemove;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainSoundDefFree;
|
|
|
|
virDomainSoundModelTypeFromString;
|
|
|
|
virDomainSoundModelTypeToString;
|
2011-05-04 09:07:01 +00:00
|
|
|
virDomainStateReasonFromString;
|
|
|
|
virDomainStateReasonToString;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainStateTypeFromString;
|
|
|
|
virDomainStateTypeToString;
|
2011-05-04 10:40:59 +00:00
|
|
|
virDomainTaintTypeFromString;
|
|
|
|
virDomainTaintTypeToString;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainTimerModeTypeFromString;
|
|
|
|
virDomainTimerModeTypeToString;
|
|
|
|
virDomainTimerNameTypeFromString;
|
|
|
|
virDomainTimerNameTypeToString;
|
|
|
|
virDomainTimerTickpolicyTypeFromString;
|
|
|
|
virDomainTimerTickpolicyTypeToString;
|
|
|
|
virDomainTimerTrackTypeFromString;
|
|
|
|
virDomainTimerTrackTypeToString;
|
2011-06-24 23:09:46 +00:00
|
|
|
virDomainVcpuPinAdd;
|
|
|
|
virDomainVcpuPinDel;
|
|
|
|
virDomainVcpuPinFindByVcpu;
|
|
|
|
virDomainVcpuPinIsDuplicate;
|
2009-07-06 13:54:44 +00:00
|
|
|
virDomainVideoDefFree;
|
|
|
|
virDomainVideoDefaultRAM;
|
|
|
|
virDomainVideoDefaultType;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainVideoTypeFromString;
|
|
|
|
virDomainVideoTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainVirtTypeToString;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainWatchdogActionTypeFromString;
|
|
|
|
virDomainWatchdogActionTypeToString;
|
|
|
|
virDomainWatchdogModelTypeFromString;
|
|
|
|
virDomainWatchdogModelTypeToString;
|
2010-03-30 11:44:22 +00:00
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
# domain_event.h
|
2011-07-22 05:57:42 +00:00
|
|
|
virDomainEventBlockJobNewFromObj;
|
|
|
|
virDomainEventBlockJobNewFromDom;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainEventCallbackListAdd;
|
2010-03-18 14:20:53 +00:00
|
|
|
virDomainEventCallbackListAddID;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainEventCallbackListCount;
|
|
|
|
virDomainEventCallbackListCountID;
|
|
|
|
virDomainEventCallbackListEventID;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainEventCallbackListFree;
|
|
|
|
virDomainEventCallbackListMarkDelete;
|
2010-03-18 14:20:53 +00:00
|
|
|
virDomainEventCallbackListMarkDeleteID;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainEventCallbackListPurgeMarked;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainEventCallbackListRemove;
|
|
|
|
virDomainEventCallbackListRemoveConn;
|
|
|
|
virDomainEventCallbackListRemoveID;
|
2011-05-29 12:21:53 +00:00
|
|
|
virDomainEventControlErrorNewFromDom;
|
|
|
|
virDomainEventControlErrorNewFromObj;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainEventDispatch;
|
|
|
|
virDomainEventDispatchDefaultFunc;
|
|
|
|
virDomainEventFree;
|
|
|
|
virDomainEventGraphicsNewFromDom;
|
|
|
|
virDomainEventGraphicsNewFromObj;
|
|
|
|
virDomainEventIOErrorNewFromDom;
|
|
|
|
virDomainEventIOErrorNewFromObj;
|
|
|
|
virDomainEventIOErrorReasonNewFromDom;
|
|
|
|
virDomainEventIOErrorReasonNewFromObj;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainEventNew;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainEventNewFromDef;
|
2009-01-05 14:05:29 +00:00
|
|
|
virDomainEventNewFromDom;
|
|
|
|
virDomainEventNewFromObj;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainEventQueueDispatch;
|
|
|
|
virDomainEventQueueFree;
|
|
|
|
virDomainEventQueueNew;
|
|
|
|
virDomainEventQueuePop;
|
|
|
|
virDomainEventQueuePush;
|
2010-03-18 18:28:15 +00:00
|
|
|
virDomainEventRTCChangeNewFromDom;
|
|
|
|
virDomainEventRTCChangeNewFromObj;
|
2011-04-25 11:35:23 +00:00
|
|
|
virDomainEventRebootNew;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainEventRebootNewFromDom;
|
|
|
|
virDomainEventRebootNewFromObj;
|
2011-01-05 22:51:45 +00:00
|
|
|
virDomainEventStateDeregister;
|
|
|
|
virDomainEventStateDeregisterAny;
|
|
|
|
virDomainEventStateFlush;
|
2011-01-05 22:27:40 +00:00
|
|
|
virDomainEventStateFree;
|
|
|
|
virDomainEventStateNew;
|
2011-01-05 22:51:45 +00:00
|
|
|
virDomainEventStateQueue;
|
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;
|
2010-10-20 17:10:45 +00:00
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2011-01-24 12:16:30 +00:00
|
|
|
# domain_lock.h
|
|
|
|
virDomainLockProcessStart;
|
|
|
|
virDomainLockProcessInquire;
|
|
|
|
virDomainLockProcessPause;
|
|
|
|
virDomainLockProcessResume;
|
|
|
|
virDomainLockDiskAttach;
|
|
|
|
virDomainLockDiskDetach;
|
|
|
|
virDomainLockLeaseAttach;
|
|
|
|
virDomainLockLeaseDetach;
|
|
|
|
|
|
|
|
|
2010-06-21 18:18:31 +00:00
|
|
|
# domain_nwfilter.h
|
|
|
|
virDomainConfNWFilterInstantiate;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDomainConfNWFilterRegister;
|
2010-06-21 18:18:31 +00:00
|
|
|
virDomainConfNWFilterTeardown;
|
|
|
|
virDomainConfVMNWFilterTeardown;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2010-10-12 11:23:18 +00:00
|
|
|
|
2009-11-03 22:11:01 +00:00
|
|
|
# ebtables.h
|
|
|
|
ebtablesAddForwardAllowIn;
|
|
|
|
ebtablesAddForwardPolicyReject;
|
2010-11-30 16:00:30 +00:00
|
|
|
ebtablesContextFree;
|
2009-11-03 22:11:01 +00:00
|
|
|
ebtablesContextNew;
|
|
|
|
ebtablesRemoveForwardAllowIn;
|
|
|
|
|
|
|
|
|
2011-02-24 17:58:04 +00:00
|
|
|
# event_poll.h
|
|
|
|
virEventPollToNativeEvents;
|
|
|
|
virEventPollFromNativeEvents;
|
|
|
|
|
|
|
|
|
2010-09-22 18:32:21 +00:00
|
|
|
# fdstream.h
|
|
|
|
virFDStreamOpen;
|
|
|
|
virFDStreamConnectUNIX;
|
|
|
|
virFDStreamOpenFile;
|
|
|
|
virFDStreamCreateFile;
|
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# hash.h
|
|
|
|
virHashAddEntry;
|
|
|
|
virHashCreate;
|
|
|
|
virHashForEach;
|
|
|
|
virHashFree;
|
|
|
|
virHashLookup;
|
|
|
|
virHashRemoveEntry;
|
|
|
|
virHashRemoveSet;
|
|
|
|
virHashSearch;
|
|
|
|
virHashSize;
|
2011-02-22 15:11:59 +00:00
|
|
|
virHashSteal;
|
2011-04-15 19:17:11 +00:00
|
|
|
virHashTableSize;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
2010-03-26 14:49:45 +00:00
|
|
|
# hooks.h
|
|
|
|
virHookCall;
|
|
|
|
virHookInitialize;
|
|
|
|
virHookPresent;
|
|
|
|
|
|
|
|
|
2010-10-20 17:10:45 +00:00
|
|
|
# interface.h
|
|
|
|
ifaceCheck;
|
|
|
|
ifaceCtrl;
|
|
|
|
ifaceGetFlags;
|
|
|
|
ifaceGetIndex;
|
2011-06-24 20:39:15 +00:00
|
|
|
ifaceGetMacAddress;
|
2011-06-22 18:28:57 +00:00
|
|
|
ifaceGetNthParent;
|
2010-10-20 17:10:45 +00:00
|
|
|
ifaceGetVlanID;
|
|
|
|
ifaceIsUp;
|
2011-06-22 18:28:57 +00:00
|
|
|
ifaceLinkDel;
|
|
|
|
ifaceMacvtapLinkAdd;
|
|
|
|
ifaceMacvtapLinkDump;
|
|
|
|
ifaceReplaceMacAddress;
|
2011-06-24 20:31:05 +00:00
|
|
|
ifaceRestoreMacAddress;
|
2011-06-24 20:39:15 +00:00
|
|
|
ifaceSetMacAddress;
|
2010-10-20 17:10:45 +00:00
|
|
|
|
|
|
|
|
2009-07-15 17:34:04 +00:00
|
|
|
# interface_conf.h
|
2010-10-20 17:10:45 +00:00
|
|
|
virInterfaceAssignDef;
|
2009-07-15 17:34:04 +00:00
|
|
|
virInterfaceDefFormat;
|
2010-10-20 17:10:45 +00:00
|
|
|
virInterfaceDefFree;
|
2009-07-15 17:34:04 +00:00
|
|
|
virInterfaceDefParseFile;
|
2009-09-10 13:21:10 +00:00
|
|
|
virInterfaceDefParseNode;
|
2010-10-20 17:10:45 +00:00
|
|
|
virInterfaceDefParseString;
|
2009-09-10 13:21:10 +00:00
|
|
|
virInterfaceFindByMACString;
|
2010-10-20 17:10:45 +00:00
|
|
|
virInterfaceFindByName;
|
2011-05-09 19:17:26 +00:00
|
|
|
virInterfaceObjListClone;
|
2010-10-20 17:10:45 +00:00
|
|
|
virInterfaceObjListFree;
|
2009-09-10 13:21:10 +00:00
|
|
|
virInterfaceObjLock;
|
|
|
|
virInterfaceObjUnlock;
|
2010-10-20 17:10:45 +00:00
|
|
|
virInterfaceRemove;
|
2009-09-10 13:21:10 +00:00
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
2009-11-03 18:59:18 +00:00
|
|
|
# json.h
|
2010-10-20 17:10:45 +00:00
|
|
|
virJSONValueArrayAppend;
|
|
|
|
virJSONValueArrayGet;
|
|
|
|
virJSONValueArraySize;
|
2009-11-03 18:59:18 +00:00
|
|
|
virJSONValueFree;
|
2010-10-20 17:10:45 +00:00
|
|
|
virJSONValueFromString;
|
|
|
|
virJSONValueGetBoolean;
|
|
|
|
virJSONValueGetNumberDouble;
|
|
|
|
virJSONValueGetNumberInt;
|
|
|
|
virJSONValueGetNumberLong;
|
|
|
|
virJSONValueGetNumberUint;
|
|
|
|
virJSONValueGetNumberUlong;
|
|
|
|
virJSONValueGetString;
|
|
|
|
virJSONValueIsNull;
|
|
|
|
virJSONValueNewArray;
|
|
|
|
virJSONValueNewBoolean;
|
|
|
|
virJSONValueNewNull;
|
|
|
|
virJSONValueNewNumberDouble;
|
2009-11-03 18:59:18 +00:00
|
|
|
virJSONValueNewNumberInt;
|
|
|
|
virJSONValueNewNumberLong;
|
2010-10-20 17:10:45 +00:00
|
|
|
virJSONValueNewNumberUint;
|
2009-11-03 18:59:18 +00:00
|
|
|
virJSONValueNewNumberUlong;
|
|
|
|
virJSONValueNewObject;
|
2010-10-20 17:10:45 +00:00
|
|
|
virJSONValueNewString;
|
|
|
|
virJSONValueNewStringLen;
|
2009-11-03 18:59:18 +00:00
|
|
|
virJSONValueObjectAppend;
|
2010-10-20 17:10:45 +00:00
|
|
|
virJSONValueObjectAppendBoolean;
|
|
|
|
virJSONValueObjectAppendNull;
|
|
|
|
virJSONValueObjectAppendNumberDouble;
|
2009-11-03 18:59:18 +00:00
|
|
|
virJSONValueObjectAppendNumberInt;
|
|
|
|
virJSONValueObjectAppendNumberLong;
|
2010-10-20 17:10:45 +00:00
|
|
|
virJSONValueObjectAppendNumberUint;
|
2009-11-03 18:59:18 +00:00
|
|
|
virJSONValueObjectAppendNumberUlong;
|
2010-10-20 17:10:45 +00:00
|
|
|
virJSONValueObjectAppendString;
|
2009-11-03 18:59:18 +00:00
|
|
|
virJSONValueObjectGet;
|
2010-10-20 17:10:45 +00:00
|
|
|
virJSONValueObjectGetBoolean;
|
|
|
|
virJSONValueObjectGetNumberDouble;
|
2009-11-03 18:59:18 +00:00
|
|
|
virJSONValueObjectGetNumberInt;
|
|
|
|
virJSONValueObjectGetNumberLong;
|
2010-10-20 17:10:45 +00:00
|
|
|
virJSONValueObjectGetNumberUint;
|
2009-11-03 18:59:18 +00:00
|
|
|
virJSONValueObjectGetNumberUlong;
|
2010-10-20 17:10:45 +00:00
|
|
|
virJSONValueObjectGetString;
|
|
|
|
virJSONValueObjectHasKey;
|
2009-11-03 18:59:18 +00:00
|
|
|
virJSONValueObjectIsNull;
|
|
|
|
virJSONValueToString;
|
|
|
|
|
|
|
|
|
2010-10-20 17:10:45 +00:00
|
|
|
# libvirt_internal.h
|
|
|
|
virDomainMigrateFinish2;
|
|
|
|
virDomainMigrateFinish;
|
|
|
|
virDomainMigratePerform;
|
|
|
|
virDomainMigratePrepare2;
|
|
|
|
virDomainMigratePrepare;
|
|
|
|
virDomainMigratePrepareTunnel;
|
Introduce yet another migration version in API.
Migration just seems to go from bad to worse. We already had to
introduce a second migration protocol when adding the QEMU driver,
since the one from Xen was insufficiently flexible to cope with
passing the data the QEMU driver required.
It turns out that this protocol still has some flaws that we
need to address. The current sequence is
* Src: DumpXML
- Generate XML to pass to dst
* Dst: Prepare
- Get ready to accept incoming VM
- Generate optional cookie to pass to src
* Src: Perform
- Start migration and wait for send completion
- Kill off VM if successful, resume if failed
* Dst: Finish
- Wait for recv completion and check status
- Kill off VM if unsuccessful
The problems with this are:
- Since the first step is a generic 'DumpXML' call, we can't
add in other migration specific data. eg, we can't include
any VM lease data from lock manager plugins
- Since the first step is a generic 'DumpXML' call, we can't
emit any 'migration begin' event on the source, or have
any hook that runs right at the start of the process
- Since there is no final step on the source, if the Finish
method fails to receive all migration data & has to kill
the VM, then there's no way to resume the original VM
on the source
This patch attempts to introduce a version 3 that uses the
improved 5 step sequence
* Src: Begin
- Generate XML to pass to dst
- Generate optional cookie to pass to dst
* Dst: Prepare
- Get ready to accept incoming VM
- Generate optional cookie to pass to src
* Src: Perform
- Start migration and wait for send completion
- Generate optional cookie to pass to dst
* Dst: Finish
- Wait for recv completion and check status
- Kill off VM if failed, resume if success
- Generate optional cookie to pass to src
* Src: Confirm
- Kill off VM if success, resume if failed
The API is designed to allow both input and output cookies
in all methods where applicable. This lets us pass around
arbitrary extra driver specific data between src & dst during
migration. Combined with the extra 'Begin' method this lets
us pass lease information from source to dst at the start of
migration
Moving the killing of the source VM out of Perform and
into Confirm, means we can now recover if the dst host
can't successfully Finish receiving migration data.
2010-11-02 12:43:44 +00:00
|
|
|
virDomainMigrateBegin3;
|
|
|
|
virDomainMigratePrepare3;
|
|
|
|
virDomainMigratePrepareTunnel3;
|
|
|
|
virDomainMigratePerform3;
|
|
|
|
virDomainMigrateFinish3;
|
|
|
|
virDomainMigrateConfirm3;
|
2010-10-20 17:10:45 +00:00
|
|
|
virDrvSupportsFeature;
|
|
|
|
virRegisterDeviceMonitor;
|
|
|
|
virRegisterDriver;
|
|
|
|
virRegisterInterfaceDriver;
|
|
|
|
virRegisterNWFilterDriver;
|
|
|
|
virRegisterNetworkDriver;
|
|
|
|
virRegisterSecretDriver;
|
|
|
|
virRegisterStorageDriver;
|
|
|
|
|
|
|
|
|
2010-09-13 13:02:58 +00:00
|
|
|
# locking.h
|
|
|
|
virLockManagerAcquire;
|
|
|
|
virLockManagerAddResource;
|
|
|
|
virLockManagerFree;
|
|
|
|
virLockManagerInquire;
|
|
|
|
virLockManagerNew;
|
|
|
|
virLockManagerPluginNew;
|
|
|
|
virLockManagerPluginRef;
|
|
|
|
virLockManagerPluginUnref;
|
|
|
|
virLockManagerPluginUsesState;
|
|
|
|
virLockManagerPluginGetName;
|
|
|
|
virLockManagerRelease;
|
|
|
|
|
|
|
|
|
2009-06-26 15:08:04 +00:00
|
|
|
# logging.h
|
2010-10-20 17:10:45 +00:00
|
|
|
virLogDefineFilter;
|
|
|
|
virLogDefineOutput;
|
2011-03-03 08:32:18 +00:00
|
|
|
virLogEmergencyDumpAll;
|
2010-10-20 17:10:45 +00:00
|
|
|
virLogGetDefaultPriority;
|
|
|
|
virLogGetFilters;
|
2009-08-06 13:45:50 +00:00
|
|
|
virLogGetNbFilters;
|
|
|
|
virLogGetNbOutputs;
|
2009-10-08 15:05:01 +00:00
|
|
|
virLogGetOutputs;
|
2010-10-20 17:10:45 +00:00
|
|
|
virLogLock;
|
|
|
|
virLogMessage;
|
2009-08-06 13:55:07 +00:00
|
|
|
virLogParseDefaultPriority;
|
2009-06-26 15:08:04 +00:00
|
|
|
virLogParseFilters;
|
|
|
|
virLogParseOutputs;
|
|
|
|
virLogReset;
|
2011-03-08 10:31:20 +00:00
|
|
|
virLogSetBufferSize;
|
2010-10-20 17:10:45 +00:00
|
|
|
virLogSetDefaultPriority;
|
|
|
|
virLogSetFromEnv;
|
|
|
|
virLogShutdown;
|
|
|
|
virLogStartup;
|
2010-02-03 16:12:57 +00:00
|
|
|
virLogUnlock;
|
2009-06-26 15:08:04 +00:00
|
|
|
|
|
|
|
|
2010-12-01 14:43:40 +00:00
|
|
|
# macvtap.h
|
|
|
|
virVMOperationTypeFromString;
|
|
|
|
virVMOperationTypeToString;
|
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# memory.h
|
|
|
|
virAlloc;
|
|
|
|
virAllocN;
|
2011-01-18 18:37:45 +00:00
|
|
|
virAllocVar;
|
2010-08-13 21:00:47 +00:00
|
|
|
virExpandN;
|
2009-01-05 14:05:29 +00:00
|
|
|
virFree;
|
2010-10-20 17:10:45 +00:00
|
|
|
virReallocN;
|
2010-08-14 15:42:51 +00:00
|
|
|
virResizeN;
|
2010-08-13 21:00:47 +00:00
|
|
|
virShrinkN;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
2011-06-22 18:17:36 +00:00
|
|
|
#netlink.h
|
|
|
|
nlComm;
|
|
|
|
|
|
|
|
|
2009-10-30 15:36:04 +00:00
|
|
|
# network.h
|
2010-12-31 02:33:24 +00:00
|
|
|
virSocketAddrBroadcast;
|
|
|
|
virSocketAddrBroadcastByPrefix;
|
2009-10-30 15:36:04 +00:00
|
|
|
virSocketAddrIsNetmask;
|
2010-11-26 18:51:44 +00:00
|
|
|
virSocketAddrMask;
|
|
|
|
virSocketAddrMaskByPrefix;
|
|
|
|
virSocketAddrPrefixToNetmask;
|
2009-10-30 15:36:04 +00:00
|
|
|
virSocketCheckNetmask;
|
2009-11-02 14:42:47 +00:00
|
|
|
virSocketFormatAddr;
|
2010-10-20 14:13:00 +00:00
|
|
|
virSocketFormatAddrFull;
|
2009-11-02 14:42:47 +00:00
|
|
|
virSocketGetPort;
|
2009-10-30 15:36:04 +00:00
|
|
|
virSocketGetRange;
|
|
|
|
virSocketParseAddr;
|
|
|
|
virSocketParseIpv4Addr;
|
|
|
|
virSocketParseIpv6Addr;
|
2009-11-02 14:42:47 +00:00
|
|
|
virSocketSetPort;
|
2011-06-29 04:38:10 +00:00
|
|
|
virVirtualPortProfileFormat;
|
|
|
|
virVirtualPortProfileParseXML;
|
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;
|
2010-11-17 18:36:19 +00:00
|
|
|
virNetworkDefGetIpByIndex;
|
2009-01-05 14:05:29 +00:00
|
|
|
virNetworkDefParseFile;
|
|
|
|
virNetworkDefParseNode;
|
|
|
|
virNetworkDefParseString;
|
|
|
|
virNetworkDeleteConfig;
|
|
|
|
virNetworkFindByName;
|
|
|
|
virNetworkFindByUUID;
|
2010-11-17 18:36:19 +00:00
|
|
|
virNetworkIpDefNetmask;
|
|
|
|
virNetworkIpDefPrefix;
|
2009-01-05 14:05:29 +00:00
|
|
|
virNetworkLoadAllConfigs;
|
2010-10-20 17:10:45 +00:00
|
|
|
virNetworkObjIsDuplicate;
|
2009-01-05 14:05:29 +00:00
|
|
|
virNetworkObjListFree;
|
2010-10-20 17:10:45 +00:00
|
|
|
virNetworkObjLock;
|
|
|
|
virNetworkObjUnlock;
|
2009-01-05 14:05:29 +00:00
|
|
|
virNetworkRemoveInactive;
|
|
|
|
virNetworkSaveConfig;
|
Give each virtual network bridge its own fixed MAC address
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=609463
The problem was that, since a bridge always acquires the MAC address
of the connected interface with the numerically lowest MAC, as guests
are started and stopped, it was possible for the MAC address to change
over time, and this change in the network was being detected by
Windows 7 (it sees the MAC of the default route change), so on each
reboot it would bring up a dialog box asking about this "new network".
The solution is to create a dummy tap interface with a MAC guaranteed
to be lower than any guest interface's MAC, and attach that tap to the
bridge as soon as it's created. Since all guest MAC addresses start
with 0xFE, we can just generate a MAC with the standard "0x52, 0x54,
0" prefix, and it's guaranteed to always win (physical interfaces are
never connected to these bridges, so we don't need to worry about
competing numerically with them).
Note that the dummy tap is never set to IFF_UP state - that's not
necessary in order for the bridge to take its MAC, and not setting it
to UP eliminates the clutter of having an (eg) "virbr0-nic" displayed
in the output of the ifconfig command.
I chose to not auto-generate the MAC address in the network XML
parser, as there are likely to be consumers of that API that don't
need or want to have a MAC address associated with the
bridge.
Instead, in bridge_driver.c when the network is being defined, if
there is no MAC, one is generated. To account for virtual network
configs that already exist when upgrading from an older version of
libvirt, I've added a %post script to the specfile that searches for
all network definitions in both the config directory
(/etc/libvirt/qemu/networks) and the state directory
(/var/lib/libvirt/network) that are missing a mac address, generates a
random address, and adds it to the config (and a matching address to
the state file, if there is one).
docs/formatnetwork.html.in: document <mac address.../>
docs/schemas/network.rng: add nac address to schema
libvirt.spec.in: %post script to update existing networks
src/conf/network_conf.[ch]: parse and format <mac address.../>
src/libvirt_private.syms: export a couple private symbols we need
src/network/bridge_driver.c:
auto-generate mac address when needed,
create dummy interface if mac address is present.
tests/networkxml2xmlin/isolated-network.xml
tests/networkxml2xmlin/routed-network.xml
tests/networkxml2xmlout/isolated-network.xml
tests/networkxml2xmlout/routed-network.xml: add mac address to some tests
2011-02-09 08:28:12 +00:00
|
|
|
virNetworkSetBridgeMacAddr;
|
2009-03-02 17:37:03 +00:00
|
|
|
virNetworkSetBridgeName;
|
conf: support abstracted interface info in network XML
The network XML is updated in the following ways:
1) The <forward> element can now contain a list of forward interfaces:
<forward .... >
<interface dev='eth10'/>
<interface dev='eth11'/>
<interface dev='eth12'/>
<interface dev='eth13'/>
</forward>
The first of these takes the place of the dev attribute that is
normally in <forward> - when defining a network you can specify
either one, and on output both will be present. If you specify
both on input, they must match.
2) In addition to forward modes of 'nat' and 'route', these new modes
are supported:
private, passthrough, vepa - when this network is referenced by a
domain's interface, it will have the same effect as if the
interface had been defined as type='direct', e.g.:
<interface type='direct'>
<source mode='${mode}' dev='${dev}>
...
</interface>
where ${mode} is one of the three new modes, and ${dev} is an interface
selected from the list given in <forward>.
bridge - if a <forward> dev (or multiple devs) is defined, and
forward mode is 'bridge' this is just like the modes 'private',
'passthrough', and 'vepa' above. If there is no forward dev
specified but a bridge name is given (e.g. "<bridge
name='br0'/>"), then guest interfaces using this network will use
libvirt's "host bridge" mode, equivalent to this:
<interface type='bridge'>
<source bridge='${bridge-name}'/>
...
</interface>
3) A network can have multiple <portgroup> elements, which may be
selected by the guest interface definition (by adding
"portgroup='${name}'" in the <source> element along with the
network name). Currently a portgroup can only contain a
virtportprofile, but the intent is that other configuration items
may be put there int the future (e.g. bandwidth config). When
building a guest's interface, if the <interface> XML itself has no
virtportprofile, and if the requested network has a portgroup with
a name matching the name given in the <interface> (or if one of the
network's portgroups is marked with the "default='yes'" attribute),
the virtportprofile from that portgroup will be used by the
interface.
4) A network can have a virtportprofile defined at the top level,
which will be used by a guest interface when connecting in one of
the 'direct' modes if the guest interface XML itself hasn't
specified any virtportprofile, and if there are also no matching
portgroups on the network.
2011-07-20 03:01:09 +00:00
|
|
|
virPortGroupFindByName;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# node_device_conf.h
|
|
|
|
virNodeDevCapTypeToString;
|
|
|
|
virNodeDevCapsDefFree;
|
2010-10-20 17:10:45 +00:00
|
|
|
virNodeDeviceAssignDef;
|
2009-01-05 14:05:29 +00:00
|
|
|
virNodeDeviceDefFormat;
|
2010-10-20 17:10:45 +00:00
|
|
|
virNodeDeviceDefFree;
|
2010-10-12 11:23:18 +00:00
|
|
|
virNodeDeviceDefParseFile;
|
2010-10-20 17:10:45 +00:00
|
|
|
virNodeDeviceDefParseNode;
|
|
|
|
virNodeDeviceDefParseString;
|
|
|
|
virNodeDeviceFindByName;
|
|
|
|
virNodeDeviceFindBySysfsPath;
|
|
|
|
virNodeDeviceGetParentHost;
|
|
|
|
virNodeDeviceGetWWNs;
|
|
|
|
virNodeDeviceHasCap;
|
|
|
|
virNodeDeviceObjListFree;
|
2009-01-05 14:05:29 +00:00
|
|
|
virNodeDeviceObjLock;
|
2010-10-20 17:10:45 +00:00
|
|
|
virNodeDeviceObjRemove;
|
2009-01-05 14:05:29 +00:00
|
|
|
virNodeDeviceObjUnlock;
|
2010-10-20 17:10:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
# nodeinfo.h
|
|
|
|
nodeCapsInitNUMA;
|
2011-06-07 01:02:55 +00:00
|
|
|
nodeGetCPUStats;
|
2010-10-20 17:10:45 +00:00
|
|
|
nodeGetCellsFreeMemory;
|
|
|
|
nodeGetFreeMemory;
|
|
|
|
nodeGetInfo;
|
2011-06-07 01:11:17 +00:00
|
|
|
nodeGetMemoryStats;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
2010-03-25 17:46:09 +00:00
|
|
|
# nwfilter_conf.h
|
2010-10-20 17:10:45 +00:00
|
|
|
virNWFilterCallbackDriversLock;
|
|
|
|
virNWFilterCallbackDriversUnlock;
|
|
|
|
virNWFilterChainSuffixTypeToString;
|
|
|
|
virNWFilterConfLayerInit;
|
|
|
|
virNWFilterConfLayerShutdown;
|
|
|
|
virNWFilterDefFormat;
|
|
|
|
virNWFilterDefFree;
|
|
|
|
virNWFilterDefParseString;
|
|
|
|
virNWFilterJumpTargetTypeToString;
|
2011-01-15 15:06:52 +00:00
|
|
|
virNWFilterLoadAllConfigs;
|
2010-10-20 17:10:45 +00:00
|
|
|
virNWFilterLockFilterUpdates;
|
2011-01-15 15:06:52 +00:00
|
|
|
virNWFilterObjAssignDef;
|
|
|
|
virNWFilterObjDeleteDef;
|
|
|
|
virNWFilterObjFindByName;
|
|
|
|
virNWFilterObjFindByUUID;
|
|
|
|
virNWFilterObjListFree;
|
|
|
|
virNWFilterObjLock;
|
|
|
|
virNWFilterObjRemove;
|
|
|
|
virNWFilterObjSaveDef;
|
|
|
|
virNWFilterObjUnlock;
|
2010-10-20 17:10:45 +00:00
|
|
|
virNWFilterPrintStateMatchFlags;
|
2011-04-08 00:13:38 +00:00
|
|
|
virNWFilterPrintTCPFlags;
|
2010-10-20 17:10:45 +00:00
|
|
|
virNWFilterRegisterCallbackDriver;
|
2010-03-25 17:46:09 +00:00
|
|
|
virNWFilterRuleActionTypeToString;
|
2010-03-25 17:46:12 +00:00
|
|
|
virNWFilterRuleProtocolTypeToString;
|
2010-03-25 17:46:09 +00:00
|
|
|
virNWFilterTestUnassignDef;
|
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
|
|
|
virNWFilterUnlockFilterUpdates;
|
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
|
|
|
|
pciDettachDevice;
|
2010-10-20 17:10:45 +00:00
|
|
|
pciDeviceFileIterate;
|
2009-08-17 14:05:23 +00:00
|
|
|
pciDeviceGetManaged;
|
2010-10-20 17:10:45 +00:00
|
|
|
pciDeviceIsAssignable;
|
2009-08-17 14:05:23 +00:00
|
|
|
pciDeviceListAdd;
|
2009-10-27 17:30:16 +00:00
|
|
|
pciDeviceListCount;
|
2010-10-20 17:10:45 +00:00
|
|
|
pciDeviceListDel;
|
|
|
|
pciDeviceListFree;
|
2009-10-27 17:30:16 +00:00
|
|
|
pciDeviceListGet;
|
2010-10-20 17:10:45 +00:00
|
|
|
pciDeviceListNew;
|
2009-10-27 17:30:16 +00:00
|
|
|
pciDeviceListSteal;
|
2011-07-03 12:09:44 +00:00
|
|
|
pciDeviceReAttachInit;
|
2010-10-20 17:10:45 +00:00
|
|
|
pciDeviceSetManaged;
|
|
|
|
pciFreeDevice;
|
|
|
|
pciGetDevice;
|
|
|
|
pciReAttachDevice;
|
|
|
|
pciResetDevice;
|
|
|
|
pciWaitForDeviceCleanup;
|
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
|
|
|
|
virProcessInfoGetAffinity;
|
2010-10-20 17:10:45 +00:00
|
|
|
virProcessInfoSetAffinity;
|
2009-11-16 15:22:34 +00:00
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# qparams.h
|
2010-10-20 17:10:45 +00:00
|
|
|
free_qparam_set;
|
2009-01-05 14:05:29 +00:00
|
|
|
qparam_get_query;
|
|
|
|
qparam_query_parse;
|
2010-10-20 17:10:45 +00:00
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2009-09-01 15:27:46 +00:00
|
|
|
# secret_conf.h
|
2010-10-20 17:10:45 +00:00
|
|
|
virSecretDefFormat;
|
2009-09-01 15:27:46 +00:00
|
|
|
virSecretDefFree;
|
|
|
|
virSecretDefParseFile;
|
2010-10-20 17:10:45 +00:00
|
|
|
virSecretDefParseString;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2009-08-14 19:48:55 +00:00
|
|
|
|
Refactor the security drivers to simplify usage
The current security driver usage requires horrible code like
if (driver->securityDriver &&
driver->securityDriver->domainSetSecurityHostdevLabel &&
driver->securityDriver->domainSetSecurityHostdevLabel(driver->securityDriver,
vm, hostdev) < 0)
This pair of checks for NULL clutters up the code, making the driver
calls 2 lines longer than they really need to be. The goal of the
patchset is to change the calling convention to simply
if (virSecurityManagerSetHostdevLabel(driver->securityDriver,
vm, hostdev) < 0)
The first check for 'driver->securityDriver' being NULL is removed
by introducing a 'no op' security driver that will always be present
if no real driver is enabled. This guarentees driver->securityDriver
!= NULL.
The second check for 'driver->securityDriver->domainSetSecurityHostdevLabel'
being non-NULL is hidden in a new abstraction called virSecurityManager.
This separates the driver callbacks, from main internal API. The addition
of a virSecurityManager object, that is separate from the virSecurityDriver
struct also allows for security drivers to carry state / configuration
information directly. Thus the DAC/Stack drivers from src/qemu which
used to pull config from 'struct qemud_driver' can now be moved into
the 'src/security' directory and store their config directly.
* src/qemu/qemu_conf.h, src/qemu/qemu_driver.c: Update to
use new virSecurityManager APIs
* src/qemu/qemu_security_dac.c, src/qemu/qemu_security_dac.h
src/qemu/qemu_security_stacked.c, src/qemu/qemu_security_stacked.h:
Move into src/security directory
* src/security/security_stack.c, src/security/security_stack.h,
src/security/security_dac.c, src/security/security_dac.h: Generic
versions of previous QEMU specific drivers
* src/security/security_apparmor.c, src/security/security_apparmor.h,
src/security/security_driver.c, src/security/security_driver.h,
src/security/security_selinux.c, src/security/security_selinux.h:
Update to take virSecurityManagerPtr object as the first param
in all callbacks
* src/security/security_nop.c, src/security/security_nop.h: Stub
implementation of all security driver APIs.
* src/security/security_manager.h, src/security/security_manager.c:
New internal API for invoking security drivers
* src/libvirt.c: Add missing debug for security APIs
2010-11-17 20:26:30 +00:00
|
|
|
# security_driver.h
|
|
|
|
virSecurityDriverLookup;
|
|
|
|
|
|
|
|
|
|
|
|
# security_manager.h
|
|
|
|
virSecurityManagerClearSocketLabel;
|
|
|
|
virSecurityManagerFree;
|
|
|
|
virSecurityManagerGenLabel;
|
|
|
|
virSecurityManagerGetDOI;
|
|
|
|
virSecurityManagerGetModel;
|
|
|
|
virSecurityManagerGetProcessLabel;
|
|
|
|
virSecurityManagerNew;
|
|
|
|
virSecurityManagerNewStack;
|
|
|
|
virSecurityManagerNewDAC;
|
|
|
|
virSecurityManagerReleaseLabel;
|
|
|
|
virSecurityManagerReserveLabel;
|
|
|
|
virSecurityManagerRestoreImageLabel;
|
|
|
|
virSecurityManagerRestoreAllLabel;
|
|
|
|
virSecurityManagerRestoreHostdevLabel;
|
|
|
|
virSecurityManagerRestoreSavedStateLabel;
|
|
|
|
virSecurityManagerSetAllLabel;
|
2011-06-24 13:43:43 +00:00
|
|
|
virSecurityManagerSetImageFDLabel;
|
Refactor the security drivers to simplify usage
The current security driver usage requires horrible code like
if (driver->securityDriver &&
driver->securityDriver->domainSetSecurityHostdevLabel &&
driver->securityDriver->domainSetSecurityHostdevLabel(driver->securityDriver,
vm, hostdev) < 0)
This pair of checks for NULL clutters up the code, making the driver
calls 2 lines longer than they really need to be. The goal of the
patchset is to change the calling convention to simply
if (virSecurityManagerSetHostdevLabel(driver->securityDriver,
vm, hostdev) < 0)
The first check for 'driver->securityDriver' being NULL is removed
by introducing a 'no op' security driver that will always be present
if no real driver is enabled. This guarentees driver->securityDriver
!= NULL.
The second check for 'driver->securityDriver->domainSetSecurityHostdevLabel'
being non-NULL is hidden in a new abstraction called virSecurityManager.
This separates the driver callbacks, from main internal API. The addition
of a virSecurityManager object, that is separate from the virSecurityDriver
struct also allows for security drivers to carry state / configuration
information directly. Thus the DAC/Stack drivers from src/qemu which
used to pull config from 'struct qemud_driver' can now be moved into
the 'src/security' directory and store their config directly.
* src/qemu/qemu_conf.h, src/qemu/qemu_driver.c: Update to
use new virSecurityManager APIs
* src/qemu/qemu_security_dac.c, src/qemu/qemu_security_dac.h
src/qemu/qemu_security_stacked.c, src/qemu/qemu_security_stacked.h:
Move into src/security directory
* src/security/security_stack.c, src/security/security_stack.h,
src/security/security_dac.c, src/security/security_dac.h: Generic
versions of previous QEMU specific drivers
* src/security/security_apparmor.c, src/security/security_apparmor.h,
src/security/security_driver.c, src/security/security_driver.h,
src/security/security_selinux.c, src/security/security_selinux.h:
Update to take virSecurityManagerPtr object as the first param
in all callbacks
* src/security/security_nop.c, src/security/security_nop.h: Stub
implementation of all security driver APIs.
* src/security/security_manager.h, src/security/security_manager.c:
New internal API for invoking security drivers
* src/libvirt.c: Add missing debug for security APIs
2010-11-17 20:26:30 +00:00
|
|
|
virSecurityManagerSetImageLabel;
|
|
|
|
virSecurityManagerSetHostdevLabel;
|
2011-06-24 13:50:36 +00:00
|
|
|
virSecurityManagerSetProcessFDLabel;
|
Refactor the security drivers to simplify usage
The current security driver usage requires horrible code like
if (driver->securityDriver &&
driver->securityDriver->domainSetSecurityHostdevLabel &&
driver->securityDriver->domainSetSecurityHostdevLabel(driver->securityDriver,
vm, hostdev) < 0)
This pair of checks for NULL clutters up the code, making the driver
calls 2 lines longer than they really need to be. The goal of the
patchset is to change the calling convention to simply
if (virSecurityManagerSetHostdevLabel(driver->securityDriver,
vm, hostdev) < 0)
The first check for 'driver->securityDriver' being NULL is removed
by introducing a 'no op' security driver that will always be present
if no real driver is enabled. This guarentees driver->securityDriver
!= NULL.
The second check for 'driver->securityDriver->domainSetSecurityHostdevLabel'
being non-NULL is hidden in a new abstraction called virSecurityManager.
This separates the driver callbacks, from main internal API. The addition
of a virSecurityManager object, that is separate from the virSecurityDriver
struct also allows for security drivers to carry state / configuration
information directly. Thus the DAC/Stack drivers from src/qemu which
used to pull config from 'struct qemud_driver' can now be moved into
the 'src/security' directory and store their config directly.
* src/qemu/qemu_conf.h, src/qemu/qemu_driver.c: Update to
use new virSecurityManager APIs
* src/qemu/qemu_security_dac.c, src/qemu/qemu_security_dac.h
src/qemu/qemu_security_stacked.c, src/qemu/qemu_security_stacked.h:
Move into src/security directory
* src/security/security_stack.c, src/security/security_stack.h,
src/security/security_dac.c, src/security/security_dac.h: Generic
versions of previous QEMU specific drivers
* src/security/security_apparmor.c, src/security/security_apparmor.h,
src/security/security_driver.c, src/security/security_driver.h,
src/security/security_selinux.c, src/security/security_selinux.h:
Update to take virSecurityManagerPtr object as the first param
in all callbacks
* src/security/security_nop.c, src/security/security_nop.h: Stub
implementation of all security driver APIs.
* src/security/security_manager.h, src/security/security_manager.c:
New internal API for invoking security drivers
* src/libvirt.c: Add missing debug for security APIs
2010-11-17 20:26:30 +00:00
|
|
|
virSecurityManagerSetProcessLabel;
|
|
|
|
virSecurityManagerSetSavedStateLabel;
|
|
|
|
virSecurityManagerSetSocketLabel;
|
|
|
|
virSecurityManagerVerify;
|
2009-03-03 09:44:41 +00:00
|
|
|
|
2011-03-29 12:39:18 +00:00
|
|
|
# sexpr.h
|
|
|
|
sexpr_append;
|
|
|
|
sexpr_cons;
|
|
|
|
sexpr_float;
|
|
|
|
sexpr_fmt_node;
|
|
|
|
sexpr_free;
|
|
|
|
sexpr_has;
|
|
|
|
sexpr_int;
|
|
|
|
sexpr_lookup;
|
|
|
|
sexpr_nil;
|
|
|
|
sexpr_node;
|
|
|
|
sexpr_node_copy;
|
|
|
|
sexpr_string;
|
|
|
|
sexpr_u64;
|
|
|
|
sexpr2string;
|
|
|
|
string2sexpr;
|
2009-03-03 09:44:41 +00:00
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# storage_conf.h
|
2010-10-20 17:10:45 +00:00
|
|
|
virStoragePartedFsTypeTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virStoragePoolDefFormat;
|
|
|
|
virStoragePoolDefFree;
|
2009-06-22 16:41:34 +00:00
|
|
|
virStoragePoolDefParseFile;
|
|
|
|
virStoragePoolDefParseNode;
|
2010-10-20 17:10:45 +00:00
|
|
|
virStoragePoolDefParseSourceString;
|
|
|
|
virStoragePoolDefParseString;
|
|
|
|
virStoragePoolFormatDiskTypeToString;
|
|
|
|
virStoragePoolFormatFileSystemNetTypeToString;
|
|
|
|
virStoragePoolFormatFileSystemTypeToString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virStoragePoolLoadAllConfigs;
|
|
|
|
virStoragePoolObjAssignDef;
|
|
|
|
virStoragePoolObjClearVols;
|
|
|
|
virStoragePoolObjDeleteDef;
|
|
|
|
virStoragePoolObjFindByName;
|
|
|
|
virStoragePoolObjFindByUUID;
|
2010-10-20 17:10:45 +00:00
|
|
|
virStoragePoolObjIsDuplicate;
|
2009-01-05 14:05:29 +00:00
|
|
|
virStoragePoolObjListFree;
|
2010-10-20 17:10:45 +00:00
|
|
|
virStoragePoolObjLock;
|
2009-01-05 14:05:29 +00:00
|
|
|
virStoragePoolObjRemove;
|
|
|
|
virStoragePoolObjSaveDef;
|
2010-10-20 17:10:45 +00:00
|
|
|
virStoragePoolObjUnlock;
|
2009-01-05 14:05:29 +00:00
|
|
|
virStoragePoolSourceFree;
|
|
|
|
virStoragePoolSourceListFormat;
|
2010-10-20 17:10:45 +00:00
|
|
|
virStoragePoolSourceListNewSource;
|
|
|
|
virStoragePoolTypeFromString;
|
2009-01-05 14:05:29 +00:00
|
|
|
virStorageVolDefFindByKey;
|
|
|
|
virStorageVolDefFindByName;
|
|
|
|
virStorageVolDefFindByPath;
|
|
|
|
virStorageVolDefFormat;
|
|
|
|
virStorageVolDefFree;
|
2009-06-22 16:41:34 +00:00
|
|
|
virStorageVolDefParseFile;
|
|
|
|
virStorageVolDefParseNode;
|
2010-10-20 17:10:45 +00:00
|
|
|
virStorageVolDefParseString;
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2009-09-08 11:33:35 +00:00
|
|
|
# storage_encryption_conf.h
|
2010-10-20 17:10:45 +00:00
|
|
|
virStorageEncryptionFormat;
|
2009-08-19 19:50:10 +00:00
|
|
|
virStorageEncryptionFree;
|
|
|
|
virStorageEncryptionParseNode;
|
2009-08-14 18:06:59 +00:00
|
|
|
virStorageGenerateQcowPassphrase;
|
2009-08-19 19:50:10 +00:00
|
|
|
|
2010-10-20 17:10:45 +00:00
|
|
|
|
2009-09-25 13:20:13 +00:00
|
|
|
# storage_file.h
|
|
|
|
virStorageFileFormatTypeFromString;
|
2010-10-20 17:10:45 +00:00
|
|
|
virStorageFileFormatTypeToString;
|
2011-07-14 10:53:45 +00:00
|
|
|
virStorageFileFreeMetadata;
|
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;
|
2010-10-29 11:20:40 +00:00
|
|
|
virStorageFileIsSharedFSType;
|
2010-10-20 17:10:45 +00:00
|
|
|
virStorageFileProbeFormat;
|
|
|
|
virStorageFileProbeFormatFromFD;
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2010-11-05 14:22:13 +00:00
|
|
|
# sysinfo.h
|
|
|
|
virSysinfoDefFree;
|
2011-02-07 23:16:04 +00:00
|
|
|
virSysinfoFormat;
|
2010-11-05 14:22:13 +00:00
|
|
|
virSysinfoRead;
|
|
|
|
|
|
|
|
|
2010-12-08 06:19:06 +00:00
|
|
|
# threadpool.h
|
|
|
|
virThreadPoolFree;
|
|
|
|
virThreadPoolNew;
|
|
|
|
virThreadPoolSendJob;
|
|
|
|
|
|
|
|
|
2009-01-15 19:56:05 +00:00
|
|
|
# threads.h
|
2010-10-20 17:10:45 +00:00
|
|
|
virCondBroadcast;
|
|
|
|
virCondDestroy;
|
|
|
|
virCondInit;
|
|
|
|
virCondSignal;
|
|
|
|
virCondWait;
|
|
|
|
virCondWaitUntil;
|
|
|
|
virMutexDestroy;
|
2009-01-15 19:56:05 +00:00
|
|
|
virMutexInit;
|
2010-10-12 11:23:18 +00:00
|
|
|
virMutexInitRecursive;
|
2009-01-15 19:56:05 +00:00
|
|
|
virMutexLock;
|
|
|
|
virMutexUnlock;
|
2011-04-20 22:26:00 +00:00
|
|
|
virOnce;
|
2010-11-02 17:17:47 +00:00
|
|
|
virThreadCreate;
|
2010-12-04 21:33:23 +00:00
|
|
|
virThreadID;
|
2010-11-02 17:17:47 +00:00
|
|
|
virThreadIsSelf;
|
|
|
|
virThreadJoin;
|
|
|
|
virThreadSelf;
|
2010-11-18 13:03:56 +00:00
|
|
|
virThreadSelfID;
|
2009-01-15 19:56:05 +00:00
|
|
|
|
2010-10-20 17:10:45 +00:00
|
|
|
|
|
|
|
# usb.h
|
|
|
|
usbDeviceFileIterate;
|
|
|
|
usbDeviceGetBus;
|
|
|
|
usbDeviceGetDevno;
|
|
|
|
usbFindDevice;
|
|
|
|
usbFreeDevice;
|
|
|
|
usbGetDevice;
|
|
|
|
|
2009-01-15 19:56:05 +00:00
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# util.h
|
|
|
|
saferead;
|
|
|
|
safewrite;
|
2009-03-20 12:17:56 +00:00
|
|
|
safezero;
|
2010-10-20 17:10:45 +00:00
|
|
|
virArgvToString;
|
|
|
|
virAsprintf;
|
|
|
|
virBuildPathInternal;
|
|
|
|
virDirCreate;
|
2011-04-29 09:28:28 +00:00
|
|
|
virEmitXMLWarning;
|
2009-01-05 14:05:29 +00:00
|
|
|
virEnumFromString;
|
|
|
|
virEnumToString;
|
|
|
|
virEventAddHandle;
|
|
|
|
virEventRemoveHandle;
|
2010-10-20 17:10:45 +00:00
|
|
|
virFileAbsPath;
|
2011-05-26 21:30:21 +00:00
|
|
|
virFileBuildPath;
|
2009-01-05 14:05:29 +00:00
|
|
|
virFileDeletePid;
|
|
|
|
virFileExists;
|
2010-10-20 17:10:45 +00:00
|
|
|
virFileFindMountPoint;
|
2009-01-05 14:05:29 +00:00
|
|
|
virFileHasSuffix;
|
2011-01-12 16:12:24 +00:00
|
|
|
virFileIsExecutable;
|
2009-01-05 14:05:29 +00:00
|
|
|
virFileLinkPointsTo;
|
|
|
|
virFileMakePath;
|
2010-10-20 17:10:45 +00:00
|
|
|
virFileMatchesNameSuffix;
|
2011-03-22 19:15:44 +00:00
|
|
|
virFileOpenAs;
|
2009-01-05 14:05:29 +00:00
|
|
|
virFileOpenTty;
|
|
|
|
virFilePid;
|
2010-10-20 17:10:45 +00:00
|
|
|
virFileReadAll;
|
|
|
|
virFileReadLimFD;
|
2009-01-05 14:05:29 +00:00
|
|
|
virFileReadPid;
|
2011-06-17 13:43:54 +00:00
|
|
|
virFileReadPidPath;
|
2010-10-20 17:10:45 +00:00
|
|
|
virFileResolveLink;
|
2010-05-20 15:41:31 +00:00
|
|
|
virFileSanitizePath;
|
2010-10-20 17:10:45 +00:00
|
|
|
virFileStripSuffix;
|
|
|
|
virFileWaitForDevices;
|
|
|
|
virFileWriteStr;
|
|
|
|
virFindFileInPath;
|
|
|
|
virFormatMacAddr;
|
Give each virtual network bridge its own fixed MAC address
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=609463
The problem was that, since a bridge always acquires the MAC address
of the connected interface with the numerically lowest MAC, as guests
are started and stopped, it was possible for the MAC address to change
over time, and this change in the network was being detected by
Windows 7 (it sees the MAC of the default route change), so on each
reboot it would bring up a dialog box asking about this "new network".
The solution is to create a dummy tap interface with a MAC guaranteed
to be lower than any guest interface's MAC, and attach that tap to the
bridge as soon as it's created. Since all guest MAC addresses start
with 0xFE, we can just generate a MAC with the standard "0x52, 0x54,
0" prefix, and it's guaranteed to always win (physical interfaces are
never connected to these bridges, so we don't need to worry about
competing numerically with them).
Note that the dummy tap is never set to IFF_UP state - that's not
necessary in order for the bridge to take its MAC, and not setting it
to UP eliminates the clutter of having an (eg) "virbr0-nic" displayed
in the output of the ifconfig command.
I chose to not auto-generate the MAC address in the network XML
parser, as there are likely to be consumers of that API that don't
need or want to have a MAC address associated with the
bridge.
Instead, in bridge_driver.c when the network is being defined, if
there is no MAC, one is generated. To account for virtual network
configs that already exist when upgrading from an older version of
libvirt, I've added a %post script to the specfile that searches for
all network definitions in both the config directory
(/etc/libvirt/qemu/networks) and the state directory
(/var/lib/libvirt/network) that are missing a mac address, generates a
random address, and adds it to the config (and a matching address to
the state file, if there is one).
docs/formatnetwork.html.in: document <mac address.../>
docs/schemas/network.rng: add nac address to schema
libvirt.spec.in: %post script to update existing networks
src/conf/network_conf.[ch]: parse and format <mac address.../>
src/libvirt_private.syms: export a couple private symbols we need
src/network/bridge_driver.c:
auto-generate mac address when needed,
create dummy interface if mac address is present.
tests/networkxml2xmlin/isolated-network.xml
tests/networkxml2xmlin/routed-network.xml
tests/networkxml2xmlout/isolated-network.xml
tests/networkxml2xmlout/routed-network.xml: add mac address to some tests
2011-02-09 08:28:12 +00:00
|
|
|
virGenerateMacAddr;
|
2010-10-20 17:10:45 +00:00
|
|
|
virGetGroupID;
|
|
|
|
virGetHostname;
|
|
|
|
virGetUserDirectory;
|
|
|
|
virGetUserID;
|
|
|
|
virGetUserName;
|
|
|
|
virHexToBin;
|
|
|
|
virIndexToDiskName;
|
2011-02-17 07:29:07 +00:00
|
|
|
virIsDevMapperDevice;
|
2010-10-20 17:10:45 +00:00
|
|
|
virKillProcess;
|
|
|
|
virMacAddrCompare;
|
|
|
|
virParseMacAddr;
|
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;
|
2010-10-20 17:10:45 +00:00
|
|
|
virRandom;
|
|
|
|
virRandomInitialize;
|
2011-03-08 18:04:06 +00:00
|
|
|
virSetBlocking;
|
2010-10-20 17:10:45 +00:00
|
|
|
virSetCloseExec;
|
2011-03-26 11:19:28 +00:00
|
|
|
virSetInherit;
|
2010-10-20 17:10:45 +00:00
|
|
|
virSetNonBlock;
|
2010-12-23 06:44:02 +00:00
|
|
|
virSetUIDGID;
|
2009-01-05 14:05:29 +00:00
|
|
|
virSkipSpaces;
|
2011-06-29 17:30:43 +00:00
|
|
|
virSkipSpacesAndBackslash;
|
2011-06-29 17:47:08 +00:00
|
|
|
virSkipSpacesBackwards;
|
2010-10-20 17:10:45 +00:00
|
|
|
virStrToDouble;
|
|
|
|
virStrToLong_i;
|
2011-01-13 22:09:18 +00:00
|
|
|
virStrToLong_l;
|
2010-10-20 17:10:45 +00:00
|
|
|
virStrToLong_ll;
|
|
|
|
virStrToLong_ui;
|
2011-01-13 22:09:18 +00:00
|
|
|
virStrToLong_ul;
|
2010-10-20 17:10:45 +00:00
|
|
|
virStrToLong_ull;
|
2010-10-12 11:23:18 +00:00
|
|
|
virStrcpy;
|
|
|
|
virStrncpy;
|
2011-06-01 09:38:56 +00:00
|
|
|
virTimeMs;
|
2010-11-01 04:17:14 +00:00
|
|
|
virTimestamp;
|
2011-06-29 17:47:08 +00:00
|
|
|
virTrimSpaces;
|
2010-11-22 23:39:47 +00:00
|
|
|
virVasprintf;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# uuid.h
|
2010-10-20 17:10:45 +00:00
|
|
|
virGetHostUUID;
|
|
|
|
virSetHostUUIDStr;
|
2009-01-05 14:05:29 +00:00
|
|
|
virUUIDFormat;
|
|
|
|
virUUIDGenerate;
|
|
|
|
virUUIDParse;
|
2010-10-20 17:10:45 +00:00
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2011-07-11 19:42:15 +00:00
|
|
|
# viraudit.h
|
2010-10-12 11:23:18 +00:00
|
|
|
virAuditClose;
|
2010-10-27 10:53:48 +00:00
|
|
|
virAuditEncode;
|
2010-10-12 11:23:18 +00:00
|
|
|
virAuditLog;
|
|
|
|
virAuditOpen;
|
|
|
|
virAuditSend;
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2011-07-19 18:32:58 +00:00
|
|
|
# virfile.h
|
|
|
|
virFileClose;
|
2011-07-11 21:26:33 +00:00
|
|
|
virFileDirectFdClose;
|
|
|
|
virFileDirectFdFlag;
|
|
|
|
virFileDirectFdFree;
|
|
|
|
virFileDirectFdNew;
|
2011-07-19 18:32:58 +00:00
|
|
|
virFileFclose;
|
|
|
|
virFileFdopen;
|
|
|
|
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
# virterror_internal.h
|
2010-10-20 17:10:45 +00:00
|
|
|
virDispatchError;
|
2009-01-05 14:05:29 +00:00
|
|
|
virErrorMsg;
|
2009-09-10 13:21:10 +00:00
|
|
|
virRaiseErrorFull;
|
2010-10-20 17:10:45 +00:00
|
|
|
virReportErrorHelper;
|
2009-01-20 17:13:33 +00:00
|
|
|
virReportOOMErrorFull;
|
2010-10-20 17:10:45 +00:00
|
|
|
virReportSystemErrorFull;
|
2010-01-09 01:38:55 +00:00
|
|
|
virSetError;
|
2011-01-21 17:25:01 +00:00
|
|
|
virSetErrorLogPriorityFunc;
|
2010-10-20 17:10:45 +00:00
|
|
|
virStrerror;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2011-07-21 07:32:34 +00:00
|
|
|
# virkeycode.h
|
|
|
|
virKeycodeSetTypeToString;
|
|
|
|
virKeycodeSetTypeFromString;
|
|
|
|
virKeycodeValueFromString;
|
|
|
|
virKeycodeValueTranslate;
|
2009-01-05 14:05:29 +00:00
|
|
|
|
|
|
|
# xml.h
|
2011-05-26 21:30:21 +00:00
|
|
|
virXMLParseFileHelper;
|
|
|
|
virXMLParseHelper;
|
2011-01-24 18:06:16 +00:00
|
|
|
virXMLParseStrHelper;
|
2010-10-20 17:10:45 +00:00
|
|
|
virXMLPropString;
|
2009-11-26 17:57:00 +00:00
|
|
|
virXPathBoolean;
|
2011-01-13 22:09:18 +00:00
|
|
|
virXPathInt;
|
2009-01-05 14:05:29 +00:00
|
|
|
virXPathLong;
|
2010-10-20 17:10:45 +00:00
|
|
|
virXPathLongHex;
|
|
|
|
virXPathLongLong;
|
2009-01-05 14:05:29 +00:00
|
|
|
virXPathNode;
|
|
|
|
virXPathNodeSet;
|
2010-10-20 17:10:45 +00:00
|
|
|
virXPathNumber;
|
2009-01-05 14:05:29 +00:00
|
|
|
virXPathString;
|
2009-03-03 09:44:41 +00:00
|
|
|
virXPathStringLimit;
|
2011-01-13 22:09:18 +00:00
|
|
|
virXPathUInt;
|
2009-12-04 18:24:25 +00:00
|
|
|
virXPathULong;
|
|
|
|
virXPathULongHex;
|
2010-10-20 17:10:45 +00:00
|
|
|
virXPathULongLong;
|