|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/VMX: Implement vmptrst
>>> On 06.01.17 at 15:39, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 06/01/17 14:37, Jan Beulich wrote:
>>>>> On 05.01.17 at 19:42, <anshul.makkar@xxxxxxxxxx> wrote:
>>> +static always_inline u64 __vmptrst(void)
>>> +{
>>> + u64 paddr;
>>> +
>>> + asm volatile (
>>> +#ifdef HAVE_GAS_VMX
>>> + "vmptrst %0\n"
>>> +#else
>>> + VMPTRST_OPCODE MODRM_EAX_07
>>> +#endif
>>> +
>>> +#ifdef HAVE_GAS_VMX
>>> + : "=m" (paddr)
>>> + :
>>> +#else
>>> + :
>>> + : "a" (&paddr),
>>> +#endif
>>> + : "memory");
>> I don't see the point of the memory clobber here in the
>> HAVE_GAS_VMX case (and in the other case it could be easily
>> avoided by making the output common).
>
> Currently it is the only thing covering the fact that paddr actually
> gets written to.
Well, see especially my remark in parentheses.
>> In fact some time ago I
>> did raise the question already as to whether some of the other
>> inline functions shouldn't also be relaxed.
>
> Didn't we agree that removing the memory clobbers was a good thing to
> do? I recall that you asked, but I don't recall what the outcome was.
Afair the outcome was at best ambiguous, or else I would either
have done it already, or I would at least have an item on my todo
list. Actually, looking through patch history I did do it for vmread/
vmwrite, so I assume there was a reason to leave the others alone
(possibly just to be overcautious).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |