* [PATCH] xen: move viridian defines to header
@ 2010-04-01 8:30 Christoph Egger
2010-04-01 8:50 ` Keir Fraser
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Egger @ 2010-04-01 8:30 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 419 bytes --]
Hi!
Attached patch moves viridian defines into viridian header.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
---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
[-- Attachment #2: xen_viridian.diff --]
[-- Type: text/x-diff, Size: 1562 bytes --]
diff -r e5e1e1532b97 xen/arch/x86/hvm/viridian.c
--- a/xen/arch/x86/hvm/viridian.c Wed Mar 31 10:21:19 2010 +0100
+++ b/xen/arch/x86/hvm/viridian.c Thu Apr 01 10:08:01 2010 +0200
@@ -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
diff -r e5e1e1532b97 xen/include/asm-x86/hvm/viridian.h
--- a/xen/include/asm-x86/hvm/viridian.h Wed Mar 31 10:21:19 2010 +0100
+++ b/xen/include/asm-x86/hvm/viridian.h Thu Apr 01 10:08:01 2010 +0200
@@ -39,6 +39,15 @@ struct viridian_domain
union 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,
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] xen: move viridian defines to header
2010-04-01 8:30 [PATCH] xen: move viridian defines to header Christoph Egger
@ 2010-04-01 8:50 ` Keir Fraser
0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2010-04-01 8:50 UTC (permalink / raw)
To: Christoph Egger, xen-devel@lists.xensource.com
On 01/04/2010 09:30, "Christoph Egger" <Christoph.Egger@amd.com> wrote:
>
> Hi!
>
> Attached patch moves viridian defines into viridian header.
>
> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-01 8:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-01 8:30 [PATCH] xen: move viridian defines to header Christoph Egger
2010-04-01 8:50 ` Keir Fraser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).