mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
ANDROID: Partially Revert "ANDROID: KVM: arm64: Allow tweaking HFGWTR_EL2 from modules"
This is a partial revert of commit 444b34b83a in order to fix booting
this kernel on devices that don't support FEAT_FGT due to direct
accesses of HFGWTR_EL2 being UNDEFINED. We are retaining the KMI part of
the commit until the next KMI breakage window.
Bug: 282917063
Change-Id: I6c156ef40a5584dc41e4d9d09c80736e30348802
Signed-off-by: Will McVicker <willmcvicker@google.com>
This commit is contained in:
committed by
Treehugger Robot
parent
7d346b229c
commit
1b160e2a0e
@@ -95,9 +95,6 @@ SYM_CODE_START_LOCAL(___kvm_hyp_init)
|
||||
ldr x1, [x0, #NVHE_INIT_HCR_EL2]
|
||||
msr hcr_el2, x1
|
||||
|
||||
ldr x1, [x0, #NVHE_INIT_HFGWTR_EL2]
|
||||
msr_s SYS_HFGWTR_EL2, x1
|
||||
|
||||
ldr x1, [x0, #NVHE_INIT_VTTBR]
|
||||
msr vttbr_el2, x1
|
||||
|
||||
|
||||
@@ -29,12 +29,9 @@ static void __update_hcr_el2(unsigned long set_mask, unsigned long clear_mask)
|
||||
|
||||
static void __update_hfgwtr_el2(unsigned long set_mask, unsigned long clear_mask)
|
||||
{
|
||||
struct kvm_nvhe_init_params *params = this_cpu_ptr(&kvm_init_params);
|
||||
|
||||
params->hfgwtr_el2 |= set_mask;
|
||||
params->hfgwtr_el2 &= ~clear_mask;
|
||||
__kvm_flush_dcache_to_poc(params, sizeof(*params));
|
||||
write_sysreg_s(params->hfgwtr_el2, SYS_HFGWTR_EL2);
|
||||
/* TODO (b/282917063): need to check whether FEAT_FGT is supported
|
||||
* before we can access HFGWTR_EL2. */
|
||||
return;
|
||||
}
|
||||
|
||||
static atomic_t early_lm_pages;
|
||||
|
||||
Reference in New Issue
Block a user