Re: [PATCH 2/3] kvmppc/e500: Add PVR/PIR init for E500

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21.01.2010, at 04:30, Liu Yu-B13201 wrote:

> 
> 
>> -----Original Message-----
>> From: Alexander Graf [mailto:agraf@xxxxxxx] 
>> Sent: Wednesday, January 20, 2010 6:45 PM
>> To: Liu Yu-B13201
>> Cc: kvm-ppc@xxxxxxxxxxxxxxx; avi@xxxxxxxxxx; hollis@xxxxxxxxxxxxxx
>> Subject: Re: [PATCH 2/3] kvmppc/e500: Add PVR/PIR init for E500
>> Importance: High
>> 
>> 
>> On 20.01.2010, at 09:03, Liu Yu wrote:
>> 
>>> Signed-off-by: Liu Yu <yu.liu@xxxxxxxxxxxxx>
>>> ---
>>> arch/powerpc/kvm/e500.c |    4 ++++
>>> 1 files changed, 4 insertions(+), 0 deletions(-)
>>> 
>>> diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c
>>> index 64949ee..fd3683d 100644
>>> --- a/arch/powerpc/kvm/e500.c
>>> +++ b/arch/powerpc/kvm/e500.c
>>> @@ -60,6 +60,10 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu)
>>> 
>>> 	kvmppc_e500_tlb_setup(vcpu_e500);
>>> 
>>> +	/* Registers init */
>>> +	vcpu->arch.pvr = mfspr(SPRN_PVR);
>>> +	vcpu->vcpu_id = mfspr(SPRN_PIR);
>> 
>> Is this correct? IIUC this should be the number of the vcpu. 
>> So if you virtualize a 2-core system, but both vcpu init 
>> functions run on core 1, this will break, right?
>> 
> 
> Since kvm booke doesn't support more than 1 core virtualization.
> Can we put a comment here for now?

Sure. I'll need to do something clever about it on Book3S as well anyways.

Also, do you really need to set vcpu_id? If you just don't touch it it'll be 0. Shouldn't that be enough if you're only running a single guest core?

Alex--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux