aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/vmx/vvmx.c
diff options
context:
space:
mode:
Diffstat (limited to 'xen/arch/x86/hvm/vmx/vvmx.c')
-rw-r--r--xen/arch/x86/hvm/vmx/vvmx.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index cecc72f053..5ef5ad7385 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -963,13 +963,11 @@ fallback:
vvmcs_to_shadow(vvmcs, field[i]);
}
-static void shadow_to_vvmcs(void *vvmcs, unsigned int field)
+static inline void shadow_to_vvmcs(void *vvmcs, unsigned int field)
{
- u64 value;
- int rc;
+ unsigned long value;
- value = __vmread_safe(field, &rc);
- if ( !rc )
+ if ( __vmread_safe(field, &value) )
__set_vvmcs(vvmcs, field, value);
}