[PATCH 4/4] kvmppc: convert wrteei to wrtee as kvm guest optimization

Jimi Xenidis jimix at pobox.com
Fri Aug 22 23:56:16 EST 2008


On Aug 22, 2008, at 4:17 AM, Kumar Gala wrote:

>
> On Aug 22, 2008, at 3:08 AM, Christian Ehrhardt wrote:
>
>> Scott Wood wrote:
>>> On Thu, Aug 21, 2008 at 09:21:39AM -0500, Kumar Gala wrote:
>>>
>>>> Where is the other discussion?  I'd like to understand what's  
>>>> going on  here.. (especially since I added the wrtee[i] changes  
>>>> to kernel way  back when).
>>>>
>>>
>>> Presumably, they want to be able to replace wrtee with a store to a
>>> hypervisor/guest shared memory area, and there's no store-immediate
>>> instruction.
>>>
>>> -Scott
>>>
>> Exactly Scott
>>
>> And for your question Kumar, in the last submission I was asked to  
>> split host and guest patches.
>> So the host discussion lives on kvm-ppc at vger.kernel.org as I  
>> mentioned (maybe a bit too hidden)
>> in the [0/4] mail of this series.
>
> Maybe I'm missing something but it seems like just changing the code  
> to wrtee isn't the best way to ensure you have enough space to put  
> the set of instructions you guys want.
>

Sorry, I have not really been following this, I assume you are  
replacing SPR accesses with load/stores that do not trap.
I believe thats fine for reading any SPR, but not true for modifying  
some SPRs, particularly MSR.
IMHO you must trap on any instruction that modifies the MSR.
So you should prolly not rewrite mtmsr or wrtee* but let them trap.

BTW: actually moving problem SPRs (like MSRs) to a read only page  
makes decoding far more efficient, but it does burn another TLB entry.

-JX


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




More information about the Linuxppc-dev mailing list