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

Re: [Xen-devel] [v5][PATCH 1/2] xen:x86:mm:p2m: introduce set_identity_p2m_entry



On 29/07/14 10:20, Chen, Tiejun wrote:
> On 2014/7/29 16:46, Andrew Cooper wrote:
>> On 29/07/2014 09:19, Jan Beulich wrote:
>>>>>> On 29.07.14 at 09:35, <tiejun.chen@xxxxxxxxx> wrote:
>>>> On 2014/7/29 15:05, Jan Beulich wrote:
>>>>>>>> On 29.07.14 at 08:40, <tiejun.chen@xxxxxxxxx> wrote:
>>>>>> +    struct p2m_domain *p2m = p2m_get_hostp2m(d);
>>>>>> +    int ret = -EBUSY;
>>>>>> +
>>>>>> +    gfn_lock(p2m, gfn, 0);
>>>>>> +
>>>>>> +    tmp_mfn = p2m->get_entry(p2m, gfn, &p2mt, &a, 0, NULL);
>>>>>> +
>>>>>> +    if ( mfn_valid(tmp_mfn) )
>>>>>> +    {
>>>>>> +        gdprintk(XENLOG_ERR,
>>>>>> +                 "Overlapping RMRRs at %"PRIx64".\n",
>>>>>> (paddr_t)gfn);
>>>>> Pointless cast: Just use %lx in the format string. Additionally I
>>>>> don't
>>>>> think the message text is correct: You don't really know whether
>>>>> what's there is another RMRR (or that the context you're being
>>>>> called in refers to an RMRR at all). On the contrary - if it was an
>>>>> RMRR (or to be precise, a previously established identity mapping),
>>>>> you'd want to report success. And generally we have no stop at
>>>>> the end of log messages.
>>>> So just print this,
>>>>
>>>> +        gdprintk(XENLOG_ERR,
>>>> +                 "Overlapping at %lx.\n", (paddr_t)gfn);
>>> Of course not - such a message is really meaningless.
>>>
>>> printk(XENLOG_G_WARNING "Cannot identity map %d:%lx, already mapped
>>> to %lx\n",
>>>         d->domain_id, gfn, mfn_x(mfn));
>>>
>>> would be a message conveying all information necessary to
>>> gain initial understanding of what the issue is.
>>
>> This would be better as "map d%d:%lx" to indicate that it is a domid
>> before the colon.
>>
>
> "d" seems hard to understand so just pdate this as "map Dom%d:%lx"
>
> Thanks
> Tiejun
>

d%d is the standard notation for domains (with d%dv%u for domain/vcpus
tuples) used increasingly over the Xen codebase.

~Andrew

_______________________________________________
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®.