[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] x86: map portion of kexec crash area that is within the direct map area
On 08/01/14 16:38, Jan Beulich wrote: >>>> On 08.01.14 at 16:56, David Vrabel <david.vrabel@xxxxxxxxxx> wrote: >> + if ( kexec_crash_area.size ) > > Wouldn't this better also include a kexec_crash_area.start range > check? It's a "if there is a crash area" check. It seems fine as-is to me. >> + { >> + unsigned long s = PFN_DOWN(kexec_crash_area.start); >> + unsigned long e = min(s + PFN_UP(kexec_crash_area.size), >> + PFN_UP(__pa(HYPERVISOR_VIRT_END - 1))); >> + >> + map_pages_to_xen((unsigned long)__va(kexec_crash_area.start), >> + s, e - s, PAGE_HYPERVISOR); > > map_pages_to_xen() doesn't tolerate a huge count resulting when > e < s (which is possible due to the min() above). Yes, you're right. This needs to be: if ( e > s ) map_pages_to_xen(...) David _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |