@@ -24,7 +24,8 @@
#include <asm/hvm/hvm.h>
#include <asm/hvm/svm/svm.h>
#include <asm/hvm/svm/vmcb.h>
-#include <asm/hvm/svm/emulate.h>
+
+#include "emulate.h"
static unsigned long svm_nextrip_insn_length(struct vcpu *v)
{
similarity index 73%
rename from xen/arch/x86/include/asm/hvm/svm/emulate.h
rename to xen/arch/x86/hvm/svm/emulate.h
@@ -1,23 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* emulate.h: SVM instruction emulation bits.
+ *
* Copyright (c) 2005, AMD Corporation.
* Copyright (c) 2004, Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __ASM_X86_HVM_SVM_EMULATE_H__
-#define __ASM_X86_HVM_SVM_EMULATE_H__
+#ifndef __X86_HVM_SVM_EMULATE_PRIV_H__
+#define __X86_HVM_SVM_EMULATE_PRIV_H__
/*
* Encoding for svm_get_insn_len(). We take X86EMUL_OPC() for the main
@@ -53,7 +43,7 @@ struct vcpu;
unsigned int svm_get_insn_len(struct vcpu *v, unsigned int instr_enc);
unsigned int svm_get_task_switch_insn_len(void);
-#endif /* __ASM_X86_HVM_SVM_EMULATE_H__ */
+#endif /* __X86_HVM_SVM_EMULATE_PRIV_H__ */
/*
* Local variables:
@@ -17,7 +17,6 @@
*/
#include <asm/hvm/support.h>
-#include <asm/hvm/svm/emulate.h>
#include <asm/hvm/svm/svm.h>
#include <asm/hvm/svm/vmcb.h>
#include <asm/hvm/nestedhvm.h>
@@ -27,6 +26,7 @@
#include <asm/event.h> /* for local_event_delivery_(en|dis)able */
#include <asm/p2m.h> /* p2m_get_pagetable, p2m_get_nestedp2m */
+#include "emulate.h"
#include "svm.h"
#define NSVM_ERROR_VVMCB 1
@@ -37,7 +37,6 @@
#include <asm/hvm/monitor.h>
#include <asm/hvm/nestedhvm.h>
#include <asm/hvm/support.h>
-#include <asm/hvm/svm/emulate.h>
#include <asm/hvm/svm/nestedsvm.h>
#include <asm/hvm/svm/svm.h>
#include <asm/hvm/svm/svmdebug.h>
@@ -55,6 +54,7 @@
#include <public/sched.h>
#include "asid.h"
+#include "emulate.h"
#include "svm.h"
void noreturn svm_asm_do_resume(void);
The header asm/hvm/svm/emulate.h is used only internally by the SVM code, so it can be changed into a private header. Take the opportunity to use an SPDX tag for the licence. No functional change intended. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> --- Changes in v3: - new patch xen/arch/x86/hvm/svm/emulate.c | 3 ++- .../x86/{include/asm => }/hvm/svm/emulate.h | 20 +++++-------------- xen/arch/x86/hvm/svm/nestedsvm.c | 2 +- xen/arch/x86/hvm/svm/svm.c | 2 +- 4 files changed, 9 insertions(+), 18 deletions(-) rename xen/arch/x86/{include/asm => }/hvm/svm/emulate.h (73%)