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

Re: [Xen-devel] [PATCH RFC] xen: arm: Log a warning message when a deprecated hypercall is used



>>> On 20.01.15 at 12:11, <Ian.Campbell@xxxxxxxxxx> wrote:
> On Tue, 2015-01-20 at 11:05 +0000, Jan Beulich wrote:
>> >>> On 20.01.15 at 11:52, <ian.campbell@xxxxxxxxxx> wrote:
>> > +static register_t do_deprecated_hypercall(void)
>> > +{
>> > +    struct cpu_user_regs *regs = guest_cpu_user_regs();
>> > +    const register_t op =
>> > +#ifdef CONFIG_ARM_64
>> > +        !is_32bit_domain(current->domain) ?
>> > +            regs->x16
>> > +        :
>> > +#endif
>> > +            regs->r12;
>> > +
>> > +    gdprintk(XENLOG_DEBUG, "%pv: deprecated hypercall %ld\n",
>> > +             current, (unsigned long)op);
>> 
>> If this was x86 code, I'd complain about the cast...
> 
> The correct format code is PRIregister (since register_t can be 32- or
> 64-bit for arm32 vs arm64 respectively), but it is in hex and xen.h
> lists __HYPERVISOR_* in decimal so that's what I wanted to print for
> each of manually looking.

Which makes sense. I'd rather question whether PRIregister is
badly defined then, in that it not just specifies an eventual size
prefix. I.e. have it be just like C99's PRIx64 and alike, commonly
implemented by a (library internal) abstraction just holding the
necessary size prefix.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.