- 18 3月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
Any source file which calls the logging APIs now needs to have a VIR_LOG_INIT("source.name") declaration at the start of the file. This provides a static variable of the virLogSource type. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 29 1月, 2014 2 次提交
-
-
由 Jiri Denemark 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1049391 When all source CPU XMLs contain just a single CPU model (with a possibly varying set of additional feature elements), virConnectBaselineCPU will try to use this CPU model in the computed guest CPU. Thus, when used on just a single CPU (useful with VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES), the result will not use a different CPU model. If the computed CPU uses the source model, set fallback mode to 'forbid' to make sure the guest CPU will always be as close as possible to the source CPUs.
-
由 Jiri Denemark 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1049391 VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES flag for virConnectBaselineCPU did not work if the resulting guest CPU would disable some features present in its base model. This patch makes sure we won't try to add such features twice.
-
- 08 11月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
Some of the emulator features are presented in the <features> element in the domain XML although they are virtual CPUID feature bits when presented to the guest. To avoid confusing the users with these features, as they are not configurable via the <cpu> element, this patch adds an internal array where those can be stored privately instead of exposing them in the XML. Additionaly KVM feature bits are added as example usage of this code.
-
由 Peter Krempa 提交于
The CPUID functions were stored in multiple arrays according to a specified prefix of those. This made it very hard to add another prefix to store KVM CPUID features (0x40000000). Instead of hardcoding a third array this patch changes the approach used: The code is refactored to use a single array where the CPUID functions are stored ordered by the cpuid function so that they don't depend on the specific prefix and don't waste memory. The code is also less complex using this approach. A trateoff to this is the change from O(N) complexity to O(N^2) in x86DataAdd and x86DataSubtract. The rest of the functions were already using O(N^2) algorithms.
-
- 04 11月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
Until now the map was loaded from the XML definition file every time a operation on the flags was requested. With the introduciton of one shot initializers we can store the definition forever (as it will never change) instead of parsing it over and over again.
-
由 Jiri Denemark 提交于
This makes virCPUx86DataAddCPUID, virCPUx86DataFree, and virCPUx86MakeData available for direct usage outside of cpu driver in tests and the new qemu monitor that will request the actual CPU definition from a running qemu instance.
-
- 15 10月, 2013 12 次提交
-
-
由 Peter Krempa 提交于
Avoid a line exceeding 80 characters and change argument alignment in two error messages.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
These return boolean results.
-
由 Peter Krempa 提交于
Use virCPUx86DataIterator and virCPUx86DataIteratorInit.
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
This patch adds cpuDataFormat and cpuDataParse APIs to be used in unit tests for testing APIs that deal with virCPUData. In the x86 world, this means we can now store/load arbitrary CPUID data in the test suite to check correctness of CPU related APIs that could not be tested before. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Eric Blake 提交于
'const fooPtr' is the same as 'foo * const' (the pointer won't change, but it's contents can). But in general, if an interface is trying to be const-correct, it should be using 'const foo *' (the pointer is to data that can't be changed). Fix up offenders in src/cpu. * src/cpu/cpu.h (cpuArchDecode, cpuArchEncode, cpuArchUpdate) (cpuArchHasFeature, cpuDecode, cpuEncode, cpuUpdate) (cpuHasFeature): Use intended type. * src/conf/cpu_conf.h (virCPUDefCopyModel, virCPUDefCopy): Likewise. (virCPUDefParseXML): Drop const. * src/cpu/cpu.c (cpuDecode, cpuEncode, cpuUpdate, cpuHasFeature): Fix fallout. * src/cpu/cpu_x86.c (x86ModelFromCPU, x86ModelSubtractCPU) (x86DecodeCPUData, x86EncodePolicy, x86Encode, x86UpdateCustom) (x86UpdateHostModel, x86Update, x86HasFeature): Likewise. * src/cpu/cpu_s390.c (s390Decode): Likewise. * src/cpu/cpu_arm.c (ArmDecode): Likewise. * src/cpu/cpu_powerpc.c (ppcModelFromCPU, ppcCompute, ppcDecode) (ppcUpdate): Likewise. * src/conf/cpu_conf.c (virCPUDefCopyModel, virCPUDefCopy) (virCPUDefParseXML): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 05 9月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The s390, ppc and arm CPU drivers never set the 'arch' field in their impl of cpuArchNodeData. This leads to error messages being reported from cpuDataFree later, due to trying to use VIR_ARCH_NONE. #0 virRaiseErrorFull (filename=filename@entry=0x76f94434 "cpu/cpu.c", funcname=funcname@entry=0x76f942dc <__FUNCTION__.18096> "cpuGetSubDriver", linenr=linenr@entry=58, domain=domain@entry=31, code=code@entry=1, level=level@entry=VIR_ERR_ERROR, str1=0x76f70e18 "internal error: %s", str2=str2@entry=0x7155f2ec "undefined hardware architecture", str3=str3@entry=0x0, int1=int1@entry=-1, int2=int2@entry=-1, fmt=0x76f70e18 "internal error: %s") at util/virerror.c:646 #1 0x76e682ea in virReportErrorHelper (domcode=domcode@entry=31, errorcode=errorcode@entry=1, filename=0x76f94434 "cpu/cpu.c", funcname=0x76f942dc <__FUNCTION__.18096> "cpuGetSubDriver", linenr=linenr@entry=58, fmt=0x76f7e7e4 "%s") at util/virerror.c:1292 #2 0x76ed82d4 in cpuGetSubDriver (arch=<optimized out>) at cpu/cpu.c:57 #3 cpuGetSubDriver (arch=VIR_ARCH_NONE) at cpu/cpu.c:51 #4 0x76ed8818 in cpuDataFree (data=data@entry=0x70c22d78) at cpu/cpu.c:216 #5 0x716aaec0 in virQEMUCapsInitCPU (arch=VIR_ARCH_ARMV7L, caps=0x70c29a08) at qemu/qemu_capabilities.c:867 Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 17 8月, 2013 1 次提交
-
-
由 Don Dugger 提交于
Currently the virConnectBaselineCPU API does not expose the CPU features that are part of the CPU's model. This patch adds a new flag, VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, that causes the API to explicitly list all features that are part of that model. Signed-off-by: NDon Dugger <donald.d.dugger@intel.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 22 7月, 2013 4 次提交
-
-
由 Jiri Denemark 提交于
Until now CPU features inherited from a specified CPU model could only be overridden with 'disable' policy. With this patch, any explicitly specified feature always overrides the same feature inherited from a CPU model regardless on the specified policy. The CPU in x86-exact-force-Haswell.xml would previously be incompatible with x86-host-SandyBridge.xml CPU even though x86-host-SandyBridge.xml provides all features required by x86-exact-force-Haswell.xml.
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
- 16 7月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=799354 Until now, the "host-model" cpu mode couldn't be influenced. This patch allows to use the <feature> elements to either enable or disable specific CPU flags. This can be used to force flags that can be emulated even if the host CPU doesn't support them.
-
由 Peter Krempa 提交于
-
- 11 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 7月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 09 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 02 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The source code base needs to be adapted as well. Some files include virutil.h just for the string related functions (here, the include is substituted to match the new file), some include virutil.h without any need (here, the include is removed), and some require both.
-
- 19 4月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
The API can be used to check if the model is on the supported models list, which needs to be done in several places.
-
- 13 2月, 2013 1 次提交
-
-
由 Eric Blake 提交于
This makes code easier to read, by avoiding lines longer than 80 columns and removing the repetition from the callers. * src/util/virstoragefile.c (qedGetHeaderUL, qedGetHeaderULL): Delete in favor of more generic macros. (qcow2GetBackingStoreFormat, qcowXGetBackingStore) (qedGetBackingStore, virStorageFileMatchesVersion) (virStorageFileGetMetadataInternal): Use new macros. * src/cpu/cpu_x86.c (x86VendorLoad): Likewise.
-
- 21 12月, 2012 4 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 19 12月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
Prior to the virArch changes, the CPU baseline method would free the arch string in the returned CPU. Fix the regression by setting arch to VIR_ARCH_NONE at the end Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 02 11月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The libvirt coding standard is to use 'function(...args...)' instead of 'function (...args...)'. A non-trivial number of places did not follow this rule and are fixed in this patch. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-