History | View | Annotate | Download (66.9 kB)
qemu: enable PV EOI for qemu 1.3
Enable KVM PV EOI by default. You can still disable it with-kvm_pv_eoi cpu flag. To avoid breaking cross-version migration,enable only for qemu 1.3 (or in the future, newer) machine type.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
target-i386: cpu: recover items 28-31 of ext2_feature_name
I removed a line by mistake on commit3b671a40cab2404bc63e57db8cd3afa4ec70bfab, containing the flags lm/i64,3dnow, and 3dnowext. This patch restores the removed line.
Reviewed-by: Don Slutz <Don@cloudswitch.com>...
cpu_dump_state: move DUMP_FPU and DUMP_CCOP flags from x86-only to generic
Move the DUMP_FPU and DUMP_CCOP flags for cpu_dump_state() from beingx86-specific flags to being generic ones. This allows us to drop someTARGET_I386 ifdefs in various places, and means that we can (potentially)...
x86: Implement SMEP and SMAP
This patch implements Supervisor Mode Execution Prevention (SMEP) andSupervisor Mode Access Prevention (SMAP) for x86. The purpose of thepatch, obviously, is to help kernel developers debug the support forthose features....
i386: -cpu help: remove reference to specific CPUID leaves/registers
The -cpu configuration interface is based on a list of feature names orproperties, on a single namespace, so there's no need to mention onwhich CPUID leaf/register each flag is located....
i386: cpu: eliminate duplicate feature names
Instead of having duplicate feature names on the ext2_feature array forthe AMD feature bit aliases, we keep the feature names only on thefeature_name[] array, and copy the corresponding bits tocpuid_ext2_features in case the CPU vendor is AMD....
i386: cpu: replace EXT2_FEATURE_MASK with CPUID_EXT2_AMD_ALIASES
Both constants have the same value, but CPUID_EXT2_AMD_ALIASES isdefined without using magic numbers.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Reviewed-by: Don Slutz <Don@CloudSwitch.com>...
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
target-i386: Allow tsc-frequency to be larger then 2.147G
The check using INT_MAX (2147483647) is wrong in this case.
Signed-off-by: Fred Oliveira <foliveira@cloudswitch.com>Signed-off-by: Don Slutz <Don@CloudSwitch.com>Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
target-i386: Drop unused setscalar() macro
It was only used by now removed setfeatures() function.
Suggested-by: Igor Mammedov <imammedo@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
target-i386: Fold -cpu ?cpuid, ?model output into -cpu help, drop ?dump
Commit c8057f95 (accidentally) disabled the ability to passoption strings starting with '?' to the target-specificcpu_list function, so the target-i386 specific "-cpu ?dump","-cpu ?cpuid" and "-cpu ?model" stopped working....
Drop cpu_list_id macro
Since the only user of the extended cpu_list_id() formatwas the x86 ?model/?dump/?cpuid output, we can drop itcompletely.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>...
target-i386: Move CPU models from cpus-x86_64.conf to C
Those models are maintained by QEMU and may require compatibility codeto be added when making some changes. Keeping the data in the C sourcecode should make it simpler to handle those details.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>...
target-i386: x86_cpudef_setup() coding style change
Make source code lines shorter.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Reviewed-by: Don Slutz <Don@CloudSwitch.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
target-i386: Kill cpudef config section support
It's nice to have a flexible system to maintain CPU models as data, butthis is holding us from making improvements in the CPU code because it'snot using the common infra-structure, and because the machine-type data...
w32: Fix broken build
Commit ef8621b1a3b199c348606c0a11a77d8e8bf135f1 added an includefile which is not available for MinGW compilations.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
target-i386: disable pv eoi to fix migration across QEMU versions
We have a problem with how we handle migration with KVM paravirt features.We unconditionally enable paravirt features regardless of whether we know howto migrate them.
We also don't tie paravirt features to specific machine types so an old QEMU on...
win32: provide separate macros for weak decls and definitions
mingw32 seems to want the declaration to also carry the weak attribute.Strangely, gcc on Linux absolutely does not want the declaration to be markedas weak. This may not be the right fix, but it seems to do the trick....
target-i386: add implementation of query-cpu-definitions (v2)
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Merge branch 'x86cpu_qom_tcg_v2' of git://github.com/imammedo/qemu
target-i386: move cpu halted decision into x86_cpu_reset
MP initialization protocol differs between cpu families, and for P6 andonward models it is up to CPU to decide if it will be BSP using thisprotocol, so try to model this. However there is no point in implementing...
target-i386: move cpu_reset and reset callback to cpu.c
Moving reset callback into cpu object from board level andresetting cpu at the end of x86_cpu_realize() will allow properlycreate cpu object during run-time (hotplug) without calling reset externaly....
Recognize PCID feature
This patch makes Qemu recognize the PCID feature specified from configuration or command line options.
Signed-off-by: Junjie Mao <junjie.mao@intel.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
kvm_pv_eoi: add flag support
Support the new PV EOI flag in kvm - it recently got mergedinto kvm.git. Set by default with -cpu kvm.Set for -cpu qemu by adding +kvm_pv_eoi.Clear by adding -kvm_pv_eoi to -cpu option.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
target-i386: move tcg initialization into x86_cpu_initfn()
In order to make cpu object not depended on external ad-hocinitialization routines, move tcg initialization from cpu_x86_initinside cpu object "x86_cpu_initfn()".
Signed-off-by: Igor Mammedov <imammedo@redhat.com>...
target-i386: Use QEMU instead of Qemu
This new 'QEmu' was recently added.Replace it by the official all upper case 'QEMU'.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Allow machines to configure the QEMU_VERSION that's exposed via hardware
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 switchthe QEMU version).There is a new field now on the struct QEmuMachine, hw_version, which may...
target-i386: Use uint32 visitor for [x]level properties
This simplifies the code and resolves TODOs.
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Expose CPUID leaf 7 only for -cpu host
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"...
target-i386: Defer MCE init
Commit de024815e3b523addf58f1f79846b7fe74643678 (target-i386: QOM'ifyCPU init) moved mce_init() call from helper.c:cpu_x86_init() intoX86CPU's cpu.c:x86_cpu_initfn().mce_init() checks for a family >= 6 though, so we could end up with a...
target-i386: Introduce "xlevel" property for X86CPU
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>Reviewed-by: Igor Mammedov <imammedo@redhat.com>
target-i386: Prepare "vendor" property for X86CPU
Using it now would incur converting the three x86_def_t vendor wordsinto a string for object_property_set_str(), then back to three wordsin the "vendor" setter.The built-in CPU definitions use numeric preprocessor defines to...
target-i386: Introduce "tsc-frequency" property for X86CPU
Use Hz as unit.
target-i386: Pass X86CPU to cpu_x86_register()
Avoids an x86_env_get_cpu() call there, to work with QOM properties.
target-i386: Add range check for -cpu ,family=x
A family field value of 0xf and extended family field value of 0xff isthe maximum representable unsigned family number.All other CPUID property values are bounds-checked, so add a check herefor symmetry before we adopt it in a property setter....
target-i386: Add "family" property to X86CPU
Add the property early in the initfn so that it can be used in helperssuch as mce_init().
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>[AF: Add an error_free(), spotted by Michael Roth]...
target-i386: Add "model" property to X86CPU
target-i386: Add "stepping" property to X86CPU
target-i386: Add "model-id" property to X86CPU
target-i386: Add property getter for CPU family
target-i386: Add property getter for CPU model
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
target-i386: Add property getter for CPU stepping
target-i386: Add property getter for CPU model-id
target-i386: Introduce "level" property for X86CPU
target-i386: Fix x86_cpuid_set_model_id()
Don't assume zeroed cpuid_model[] fields.
This didn't break anything yet but QOM properties should be able to setthe value to something else without setting an intermediate zero string.
Reviewed-by: Eduardo Habhost <ehabkost@redhat.com>...
target-i386: Rename cpuid.c
Name it cpu.c to align with other QOM'ified targets.
Signed-off-by: Andreas Färber <afaerber@suse.de>
target-i386: QOM'ify CPU
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().
target-i386: QOM'ify CPU init
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.
target-i386: QOM'ify CPU reset
Move code from cpu_state_reset() into QOM x86_cpu_reset(),fixing style issues for FPU init.