Re: [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work

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

 



Avi Kivity wrote:
> On 03/08/2010 04:14 PM, Alexander Graf wrote:
>>
>> We're looking at two different ifs here.
>>
>> 1) GPR Inside the PACA or not (volatile vs non-volatile)
>>
>> This is constant. Volatile registers go to the PACA; non-volatiles go to
>> the vcpu struct.
>>    
>
> Okay - so no if ().

Eh.

r[0 - 12] are volatile
r[13 - 31] are non-volatile

So if we want a common gpr access function we need an if. And we need
one, because the opcodes just use register numbers and doesn't care
where they are.

>
>> 2) GPR actually loaded in the PACA
>>
>> When we're in vcpu_load context the registers in the PACA, when not
>> they're in the vcpu struct
>>
>>
>> If you have a really easy and fast way to assure that we're always
>> inside a vcpu_load context, all is great. I could probably even just put
>> in a BUG_ON(not in vcpu_load context) and make the callers safe. But
>> some check needs to be done.
>>    
>
> x86 assumes in vcpu_load() context (without even a BUG_ON()). 
> KVM_GET_REGS and friends are responsible for this.

Oh, interesting. Just drop this patch then :).


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