kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 01/10] KVM: reintroduce hc_gpa
@ 2012-06-06 11:00 Sasha Levin
  2012-06-06 11:00 ` [RFC 02/10] KVM: wire up the TMEM HC Sasha Levin
                   ` (9 more replies)
  0 siblings, 10 replies; 18+ messages in thread
From: Sasha Levin @ 2012-06-06 11:00 UTC (permalink / raw)
  To: avi, mtosatti, gregkh, sjenning, dan.magenheimer, konrad.wilk
  Cc: kvm, Sasha Levin

While PV MMU is dead and gone, we'll still want to pass gpa from guest to
host, and to do that properly we'll need to revive hc_gpa which died
during the great PV MMU massacre of 3.2.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
 arch/x86/kvm/x86.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 185a2b8..675dfb8 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4993,6 +4993,15 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu)
 	return 1;
 }
 
+static inline gpa_t hc_gpa(struct kvm_vcpu *vcpu, unsigned long a0,
+				unsigned long a1)
+{
+	if (is_long_mode(vcpu))
+		return a0;
+	else
+		return a0 | ((gpa_t)a1 << 32);
+}
+
 int kvm_emulate_hypercall(struct kvm_vcpu *vcpu)
 {
 	unsigned long nr, a0, a1, a2, a3, ret;
-- 
1.7.8.6


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-06-29  2:07 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-06 11:00 [RFC 01/10] KVM: reintroduce hc_gpa Sasha Levin
2012-06-06 11:00 ` [RFC 02/10] KVM: wire up the TMEM HC Sasha Levin
2012-06-06 11:00 ` [RFC 03/10] zcache: export zcache interface Sasha Levin
2012-06-06 11:00 ` [RFC 04/10] KVM: add KVM TMEM entries in the appropriate config menu entry Sasha Levin
2012-06-06 11:00 ` [RFC 05/10] KVM: bring in general tmem definitions Sasha Levin
2012-06-06 11:00 ` [RFC 06/10] zcache: move out client declaration and add a KVM client Sasha Levin
2012-06-06 11:00 ` [RFC 07/10] KVM: add KVM TMEM host side interface Sasha Levin
2012-06-29  1:59   ` Konrad Rzeszutek Wilk
2012-06-06 11:00 ` [RFC 08/10] KVM: add KVM TMEM guest support Sasha Levin
2012-06-06 11:00 ` [RFC 09/10] KVM: support guest side cleancache Sasha Levin
2012-06-06 11:00 ` [RFC 10/10] KVM: support guest side frontswap Sasha Levin
2012-06-06 11:06 ` [RFC 01/10] KVM: reintroduce hc_gpa Avi Kivity
2012-06-06 11:32   ` Sasha Levin
2012-06-06 11:38     ` Avi Kivity
2012-06-06 11:45       ` Sasha Levin
2012-06-06 12:15         ` Avi Kivity
2012-06-06 12:32           ` Sasha Levin
2012-06-06 12:37             ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).