xen: fix IDT setup after PTI
On amd64 the IDT handler was not set correctly when using PTI. While there also fix the selectors to SEL_KPL. Obtained from: kib MFC with: r328083
This commit is contained in:
parent
2b541904af
commit
50a53194f6
@ -1667,7 +1667,8 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
|
||||
&IDTVEC(dtrace_ret), SDT_SYSIGT, SEL_UPL, 0);
|
||||
#endif
|
||||
#ifdef XENHVM
|
||||
setidt(IDT_EVTCHN, &IDTVEC(xen_intr_upcall), SDT_SYSIGT, SEL_UPL, 0);
|
||||
setidt(IDT_EVTCHN, pti ? &IDTVEC(xen_intr_upcall_pti) :
|
||||
&IDTVEC(xen_intr_upcall), SDT_SYSIGT, SEL_KPL, 0);
|
||||
#endif
|
||||
r_idt.rd_limit = sizeof(idt0) - 1;
|
||||
r_idt.rd_base = (long) idt;
|
||||
|
@ -2268,7 +2268,7 @@ init386(int first)
|
||||
GSEL(GCODE_SEL, SEL_KPL));
|
||||
#endif
|
||||
#ifdef XENHVM
|
||||
setidt(IDT_EVTCHN, &IDTVEC(xen_intr_upcall), SDT_SYS386IGT, SEL_UPL,
|
||||
setidt(IDT_EVTCHN, &IDTVEC(xen_intr_upcall), SDT_SYS386IGT, SEL_KPL,
|
||||
GSEL(GCODE_SEL, SEL_KPL));
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user