Skip to content
Snippets Groups Projects
Commit da1cc323 authored by Evgeny Yakovlev's avatar Evgeny Yakovlev Committed by Paolo Bonzini
Browse files

hyperv: set partition-wide MSRs only on first vcpu


Hyper-V has a notion of partition-wide MSRs.  Those MSRs are read and
written as usual on each VCPU, however the hypervisor maintains a single
global value for all VCPUs.  Thus writing such an MSR from any single
VCPU affects the global value that is read by all other VCPUs.

This leads to an issue during VCPU hotplug: the zero-initialzied values
of those MSRs get synced into KVM and override the global values as has
already been set by the guest.

This change makes the partition-wide MSRs only be synchronized on the
first vcpu.

Signed-off-by: default avatarEvgeny Yakovlev <eyakovlev@virtuozzo.com>
Signed-off-by: default avatarRoman Kagan <rkagan@virtuozzo.com>
Message-Id: <20171122181418.14180-2-rkagan@virtuozzo.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent aff9e6e4
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment