Move x86 ioctl definitions from include/linux/kvm.h
PATCH 1/1 Move x86 ioctl definitions from include/linux/kvm.h
This patch is a continuation of the 7 patches sent earlier. This patch moves all x86 specific macros from include/linux/kvm.h to include/asm-x86/kvm.h.
*note just realized none of the other patches except for email 0
had the [PATCH] addendum on the subjects.
include/asm-x86/kvm.h +33 -0
@@ -151,5 +151,38 @@ struct kvm_cpuid { struct kvm_cpuid_entry entries[0]; }; +/* +* ioctls for /dev/kvm fds: +*/ +#define KVM_GET_MSR_INDEX_LIST _IOWR(KVMIO, 0x02, struct kvm_msr_list) + +/* +* KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns +* a vcpu fd. +*/ +#define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias) + +/* +* Extension capability list. +*/ +#define KVM_CAP_IRQCHIP 0 +#define KVM_CAP_HLT 1 +#define KVM_CAP_MMU_SHADOW_CACHE_CONTROL 2 +#define KVM_CAP_USER_MEMORY 3 +#define KVM_CAP_SET_TSS_ADDR 4 + +/* +* ioctls for VM fds +*/ +#define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47) + +/* +* ioctls for vcpu fds +*/ +#define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs) +#define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) +#define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid) +#define KVM_GET_LAPIC _IOR(KVMIO, 0x8e, struct kvm_lapic_state) +#define KVM_SET_LAPIC _IOW(KVMIO, 0x8f, struct kvm_lapic_state)#endif
include/linux/kvm.h +1 -17
@@ -205,7 +205,6 @@ struct kvm_signal_mask {*/ #define KVM_GET_API_VERSION _IO(KVMIO, 0x00)#define KVM_CREATE_VM _IO(KVMIO, 0x01)/* returns a VM fd */ -#define KVM_GET_MSR_INDEX_LIST _IOWR(KVMIO, 0x02, struct kvm_msr_list)/* * Check if a kvm extension is available. Argument is extension number, * return is 1 (yes) or 0 (no, sorry).
@@ -217,15 +216,6 @@ struct kvm_signal_mask {#define KVM_GET_VCPU_MMAP_SIZE _IO(KVMIO, 0x04)/* in bytes */ /* -* Extension capability list. -*/ -#define KVM_CAP_IRQCHIP 0 -#define KVM_CAP_HLT 1 -#define KVM_CAP_MMU_SHADOW_CACHE_CONTROL 2 -#define KVM_CAP_USER_MEMORY 3 -#define KVM_CAP_SET_TSS_ADDR 4 - -/* * ioctls for VM fds */ #define KVM_SET_MEMORY_REGION _IOW(KVMIO, 0x40, struct kvm_memory_region)
@@ -233,14 +223,13 @@ struct kvm_signal_mask {#define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45)#define KVM_SET_USER_MEMORY_REGION _IOW(KVMIO, 0x46,\ struct kvm_userspace_memory_region) -#define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47) +/* * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns * a vcpu fd. */ #define KVM_CREATE_VCPU _IO(KVMIO, 0x41)#define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) -#define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias)/* Device model IOC */ #define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60)#define KVM_IRQ_LINE _IOW(KVMIO, 0x61, struct kvm_irq_level)
@@ -258,13 +247,8 @@ struct kvm_signal_mask {#define KVM_TRANSLATE _IOWR(KVMIO, 0x85, struct kvm_translation)#define KVM_INTERRUPT _IOW(KVMIO, 0x86, struct kvm_interrupt)#define KVM_DEBUG_GUEST _IOW(KVMIO, 0x87, struct kvm_debug_guest) -#define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs) -#define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) -#define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid)#define KVM_SET_SIGNAL_MASK _IOW(KVMIO, 0x8b, struct kvm_signal_mask)#define KVM_GET_FPU _IOR(KVMIO, 0x8c, struct kvm_fpu)#define KVM_SET_FPU _IOW(KVMIO, 0x8d, struct kvm_fpu) -#define KVM_GET_LAPIC _IOR(KVMIO, 0x8e, struct kvm_lapic_state) -#define KVM_SET_LAPIC _IOW(KVMIO, 0x8f, struct kvm_lapic_state)#endif
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
A message that is not in the archive (sent off-list or not yet received): 11955344663232-git-send-email-jyoung5-r/[email protected]
Carsten Otte
Acked-byQuoted 5 lines · Jerone Young
This patch is a continuation of the 7 patches sent earlier. This patch moves all x86 specific macros from
include/linux/kvm.htoinclude/asm-x86/kvm.h.Signed-off-by Jerone Young <jyoung5-r/[email protected]>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Zhang, Xiantao
Acked-byRe: [PATCH] Move x86 ioctl definitions frominclude/linux/kvm.h
In reply to a message not in the archiveQuoted 29 lines · Jerone Young
This patch is a continuation of the 7 patches sent earlier. This patch moves all x86 specific macros from
include/linux/kvm.htoinclude/asm-x86/kvm.h.Signed-off-by Jerone Young <jyoung5-r/[email protected]>*note just realized none of the other patches except for email 0
had the [PATCH] addendum on the subjects.include/asm-x86/kvm.h +4
-0@@ -151,5 +151,38 @@ struct kvm_cpuid {struct kvm_cpuid_entry entries[0 ]; }; +/* +* ioctls for /dev/kvm fds: +*/ +#define KVM_GET_MSR_INDEX_LIST _IOWR(KVMIO, 0x02, struct
kvm_msr_list) +include/asm-x86/kvm.h +5
-0+/* +* KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns +* a vcpu fd. +*/ +#define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct
kvm_memory_alias) +
include/asm-x86/kvm.h struct kvm_cpuid {
Quoted 9 lines
include/asm-x86/kvm.h +7
-0+/* +* Extension capability list. +*/ +#define KVM_CAP_IRQCHIP 0 +#define KVM_CAP_HLT 1 +#define KVM_CAP_MMU_SHADOW_CACHE_CONTROL 2 +#define KVM_CAP_USER_MEMORY 3
One minor comment: Currenlty, user and kernel space memory interfaces are in common, should we move this capability
definition to arch?
Anyway this is not a big issue.
Quoted 1 line
------------------------------------------------------------------------
-
Quoted 7 lines
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Quoted 5 lines · Jerone Young
This patch is a continuation of the 7 patches sent earlier. This patch moves all x86 specific macros from
include/linux/kvm.htoinclude/asm-x86/kvm.h.
Just noticed I'd dropped this old patch. Unfortunately kvm.git has changed in this area. Care to re-spin?
Sorry about the drop.
Signature · 8 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
A message that is not in the archive (sent off-list or not yet received): 474FDC9E.2030701-atKUWr5tajBWk0Htik3J/[email protected]
Actually this is was probably way overkill on moving these. I don't think that this patch is really needed. So I say just leave it be. Since they are macros they really cause no harm being where they are. It's also easier to make sure that none collide on the numbers they use.
Quoted 7 lines · Avi Kivity
Quoted 5 lines · Jerone Young
This patch is a continuation of the 7 patches sent earlier. This patch moves all x86 specific macros from
include/linux/kvm.htoinclude/asm-x86/kvm.h.
Quoted 5 lines
Just noticed I'd dropped this old patch. Unfortunately kvm.git has changed in this area. Care to re-spin?
Sorry about the drop.
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
Re: [PATCH] Move x86 ioctldefinitions from include/linux/kvm.h
Quoted 5 lines · Jerone Young
Actually this is was probably way overkill on moving these. I don't think that this patch is really needed. So I say just leave it be. Since they are macros they really cause no harm being where they are. It's also easier to make sure that none collide on the numbers they use.
Since it is in common code, maybe we should use CONFIG_X86 marco to handle it, and it won't lead to unnecessary definitions for all archs and also allows other archs to define their arch-specific ioctls. Certaninly, I don't think we can split them, since they are numbered in sequence, and can't change considering compability issue. Xiantao
Quoted 8 lines · Avi Kivity
Quoted 7 lines
Quoted 5 lines · Jerone Young
This patch is a continuation of the 7 patches sent earlier. This patch moves all x86 specific macros from
include/linux/kvm.htoinclude/asm-x86/kvm.h.
Quoted 8 lines
Quoted 5 lines
Just noticed I'd dropped this old patch. Unfortunately kvm.git has changed in this area. Care to re-spin?
Sorry about the drop.
------------------------------------------------------------------------
-
Quoted 8 lines
SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4