All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xenia Ragiadakou <burzalodowa@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: "Jan Beulich" <jbeulich@suse.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>
Subject: [PATCH v3 04/14] x86/svm: make emulate.h private
Date: Fri, 24 Feb 2023 20:50:00 +0200	[thread overview]
Message-ID: <20230224185010.3692754-5-burzalodowa@gmail.com> (raw)
In-Reply-To: <20230224185010.3692754-1-burzalodowa@gmail.com>

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%)

diff --git a/xen/arch/x86/hvm/svm/emulate.c b/xen/arch/x86/hvm/svm/emulate.c
index 16fc134883..4a84b4e761 100644
--- a/xen/arch/x86/hvm/svm/emulate.c
+++ b/xen/arch/x86/hvm/svm/emulate.c
@@ -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)
 {
diff --git a/xen/arch/x86/include/asm/hvm/svm/emulate.h b/xen/arch/x86/hvm/svm/emulate.h
similarity index 73%
rename from xen/arch/x86/include/asm/hvm/svm/emulate.h
rename to xen/arch/x86/hvm/svm/emulate.h
index eb1a8c24af..c0d27772a5 100644
--- a/xen/arch/x86/include/asm/hvm/svm/emulate.h
+++ b/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:
diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index a341ccc876..5f5752ce21 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -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
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 793a10eaca..c767a3eb76 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -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);
-- 
2.37.2



  parent reply	other threads:[~2023-02-24 18:50 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 18:49 [PATCH v3 00/14] x86/hvm: {svm,vmx} {c,h} cleanup Xenia Ragiadakou
2023-02-24 18:49 ` [PATCH v3 01/14] x86/svm: move declarations used only by svm code from svm.h to private header Xenia Ragiadakou
2023-02-24 18:49 ` [PATCH v3 02/14] x86/svm: make asid.h private Xenia Ragiadakou
2023-02-24 19:42   ` [PATCH v3 02/14 - ALT] x86/svm: Remove the asm/hvm/svm/asid.h header Andrew Cooper
2023-02-24 19:59     ` Xenia Ragiadakou
2023-02-24 18:49 ` [PATCH v3 03/14] x86/svm: delete header asm/hvm/svm/intr.h Xenia Ragiadakou
2023-02-24 18:50 ` Xenia Ragiadakou [this message]
2023-02-24 19:50   ` [PATCH v3 04/14] x86/svm: make emulate.h private Andrew Cooper
2023-02-24 19:58   ` [PATCH v3 04/14 - ALT] x86/svm: Remove the asm/hvm/svm/emulate.h header Andrew Cooper
2023-02-24 20:04     ` Xenia Ragiadakou
2023-02-24 18:50 ` [PATCH v3 05/14] x86/svm: move nestedsvm declarations used only by svm code to private header Xenia Ragiadakou
2023-02-24 20:12   ` Andrew Cooper
2023-02-24 20:28     ` Xenia Ragiadakou
2023-02-24 20:34       ` Andrew Cooper
2023-02-24 21:06   ` [PATCH v3 05.5/14] x86/svm: Decouple types in struct nestedsvm Andrew Cooper
2023-02-27  8:52     ` Xenia Ragiadakou
2023-02-27 10:47       ` Andrew Cooper
2023-02-24 18:50 ` [PATCH v3 06/14] x86/svm: move vmcb declarations used only by svm code to private header Xenia Ragiadakou
2023-02-24 18:50 ` [PATCH v3 07/14] x86/svm: move svmdebug.h declarations to private vmcb.h and delete it Xenia Ragiadakou
2023-02-24 18:50 ` [PATCH v3 08/14] x86/vmx: move vmx_update_debug_state() in vmcs.c and declare it static Xenia Ragiadakou
2023-02-27 15:59   ` Andrew Cooper
2023-02-24 18:50 ` [PATCH v3 09/14] x86/vmx: remove unused included headers from vmx.h Xenia Ragiadakou
2023-02-24 18:50 ` [PATCH v3 10/14] x86/vmx: move declarations used only by vmx code from vmx.h to private headers Xenia Ragiadakou
2023-02-27 15:25   ` Jan Beulich
2023-02-28  7:36     ` Xenia Ragiadakou
2023-02-28  8:05       ` Jan Beulich
2023-02-27 16:26   ` Andrew Cooper
2023-02-27 16:41     ` Andrew Cooper
2023-02-28  7:47     ` Jan Beulich
2023-02-24 18:50 ` [PATCH v3 11/14] x86/vmx: remove unused included headers from vmx.c Xenia Ragiadakou
2023-02-24 18:50 ` [PATCH v3 12/14] x86/vmx: declare nvmx_enqueue_n2_exceptions() static Xenia Ragiadakou
2023-02-24 18:50 ` [PATCH v3 13/14] x86/vmx: move vvmx declarations used only by vmx code to private header Xenia Ragiadakou
2023-02-24 18:50 ` [PATCH v3 14/14] x86/vmx: move vmcs " Xenia Ragiadakou
2023-02-24 19:29 ` [PATCH v3 00/14] x86/hvm: {svm,vmx} {c,h} cleanup Andrew Cooper
2023-02-24 20:08   ` Xenia Ragiadakou
2023-02-24 21:33     ` Andrew Cooper
2023-02-24 23:39       ` Xenia Ragiadakou
2023-02-27 10:46       ` Jan Beulich
2023-02-27 11:15         ` Andrew Cooper
2023-02-27 11:33           ` Jan Beulich
2023-02-27 12:06             ` Andrew Cooper
2023-02-27 12:17               ` Jan Beulich
2023-02-28  7:09                 ` Xenia Ragiadakou
2023-02-28  7:11                   ` Jan Beulich
2023-03-01 13:05                     ` Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230224185010.3692754-5-burzalodowa@gmail.com \
    --to=burzalodowa@gmail.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.