mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 17:17:04 -04:00
KVM: Don't allow the guest to turn off the cpu cache
The cpu cache is a host resource; the guest should not be able to turn it off (even for itself). Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
@@ -737,8 +737,10 @@ static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
|
||||
}
|
||||
#endif
|
||||
vcpu->svm->cr0 = cr0;
|
||||
vcpu->svm->vmcb->save.cr0 = cr0 | CR0_PG_MASK | CR0_WP_MASK;
|
||||
vcpu->cr0 = cr0;
|
||||
cr0 |= CR0_PG_MASK | CR0_WP_MASK;
|
||||
cr0 &= ~(CR0_CD_MASK | CR0_NW_MASK);
|
||||
vcpu->svm->vmcb->save.cr0 = cr0;
|
||||
}
|
||||
|
||||
static void svm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
|
||||
|
||||
Reference in New Issue
Block a user