Re: merge bouyer-xenpvh to HEAD
Manuel Bouyer <[email protected]> Sun, 26 Apr 2020 18:17:59 +0200
| Newsgroups | gmane.os.netbsd.ports.x86-64,gmane.os.netbsd.ports.xen,gmane.os.netbsd.ports.i386 |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> NetBSD: 26 ans d'experience feront toujours la difference --