- 13 4月, 2019 3 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
Although vendor string is always reported by CPUID, the container struct is used for consistency and thus "cpuid" name is not a good fit anymore. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
The following patches introduce CPU features read from MSR in addition to those queried via CPUID instruction. Let's introduce a container struct which will be able to describe either feature type. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 08 4月, 2019 2 次提交
-
-
由 Jiri Denemark 提交于
A feature with no cpuid element is invalid and it should not be silently treated as a feature with all CPUID bits set to zero. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
The microcode version checks are used to invalidate cached CPU data we get from QEMU. To minimize /proc/cpuinfo parsing the microcode version was only read when libvirtd started and cached for the daemon's lifetime. However, the CPU microcode can change anytime (updating the microcode package can automatically upload it to the CPU) and we need to stop caching it to avoid using stale CPU model data. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 07 3月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
Problem is that if there are no signatures for a CPU, then we still allocate cpu->signatures (even though with size 0). Later, we access cpu->signatures[0] if cpu->signatures is not NULL. Invalid read of size 4 at 0x5F439D7: virCPUx86Translate (cpu_x86.c:2930) by 0x5F3C239: virCPUTranslate (cpu.c:927) by 0x57CE7A1: qemuProcessUpdateGuestCPU (qemu_process.c:5870) ... Address 0xf752d40 is 0 bytes after a block of size 0 alloc'd at 0x4C30EC6: calloc (vg_replace_malloc.c:711) by 0x5DBDE4E: virAllocN (viralloc.c:190) by 0x5F3E4FA: x86ModelCopySignatures (cpu_x86.c:990) by 0x5F3E60F: x86ModelCopy (cpu_x86.c:1008) by 0x5F3E7CB: x86ModelFromCPU (cpu_x86.c:1068) by 0x5F4397E: virCPUx86Translate (cpu_x86.c:2922) by 0x5F3C239: virCPUTranslate (cpu.c:927) by 0x57CE7A1: qemuProcessUpdateGuestCPU (qemu_process.c:5870) ... Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 05 3月, 2019 10 次提交
-
-
由 Jiri Denemark 提交于
The function exports the functionality of x86DataToSignatureFull and x86MakeSignature to the test suite. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
The log message may be useful when debugging why a specific CPU model was selected for a given set of CPUID data. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
CPU signatures in the cpu_map serve as a hint for CPUID to CPU model matching algorithm. If the CPU signatures matches any CPU model in the cpu_map, this model will be the preferred one. This works out well and solved several mismatches, but in real world CPUs which should match a single CPU model may be produced with several different signatures. For example, low voltage Broadwell CPUs for laptops and Broadwell CPUs for servers differ in CPU model numbers while we should detect them all as Broadwell CPU model. This patch adds support for storing several signatures for a single CPU model to make this hint useful for more CPUs. Later commits will provide additional signatures for existing CPU models, which will correct some results in our CPU test suite. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
In preparation for storing several CPU signatures in a single CPU model, we need to turn virCPUx86Model's signature into an array of signatures. The parser still hardcodes the number of signatures to 1, but the following patch will drop this limit. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
Introduce a helper for copying CPU signature between two CPU models. It's not very useful until the way we store signatures is changed in the next patch. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
Having multiple CPU model definitions with the same name could result in unexpected behavior. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
The code is separated into a new x86ModelParseFeatures function. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
The code is separated into a new x86ModelParseVendor function. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
The code is separated into a new x86ModelParseSignature function. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
The code is separated into a new x86ModelParseAncestor function. 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>
-
- 15 11月, 2018 2 次提交
-
-
由 Vitaly Kuznetsov 提交于
Support Hyper-V Enlightened VMCS in domain config. QEMU support will be implemented in the next patch, adding interim VIR_DOMAIN_HYPERV_EVMCS cases to src/qemu/* for now. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
-
由 Vitaly Kuznetsov 提交于
Support Hyper-V PV IPI enlightenment in domain config. QEMU support will be implemented in the next patch, adding interim VIR_DOMAIN_HYPERV_IPI cases to src/qemu/* for now. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
-
- 20 9月, 2018 1 次提交
-
-
由 Erik Skultety 提交于
All of the ones being removed are pulled in by internal.h. The only exception is sanlock which expects the application to include <stdint.h> before sanlock's headers, because sanlock prototypes use fixed width int, but they don't include stdint.h themselves, so we have to leave that one in place. Signed-off-by: NErik Skultety <eskultet@redhat.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 17 9月, 2018 1 次提交
-
-
由 Shi Lei 提交于
Signed-off-by: NShi Lei <shi_lei@massclouds.com>
-
- 28 8月, 2018 3 次提交
-
-
由 Daniel P. Berrangé 提交于
Get rid of the separate 'error:' label, so all code paths jump straight to the 'cleanup:' label. Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The x86 and ppc impls both duplicate some logic when parsing CPU features. Change the callback signature so that this duplication can be pushed up a level to common code. Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Two pieces of code accidentally jumped to the wrong label when they failed causing incorrect cleanup, returning a partially initialized CPU model struct. Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 17 8月, 2018 3 次提交
-
-
由 Vitaly Kuznetsov 提交于
Qemu-3.0 supports Hyper-V-style PV TLB flush, Windows guests can benefit from this feature as KVM knows which vCPUs are not currently scheduled (and thus don't require any immediate action). Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Vitaly Kuznetsov 提交于
Qemu-3.0 supports so-called 'Reenlightenment' notifications and this (in conjunction with 'hv-frequencies') can be used make Hyper-V on KVM pass stable TSC page clocksource to L2 guests. Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Vitaly Kuznetsov 提交于
Qemu-2.12 gained 'hv-frequencies' cpu flag to enable Hyper-V frequency MSRs. These MSRs are required (but not sufficient) to make Hyper-V on KVM pass stable TSC page clocksource to L2 guests. Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 28 5月, 2018 3 次提交
-
-
由 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 提交于
Modern host CPU models from domain capabilities XMLs are reported as guest CPU definitions with feature policies. This patch updates virCPUx86Baseline to properly handle such CPU models. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 10 1月, 2018 2 次提交
-
-
由 Jiri Denemark 提交于
When specifying a new CPU model in cpu_map.xml as an extension to an existing model, we forgot to copy the signature (family + model) from the original CPU model. We don't use this way of specifying CPU models, but it's still supported and it becomes useful when someone wants to quickly hack up a CPU model for testing or when creating additional variants of existing models to help with fixing some spectral issues. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
When translating CPUID data into CPU model + features, the code sometimes uses an unexpected CPU model. There may be several reasons for this, starting with wrong expectations and ending with an actual bug in our code. These debug messages will help determining the reason. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 04 1月, 2018 2 次提交
-
-
由 Paolo Bonzini 提交于
A microcode update can cause the CPUID bits to change; an example from the past was the update that disabled TSX on several Haswell and Broadwell machines. In order to track the x86 microcode version in the QEMU capabilities, we have to fetch it and store it in the host CPU. This also makes the version visible in "virsh capabilities", which is a nice side effect. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
The function will be used to initialize internal data of the x86 CPU driver (including the CPU map). Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 03 11月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
Right-aligning backslashes when defining macros or using complex commands in Makefiles looks cute, but as soon as any changes is required to the code you end up with either distractingly broken alignment or unnecessarily big diffs where most of the changes are just pushing all backslashes a few characters to one side. Generated using $ git grep -El '[[:blank:]][[:blank:]]\\$' | \ grep -E '*\.([chx]|am|mk)$$' | \ while read f; do \ sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \ done Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 18 10月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
Even though only family and model are used for matching CPUID data with CPU models from cpu_map.xml, stepping is used by x86DataFilterTSX which is supposed to disable TSX on CPU models with broken TSX support. Thus we need to start parsing stepping from QEMU to make sure we don't disable TSX on CPUs which provide working TSX implementation. See the following patch for a real world example of such CPU. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 16 10月, 2017 4 次提交
-
-
由 Jiri Denemark 提交于
When decoding CPUID data to virCPUDef we need to be careful about using a CPU model which cannot be directly used on the current host. Normally, libvirt would notice the features which prevent the model from being usable and it would disable them in the computed virCPUDef, but this won't work in case the definition of the CPU model in QEMU contains more features than what we have in cpu_map.xml. We need to count with the usability blockers we got from QEMU and explicitly disable all of them to make the computed virCPUDef usable. https://bugzilla.redhat.com/show_bug.cgi?id=1464832Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
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>
-