[PATCH 08/26] KVM: PPC: Add PV guest critical sections

Alexander Graf agraf at suse.de
Sun Jun 27 20:33:31 EST 2010


Am 27.06.2010 um 11:52 schrieb Avi Kivity <avi at redhat.com>:

> On 06/27/2010 12:40 PM, Alexander Graf wrote:
>>
>> Am 27.06.2010 um 10:21 schrieb Avi Kivity <avi at redhat.com>:
>>
>>> On 06/26/2010 02:24 AM, Alexander Graf wrote:
>>>> When running in hooked code we need a way to disable interrupts  
>>>> without
>>>> clobbering any interrupts or exiting out to the hypervisor.
>>>>
>>>> To achieve this, we have an additional critical field in the  
>>>> shared page. If
>>>> that field is equal to the r1 register of the guest, it tells the  
>>>> hypervisor
>>>> that we're in such a critical section and thus may not receive  
>>>> any interrupts.
>>>>
>>>
>>> Is r1 reserved for this purpose?  Can't it match accidentally?
>>
>> r1 is defined by the abi to be the stack.
>
> Neat trick!
>
>>>
>>> Why won't zero/nonzero work for this?
>>
>> Because there is no store immediate opcode on powerpc :(.
>
> Or inc/dec...

Uh - huh? How would that help?

Alex



More information about the Linuxppc-dev mailing list