Begin to untangle the header dependency tangle by moving definition of
struct cpuid_leaf out of x86_emulate.h into the new cpuid.h.
Additionally, plumb the header through to libxc. This is technically a
redundant include at this point, but it helps build-test the later changes,
and will be used eventually.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
ln -sf $(XEN_ROOT)/xen/include/acpi acpi
ifeq ($(CONFIG_X86),y)
ln -sf $(XEN_ROOT)/xen/include/asm-x86 xen/asm
+ mkdir -p xen/lib
+ ln -sf $(XEN_ROOT)/xen/include/xen/lib/x86 xen/lib/x86
endif
touch $@
};
#include "_xc_cpuid_autogen.h"
+#include <xen/lib/x86/cpuid.h>
+
#define bitmaskof(idx) (1u << ((idx) & 31))
#define featureword_of(idx) ((idx) >> 5)
#define clear_feature(idx, dst) ((dst) &= ~bitmaskof(idx))
#ifndef __X86_EMULATE_H__
#define __X86_EMULATE_H__
+#include <xen/lib/x86/cpuid.h>
+
#define MAX_INST_LEN 15
#if defined(__i386__)
X86EMUL_FPU_none
};
-struct cpuid_leaf
-{
- uint32_t a, b, c, d;
-};
-
struct x86_emulate_state;
/*
#ifndef __ASSEMBLY__
#include <xen/types.h>
#include <xen/kernel.h>
-#include <asm/x86_emulate.h>
+
+#include <xen/lib/x86/cpuid.h>
+
#include <public/sysctl.h>
extern const uint32_t known_features[FSCAPINTS];
--- /dev/null
+/* Common data structures and functions consumed by hypervisor and toolstack */
+#ifndef XEN_LIB_X86_CPUID_H
+#define XEN_LIB_X86_CPUID_H
+
+struct cpuid_leaf
+{
+ uint32_t a, b, c, d;
+};
+
+#endif /* !XEN_LIB_X86_CPUID_H */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */