aboutsummaryrefslogtreecommitdiff
path: root/docs/hyperv.txt
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2019-10-18 18:39:08 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-10-22 09:38:42 +0200
commit30d6ff662d0411fcb98a577e58582690fc2c513c (patch)
tree4a13f942c1e50fcccac5f0066c67e7bb3e222d66 /docs/hyperv.txt
parentf1733749709b2f6935493e8183afe1ce6c80d52d (diff)
downloadqemu-30d6ff662d0411fcb98a577e58582690fc2c513c.zip
qemu-30d6ff662d0411fcb98a577e58582690fc2c513c.tar.gz
qemu-30d6ff662d0411fcb98a577e58582690fc2c513c.tar.bz2
i386/kvm: add NoNonArchitecturalCoreSharing Hyper-V enlightenment
Hyper-V TLFS specifies this enlightenment as: "NoNonArchitecturalCoreSharing - Indicates that a virtual processor will never share a physical core with another virtual processor, except for virtual processors that are reported as sibling SMT threads. This can be used as an optimization to avoid the performance overhead of STIBP". However, STIBP is not the only implication. It was found that Hyper-V on KVM doesn't pass MD_CLEAR bit to its guests if it doesn't see NoNonArchitecturalCoreSharing bit. KVM reports NoNonArchitecturalCoreSharing in KVM_GET_SUPPORTED_HV_CPUID to indicate that SMT on the host is impossible (not supported of forcefully disabled). Implement NoNonArchitecturalCoreSharing support in QEMU as tristate: 'off' - the feature is disabled (default) 'on' - the feature is enabled. This is only safe if vCPUS are properly pinned and correct topology is exposed. As CPU pinning is done outside of QEMU the enablement decision will be made on a higher level. 'auto' - copy KVM setting. As during live migration SMT settings on the source and destination host may differ this requires us to add a migration blocker. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <20191018163908.10246-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs/hyperv.txt')
-rw-r--r--docs/hyperv.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/hyperv.txt b/docs/hyperv.txt
index 8fdf25c..6518b71 100644
--- a/docs/hyperv.txt
+++ b/docs/hyperv.txt
@@ -184,6 +184,19 @@ enabled.
Requires: hv-vpindex, hv-synic, hv-time, hv-stimer
+3.17. hv-no-nonarch-coresharing=on/off/auto
+===========================================
+This enlightenment tells guest OS that virtual processors will never share a
+physical core unless they are reported as sibling SMT threads. This information
+is required by Windows and Hyper-V guests to properly mitigate SMT related CPU
+vulnerabilities.
+When the option is set to 'auto' QEMU will enable the feature only when KVM
+reports that non-architectural coresharing is impossible, this means that
+hyper-threading is not supported or completely disabled on the host. This
+setting also prevents migration as SMT settings on the destination may differ.
+When the option is set to 'on' QEMU will always enable the feature, regardless
+of host setup. To keep guests secure, this can only be used in conjunction with
+exposing correct vCPU topology and vCPU pinning.
4. Development features
========================