aboutsummaryrefslogtreecommitdiff
path: root/target-i386/kvm.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-06-18 18:30:52 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-07-06 18:39:59 +0200
commit355023f2010c4df619d88a0dd7012b4b9c74c12c (patch)
tree60f388e6585b7075c1a721e14c6ce12f1bd394de /target-i386/kvm.c
parentfba72476c6b7be60ac74c5bcdc06c61242d1fe4f (diff)
pc: add SMM property
The property can take values on, off or auto. The default is "off" for KVM and pre-2.4 machines, otherwise "auto" (which makes it available on TCG or on new-enough kernels). Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-i386/kvm.c')
-rw-r--r--target-i386/kvm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 9dccbe112d..9038bf7077 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -86,6 +86,11 @@ static bool has_msr_xss;
static bool has_msr_architectural_pmu;
static uint32_t num_architectural_pmu_counters;
+bool kvm_has_smm(void)
+{
+ return kvm_check_extension(kvm_state, KVM_CAP_X86_SMM);
+}
+
bool kvm_allows_irq0_override(void)
{
return !kvm_irqchip_in_kernel() || kvm_has_gsi_routing();