]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
LoongArch: KVM: Remove duplicated cache attribute setting
authorBibo Mao <maobibo@loongson.cn>
Thu, 13 Feb 2025 04:02:56 +0000 (12:02 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Thu, 13 Feb 2025 04:02:56 +0000 (12:02 +0800)
Cache attribute comes from GPA->HPA secondary mmu page table and is
configured when kvm is enabled. It is the same for all VMs, so remove
duplicated cache attribute setting on vCPU context switch.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kvm/vcpu.c

index fb72095c8077e8c5b81db7c284f365e426483fd2..20f941af3e9ea44914565a91671daef2438beeff 100644 (file)
@@ -1548,9 +1548,6 @@ static int _kvm_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
 
        /* Restore timer state regardless */
        kvm_restore_timer(vcpu);
-
-       /* Control guest page CCA attribute */
-       change_csr_gcfg(CSR_GCFG_MATC_MASK, CSR_GCFG_MATC_ROOT);
        kvm_make_request(KVM_REQ_STEAL_UPDATE, vcpu);
 
        /* Restore hardware PMU CSRs */