diff options
author | Brijesh Singh <[email protected]> | 2017-08-25 15:55:40 -0500 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2017-08-26 09:23:00 +0200 |
commit | ea2800ddb20d6e66042051a61f66e6bea4fa0db7 (patch) | |
tree | 8634800519b50832e143d26d3058122db858ece2 /drivers/fpga/fpga-bridge.c | |
parent | 413d63d71b222108d19703f3fd5cf9108652a730 (diff) |
kvm/x86: Avoid clearing the C-bit in rsvd_bits()
The following commit:
d0ec49d4de90 ("kvm/x86/svm: Support Secure Memory Encryption within KVM")
uses __sme_clr() to remove the C-bit in rsvd_bits(). rsvd_bits() is
just a simple function to return some 1 bits. Applying a mask based
on properties of the host MMU is incorrect. Additionally, the masks
computed by __reset_rsvds_bits_mask also apply to guest page tables,
where the C bit is reserved since we don't emulate SME.
The fix is to clear the C-bit from rsvd_bits_mask array after it has been
populated from __reset_rsvds_bits_mask()
Suggested-by: Paolo Bonzini <[email protected]>
Signed-off-by: Brijesh Singh <[email protected]>
Acked-by: Paolo Bonzini <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Radim Krčmář <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Tom Lendacky <[email protected]>
Cc: [email protected]
Cc: [email protected]
Fixes: d0ec49d ("kvm/x86/svm: Support Secure Memory Encryption within KVM")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions