- 20 6月, 2012 1 次提交
-
-
由 Crístian Viana 提交于
QEMU exposes its version to the guest's hardware and in some cases that is wrong (e.g. Windows prints messages about driver updates when you switch the QEMU version). There is a new field now on the struct QEmuMachine, hw_version, which may contain the version that the specific machine should report. If that field is set, then that machine will report that version to the guest. Signed-off-by: NCrístian Viana <vianac@linux.vnet.ibm.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 08 6月, 2012 1 次提交
-
-
由 Andreas Färber 提交于
This simplifies the code and resolves TODOs. Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
-
- 30 5月, 2012 1 次提交
-
-
由 Eduardo Habkost 提交于
Changes v2 -> v3; - Check for kvm_enabled() before setting cpuid_7_0_ebx_features Changes v1 -> v2: - Use kvm_arch_get_supported_cpuid() instead of host_cpuid() on cpu_x86_fill_host(). We should use GET_SUPPORTED_CPUID for all bits on "-cpu host" eventually, but I am not changing all the other CPUID leaves because we may not be able to test such an intrusive change in time for 1.1. Description of the bug: Since QEMU 0.15, the CPUID information on CPUID[EAX=7,ECX=0] is being returned unfiltered to the guest, directly from the GET_SUPPORTED_CPUID return value. The problem is that this makes the resulting CPU feature flags unpredictable and dependent on the host CPU and kernel version. This breaks live-migration badly if migrating from a host CPU that supports some features on that CPUID leaf (running a recent kernel) to a kernel or host CPU that doesn't support it. Migration also is incorrect (the virtual CPU changes under the guest's feet) if you migrate in the opposite direction (from an old CPU/kernel to a new CPU/kernel), but with less serious consequences (guests normally query CPUID information only once on boot). Fortunately, the bug affects only users using cpudefs with level >= 7. The right behavior should be to explicitly enable those features on [cpudef] config sections or on the "-cpu" command-line arguments. Right now there is no predefined CPU model on QEMU that has those features: the latest Intel model we have is Sandy Bridge. I would like to get this fixed on 1.1, so I am submitting this patch, that enables those features only if "-cpu host" is being used (as we don't have any pre-defined CPU model that actually have those features). After 1.1 is released, we can make those features properly configurable on [cpudef] and -cpu configuration. One problem is: with this patch, users with the following setup: - Running QEMU 1.0; - Using a cpudef having level >= 7; - Running a kernel that supports the features on CPUID leaf 7; and - Running on a CPU that supports some features on CPUID leaf 7 won't be able to live-migrate to QEMU 1.1. But for these users live-migration is already broken (they can't live-migrate to hosts with older CPUs or older kernels, already), I don't see how to avoid this problem. Signed-off-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 12 5月, 2012 1 次提交
-
-
由 Andreas Färber 提交于
Commit de024815 (target-i386: QOM'ify CPU init) moved mce_init() call from helper.c:cpu_x86_init() into X86CPU's cpu.c:x86_cpu_initfn(). mce_init() checks for a family >= 6 though, so we could end up with a sequence such as for -cpu somecpu,family=6: x86_cpu_initfn => X86CPU::family == 5 mce_init => no-op cpu_x86_register => X86CPU::family = 6 => MCE unexpectedly not init'ed or for -cpu someothercpu,family=5: x86_cpu_initfn => X86CPU::family == 6 mce_init => init'ed cpu_x86_register => X86CPU::family = 5 => MCE unexpectedly init'ed Therefore partially revert the above commit. To avoid moving mce_init() back into helper.c, foresightedly move it into a new x86_cpu_realize() function and, in lack of ObjectClass::realize, call it directly from cpu_x86_init(). While at it, move the qemu_init_vcpu() call that used to follow mce_init() in cpu_x86_init() into the new realizefn as well. Reported-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-
- 27 4月, 2012 1 次提交
-
-
由 Andreas Färber 提交于
Don't assume zeroed cpuid_model[] fields. This didn't break anything yet but QOM properties should be able to set the value to something else without setting an intermediate zero string. Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 25 4月, 2012 15 次提交
-
-
由 Andreas Färber 提交于
Use Hz as unit. Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-
由 Andreas Färber 提交于
Using it now would incur converting the three x86_def_t vendor words into a string for object_property_set_str(), then back to three words in the "vendor" setter. The built-in CPU definitions use numeric preprocessor defines to initialize the three words in a charset-safe way, so do not change the fields to char[12] just to use the setter. Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-
由 Andreas Färber 提交于
Add the property early in the initfn so that it can be used in helpers such as mce_init(). Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> [AF: Add an error_free(), spotted by Michael Roth] Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-
由 Andreas Färber 提交于
A family field value of 0xf and extended family field value of 0xff is the maximum representable unsigned family number. All other CPUID property values are bounds-checked, so add a check here for symmetry before we adopt it in a property setter. Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-
由 Andreas Färber 提交于
Avoids an x86_env_get_cpu() call there, to work with QOM properties. Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-
由 Andreas Färber 提交于
Don't assume zeroed cpuid_model[] fields. This didn't break anything yet but QOM properties should be able to set the value to something else without setting an intermediate zero string. Reviewed-by: NEduardo Habhost <ehabkost@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> [AF: Use memset() instead of for loop, suggested by Igor] Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 10 4月, 2012 4 次提交
-
-
由 Andreas Färber 提交于
Move code from cpu_state_reset() into QOM x86_cpu_reset(), fixing style issues for FPU init. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Move code from cpu_x86_init() to new QOM x86_cpu_initfn(). Also move mce_init() to cpu.c since it's used nowhere else. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Embed CPUX86State as first member of X86CPU. Distinguish between "x86_64-cpu" and "i386-cpu". Drop cpu_x86_close() in favor of calling object_delete() directly. For now let CPUClass::reset() call cpu_state_reset(). Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Name it cpu.c to align with other QOM'ified targets. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 13 3月, 2012 1 次提交
-
-
由 Eduardo Habkost 提交于
Signed-off-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 24 2月, 2012 4 次提交
-
-
由 Andreas Färber 提交于
Move the logic to transform the 48-char model ID into the 12-word model value into a helper. Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Andreas Färber 提交于
Move the logic for setting the stepping field into a helper function. To make the function self-contained and to prepare for future unordered/multiple uses, mask out any previous stepping values first. Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Andreas Färber 提交于
Move the logic for setting the model and extended model fields into a helper function. To make the function self-contained and to prepare for future unordered/multiple uses, mask out any previous model values first. Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Andreas Färber 提交于
Move the logic for setting the family and extended family into a helper function. To make the helper self-contained and in preparation of future unordered/multiple uses, mask out any previous family values first. Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 23 2月, 2012 2 次提交
-
-
由 Eduardo Habkost 提交于
Use 'i64' instead of 'lm' and 'xd' instead of 'nx' on Intel models. The flags have different names on Intel docs, so use those names for clarity. This is based on a previous patch from John Cooper where this was introduced with many other changes at the same time. Original John's patch submission is at Message-ID: <4DDAD5E7.2020002@redhat.com>, <http://marc.info/?l=qemu-devel&m=130618871926030>. Changes v1 -> v2: - Rebase patch against latest Qemu git tree Signed-off-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Eduardo Habkost 提交于
pclmulqdq: /proc/cpuinfo on Linux and all documentation I have seen uses pclmulqdq as the flag name. As the only document using pclmuldq seems to be the Intel CPUID documentation (Application Note 485), it looks like a typo and not the correct name for the flag. ffxsr: AMD docs refer to fxsr_opt as ffxsr, so allow this named to be used too. Signed-off-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 19 1月, 2012 1 次提交
-
-
由 Vadim Rozenfeld 提交于
[Jan: fix build with CONFIG_USER_ONLY] Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
-
- 23 12月, 2011 1 次提交
-
-
由 Gleb Natapov 提交于
Signed-off-by: NGleb Natapov <gleb@redhat.com> Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
-
- 29 11月, 2011 1 次提交
-
-
由 Markus Armbruster 提交于
cpu_x86_find_by_name() uses strtosz_suffix_unit(), but screws up the error checking. It detects some failures, but not all. Undetected failures result in a zero tsc_khz value (error value -1 divided by 1000), which means "no tsc_freq set". To reproduce, try "-cpu qemu64,tsc_freq=9999999T". strtosz_suffix_unit() fails, because the value overflows int64_t, Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 28 11月, 2011 1 次提交
-
-
由 Anthony Liguori 提交于
This reverts commit 66e3dd92. From Avi, "Anthony, I think we should revert that commit and refactor cpuid for 1.1. The logic is spread over too many places which makes it hard to reason about." Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 10 11月, 2011 4 次提交
-
-
由 Markus Armbruster 提交于
Spotted by Coverity. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
由 Markus Armbruster 提交于
To reproduce the leak, put two name options into the same [cpudef] section of target-x86_64.conf. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
由 Markus Armbruster 提交于
Fixes missing error checking. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
由 Avi Kivity 提交于
The fact that a host cpu supports a feature doesn't mean that QEMU and KVM will also support it, yet -cpuid host brings host features wholesale. We need to whitelist each feature separately to make sure we support it. This patch adds KVM whitelisting (by simply using KVM_GET_SUPPORTED_CPUID instead of the CPUID instruction). Signed-off-by: NAvi Kivity <avi@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 21 8月, 2011 1 次提交
-
-
由 Anthony Liguori 提交于
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-