Re: VMI Interface Proposal Documentation for I386, Part 5

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

 



Zwane Mwaikambo wrote:
I believe it certainly is worth seperating and would help in the iret, in that you could enable interrupts without recursing again.

The iret instruction is by far the trickiest and most sinister instruction in the i386 architecture to virtualize. It is used for so many different things - setting VIF and VIP flags, returning to kernel mode from an interrupt or exception, returning to user mode from a system call, returning to v8086 mode. And it uses the stack differently for some of these. And it is inherently non-virtualizable, because it is sensitive to IOPL without trapping. And it performs many actions atomically - setting CPU flags, segment registers and EIP, popping values off the stack. And it is often used from one code location for many of these possible effects simultaneously. And it alters code flow, so after it executes, there is no going back. Unfortunately, it is usually not possible to entirely separate the implications of interrupt delivery from the iret instruction.

Iret really does need specially treatment. You can't virtualize it in one instruction without hardware assistance. But you can emulate it successfully if you can perform a simple test on your fault / IRQ delivery path. See patch 8, Vmi syscall assembly for some more details. The same race condition is inherent to all stack based event delivery mechanisms.

Zach
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux