#include <xen/guest_access.h>
#include <xen/hypercall.h>
#include <compat/vcpu.h>
-#include <compat/hvm/hvm_vcpu.h>
#define xen_vcpu_set_periodic_timer vcpu_set_periodic_timer
CHECK_vcpu_set_periodic_timer;
CHECK_vcpu_register_vcpu_info;
#undef xen_vcpu_register_vcpu_info
+#ifdef CONFIG_HVM
+
+#include <compat/hvm/hvm_vcpu.h>
+
#define xen_vcpu_hvm_context vcpu_hvm_context
#define xen_vcpu_hvm_x86_32 vcpu_hvm_x86_32
#define xen_vcpu_hvm_x86_64 vcpu_hvm_x86_64
#undef xen_vcpu_hvm_x86_32
#undef xen_vcpu_hvm_context
+#endif
+
int compat_vcpu_op(int cmd, unsigned int vcpuid, XEN_GUEST_HANDLE_PARAM(void) arg)
{
struct domain *d = current->domain;
if ( v->vcpu_info == &dummy_vcpu_info )
return -EINVAL;
+#ifdef CONFIG_HVM
if ( is_hvm_vcpu(v) )
{
struct vcpu_hvm_context ctxt;
domain_unlock(d);
}
else
+#endif
{
struct compat_vcpu_guest_context *ctxt;
compat-arch-$(CONFIG_X86) := x86_32
headers-y := \
- compat/argo.h \
- compat/callback.h \
+ compat/arch-$(compat-arch-y).h \
compat/elfnote.h \
compat/event_channel.h \
compat/features.h \
- compat/grant_table.h \
- compat/hypfs.h \
- compat/kexec.h \
compat/memory.h \
compat/nmi.h \
compat/physdev.h \
compat/platform.h \
+ compat/pmu.h \
compat/sched.h \
- compat/trace.h \
compat/vcpu.h \
compat/version.h \
compat/xen.h \
- compat/xenoprof.h
+ compat/xlat.h
headers-$(CONFIG_X86) += compat/arch-x86/pmu.h
headers-$(CONFIG_X86) += compat/arch-x86/xen-mca.h
headers-$(CONFIG_X86) += compat/arch-x86/xen.h
headers-$(CONFIG_X86) += compat/arch-x86/xen-$(compat-arch-y).h
-headers-$(CONFIG_X86) += compat/hvm/dm_op.h
-headers-$(CONFIG_X86) += compat/hvm/hvm_op.h
-headers-$(CONFIG_X86) += compat/hvm/hvm_vcpu.h
-headers-y += compat/arch-$(compat-arch-y).h compat/pmu.h compat/xlat.h
+headers-$(CONFIG_ARGO) += compat/argo.h
+headers-$(CONFIG_PV) += compat/callback.h
+headers-$(CONFIG_GRANT_TABLE) += compat/grant_table.h
+headers-$(CONFIG_HVM) += compat/hvm/dm_op.h
+headers-$(CONFIG_HVM) += compat/hvm/hvm_op.h
+headers-$(CONFIG_HVM) += compat/hvm/hvm_vcpu.h
+headers-$(CONFIG_HYPFS) += compat/hypfs.h
+headers-$(CONFIG_KEXEC) += compat/kexec.h
+headers-$(CONFIG_TRACEBUFFER) += compat/trace.h
+headers-$(CONFIG_XENOPROF) += compat/xenoprof.h
headers-$(CONFIG_XSM_FLASK) += compat/xsm/flask_op.h
cppflags-y := -include public/xen-compat.h -DXEN_GENERATING_COMPAT_HEADERS