- 18 3月, 2020 2 次提交
-
-
由 Jiri Denemark 提交于
The check attribute was completely ignored for host-passthrough CPUs even if they explicitly requested some features to be enabled. For example, a domain with the following CPU definition <cpu mode='host-passthrough' check='full'> <feature policy='require' name='svm'/> </cpu> would happily start even when 'svm' cannot be enabled. Let's call virCPUArchUpdateLive for host-passthrough CPUs with VIR_CPU_CHECK_FULL to make sure the architecture specific code can validate the provided virtual CPU against the desired definition. https://bugzilla.redhat.com/show_bug.cgi?id=1515677Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
The updateLive CPU sub-driver function is supposed to be called only for a subset of CPU definitions. Let's make it more obvious by turning a negative test and return into a positive check. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 26 2月, 2020 1 次提交
-
-
由 Jiri Denemark 提交于
Whenever there is a guest CPU configured in domain XML, we will call some CPU driver APIs to validate the CPU definition and check its compatibility with the hypervisor. Thus domains with guest CPU specification can only be started if the guest architecture is supported by the CPU driver. But we would add a default CPU to any domain as long as QEMU reports it causing failures to start any domain on affected architectures. https://bugzilla.redhat.com/show_bug.cgi?id=1805755Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 24 1月, 2020 1 次提交
-
-
由 Michal Privoznik 提交于
The virCapabilitiesGetNodeInfo() function has the usual return value semantics for integeres: a negative value means an error, zero or a positive value means success. However, the function call done in virCPUProbeHost() doesn't check for the return value accordingly. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
- 16 1月, 2020 1 次提交
-
-
由 Daniel P. Berrangé 提交于
Recently CPU hardware vendors have started to support a new structure inside the CPU package topology known as a "die". Thus the hierarchy is now: sockets > dies > cores > threads This adds support for "dies" in the XML parser, with the value defaulting to 1 if not specified for backwards compatibility. For example a system with 64 logical CPUs might report <topology sockets="4" dies="2" cores="4" threads="2"/> Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 09 12月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
Annoyingly there was no existing constructor, and identifying all the places which do a VIR_ALLOC(cpu) is a bit error prone. Hopefully this has found & converted them all. Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 15 10月, 2019 1 次提交
-
-
由 Ján Tomko 提交于
Prefer the GLib version of the macro. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 07 10月, 2019 1 次提交
-
-
由 Collin Walling 提交于
Implement an XML to virCPUDefPtr helper that handles the ctxt prerequisite for virCPUDefParseXML. This does not alter any functionality. Signed-off-by: NCollin Walling <walling@linux.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.ibm.com> Reviewed-by: NDaniel Henrique Barboza <danielh413@gmail.com> Message-Id: <1568924706-2311-14-git-send-email-walling@linux.ibm.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 20 6月, 2019 1 次提交
-
-
由 Jiri Denemark 提交于
This is a generic replacement for the former virCPUx86DataAddFeature, which worked on the generic virCPUDataPtr anyway. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 14 12月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
In many files there are header comments that contain an Author: statement, supposedly reflecting who originally wrote the code. In a large collaborative project like libvirt, any non-trivial file will have been modified by a large number of different contributors. IOW, the Author: comments are quickly out of date, omitting people who have made significant contribitions. In some places Author: lines have been added despite the person merely being responsible for creating the file by moving existing code out of another file. IOW, the Author: lines give an incorrect record of authorship. With this all in mind, the comments are useless as a means to identify who to talk to about code in a particular file. Contributors will always be better off using 'git log' and 'git blame' if they need to find the author of a particular bit of code. This commit thus deletes all Author: comments from the source and adds a rule to prevent them reappearing. The Copyright headers are similarly misleading and inaccurate, however, we cannot delete these as they have legal meaning, despite being largely inaccurate. In addition only the copyright holder is permitted to change their respective copyright statement. Reviewed-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 28 5月, 2018 4 次提交
-
-
由 Jiri Denemark 提交于
When computing a baseline CPU for a specific hypervisor we have to make sure to include only CPU features supported by the hypervisor. Otherwise the computed CPU could not be used for starting a new domain. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCollin Walling <walling@linux.ibm.com>
-
由 Jiri Denemark 提交于
To make it more consistent with the rest of the CPU driver code. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCollin Walling <walling@linux.ibm.com>
-
由 Jiri Denemark 提交于
This is required for virCPUBaseline to accept a list of guest CPU definitions since they do not have arch set. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCollin Walling <walling@linux.ibm.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 16 10月, 2017 3 次提交
-
-
由 Jiri Denemark 提交于
This internal API can be used to find a specific CPU model in virDomainCapsCPUModels list. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
The "preferred" parameter is not used by any caller of cpuDecode anymore. It's only used internally in cpu_x86 to implement cpuBaseline. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
All APIs which expect a list of CPU models supported by hypervisors were switched from char **models and int models to just accept a pointer to virDomainCapsCPUModels object stored in domain capabilities. This avoids the need to transform virDomainCapsCPUModelsPtr into a NULL-terminated list of model names and also allows the various cpu driver APIs to access additional details (such as its usability) about each CPU model. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 18 9月, 2017 4 次提交
-
-
由 Jiri Denemark 提交于
This new API may be used to check whether all features used in a CPU definition are valid (e.g., libvirt knows their name, their policy is supported, etc.). Leaving this API unimplemented in an arch subdriver means libvirt does not restrict CPU features usable on the associated architectures. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
The implementation of virConnectBaselineCPU may be different for each hypervisor. Thus it shouldn't really be implmented in the cpu code. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
They are logged in cpuBaseline anyway. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 07 6月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 19 4月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
Sometimes we want to call virCPUGetHost only when it is implemented for a given architecture to avoid logging expected and possibly misleading errors. The new virCPUGetHostIsSupported API may be used to guard such calls to virCPUGetHost. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 07 4月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
This new internal API makes a copy of virCPUDef while removing all features which would block migration. It uses cpu_map.xml as a database of such features, which should only be used as a fallback when we cannot get the data from a hypervisor. The main goal of this API is to decouple this filtering from virCPUUpdate so that the hypervisor driver can filter the features according to the hypervisor. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 27 3月, 2017 7 次提交
-
-
由 Jiri Denemark 提交于
The public API flags are handled by the cpuBaselineXML wrapper. The internal cpuBaseline API only needs to know whether it is supposed to drop non-migratable features. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
cpuBaseline is responsible for computing a baseline CPU while feature expansion is done by virCPUExpandFeatures. The cpuBaselineXML wrapper (used by hypervisor drivers to implement virConnectBaselineCPU API) calls cpuBaseline followed by virCPUExpandFeatures if requested by VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES flag. The features in the three changed test files had to be sorted using "sort -k 3" because virCPUExpandFeatures returns a sorted list of features. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Having to use cpuBaseline with VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES flag to expand CPU features is strange. Not to mention that cpuBaseline can only expand host CPU definitions (i.e., it completely ignores feature policies). The new virCPUExpandFeatures API is designed to work with both host and guest CPU definitions. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Martin Kletzander 提交于
There is no "node driver" as there was before, drivers have to do their own ACL checking anyway, so they all specify their functions and nodeinfo is basically just extending conf/capablities. Hence moving the code to src/conf/ is the right way to go. Also that way we can de-duplicate some code that is in virsysfs and/or virhostcpu that got duplicated during the virhostcpu.c split. And Some cleanup is done throughout the changes, like adding the vir* prefix etc. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Both QEMU and bhyve are using the same function for setting up the CPU in virCapabilities, so de-duplicate it, save code and time, and help other drivers adopt it. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 17 3月, 2017 2 次提交
-
-
由 Jiri Denemark 提交于
When guest CPU definition uses VIR_CPU_CHECK_FULL checks, we need to make sure QEMU does not add or remove any features. https://bugzilla.redhat.com/show_bug.cgi?id=822148 https://bugzilla.redhat.com/show_bug.cgi?id=824989Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
When starting a domain with custom guest CPU specification QEMU may add or remove some CPU features. There are several reasons for this, e.g., QEMU/KVM does not support some requested features or the definition of the requested CPU model in libvirt's cpu_map.xml differs from the one QEMU is using. We can't really avoid this because CPU models are allowed to change with machine types and libvirt doesn't know (and probably doesn't even want to know) about such changes. Thus when we want to make sure guest ABI doesn't change when a domain gets migrated to another host, we need to update our live CPU definition according to the CPU QEMU created. Once updated, we will change CPU checking to VIR_CPU_CHECK_FULL to make sure the virtual CPU created after migration exactly matches the one on the source. https://bugzilla.redhat.com/show_bug.cgi?id=822148 https://bugzilla.redhat.com/show_bug.cgi?id=824989Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 14 3月, 2017 3 次提交
-
-
由 Jiri Denemark 提交于
When creating host CPU definition usable with a given emulator, the CPU should not be defined using an unsupported CPU model. The new @models and @nmodels parameters can be used to limit CPU models which can be used in the result. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
The parameter can be used to request either VIR_CPU_TYPE_HOST (which has been assumed so far) or VIR_CPU_TYPE_GUEST definition. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
cpuNodeData has always been followed by cpuDecode as no hypervisor driver is really interested in raw CPUID data for a host CPU. Let's create a new CPU driver API which returns virCPUDefPtr directly. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 24 2月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
The new API is called virCPUDataFree. Individual CPU drivers are no longer required to implement their own freeing function unless they need to free architecture specific data from virCPUData. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 22 2月, 2017 2 次提交
-
-
由 Jiri Denemark 提交于
virCPUDef.arch is not required to be filled in for guest CPU definitions. It doesn't make sense to artificially mandate it to be set when cpuDecode is called especially when virCPUData.arch passed to cpuDecode already contains the architecture. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 15 11月, 2016 1 次提交
-
-
由 Jiri Denemark 提交于
The API is not used anywhere in the code. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-