On 07.05.2024 17:22, Elias El Yandouzi wrote:
>>> This only lifts the mapcache variable up. Whether we populate the
>>> mapcache for a domain is unchanged in this patch.
>>
>> Is it? I wonder because of ...
>>
>
> I agree, the commit message doesn't completely reflect the changes below.
>
>>> --- a/xen/arch/x86/domain.c
>>> +++ b/xen/arch/x86/domain.c
>>> @@ -843,6 +843,8 @@ int arch_domain_create(struct domain *d,
>>>
>>> psr_domain_init(d);
>>>
>>> + mapcache_domain_init(d);
>>> +
>>> if ( is_hvm_domain(d) )
>>> {
>>> if ( (rc = hvm_domain_initialise(d, config)) != 0 )
>>> @@ -850,8 +852,6 @@ int arch_domain_create(struct domain *d,
>>> }
>>> else if ( is_pv_domain(d) )
>>> {
>>> - mapcache_domain_init(d);
>>> -
>>> if ( (rc = pv_domain_initialise(d)) != 0 )
>>> goto fail;
>>> }
>>
>> ... this and ...
>>
>>> --- a/xen/arch/x86/domain_page.c
>>> +++ b/xen/arch/x86/domain_page.c
>>> @@ -82,11 +82,11 @@ void *map_domain_page(mfn_t mfn)
>>> #endif
>>>
>>> v = mapcache_current_vcpu();
>>> - if ( !v || !is_pv_vcpu(v) )
>>> + if ( !v )
>>> return mfn_to_virt(mfn_x(mfn));
>>
>> ... this and yet more changes indicating otherwise.
>>
>> Yet if which domains have a mapcache set up is already changed here, I
>> wonder whether the idle domain shouldn't be taken care of here as well.
>
> Do you suggest to fold here the following patch where the mapcache gets
> initialized for idle domains?
Or the respective part(s) thereof.
Jan