NetBSD-Bugs archive

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

Re: port-xen/53267 (XEN amd64 DomU (Dom0??) NetBSD current USERMODE() fails)

The following reply was made to PR port-xen/53267; it has been noted by GNATS.

From: Robert Elz <kre%munnari.OZ.AU@localhost>
Subject: Re: port-xen/53267 (XEN amd64 DomU (Dom0??) NetBSD current USERMODE() fails)
Date: Tue, 08 May 2018 03:15:18 +0700

     Date:        Mon,  7 May 2018 17:32:36 +0000 (UTC)
     Message-ID:  <>
   | Well, you should probably try to revert my amd64/include/frameasm.h::1.34.
 Tried that.
   | Normally it shouldn't change anything
 It didn't.
   | since andb is there for Xen, but who| knows.
 That appears to (unconditionally) reset the bottom two bits of
 %cs (the saved value) - which would convert it from 3 (user more,
 or acual kernel mode in xen) into 0 (apparent kernel mode in everything)
 That is consistent with XEN always believeing it was in kernel mode.
 That is, if I am readong it correctly.   What I don't see is how that is
 avoided if the processor had been in user mode (and so the andb
 should not be done) - nor how in xen one tells whether it was running
 in user or kernel mode before the trap.
 There must be some other difference though, as that is the same in 8
 and current (aside from the method of gettig %cs which seems to make
 no difference).

Home | Main Index | Thread Index | Old Index