[PATCH -V8 04/11] arch/powerpc: Convert virtual address to vpn
Aneesh Kumar K.V
aneesh.kumar at linux.vnet.ibm.com
Tue Oct 16 03:05:54 EST 2012
Andreas Schwab <schwab at linux-m68k.org> writes:
> "Aneesh Kumar K.V" <aneesh.kumar at linux.vnet.ibm.com> writes:
>
>> diff --git a/arch/powerpc/kvm/book3s_32_mmu_host.c b/arch/powerpc/kvm/book3s_32_mmu_host.c
>> index 837f13e..00aa612 100644
>> --- a/arch/powerpc/kvm/book3s_32_mmu_host.c
>> +++ b/arch/powerpc/kvm/book3s_32_mmu_host.c
>> @@ -141,7 +141,7 @@ extern char etext[];
>> int kvmppc_mmu_map_page(struct kvm_vcpu *vcpu, struct kvmppc_pte *orig_pte)
>> {
>> pfn_t hpaddr;
>> - u64 va;
>> + u64 vpn;
>> u64 vsid;
>> struct kvmppc_sid_map *map;
>> volatile u32 *pteg;
>> @@ -173,7 +173,7 @@ int kvmppc_mmu_map_page(struct kvm_vcpu *vcpu, struct kvmppc_pte *orig_pte)
>> BUG_ON(!map);
>>
>> vsid = map->host_vsid;
>> - va = (vsid << SID_SHIFT) | (eaddr & ~ESID_MASK);
>> + vpn = (vsid << (SID_SHIFT - VPN_SHIFT)) | ((eaddr & ~ESID_MASK) >> VPN_SHIFT)
>
> Where is VPN_SHIFT? Where is the semicolon?
I had done a kvm build test with the changes, but missed the fact that
this is !SMP and PPC_BOOK3S_32. Will send a follow up patch.
-aneesh
More information about the Linuxppc-dev
mailing list