mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-21 05:02:24 +00:00
In current implemenation, cr0/cr4 host mask value are set according to the value from fixed0/fixed1 values of cr0/cr4. In fact, host mask can be set to the bits, which need to be trapped. This patch, add code to support exiting long mode in CR0 write handling. Add some check when modify CR0/CR4. - CR0_PG, CR0_PE, CR0_WP, CR0_NE are trapped for CR0. PG, PE are trapped to track vcpu mode switch. WP is trapped for info of protection when paing walk. NE is always on bit. - CR4_PSE, CR4_PAE, CR4_VMXE are trapped for CR4. PSE, PAE are trapped to track paging mode. VMXE is always on bit. - Reserved bits and always off bits are not allow to be set by guest. If guest try to set these bits when vmexit, a #GP will be injected. Signed-off-by: Binbin Wu <binbin.wu@intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Xu, Anthony <anthony.xu@intel.com> |
||
---|---|---|
.. | ||
arch/x86 | ||
common | ||
debug | ||
lib | ||
public | ||
hv_debug.h | ||
hv_lib.h | ||
hypervisor.h |