KVM: x86: Ignore CR0.WP toggles in non-paging mode
authorMathias Krause <minipli@grsecurity.net>
Wed, 22 Mar 2023 01:37:28 +0000 (02:37 +0100)
committerSean Christopherson <seanjc@google.com>
Wed, 22 Mar 2023 14:47:24 +0000 (07:47 -0700)
commite40bcf9f3a187126ce74a05d3b177fc16874446f
treeba80c0a3038d28ecef1574cd333235951ade4fc3
parent01b31714bd90be2784f7145bf93b7f78f3d081e1
KVM: x86: Ignore CR0.WP toggles in non-paging mode

If paging is disabled, there are no permission bits to emulate.
Micro-optimize this case to avoid unnecessary work.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Mathias Krause <minipli@grsecurity.net>
Link: https://lore.kernel.org/r/20230322013731.102955-4-minipli@grsecurity.net
Co-developed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/x86.c