kvm.h only needs asm/types.h
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
@@ -21,7 +21,7 @@* */ -#include <linux/types.h> +#include <asm/types.h> #include <linux/ioctl.h> /* Select x86 specific features in <linux/kvm.h> */
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.hdirectly with QEMU, without having to modify it.Patch against latest Linus tree.
Cheers,
Jes
Quoted 2 lines · Xiantao
Generally we should include
linux/types.hinstead ofasm/types.hfor kernel. We have already used the magic hack-module.awk(replacelinux/types.hwithasm/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
Quoted 8 lines · Jes Sorensen
Quoted 4 lines · Xiantao
Generally we should include
linux/types.hinstead ofasm/types.hfor kernel. We have already used the magic hack-module.awk(replacelinux/types.hwithasm/types.h) to make it work in userspace. :) XiantaoYes 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
Quoted 11 lines · Xiantao
Quoted 7 lines · Jes Sorensen
Quoted 4 lines · Xiantao
Generally we should include
linux/types.hinstead ofasm/types.hfor kernel. We have already used the magic hack-module.awk(replacelinux/types.hwithasm/types.h) to make it work in userspace. :) XiantaoYes 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
Quoted 7 lines · Jes Sorensen
Quoted 6 lines · Xiantao
Quoted 5 lines · Jes Sorensen
Quoted 4 lines · Xiantao
Generally we should include
linux/types.hinstead ofasm/types.hfor kernel. We have already used the magic hack-module.awk(replacelinux/types.hwithasm/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
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/linuxshould be hacked also. Xiantao
Yes I understand that, I am just trying to make things easier where possible, thats all.
Cheers,
Jes