Re: [kvm-unit-tests PATCH v2] s390x: Interception tests

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

 



On 04.06.2017 10:59, Thomas Huth wrote:
> On 02.06.2017 18:22, David Hildenbrand wrote:
>>
>>>>> +static uint8_t pagebuf[PAGE_SIZE * 2] __attribute__((aligned(PAGE_SIZE)));
>>>>> +
>>>>> +/* Enable or disable low-address protection */
>>>>> +static void set_low_prot(bool enable)
>>>>> +{
>>>>> +	uint64_t cr0;
>>>>> +
>>>>> +	asm volatile (" stctg 0,0,%0 " : : "Q"(cr0));
>>>>
>>>> Use %c0 instead?
>>>
>>> It's got to be %%c0 ... not sure whether this looks really nicer here?
>>
>> %c0 should work, e.g. do a "git grep "%c0" in linux.git
>>
>> arch/s390/kernel/base.S:        lctlg   %c0,%c0,0(%r4)
> 
> Well, that's a .S file ... for inline assembly in .c files, you need two
> percentage characters.
> 

Oh right, wasn't aware of that! As I said, keep it like that if you prefer.

-- 

Thanks,

David



[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