Re: [PATCH v3] powerpc: Add tests for sPAPR h-calls

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

 



On 03.03.2016 00:23, David Gibson wrote:
> On Wed, 2 Mar 2016 11:07:55 +0100
> Laurent Vivier <lvivier@xxxxxxxxxx> wrote:
> 
>> On 02/03/2016 09:40, Thomas Huth wrote:
>>> Introduce a test for sPAPR hypercalls, starting with the
>>> three hypercalls H_SET_SPRG0, H_PAGE_INIT and H_RANDOM.
>>>
>>> Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx>
>>> ---
...
>>> +static int h_random(uint64_t *val)
>>> +{
>>> +	register uint64_t r3 asm("r3") = H_RANDOM;
>>> +	register uint64_t r4 asm("r4");
>>> +
>>> +	asm volatile (" sc 1 " : "+r"(r3), "=r"(r4) : "r"(r3));  
>>
>> as you use "+r" with r3 in the output operands field, I think you don't
>> have to declare it in the input operands field.
> 
> More importantly, I think a hypercall is allowed to clobber any of the
> volatile registers (r0 & r3..r12), so they probably need to be declared
> in the clobbers as well.

Ok, that's a point ... I'll fix it up and send a v4.

 Thomas



Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux