|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 2/9] x86/PV: properly set shadow allocation for Dom0
On 22.09.2021 16:25, Roger Pau Monné wrote:
> On Wed, Sep 22, 2021 at 03:50:25PM +0200, Jan Beulich wrote:
>> On 22.09.2021 15:31, Andrew Cooper wrote:
>>> On 21/09/2021 08:17, Jan Beulich wrote:
>>>> @@ -933,7 +934,18 @@ int __init dom0_construct_pv(struct doma
>>>> #ifdef CONFIG_SHADOW_PAGING
>>>> if ( opt_dom0_shadow )
>>>> {
>>>> + bool preempted;
>>>> +
>>>> printk("Switching dom0 to using shadow paging\n");
>>>> +
>>>> + nr_pt_pages = dom0_paging_pages(d, nr_pages);
>>>> +
>>>> + do {
>>>> + preempted = false;
>>>> + shadow_set_allocation(d, nr_pt_pages, &preempted);
>>>> + process_pending_softirqs();
>>>> + } while ( preempted );
>>>
>>> This is still broken.
>>>
>>> The loop setting the shadow allocation needs to be outside of this
>>> conditional, because it is not related to early activation of the l1tf
>>> tasklet.
>>
>> Well, I'm not sure what to say. On v1 you already said so. But then you
>> didn't care to reply to me responding:
>>
>> "Are you suggesting to set up a (perhaps large) shadow pool just in
>> case we need to enable shadow mode on Dom0? And all of this memory
>> to then remain unused in the majority of cases?
>>
>> Plus even if so, I'd view this as a 2nd, independent step, largely
>> orthogonal to the handling of "dom0=shadow". If somebody really
>> wanted that, I think this should be driven by an explicit setting
>> of the shadow pool size, indicating the admin is willing to waste
>> the memory.
>
> Maybe an acceptable compromise would be to allocate the pool if
> opt_dom0_shadow || opt_pv_l1tf_hwdom?
>
> opt_pv_l1tf_hwdom is not enabled by default, so an admin opting to
> enable it should also be willing to reserve the memory it requires in
> case it needs activating during runtime.
I'd be fine making that change. Andrew - would that be sufficient to
address your concern?
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |