Subject: Re: [PATCH -V8 04/11] arch/powerpc: Convert virtual address to vpn

From: "Aneesh Kumar K.V" <[email-masked]>
Date: Mon, 15 Oct 2012 21:35:54 +0530

Andreas Schwab <[email-masked]> writes:

> "Aneesh Kumar K.V" <[email-masked]> 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