diff options
-rw-r--r-- | arch/powerpc/kvm/e500_mmu_host.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c index ecf2247b13be..a45e25cd78fc 100644 --- a/arch/powerpc/kvm/e500_mmu_host.c +++ b/arch/powerpc/kvm/e500_mmu_host.c | |||
@@ -231,15 +231,15 @@ void inval_gtlbe_on_host(struct kvmppc_vcpu_e500 *vcpu_e500, int tlbsel, | |||
231 | ref->flags &= ~(E500_TLB_TLB0 | E500_TLB_VALID); | 231 | ref->flags &= ~(E500_TLB_TLB0 | E500_TLB_VALID); |
232 | } | 232 | } |
233 | 233 | ||
234 | /* Already invalidated in between */ | 234 | /* |
235 | if (!(ref->flags & E500_TLB_VALID)) | 235 | * If TLB entry is still valid then it's a TLB0 entry, and thus |
236 | return; | 236 | * backed by at most one host tlbe per shadow pid |
237 | 237 | */ | |
238 | /* Guest tlbe is backed by at most one host tlbe per shadow pid. */ | 238 | if (ref->flags & E500_TLB_VALID) |
239 | kvmppc_e500_tlbil_one(vcpu_e500, gtlbe); | 239 | kvmppc_e500_tlbil_one(vcpu_e500, gtlbe); |
240 | 240 | ||
241 | /* Mark the TLB as not backed by the host anymore */ | 241 | /* Mark the TLB as not backed by the host anymore */ |
242 | ref->flags &= ~E500_TLB_VALID; | 242 | ref->flags = 0; |
243 | } | 243 | } |
244 | 244 | ||
245 | static inline int tlbe_is_writable(struct kvm_book3e_206_tlb_entry *tlbe) | 245 | static inline int tlbe_is_writable(struct kvm_book3e_206_tlb_entry *tlbe) |
@@ -252,7 +252,7 @@ static inline void kvmppc_e500_ref_setup(struct tlbe_ref *ref, | |||
252 | pfn_t pfn) | 252 | pfn_t pfn) |
253 | { | 253 | { |
254 | ref->pfn = pfn; | 254 | ref->pfn = pfn; |
255 | ref->flags |= E500_TLB_VALID; | 255 | ref->flags = E500_TLB_VALID; |
256 | 256 | ||
257 | /* Mark the page accessed */ | 257 | /* Mark the page accessed */ |
258 | kvm_set_pfn_accessed(pfn); | 258 | kvm_set_pfn_accessed(pfn); |