diff options
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/kvm-stub.c | 5 | ||||
-rw-r--r-- | target-i386/kvm.c | 5 | ||||
-rw-r--r-- | target-i386/kvm_i386.h | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/target-i386/kvm-stub.c b/target-i386/kvm-stub.c index 2b9e8011fb..6fefd65c23 100644 --- a/target-i386/kvm-stub.c +++ b/target-i386/kvm-stub.c @@ -18,6 +18,11 @@ bool kvm_allows_irq0_override(void) } #ifndef __OPTIMIZE__ +bool kvm_has_smm(void) +{ + return 1; +} + /* This function is only called inside conditionals which we * rely on the compiler to optimize out when CONFIG_KVM is not * defined. 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(); diff --git a/target-i386/kvm_i386.h b/target-i386/kvm_i386.h index cac30fd381..e557e94f44 100644 --- a/target-i386/kvm_i386.h +++ b/target-i386/kvm_i386.h @@ -14,6 +14,7 @@ #include "sysemu/kvm.h" bool kvm_allows_irq0_override(void); +bool kvm_has_smm(void); void kvm_arch_reset_vcpu(X86CPU *cs); void kvm_arch_do_init_vcpu(X86CPU *cs); |