mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/pv: Adjust the save_segments() comment regarding MSR_GS_SHADOW
This is slightly stale mentioning SWAPGS and not LKGS. However, take the opportunity to make the comment more general and less likely to bitrot. It would be a serious vulnerability for operating systems generally if CPL3 could modify GS_SHADOW at all. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
This commit is contained in:
1 parent
9ed72c697b
commit
a41bba43a7
1 file changed
+2
-3
@@ -1951,9 +1951,8 @@ static void load_segments(struct vcpu *n)
|
||||
* changes to bases can also be made with the WR{FS,GS}BASE instructions, when
|
||||
* enabled.
|
||||
*
|
||||
* Guests however cannot use SWAPGS, so there is no mechanism to modify the
|
||||
* inactive GS base behind Xen's back. Therefore, Xen's copy of the inactive
|
||||
* GS base is still accurate, and doesn't need reading back from hardware.
|
||||
* Guests cannot modify the inactive GS base behind Xen's back. Therefore
|
||||
* Xen's copy is still accurate and doesn't need reading back.
|
||||
*
|
||||
* Under FRED, hardware automatically swaps GS for us, so SHADOW_GS is the
|
||||
* active GS from the guest's point of view.
|
||||
|
||||