marcel added a comment.

  Going for the workaround I see! :-)

INLINE COMMENTS

> copy.c:56
> +     int i, ndesc;
> +     unsigned long aviable_pages;
> +

It's spelled "available" instead of "aviable" :-)

> copy.c:79-84
> +             if (KERNEL_PHYSICAL_BASE < start ||
> +                 KERNEL_PHYSICAL_BASE >= end)
> +                     continue;
> +
> +             if (p->Type != EfiConventionalMemory)
> +                     continue;

Please also handle existing allocations. If those allocations represent 
free/usable memory after boot services has exited, then they are for all 
practical purposes "conventional memory".

Also: please make sure that KERNEL_PHYSICAL_BASE is covered by usable memory to 
begin with.

As such, we may have multiple memory descriptors that overlap with 
[2MB..2MB+nr_pages*PAGE_SIZE]. As long as they are free to use after boot 
services has exited, we're ok. We can only reduce the staging size if 
[2MB..2MB+delta] is usable when [2MB+delta..2MB+nr_pages*PAGE_SIZE] isn't.
We can reduce the staging area to delta/PAGE_SIZE. But if 2MB isn't usable, we 
cannot reduce (or put differently we have to reduce to 0).

REVISION DETAIL
  https://reviews.freebsd.org/D9686

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: decui_microsoft.com, imp, jhb, will, kib, delphij, emaste, 
sepherosa_gmail.com, honzhan_microsoft.com, howard0su_gmail.com, marcel
Cc: freebsd-virtualization-list
_______________________________________________
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"

Reply via email to