Skip to contentSkip to conversation

kvm.h only needs asm/types.h

PATCH In review Jes Sorensen 2 participants 7 messages Apr 29, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm.h only needs asm/types.h

Hi,

I'd like to push this one upstream - it allows us to share asm/kvm.h directly with QEMU, without having to modify it.

Patch against latest Linus tree.

Cheers,
Jes

We only need asm/types.h in asm/kvm.h on ia64. This allows this file to be shared with KVM userland without modifications.

---
 arch/ia64/include/asm/kvm.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/include/asm/kvm.h +1 -1
Index: linux-2.6.git/arch/ia64/include/asm/kvm.h
===================================================================
@@ -21,7 +21,7 @@
  *
  */
 
-#include <linux/types.h>
+#include <asm/types.h>
 #include <linux/ioctl.h>
 
 /* Select x86 specific features in <linux/kvm.h> */
#1 lore raw

Generally we should include linux/types.h instead of asm/types.h for kernel. We have already used the magic hack-module.awk(replace linux/types.h with asm/types.h) to make it work in userspace. :) Xiantao

Quoted 9 lines · Jes Sorensen

Hi,

I'd like to push this one upstream - it allows us to share asm/kvm.h directly with QEMU, without having to modify it.

Patch against latest Linus tree.

Cheers,
Jes

#2 lore raw
In reply to Jes Sorensen
Quoted 2 lines · Xiantao

Generally we should include linux/types.h instead of asm/types.h for kernel. We have already used the magic hack-module.awk(replace linux/types.h with asm/types.h) to make it work in userspace. :) Xiantao

Yes and no, in this case we don't need it, and there is no reason to modify the kernel headers for KVM if we can share them unmodified.

Cheers,
Jes

#3 lore raw
In reply to Jes Sorensen
Quoted 8 lines · Jes Sorensen
Quoted 4 lines · Xiantao

Generally we should include linux/types.h instead of asm/types.h for kernel. We have already used the magic hack-module.awk(replace linux/types.h with asm/types.h) to make it work in userspace. :) Xiantao

Yes and no, in this case we don't need it, and there is no reason to modify the kernel headers for KVM if we can share them unmodified.

When you do "make sync" in userland, many files are modifed except this one. :) Xiantao

#4 lore raw
In reply to Jes Sorensen
Quoted 11 lines · Xiantao
Quoted 7 lines · Jes Sorensen
Quoted 4 lines · Xiantao

Generally we should include linux/types.h instead of asm/types.h for kernel. We have already used the magic hack-module.awk(replace linux/types.h with asm/types.h) to make it work in userspace. :) Xiantao

Yes and no, in this case we don't need it, and there is no reason to modify the kernel headers for KVM if we can share them unmodified.

When you do "make sync" in userland, many files are modifed except this one. :) Xiantao

I thought make sync had been removed :-) It at least no longer works.

Cheers,
Jes

#5 lore raw
In reply to Jes Sorensen
Quoted 7 lines · Jes Sorensen
Quoted 6 lines · Xiantao
Quoted 5 lines · Jes Sorensen
Quoted 4 lines · Xiantao

Generally we should include linux/types.h instead of asm/types.h for kernel. We have already used the magic hack-module.awk(replace linux/types.h with asm/types.h) to make it work in userspace. :) Xiantao

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Yes and no, in this case we don't need it, and there is no reason to modify the kernel headers for KVM if we can share them unmodified.

When you do "make sync" in userland, many files are modifed except this one. :) Xiantao

I thought make sync had been removed :-) It at least no longer works.

If make sync won't exist in future, you may only need to submit a patch for qemu-kvm.git to fix the header file directly, :-)

Even with the patch you proposed, we still can't make kernel and userspace share all header files. For example, the header files under include/linux should be hacked also. Xiantao

#6 lore raw
In reply to Jes Sorensen
Quoted 7 lines · Xiantao
Quoted 1 line · Jes Sorensen

I thought make sync had been removed :-) It at least no longer works.

If make sync won't exist in future, you may only need to submit a patch for qemu-kvm.git to fix the header file directly, :-)

Even with the patch you proposed, we still can't make kernel and userspace share all header files. For example, the header files under include/linux should be hacked also. Xiantao

Yes I understand that, I am just trying to make things easier where possible, thats all.

Cheers,
Jes