Repository navigation
Commit 14c2bf8
KVM: SVM: Fix #GP handling for doubly-nested virtualization
Under the case of nested on nested (L0, L1, L2 are all hypervisors),
we do not support emulation of the vVMLOAD/VMSAVE feature, the
L0 hypervisor can inject the proper #VMEXIT to inform L1 of what is
happening and L1 can avoid invoking the #GP workaround. For this
reason we turns on guest VM's X86_FEATURE_SVME_ADDR_CHK bit for KVM
running inside VM to receive the notification and change behavior.
Similarly we check if vcpu is under guest mode before emulating the
vmware-backdoor instructions. For the case of nested on nested, we
let the guest handle it.
Co-developed-by: Bandan Das <bsd@redhat.com>
Signed-off-by: Bandan Das <bsd@redhat.com>
Signed-off-by: Wei Huang <wei.huang2@amd.com>
Tested-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20210126081831.570253-5-wei.huang2@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 3b9c723 commit 14c2bf8
1 file changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
933 | 933 | | |
934 | 934 | | |
935 | 935 | | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
936 | 939 | | |
937 | 940 | | |
938 | 941 | | |
| |||
2202 | 2205 | | |
2203 | 2206 | | |
2204 | 2207 | | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
2205 | 2213 | | |
2206 | 2214 | | |
2207 | 2215 | | |
2208 | 2216 | | |
2209 | 2217 | | |
2210 | 2218 | | |
2211 | 2219 | | |
2212 | | - | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
2213 | 2228 | | |
2214 | 2229 | | |
2215 | 2230 | | |
| |||
2244 | 2259 | | |
2245 | 2260 | | |
2246 | 2261 | | |
2247 | | - | |
| 2262 | + | |
| 2263 | + | |
2248 | 2264 | | |
2249 | 2265 | | |
2250 | 2266 | | |
| |||
0 commit comments