* [PATCH] Move x86 ioctl definitions from include/linux/kvm.h
@ 2007-11-20 4:54 Jerone Young
[not found] ` <11955344663232-git-send-email-jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Jerone Young @ 2007-11-20 4:54 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Jerone Young
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.
Signed-off-by: Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
*note just realized none of the other patches except for email 0
had the [PATCH] addendum on the subjects.
diff --git a/include/asm-x86/kvm.h b/include/asm-x86/kvm.h
index 9d40f75..5622f25 100644
--- a/include/asm-x86/kvm.h
+++ b/include/asm-x86/kvm.h
@@ -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
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index fd4f900..ed85110 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -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/
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Move x86 ioctl definitions from include/linux/kvm.h
[not found] ` <11955344663232-git-send-email-jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2007-11-20 8:34 ` Carsten Otte
2007-11-20 8:41 ` [PATCH] Move x86 ioctl definitions frominclude/linux/kvm.h Zhang, Xiantao
2007-11-30 9:49 ` [PATCH] Move x86 ioctl definitions from include/linux/kvm.h Avi Kivity
2 siblings, 0 replies; 6+ messages in thread
From: Carsten Otte @ 2007-11-20 8:34 UTC (permalink / raw)
To: Jerone Young; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Jerone Young wrote:
> 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.
>
> Signed-off-by: Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Acked-by: Carsten Otte <cotte-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
-------------------------------------------------------------------------
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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Move x86 ioctl definitions frominclude/linux/kvm.h
[not found] ` <11955344663232-git-send-email-jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-11-20 8:34 ` Carsten Otte
@ 2007-11-20 8:41 ` Zhang, Xiantao
2007-11-30 9:49 ` [PATCH] Move x86 ioctl definitions from include/linux/kvm.h Avi Kivity
2 siblings, 0 replies; 6+ messages in thread
From: Zhang, Xiantao @ 2007-11-20 8:41 UTC (permalink / raw)
To: Jerone Young, kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Avi Kivity
Jerone Young wrote:
> 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.
>
> Signed-off-by: Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
>
> *note just realized none of the other patches except for email 0
> had the [PATCH] addendum on the subjects.
>
>
> diff --git a/include/asm-x86/kvm.h b/include/asm-x86/kvm.h
> index 9d40f75..5622f25 100644
> --- a/include/asm-x86/kvm.h
> +++ b/include/asm-x86/kvm.h
> @@ -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
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.
Acked-by: Zhang Xiantao<xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
------------------------------------------------------------------------
-
> 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
> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> 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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Move x86 ioctl definitions from include/linux/kvm.h
[not found] ` <11955344663232-git-send-email-jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-11-20 8:34 ` Carsten Otte
2007-11-20 8:41 ` [PATCH] Move x86 ioctl definitions frominclude/linux/kvm.h Zhang, Xiantao
@ 2007-11-30 9:49 ` Avi Kivity
[not found] ` <474FDC9E.2030701-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2 siblings, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2007-11-30 9:49 UTC (permalink / raw)
To: Jerone Young; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Jerone Young wrote:
> 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.
>
>
Just noticed I'd dropped this old patch. Unfortunately kvm.git has
changed in this area. Care to re-spin?
Sorry about the drop.
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Move x86 ioctl definitions from include/linux/kvm.h
[not found] ` <474FDC9E.2030701-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2007-11-30 16:21 ` Jerone Young
2007-12-04 1:36 ` [PATCH] Move x86 ioctldefinitions " Zhang, Xiantao
0 siblings, 1 reply; 6+ messages in thread
From: Jerone Young @ 2007-11-30 16:21 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
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.
On Fri, 2007-11-30 at 11:49 +0200, Avi Kivity wrote:
> Jerone Young wrote:
> > 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.
> >
> >
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Move x86 ioctldefinitions from include/linux/kvm.h
2007-11-30 16:21 ` Jerone Young
@ 2007-12-04 1:36 ` Zhang, Xiantao
0 siblings, 0 replies; 6+ messages in thread
From: Zhang, Xiantao @ 2007-12-04 1:36 UTC (permalink / raw)
To: jyoung5-r/Jw6+rmf7HQT0dZR+AlfA, Avi Kivity
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Jerone Young wrote:
> 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
> On Fri, 2007-11-30 at 11:49 +0200, Avi Kivity wrote:
>> Jerone Young wrote:
>>> 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.
>>>
>>>
>>
>> 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
> _______________________________________________
> kvm-devel mailing list
> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-12-04 1:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-20 4:54 [PATCH] Move x86 ioctl definitions from include/linux/kvm.h Jerone Young
[not found] ` <11955344663232-git-send-email-jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-11-20 8:34 ` Carsten Otte
2007-11-20 8:41 ` [PATCH] Move x86 ioctl definitions frominclude/linux/kvm.h Zhang, Xiantao
2007-11-30 9:49 ` [PATCH] Move x86 ioctl definitions from include/linux/kvm.h Avi Kivity
[not found] ` <474FDC9E.2030701-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-11-30 16:21 ` Jerone Young
2007-12-04 1:36 ` [PATCH] Move x86 ioctldefinitions " Zhang, Xiantao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox