From: Andrew Cooper Date: Thu, 20 Jun 2019 12:04:14 +0000 (+0100) Subject: x86/svm: Drop svm_vm{load,save}() helpers X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~1973 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=282015930f040cbbc6e187ca7cf288bca18d5fa7;p=xen.git x86/svm: Drop svm_vm{load,save}() helpers Following on from c/s 7d161f6537 "x86/svm: Fix svm_vmcb_dump() when used in current context", there is now only a single user of svm_vmsave() remaining in the tree, with all users moved to svm_vm{load,save}_pa(). nv->nv_n1vmcx has a matching nv->nv_n1vmcx_pa which is always correct, and avoids a redundant __pa() translation behind the scenes. With this gone, all VM{LOAD,SAVE} operations are using paddr_t's which is more efficient, so drop the svm_vm{load,save}() helpers to avoid uses of them reappearing in the future. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Acked-by: Brian Woods --- diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c index 35c1a04542..fef124fb11 100644 --- a/xen/arch/x86/hvm/svm/nestedsvm.c +++ b/xen/arch/x86/hvm/svm/nestedsvm.c @@ -1030,7 +1030,7 @@ nsvm_vmcb_prepare4vmexit(struct vcpu *v, struct cpu_user_regs *regs) struct vmcb_struct *ns_vmcb = nv->nv_vvmcx; struct vmcb_struct *n2vmcb = nv->nv_n2vmcx; - svm_vmsave(nv->nv_n1vmcx); + svm_vmsave_pa(nv->nv_n1vmcx_pa); /* Cache guest physical address of virtual vmcb * for VMCB Cleanbit emulation. diff --git a/xen/include/asm-x86/hvm/svm/svm.h b/xen/include/asm-x86/hvm/svm/svm.h index 6e688a8e10..16a994ec74 100644 --- a/xen/include/asm-x86/hvm/svm/svm.h +++ b/xen/include/asm-x86/hvm/svm/svm.h @@ -22,9 +22,6 @@ #include -#define svm_vmload(x) svm_vmload_pa(__pa(x)) -#define svm_vmsave(x) svm_vmsave_pa(__pa(x)) - static inline void svm_vmload_pa(paddr_t vmcb) { asm volatile (