mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86: move PV privileged instruction emulation code
Move the code to pv/emul-priv-op.c. Prefix emulate_privileged_op with pv_ and export it via pv/traps.h. Also move gpr_switch.S since it is used by the privileged instruction emulation code only. Code motion only except for the rename. Cleanup etc will come later. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
46b488cb66
commit
ecaba067e1
6 files changed
+1464
-1359
No files matched your search
@@ -4,3 +4,5 @@ obj-y += traps.o
|
||||
obj-bin-y += dom0_build.init.o
|
||||
obj-y += domain.o
|
||||
obj-y += emulate.o
|
||||
obj-y += emul-priv-op.o
|
||||
obj-bin-y += gpr_switch.o
|
||||
File diff suppressed because it is too large.
Load diff
File renamed without changes.
+2
-1358
File diff suppressed because it is too large.
Load diff
@@ -1,7 +1,6 @@
|
||||
subdir-y += compat
|
||||
|
||||
obj-bin-y += entry.o
|
||||
obj-bin-y += gpr_switch.o
|
||||
obj-y += traps.o
|
||||
obj-$(CONFIG_KEXEC) += machine_kexec.o
|
||||
obj-y += pci.o
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* pv/traps.h
|
||||
*
|
||||
* PV guest traps interface definitions
|
||||
*
|
||||
* Copyright (C) 2017 Wei Liu <wei.liu2@citrix.com>
|
||||
*
|
||||
* 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 that 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 __X86_PV_TRAPS_H__
|
||||
#define __X86_PV_TRAPS_H__
|
||||
|
||||
#ifdef CONFIG_PV
|
||||
|
||||
#include <public/xen.h>
|
||||
|
||||
int pv_emulate_privileged_op(struct cpu_user_regs *regs);
|
||||
|
||||
#else /* !CONFIG_PV */
|
||||
|
||||
static inline int pv_emulate_privileged_op(struct cpu_user_regs *regs) { return 0; }
|
||||
|
||||
#endif /* CONFIG_PV */
|
||||
|
||||
#endif /* __X86_PV_TRAPS_H__ */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* mode: C
|
||||
* c-file-style: "BSD"
|
||||
* c-basic-offset: 4
|
||||
* tab-width: 4
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*/
|
||||