mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 07:47:50 +07:00
MIPS: asm/tlb.h: Add UNIQUE_GUEST_ENTRYHI() macro
Add a distinct UNIQUE_GUEST_ENTRYHI() macro for invalidation of guest TLB entries by KVM, using addresses in KSeg1 rather than KSeg0. This avoids conflicts with guest invalidation routines when there is no EHINV bit to mark the whole entry as invalid, avoiding guest machine check exceptions on Cavium Octeon III. Signed-off-by: James Hogan <james.hogan@imgtec.com> Acked-by: Ralf Baechle <ralf@linux-mips.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org
This commit is contained in:
parent
eb0bab3866
commit
a6c09b9f9d
@ -21,9 +21,11 @@
|
||||
*/
|
||||
#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
|
||||
|
||||
#define UNIQUE_ENTRYHI(idx) \
|
||||
((CKSEG0 + ((idx) << (PAGE_SHIFT + 1))) | \
|
||||
#define _UNIQUE_ENTRYHI(base, idx) \
|
||||
(((base) + ((idx) << (PAGE_SHIFT + 1))) | \
|
||||
(cpu_has_tlbinv ? MIPS_ENTRYHI_EHINV : 0))
|
||||
#define UNIQUE_ENTRYHI(idx) _UNIQUE_ENTRYHI(CKSEG0, idx)
|
||||
#define UNIQUE_GUEST_ENTRYHI(idx) _UNIQUE_ENTRYHI(CKSEG1, idx)
|
||||
|
||||
static inline unsigned int num_wired_entries(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user