diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2019-05-17 16:19:24 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-06-21 02:29:39 +0200 |
commit | 128531d9e10908a08761ed1ce10e607985d172d7 (patch) | |
tree | 8221bb01bfe2372edbdd2f801d7bc6ca8c6f91d3 /target/i386/kvm.c | |
parent | 8caba36db5d70beb5353b5b5d28421b67275bcf0 (diff) | |
download | qemu-128531d9e10908a08761ed1ce10e607985d172d7.zip qemu-128531d9e10908a08761ed1ce10e607985d172d7.tar.gz qemu-128531d9e10908a08761ed1ce10e607985d172d7.tar.bz2 |
i386/kvm: add support for Direct Mode for Hyper-V synthetic timers
Hyper-V on KVM can only use Synthetic timers with Direct Mode (opting for
an interrupt instead of VMBus message). This new capability is only
announced in KVM_GET_SUPPORTED_HV_CPUID.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20190517141924.19024-10-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/kvm.c')
-rw-r--r-- | target/i386/kvm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 86de510..a323b1f 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -802,6 +802,14 @@ static struct { }, .dependencies = BIT(HYPERV_FEAT_VPINDEX) }, + [HYPERV_FEAT_STIMER_DIRECT] = { + .desc = "direct mode synthetic timers (hv-stimer-direct)", + .flags = { + {.fw = FEAT_HYPERV_EDX, + .bits = HV_STIMER_DIRECT_MODE_AVAILABLE} + }, + .dependencies = BIT(HYPERV_FEAT_STIMER) + }, }; static struct kvm_cpuid2 *try_get_hv_cpuid(CPUState *cs, int max) @@ -1124,6 +1132,7 @@ static int hyperv_handle_properties(CPUState *cs, r |= hv_cpuid_check_and_set(cs, cpuid, HYPERV_FEAT_TLBFLUSH); r |= hv_cpuid_check_and_set(cs, cpuid, HYPERV_FEAT_EVMCS); r |= hv_cpuid_check_and_set(cs, cpuid, HYPERV_FEAT_IPI); + r |= hv_cpuid_check_and_set(cs, cpuid, HYPERV_FEAT_STIMER_DIRECT); /* Additional dependencies not covered by kvm_hyperv_properties[] */ if (hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNIC) && |