mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
Revert "ANDROID: Partially Revert "ANDROID: KVM: arm64: Allow tweaking HFGWTR_EL2 from modules""
This reverts commit 6cf9fb4579. It was a
temporary workaround which will be replaced a proper fix shortly.
Bug: 282917063
Bug: 282993310
Change-Id: I0caec4a63aabaecbf3fa7ec5d5b4c6930ea6efcd
Signed-off-by: Quentin Perret <qperret@google.com>
This commit is contained in:
committed by
Will Deacon
parent
630b104caa
commit
95cd5f8f94
@@ -95,6 +95,9 @@ 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,9 +29,12 @@ 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)
|
||||
{
|
||||
/* TODO (b/282917063): need to check whether FEAT_FGT is supported
|
||||
* before we can access HFGWTR_EL2. */
|
||||
return;
|
||||
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);
|
||||
}
|
||||
|
||||
static atomic_t early_lm_pages;
|
||||
|
||||
Reference in New Issue
Block a user