* [PATCH 1/2] Hyperv detection - code cleanup
@ 2010-05-19 17:12 Ky Srinivasan
2010-05-19 17:51 ` H. Peter Anvin
0 siblings, 1 reply; 5+ messages in thread
From: Ky Srinivasan @ 2010-05-19 17:12 UTC (permalink / raw)
To: hpa; +Cc: greg, hjanssen, mingo, linux-kernel
From: K. Y. Srinivasan <ksrinivasan@novell.com>
Subject: Code cleanup - consolidate all hyperv related definitions into one
header file.
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Index: linux.trees.git/arch/x86/include/asm/hyperv.h
===================================================================
--- linux.trees.git.orig/arch/x86/include/asm/hyperv.h 2010-05-18 10:14:02.000000000 -0600
+++ linux.trees.git/arch/x86/include/asm/hyperv.h 2010-05-18 14:11:55.000000000 -0600
@@ -190,4 +190,11 @@
#define HV_STATUS_INVALID_HYPERCALL_INPUT 3
#define HV_STATUS_INVALID_ALIGNMENT 4
+struct ms_hyperv_info {
+ u32 features;
+ u32 hints;
+};
+
+extern struct ms_hyperv_info ms_hyperv;
+
#endif
Index: linux.trees.git/arch/x86/include/asm/mshyperv.h
===================================================================
--- linux.trees.git.orig/arch/x86/include/asm/mshyperv.h 2010-05-18 10:14:02.000000000 -0600
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,14 +0,0 @@
-#ifndef _ASM_X86_MSHYPER_H
-#define _ASM_X86_MSHYPER_H
-
-#include <linux/types.h>
-#include <asm/hyperv.h>
-
-struct ms_hyperv_info {
- u32 features;
- u32 hints;
-};
-
-extern struct ms_hyperv_info ms_hyperv;
-
-#endif
Index: linux.trees.git/arch/x86/kernel/cpu/mshyperv.c
===================================================================
--- linux.trees.git.orig/arch/x86/kernel/cpu/mshyperv.c 2010-05-18 12:46:50.000000000 -0600
+++ linux.trees.git/arch/x86/kernel/cpu/mshyperv.c 2010-05-18 14:11:55.000000000 -0600
@@ -15,7 +15,6 @@
#include <asm/processor.h>
#include <asm/hypervisor.h>
#include <asm/hyperv.h>
-#include <asm/mshyperv.h>
struct ms_hyperv_info ms_hyperv;
EXPORT_SYMBOL(ms_hyperv);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Hyperv detection - code cleanup
2010-05-19 17:12 [PATCH 1/2] Hyperv detection - code cleanup Ky Srinivasan
@ 2010-05-19 17:51 ` H. Peter Anvin
2010-05-19 18:18 ` Ky Srinivasan
2010-05-19 18:47 ` Avi Kivity
0 siblings, 2 replies; 5+ messages in thread
From: H. Peter Anvin @ 2010-05-19 17:51 UTC (permalink / raw)
To: Ky Srinivasan; +Cc: greg, hjanssen, mingo, linux-kernel, Avi Kivity
On 05/19/2010 10:12 AM, Ky Srinivasan wrote:
>
> From: K. Y. Srinivasan <ksrinivasan@novell.com>
> Subject: Code cleanup - consolidate all hyperv related definitions into one
> header file.
>
How will this affect KVM? I was under the impression that this was
separated out as a constants-only header file for a reason.
-hpa
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Hyperv detection - code cleanup
2010-05-19 17:51 ` H. Peter Anvin
@ 2010-05-19 18:18 ` Ky Srinivasan
2010-05-19 18:47 ` Avi Kivity
1 sibling, 0 replies; 5+ messages in thread
From: Ky Srinivasan @ 2010-05-19 18:18 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: greg, hjanssen, Avi Kivity, mingo, linux-kernel
>>> On 5/19/2010 at 1:51 PM, in message <4BF4252E.6090609@zytor.com>, "H. Peter
Anvin" <hpa@zytor.com> wrote:
> On 05/19/2010 10:12 AM, Ky Srinivasan wrote:
>>
>> From: K. Y. Srinivasan <ksrinivasan@novell.com>
>> Subject: Code cleanup - consolidate all hyperv related definitions into one
>> header file.
>>
>
> How will this affect KVM? I was under the impression that this was
> separated out as a constants-only header file for a reason.
I was under the impression that hyperv.h was for all public definitions of Hyperv. I am hoping Avi can shed some light on KVM implications (if any).
Regards,
K. Y
>
> -hpa
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Hyperv detection - code cleanup
2010-05-19 17:51 ` H. Peter Anvin
2010-05-19 18:18 ` Ky Srinivasan
@ 2010-05-19 18:47 ` Avi Kivity
2010-05-19 20:06 ` H. Peter Anvin
1 sibling, 1 reply; 5+ messages in thread
From: Avi Kivity @ 2010-05-19 18:47 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Ky Srinivasan, greg, hjanssen, mingo, linux-kernel
On 05/19/2010 08:51 PM, H. Peter Anvin wrote:
> On 05/19/2010 10:12 AM, Ky Srinivasan wrote:
>
>> From: K. Y. Srinivasan<ksrinivasan@novell.com>
>> Subject: Code cleanup - consolidate all hyperv related definitions into one
>> header file.
>>
>>
> How will this affect KVM? I was under the impression that this was
> separated out as a constants-only header file for a reason.
>
>
It's exported, so any types need to be compatible with userspace (i.e.
__u32).
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Hyperv detection - code cleanup
2010-05-19 18:47 ` Avi Kivity
@ 2010-05-19 20:06 ` H. Peter Anvin
0 siblings, 0 replies; 5+ messages in thread
From: H. Peter Anvin @ 2010-05-19 20:06 UTC (permalink / raw)
To: Avi Kivity; +Cc: Ky Srinivasan, greg, hjanssen, mingo, linux-kernel
On 05/19/2010 11:47 AM, Avi Kivity wrote:
> On 05/19/2010 08:51 PM, H. Peter Anvin wrote:
>> On 05/19/2010 10:12 AM, Ky Srinivasan wrote:
>>
>>> From: K. Y. Srinivasan<ksrinivasan@novell.com>
>>> Subject: Code cleanup - consolidate all hyperv related definitions into one
>>> header file.
>>>
>>>
>> How will this affect KVM? I was under the impression that this was
>> separated out as a constants-only header file for a reason.
>
> It's exported, so any types need to be compatible with userspace (i.e.
> __u32).
>
... and certainly no prototypes for kernel-only functionality.
Right, that's what I thought. So NAK on this patch, too.
-hpa
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-19 20:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-19 17:12 [PATCH 1/2] Hyperv detection - code cleanup Ky Srinivasan
2010-05-19 17:51 ` H. Peter Anvin
2010-05-19 18:18 ` Ky Srinivasan
2010-05-19 18:47 ` Avi Kivity
2010-05-19 20:06 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox