[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 5/6] x86/boot: Don't map 0 during boot



On 06.01.2020 16:54, Andrew Cooper wrote:
> --- a/xen/arch/x86/boot/head.S
> +++ b/xen/arch/x86/boot/head.S
> @@ -689,12 +689,15 @@ trampoline_setup:
>          sub     $(L2_PAGETABLE_ENTRIES*8),%eax
>          loop    1b
>  
> -        /*
> -         * During boot, hook 4kB mappings of first 2MB of memory into L2.
> -         * This avoids mixing cachability for the legacy VGA region.
> -         */
> -        lea     __PAGE_HYPERVISOR+sym_esi(l1_identmap),%edi
> -        mov     %edi,sym_fs(l2_bootmap)
> +        /* Map the permentant trampoline page into l{1,2}_bootmap[]. */

"permanent"?

> +        mov     sym_esi(trampoline_phys), %edx
> +        mov     %edx, %ecx
> +        or      $__PAGE_HYPERVISOR_RX, %edx /* %edx = PTE to write  */
> +        shr     $PAGE_SHIFT, %ecx           /* %ecx = Slot to write */

Following the LEA model further down, how about

        mov     sym_esi(trampoline_phys), %ecx
        lea     __PAGE_HYPERVISOR_RX(%ecx), %edx /* %edx = PTE to write  */
        shr     $PAGE_SHIFT, %ecx                /* %ecx = Slot to write */

? Anyway, with or without this adjustment
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.