Re: [Xen-devel] [PATCH V2 3/3] xen: eliminate scalability issues from initial mapping setup

From: David Vrabel
Date: Wed Sep 17 2014 - 10:43:07 EST


On 17/09/14 15:20, Juergen Gross wrote:
> On 09/17/2014 04:07 PM, David Vrabel wrote:
>>
>>
>> Are you missing a ClearPagePinned(..) here?
>
> Probably, yes.

Jan pointed out that this is not needed.

>>> @@ -1529,6 +1604,22 @@ static pte_t __init mask_rw_pte(pte_t *ptep,
>>> pte_t pte)
>>> #else /* CONFIG_X86_64 */
>>> static pte_t __init mask_rw_pte(pte_t *ptep, pte_t pte)
>>> {
>>> + unsigned long pfn;
>>> +
>>> + if (xen_feature(XENFEAT_writable_page_tables) ||
>>> + xen_feature(XENFEAT_auto_translated_physmap) ||
>>> + xen_start_info->mfn_list >= __START_KERNEL_map)
>>> + return pte;
>>> +
>>> + /*
>>> + * Pages belonging to the initial p2m list mapped outside the
>>> default
>>> + * address range must be mapped read-only.
>>
>> Why? I didn't think was anything special about these MFNs.
>
> The hypervisor complained when I did otherwise. I think the main reason
> is that the hypervisor will set up some more page tables to be able to
> map then mfn_list outside the "normal" address range. They are located
> in the range starting at xen_start_info->first_p2m_pfn (otherwise the
> info in first_p2m_pfn and nr_p2m_frames wouldn't be needed).

Ok. Can you expand the comment to say this?

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/