From: Eduardo Habkost <ehabkost-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Avi Kivity <avi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>
Cc: Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>,
Zachary Amsden <zach-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>,
Eduardo Habkost
<ehabkost-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>,
Haren Myneni <hbabu-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>,
"Eric W. Biederman"
<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
Andrey Borzenkov <arvidjaar-JGs/UdohzUI@public.gmane.org>,
mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH 03/12] kvm: vmx: move ASM_VMX_* definitions from asm/kvm_host.h to asm/vmx.h
Date: Mon, 17 Nov 2008 19:03:15 -0200 [thread overview]
Message-ID: <1226955804-16802-4-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1226955804-16802-1-git-send-email-ehabkost-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Those definitions will be used by code outside KVM, so move it outside
of a KVM-specific source file.
Those definitions are used only on kvm/vmx.c, that already includes
asm/vmx.h, so they can be moved safely.
Signed-off-by: Eduardo Habkost <ehabkost-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/x86/include/asm/kvm_host.h | 12 ------------
arch/x86/include/asm/vmx.h | 15 +++++++++++++++
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 8346be8..caad194 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -702,18 +702,6 @@ static inline void kvm_inject_gp(struct kvm_vcpu *vcpu, u32 error_code)
kvm_queue_exception_e(vcpu, GP_VECTOR, error_code);
}
-#define ASM_VMX_VMCLEAR_RAX ".byte 0x66, 0x0f, 0xc7, 0x30"
-#define ASM_VMX_VMLAUNCH ".byte 0x0f, 0x01, 0xc2"
-#define ASM_VMX_VMRESUME ".byte 0x0f, 0x01, 0xc3"
-#define ASM_VMX_VMPTRLD_RAX ".byte 0x0f, 0xc7, 0x30"
-#define ASM_VMX_VMREAD_RDX_RAX ".byte 0x0f, 0x78, 0xd0"
-#define ASM_VMX_VMWRITE_RAX_RDX ".byte 0x0f, 0x79, 0xd0"
-#define ASM_VMX_VMWRITE_RSP_RDX ".byte 0x0f, 0x79, 0xd4"
-#define ASM_VMX_VMXOFF ".byte 0x0f, 0x01, 0xc4"
-#define ASM_VMX_VMXON_RAX ".byte 0xf3, 0x0f, 0xc7, 0x30"
-#define ASM_VMX_INVEPT ".byte 0x66, 0x0f, 0x38, 0x80, 0x08"
-#define ASM_VMX_INVVPID ".byte 0x66, 0x0f, 0x38, 0x81, 0x08"
-
#define MSR_IA32_TIME_STAMP_COUNTER 0x010
#define TSS_IOPB_BASE_OFFSET 0x66
diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h
index ec5edc3..e8aa699 100644
--- a/arch/x86/include/asm/vmx.h
+++ b/arch/x86/include/asm/vmx.h
@@ -356,4 +356,19 @@ enum vmcs_field {
#define VMX_EPT_IDENTITY_PAGETABLE_ADDR 0xfffbc000ul
+
+#define ASM_VMX_VMCLEAR_RAX ".byte 0x66, 0x0f, 0xc7, 0x30"
+#define ASM_VMX_VMLAUNCH ".byte 0x0f, 0x01, 0xc2"
+#define ASM_VMX_VMRESUME ".byte 0x0f, 0x01, 0xc3"
+#define ASM_VMX_VMPTRLD_RAX ".byte 0x0f, 0xc7, 0x30"
+#define ASM_VMX_VMREAD_RDX_RAX ".byte 0x0f, 0x78, 0xd0"
+#define ASM_VMX_VMWRITE_RAX_RDX ".byte 0x0f, 0x79, 0xd0"
+#define ASM_VMX_VMWRITE_RSP_RDX ".byte 0x0f, 0x79, 0xd4"
+#define ASM_VMX_VMXOFF ".byte 0x0f, 0x01, 0xc4"
+#define ASM_VMX_VMXON_RAX ".byte 0xf3, 0x0f, 0xc7, 0x30"
+#define ASM_VMX_INVEPT ".byte 0x66, 0x0f, 0x38, 0x80, 0x08"
+#define ASM_VMX_INVVPID ".byte 0x66, 0x0f, 0x38, 0x81, 0x08"
+
+
+
#endif
--
1.5.5.GIT
next prev parent reply other threads:[~2008-11-17 21:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-17 21:03 [PATCH 00/12] x86: disable virt on kdump and emergency_restart (v4) Eduardo Habkost
2008-11-17 21:03 ` [PATCH 07/12] x86: cpu_emergency_vmxoff() function Eduardo Habkost
[not found] ` <1226955804-16802-1-git-send-email-ehabkost-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-11-17 21:03 ` [PATCH 01/12] kvm: vmx: move vmx.h to include/asm Eduardo Habkost
2008-11-17 21:03 ` [PATCH 02/12] kvm: svm: move svm.h " Eduardo Habkost
2008-11-17 21:03 ` Eduardo Habkost [this message]
2008-11-17 21:03 ` [PATCH 04/12] kvm: vmx: move cpu_has_kvm_support() to an inline on asm/virtext.h Eduardo Habkost
2008-11-17 21:03 ` [PATCH 05/12] x86: asm/virtext.h: add cpu_vmxoff() inline function Eduardo Habkost
2008-11-17 21:03 ` [PATCH 06/12] kvm: vmx: extract kvm_cpu_vmxoff() from hardware_disable() Eduardo Habkost
2008-11-17 21:03 ` [PATCH 08/12] kvm: svm: move has_svm() code to asm/virtext.h Eduardo Habkost
2008-11-17 21:03 ` [PATCH 10/12] x86: cpu_emergency_svm_disable() function Eduardo Habkost
2008-11-17 21:03 ` [PATCH 11/12] kdump: forcibly disable VMX and SVM on machine_crash_shutdown() Eduardo Habkost
2008-11-18 8:15 ` [PATCH 00/12] x86: disable virt on kdump and emergency_restart (v4) Ingo Molnar
[not found] ` <20081118081501.GF17838-X9Un+BFzKDI@public.gmane.org>
2008-11-21 16:07 ` Avi Kivity
[not found] ` <4926DCC8.1040500-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-11-21 16:18 ` Ingo Molnar
2008-11-24 14:58 ` Eduardo Habkost
2008-11-17 21:03 ` [PATCH 09/12] kvm: svm: move svm_hardware_disable() code to asm/virtext.h Eduardo Habkost
2008-11-17 21:03 ` [PATCH 12/12] x86: disable VMX on all CPUs on reboot Eduardo Habkost
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=1226955804-16802-4-git-send-email-ehabkost@redhat.com \
--to=ehabkost-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=akpm-3NddpPZAyC0@public.gmane.org \
--cc=arvidjaar-JGs/UdohzUI@public.gmane.org \
--cc=avi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
--cc=hbabu-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org \
--cc=kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=mingo-X9Un+BFzKDI@public.gmane.org \
--cc=rjw-KKrjLPT3xs0@public.gmane.org \
--cc=vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=zach-pghWNbHTmq7QT0dZR+AlfA@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox