Skip to content
Commit 74cdc836 authored by Mathias Krause's avatar Mathias Krause Committed by Sean Christopherson
Browse files

KVM: x86: Make use of kvm_read_cr*_bits() when testing bits



Make use of the kvm_read_cr{0,4}_bits() helper functions when we only
want to know the state of certain bits instead of the whole register.

This not only makes the intent cleaner, it also avoids a potential
VMREAD in case the tested bits aren't guest owned.

Signed-off-by: default avatarMathias Krause <minipli@grsecurity.net>
Link: https://lore.kernel.org/r/20230322013731.102955-5-minipli@grsecurity.net


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent e40bcf9f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment