]> xenbits.xensource.com Git - xen.git/commit
xc_cpuid_x86.c: Simplify masking conditions and remove redundant work
authorZhuo Song <alfred.z.song@gmail.com>
Wed, 10 Sep 2014 10:29:00 +0000 (18:29 +0800)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 10 Sep 2014 14:07:02 +0000 (15:07 +0100)
commitf2620c82ddb262d0c2da649a820a31f6dc6e3e25
tree6d9a3c5b7e2ef868c74c31d18b7f4cef80576d0c
parent7f6b3ca54de7603d5042c2ba73c07fb23f135f8e
xc_cpuid_x86.c: Simplify masking conditions and remove redundant work

* Since there would not be 32-bit hypervisor, we do not need
  hypervisor_is_64bit() again.

* Remove xen_64bit from xc_cpuid_pv_policy().

* Move conditionals for LM/NX masking into architectural logic.

* Since RDTSCP could be used for both 64-bit and 32-bit architectures,
  we do not need the tying to 64-bit in intel_xc_cpuid_policy().

* vmx_cpuid_intercept() has covered SYSCALL masking when vmexit and
  original is_64bit or is_pae could not cover whether guest OS is really
  in long mode or not. Here to drop the conditionals and leave it to
  vmexit handler to do the real work.

Signed-off-by: Zhuo Song <songzhuo.sz@alibaba-inc.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
[ ijc -- inserted missing ) to fix compile error ]
tools/libxc/xc_cpuid_x86.c