[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] VMXAssist: Bug fix (selector initialization)
In VMXAssist (setup.c), the function setup_ctx() initializes the various selectors, especially, the TSS is being set up like this: c->tr_sel = TSS_SELECTOR; c->tr_limit = sizeof(tss)-1; c->tr_base = (unsigned long) &tss; c->tr_arbytes.fields.seg_type = 0xb; /* 0x9 | 0x2 (busy) */ The TSS limit is initialized to be sizeof(tss)-1, this leaves the last byte of the I/O permission bitmap out, and accesses to ioports above 0xFFF8 causes the emulation to halt (the bits that were left out are treated as being set and a #GPF is generated but not treated for outw, for example). Besides that, all other selectors are initialized in the same way (idt, gdt). I'm guessing that way way way back, the TSS was not a structure but rather a null-terminated string. We encountered this problem while developing PCI pass-through support for Xen. Signed-off-by: Alex Novik <alex@xxxxxxxxxxxx> Signed-off-by: Guy Zana <guy@xxxxxxxxxxxx> Thanks, Guy. Attachment:
bug-fix-tss-limit.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |