Rusty Russell wrote:
> 
> It was a PITA because we can't just load $0x18 into %ss: it has to be
> $0x19.  I started doing it (read %cs, mask off bottom 2 bits, orl
> __BOOT_DS), but between that extra code and the extra code to then
> change segments back...  well, we have to skip the cli anyway so it was
> easy to skip them all.
> 
> I think Jeremy said Xen doesn't start on the boot descriptors either.  I
> have to wonder why we don't just run on the boot descriptors forever
> (#define __KERNEL_DS __BOOT_DS etc)?
> 

You can't do that once you define your own layout, or you introduce a
nasty intermodule dependency which shouldn't exist.

The rule should be:

- You MUST NOT reload segments before LGDT.
  (One can possibly get away with declaring that DS = CS+8 by
  protocol and load dynamic values, but that's not a good thing.)
- After LGDT, you MUST load your own segment values.

Anything else is just broken.

        -hpa
-
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/

Reply via email to