On 30/10/18 16:22, Jan Beulich wrote:
>>>> On 29.10.18 at 13:40, <rcojoc...@bitdefender.com> wrote:
>> This patch is a pre-requisite for the one fixing VGA logdirty
>> freezes when using altp2m. It only concerns itself with the
>> ranges allocation / deallocation / initialization part.
> But while looking (briefly only for now) over patch 3 I couldn't
> see any sync-ing of the log-dirty ranges there either. Doesn't
> this need doing either there or here, if you go the copy route?
>
>> @@ -2271,6 +2297,7 @@ void p2m_flush_altp2m(struct domain *d)
>>      {
>>          p2m_flush_table(d->arch.altp2m_p2m[i]);
>>          /* Uninit and reinit ept to force TLB shootdown */
>> +        p2m_free_logdirty(d->arch.altp2m_p2m[i]);
>>          ept_p2m_uninit(d->arch.altp2m_p2m[i]);
>>          ept_p2m_init(d->arch.altp2m_p2m[i]);
>>          d->arch.altp2m_eptp[i] = mfn_x(INVALID_MFN);
>> @@ -2341,6 +2385,7 @@ int p2m_destroy_altp2m_by_id(struct domain *d, 
>> unsigned int idx)
>>          {
>>              p2m_flush_table(d->arch.altp2m_p2m[idx]);
>>              /* Uninit and reinit ept to force TLB shootdown */
>> +            p2m_free_logdirty(d->arch.altp2m_p2m[idx]);
>>              ept_p2m_uninit(d->arch.altp2m_p2m[idx]);
>>              ept_p2m_init(d->arch.altp2m_p2m[idx]);
>>              d->arch.altp2m_eptp[idx] = mfn_x(INVALID_MFN);
>> @@ -2471,6 +2516,7 @@ static void p2m_reset_altp2m(struct p2m_domain *p2m)
>>  {
>>      p2m_flush_table(p2m);
>>      /* Uninit and reinit ept to force TLB shootdown */
>> +    p2m_free_logdirty(p2m);
>>      ept_p2m_uninit(p2m);
>>      ept_p2m_init(p2m);
>>      p2m->min_remapped_gfn = gfn_x(INVALID_GFN);
> For one these look all pretty similar, so I wonder why there's
> no helper function. But that's not something you need to change.
> Yet why are you freeing the log-dirty ranges here? These aren't
> full cleanup paths afaict.

Rangesets get added to the domain rangeset list, and we clean them all
up rangeset_domain_destroy()

TBH, I'm not sure why we do it like this, and I'm not 100% convinced it
is a clever deallocation scheme.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to