Thread (17 messages) 17 messages, 4 authors, 2013-01-31

RE: [PATCH 4/5] KVM: PPC: e500: Emulate EPTCFG register

From: Caraman Mihai Claudiu-B02008 <hidden>
Date: 2013-01-31 15:00:20
Also in: kvm

-----Original Message-----
From: Alexander Graf [mailto:agraf@suse.de]
Sent: Thursday, January 31, 2013 3:31 PM
To: Caraman Mihai Claudiu-B02008
Cc: kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; linuxppc-
dev@lists.ozlabs.org
Subject: Re: [PATCH 4/5] KVM: PPC: e500: Emulate EPTCFG register
=20
=20
On 30.01.2013, at 14:29, Mihai Caraman wrote:
=20
quoted
EPTCFG register defined by E.PT is accessed unconditionally by Linux
guests
quoted
in the presence of MAV 2.0. Emulate EPTCFG register now.

Signed-off-by: Mihai Caraman <redacted>
---
arch/powerpc/include/asm/kvm_host.h |    1 +
arch/powerpc/kvm/e500.h             |    6 ++++++
arch/powerpc/kvm/e500_emulate.c     |    9 +++++++++
arch/powerpc/kvm/e500_mmu.c         |    5 +++++
4 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/include/asm/kvm_host.h
b/arch/powerpc/include/asm/kvm_host.h
quoted
index 88fcfe6..f480b20 100644
--- a/arch/powerpc/include/asm/kvm_host.h
+++ b/arch/powerpc/include/asm/kvm_host.h
@@ -503,6 +503,7 @@ struct kvm_vcpu_arch {
	u32 tlbcfg[4];
	u32 tlbps[4];
	u32 mmucfg;
+	u32 eptcfg;
=20
This too needs to be settable through SW_TLB.
=20
quoted
	u32 epr;
	struct kvmppc_booke_debug_reg dbg_reg;
#endif
diff --git a/arch/powerpc/kvm/e500.h b/arch/powerpc/kvm/e500.h
index b9f76d8..983eb95 100644
--- a/arch/powerpc/kvm/e500.h
+++ b/arch/powerpc/kvm/e500.h
@@ -308,4 +308,10 @@ static inline unsigned int has_mmu_v2(const struct
kvm_vcpu *vcpu)
quoted
	return ((vcpu->arch.mmucfg & MMUCFG_MAVN) =3D=3D MMUCFG_MAVN_V2);
}

+static inline unsigned int supports_page_tables(const struct kvm_vcpu
*vcpu)
=20
bool again. Can we generalize this a bit more? How about a small
framework that allows us to differentiate across e.XX features?=20
I thought you will ask for it :)

-Mike
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help