Ramon van Handel wrote:

> Initially, it's not important to emulate VIF/VIP
> functionality, as most OSes don't use it anyway.
> We could always think about this later on if needed.

Yes, I agree.

> Uh, hang on... I think you misunderstood my code,
> or else I'm being *very* confused.  

Sorry, I was confused :-/  You're right.

> > B.t.w. there's another problem with the CLI/STI code: you need to
> > check the current guest CPL; if it is greater than the guest IOPL,
> > CLI/STI should trap to the guest GPF handler (unless the guest has
> > activated PVI if we want to support that ...).  But this is probably
> > not critical for now.
> 
> It's pretty critical, I just forgot it.  It's pretty
> trivial anyway.  However, I couldn't find where the
> guest IOPL was emulated... there's no guest_iopl
> field in nexus_t !?  

There isn't.  The whole guest flags handling is somewhat of
a hack right now.  (Partially because of the missing PUSHF/POPF
trap, but we could at least do it right on INT/IRET for now ...)

> If you tell me that, I'll add it
> and I'll also add it in the iret code (where the
> same check is needed; I temporarily hardcoded iopl=0
> there for now).

There should probably be a guest_eflags containing all the
'non-safe' guest flags, including IOPL.

Bye,
Ulrich

-- 
  Ulrich Weigand,
  IMMD 1, Universitaet Erlangen-Nuernberg,
  Martensstr. 3, D-91058 Erlangen, Phone: +49 9131 85-27688

Reply via email to