Message ID | 1277508314-915-13-git-send-email-agraf@suse.de (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On 06/26/2010 02:25 AM, Alexander Graf wrote: > We will be introducing a method to project the shared page in guest context. > As soon as we're talking about this coupling, the shared page is colled magic > page. > > This patch introduces simple defines, so the follow-up patches are easier to > read. > > > > diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h > index e35c1ac..5f8c214 100644 > --- a/arch/powerpc/include/asm/kvm_host.h > +++ b/arch/powerpc/include/asm/kvm_host.h > @@ -285,6 +285,8 @@ struct kvm_vcpu_arch { > u64 dec_jiffies; > unsigned long pending_exceptions; > struct kvm_vcpu_arch_shared *shared; > + unsigned long magic_page_pa; /* phys addr to map the magic page to */ > + unsigned long magic_page_ea; /* effect. addr to map the magic page to */ > Is ea like a va? If so, can't the guest specify it by manipulating the hash table (or tlb)?
Am 27.06.2010 um 10:24 schrieb Avi Kivity <avi@redhat.com>: > On 06/26/2010 02:25 AM, Alexander Graf wrote: >> We will be introducing a method to project the shared page in guest >> context. >> As soon as we're talking about this coupling, the shared page is >> colled magic >> page. >> >> This patch introduces simple defines, so the follow-up patches are >> easier to >> read. >> >> >> >> diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/ >> include/asm/kvm_host.h >> index e35c1ac..5f8c214 100644 >> --- a/arch/powerpc/include/asm/kvm_host.h >> +++ b/arch/powerpc/include/asm/kvm_host.h >> @@ -285,6 +285,8 @@ struct kvm_vcpu_arch { >> u64 dec_jiffies; >> unsigned long pending_exceptions; >> struct kvm_vcpu_arch_shared *shared; >> + unsigned long magic_page_pa; /* phys addr to map the magic >> page to */ >> + unsigned long magic_page_ea; /* effect. addr to map the magic >> page to */ >> > > Is ea like a va? If so, can't the guest specify it by manipulating > the hash table (or tlb)? ea in ppc speech is va in x86 speech. Yes, the guest could map it itself, but I couldn't find out how. This way I at least know what's happening :). Alex
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index e35c1ac..5f8c214 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h @@ -285,6 +285,8 @@ struct kvm_vcpu_arch { u64 dec_jiffies; unsigned long pending_exceptions; struct kvm_vcpu_arch_shared *shared; + unsigned long magic_page_pa; /* phys addr to map the magic page to */ + unsigned long magic_page_ea; /* effect. addr to map the magic page to */ #ifdef CONFIG_PPC_BOOK3S struct kmem_cache *hpte_cache; diff --git a/include/linux/kvm_para.h b/include/linux/kvm_para.h index 3b8080e..ac2015a 100644 --- a/include/linux/kvm_para.h +++ b/include/linux/kvm_para.h @@ -18,6 +18,7 @@ #define KVM_HC_VAPIC_POLL_IRQ 1 #define KVM_HC_MMU_OP 2 #define KVM_HC_FEATURES 3 +#define KVM_HC_PPC_MAP_MAGIC_PAGE 4 /* * hypercalls use architecture specific
We will be introducing a method to project the shared page in guest context. As soon as we're talking about this coupling, the shared page is colled magic page. This patch introduces simple defines, so the follow-up patches are easier to read. Signed-off-by: Alexander Graf <agraf@suse.de> --- arch/powerpc/include/asm/kvm_host.h | 2 ++ include/linux/kvm_para.h | 1 + 2 files changed, 3 insertions(+), 0 deletions(-)