x86/vmx: Don't self-recurse in vmx_update_guest_cr()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 27 Sep 2017 15:55:09 +0000 (15:55 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 10 Oct 2017 09:47:34 +0000 (10:47 +0100)
commit8ef6793a2cd5c78b474bf44f20ef0da5811c402c
tree26c43c0cf8e16bf490a512abce38b66fb52d83ff
parentb2db183d9a82d00a30beb91e137113492be59c39
x86/vmx: Don't self-recurse in vmx_update_guest_cr()

An update to CR4 following a CR0 update can be done easily by falling
through into the CR4 case.  This avoids unnecessary passes through
vmx_vmcs_{enter,exit}() and unnecessary stack usage (as the compiler
cannot optimise this use to a tailcall).

No behavioural change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vmx.c