diff options
author | Wincy Van <fanwenyi0529@gmail.com> | 2014-12-11 00:52:58 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-01-08 16:45:14 -0500 |
commit | ff651cb613b4cc8aa2e4284525948872b4d77d66 (patch) | |
tree | 8c3bcd9e4076404fa9a899b47ce321c716296e32 /virt | |
parent | b1940cd21c0f4abdce101253e860feff547291b0 (diff) |
KVM: nVMX: Add nested msr load/restore algorithm
Several hypervisors need MSR auto load/restore feature.
We read MSRs from VM-entry MSR load area which specified by L1,
and load them via kvm_set_msr in the nested entry.
When nested exit occurs, we get MSRs via kvm_get_msr, writing
them to L1`s MSR store area. After this, we read MSRs from VM-exit
MSR load area, and load them via kvm_set_msr.
Signed-off-by: Wincy Van <fanwenyi0529@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 1cc6e2e19982..167e8c14b143 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -1593,6 +1593,7 @@ int kvm_write_guest(struct kvm *kvm, gpa_t gpa, const void *data, | |||
1593 | } | 1593 | } |
1594 | return 0; | 1594 | return 0; |
1595 | } | 1595 | } |
1596 | EXPORT_SYMBOL_GPL(kvm_write_guest); | ||
1596 | 1597 | ||
1597 | int kvm_gfn_to_hva_cache_init(struct kvm *kvm, struct gfn_to_hva_cache *ghc, | 1598 | int kvm_gfn_to_hva_cache_init(struct kvm *kvm, struct gfn_to_hva_cache *ghc, |
1598 | gpa_t gpa, unsigned long len) | 1599 | gpa_t gpa, unsigned long len) |