mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86: make arch_set_info_guest() match comments in load_segments()
For both fs_base and gs_base_user, there are comments saying "This can only be non-zero if selector is NULL." While save_segments() ensures this, so far arch_set_info_guest() didn't. Make behavior consistent (attaching comments identical to those in save_segments()). Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
3e4ec07e14
commit
520116f7b1
1 file changed
+6
-2
@@ -931,9 +931,13 @@ int arch_set_info_guest(
|
||||
if ( !compat )
|
||||
{
|
||||
v->arch.pv_vcpu.syscall_callback_eip = c.nat->syscall_callback_eip;
|
||||
v->arch.pv_vcpu.fs_base = c.nat->fs_base;
|
||||
/* non-nul selector kills fs_base */
|
||||
v->arch.pv_vcpu.fs_base =
|
||||
!(v->arch.user_regs.fs & ~3) ? c.nat->fs_base : 0;
|
||||
v->arch.pv_vcpu.gs_base_kernel = c.nat->gs_base_kernel;
|
||||
v->arch.pv_vcpu.gs_base_user = c.nat->gs_base_user;
|
||||
/* non-nul selector kills gs_base_user */
|
||||
v->arch.pv_vcpu.gs_base_user =
|
||||
!(v->arch.user_regs.gs & ~3) ? c.nat->gs_base_user : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||