]> xenbits.xensource.com Git - unikraft/unikraft.git/commit
plat/x86: Enable NX bit when initializing paging
authorMarco Schlumpp <marco@unikraft.io>
Thu, 9 Feb 2023 11:28:50 +0000 (12:28 +0100)
committerUnikraft <monkey@unikraft.io>
Wed, 26 Apr 2023 05:54:00 +0000 (05:54 +0000)
commitad24ea988cf92b133ae6ecb618cda6b047bdec7f
tree72eb59e19d200036a16ce1c208e01f51d31a9a9c
parent85422c9978b5996c748cd935849063e0b43ccc70
plat/x86: Enable NX bit when initializing paging

There are a few reasons to enable the NX bit in the paging init routine:
* Setting the bit before checking for actual support is risky.
  Currently, the check happens in the paging initialization routine.
* The bit is not used, when the Unikraft paging support is not enabled.
* Every boot entry point (32-bit/64-bit) would have a duplicated enable.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Florin Postolache <florin.postolache80@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #752
plat/common/include/x86/paging.h
plat/kvm/x86/lcpu_start.S