xen: move viridian defines to header
PATCH 1/1 xen: move viridian defines to header
Hi!
Attached patch moves viridian defines into viridian header.
Signed-off-by Christoph Egger <[email protected]>
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
xen/arch/x86/hvm/viridian.c +1 -9
@@ -12,18 +12,10 @@#include <asm/paging.h> #include <asm/p2m.h> #include <asm/hvm/support.h> +#include <asm/hvm/viridian.h> #include <public/sched.h> #include <public/hvm/hvm_op.h> -/* Viridian MSR numbers. */ -#define VIRIDIAN_MSR_GUEST_OS_ID 0x40000000 -#define VIRIDIAN_MSR_HYPERCALL 0x40000001 -#define VIRIDIAN_MSR_VP_INDEX 0x40000002 -#define VIRIDIAN_MSR_EOI 0x40000070 -#define VIRIDIAN_MSR_ICR 0x40000071 -#define VIRIDIAN_MSR_TPR 0x40000072 -#define VIRIDIAN_MSR_APIC_ASSIST 0x40000073 -/* Viridian Hypercall Status Codes. */ #define HV_STATUS_SUCCESS 0x0000#define HV_STATUS_INVALID_HYPERCALL_CODE 0x0002
xen/include/asm-x86/hvm/viridian.h +9 -0
@@ -39,6 +39,15 @@ struct viridian_domainunion viridian_hypercall_gpa hypercall_gpa; }; +/* Viridian MSR numbers. */ +#define VIRIDIAN_MSR_GUEST_OS_ID 0x40000000 +#define VIRIDIAN_MSR_HYPERCALL 0x40000001 +#define VIRIDIAN_MSR_VP_INDEX 0x40000002 +#define VIRIDIAN_MSR_EOI 0x40000070 +#define VIRIDIAN_MSR_ICR 0x40000071 +#define VIRIDIAN_MSR_TPR 0x40000072 +#define VIRIDIAN_MSR_APIC_ASSIST 0x40000073 + int cpuid_viridian_leaves( unsigned int leaf,
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 6 lines · Christoph Egger
Hi!
Attached patch moves viridian defines into viridian header.
Signed-off-by Christoph Egger <[email protected]>
I don't consider this a clean up by itself. It's nicer to define things in a .c file if they are only sued in that .c file. Also moving the MSRs out but not other viridian-architectural defines like the MSR flag definitions and hypercall status codes seems inconsistent.
I would consider this as part of a patch series where later patches that I actually care about make use of this change. On its own, it gets a nack.
-- Keir