Port-amd64 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: merge bouyer-xenpvh to HEAD
On Sun, Apr 26, 2020 at 01:25:45PM +0200, Maxime Villard wrote:
> Two late remarks.
>
> In locore.S:
>
> + movl $VM_GUEST_XENPV, _C_LABEL(vm_guest)
>
> vm_guest being an enum, I don't know if the "movl" is correct. The compiler
> could make vm_guest an uint8_t. I think it should be switched to a fixed-
> size type.
Actually it is 32 bits, I did check it.
Would it make sense for the compiler to change it to 8bits at some point ?
We could CTASSERT that it is 32 bits.
>
> In vector.S:
>
> + jmp _C_LABEL(Xhypervisor_pvhvm_callback)
> + TEXT_USER_BEGIN
> IDTVEC(hypervisor_pvhvm_callback)
> pushq $0 /* Dummy error code */
> pushq $T_ASTFLT
> INTRENTRY
> - /* sti?? */
> + movl CPUVAR(ILEVEL),%edi
> + pushq %rdi /* for Xdoreti */
> + incl CPUVAR(IDEPTH)
> ...
>
> All the code after INTRENTRY should be in a separate function in the .text
> section, because with Meltdown, the code between TEXT_USER_BEGIN and
> TEXT_USER_END is leaked to userland. Here your change leaks more information
> than necessary.
>
> You can use intr_lapic_ltimer as an example, we leave right after the
> INTRENTRY.
thanks, I'll look at this tomorow
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index