public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] kvm: define KVM_CAP_DEVICE_DEASSIGNMENT
@ 2009-02-10 12:40 Han, Weidong
  2009-02-11 12:34 ` Avi Kivity
  2009-02-11 18:58 ` Mark McLoughlin
  0 siblings, 2 replies; 4+ messages in thread
From: Han, Weidong @ 2009-02-10 12:40 UTC (permalink / raw)
  To: 'Avi Kivity'; +Cc: 'kvm@vger.kernel.org'

[-- Attachment #1: Type: text/plain, Size: 933 bytes --]

define KVM_CAP_DEVICE_DEASSIGNMENT and KVM_DEASSIGN_PCI_DEVICE
for device deassignment.

Signed-off-by: Weidong Han <weidong.han@intel.com>
---
 include/linux/kvm.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 869462c..02dfb1b 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -402,6 +402,9 @@ struct kvm_trace_rec {
 #ifdef __KVM_HAVE_IOAPIC
 #define KVM_CAP_IRQ_ROUTING 25
 #endif
+#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT
+#define KVM_CAP_DEVICE_DEASSIGNMENT 26
+#endif
 
 #ifdef KVM_CAP_IRQ_ROUTING
 
@@ -466,6 +469,8 @@ struct kvm_irq_routing {
 #define KVM_ASSIGN_IRQ _IOR(KVMIO, 0x70, \
 			    struct kvm_assigned_irq)
 #define KVM_REINJECT_CONTROL      _IO(KVMIO, 0x71)
+#define KVM_DEASSIGN_PCI_DEVICE _IOR(KVMIO, 0x72, \
+				     struct kvm_assigned_pci_dev)
 
 /*
  * ioctls for vcpu fds
-- 
1.6.0.4

[-- Attachment #2: 0001-kvm-define-KVM_CAP_DEVICE_DEASSIGNMENT.patch --]
[-- Type: application/octet-stream, Size: 1110 bytes --]

From e4d3a816b397ceff5a7906da58f0780715662c2f Mon Sep 17 00:00:00 2001
From: Weidong Han <weidong.han@intel.com>
Date: Tue, 10 Feb 2009 20:05:28 +0800
Subject: [PATCH] kvm: define KVM_CAP_DEVICE_DEASSIGNMENT

define KVM_CAP_DEVICE_DEASSIGNMENT and KVM_DEASSIGN_PCI_DEVICE
for device deassignment.

Signed-off-by: Weidong Han <weidong.han@intel.com>
---
 include/linux/kvm.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 869462c..02dfb1b 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -402,6 +402,9 @@ struct kvm_trace_rec {
 #ifdef __KVM_HAVE_IOAPIC
 #define KVM_CAP_IRQ_ROUTING 25
 #endif
+#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT
+#define KVM_CAP_DEVICE_DEASSIGNMENT 26
+#endif
 
 #ifdef KVM_CAP_IRQ_ROUTING
 
@@ -466,6 +469,8 @@ struct kvm_irq_routing {
 #define KVM_ASSIGN_IRQ _IOR(KVMIO, 0x70, \
 			    struct kvm_assigned_irq)
 #define KVM_REINJECT_CONTROL      _IO(KVMIO, 0x71)
+#define KVM_DEASSIGN_PCI_DEVICE _IOR(KVMIO, 0x72, \
+				     struct kvm_assigned_pci_dev)
 
 /*
  * ioctls for vcpu fds
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/4] kvm: define KVM_CAP_DEVICE_DEASSIGNMENT
  2009-02-10 12:40 [PATCH 1/4] kvm: define KVM_CAP_DEVICE_DEASSIGNMENT Han, Weidong
@ 2009-02-11 12:34 ` Avi Kivity
  2009-02-11 18:58 ` Mark McLoughlin
  1 sibling, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2009-02-11 12:34 UTC (permalink / raw)
  To: Han, Weidong; +Cc: 'kvm@vger.kernel.org'

Han, Weidong wrote:
> define KVM_CAP_DEVICE_DEASSIGNMENT and KVM_DEASSIGN_PCI_DEVICE
> for device deassignment.
>
>
>  #ifdef KVM_CAP_IRQ_ROUTING
>  
> @@ -466,6 +469,8 @@ struct kvm_irq_routing {
>  #define KVM_ASSIGN_IRQ _IOR(KVMIO, 0x70, \
>  			    struct kvm_assigned_irq)
>  #define KVM_REINJECT_CONTROL      _IO(KVMIO, 0x71)
> +#define KVM_DEASSIGN_PCI_DEVICE _IOR(KVMIO, 0x72, \
> +				     struct kvm_assigned_pci_dev)
>  

Where's the implementation of this new ioctl?

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/4] kvm: define KVM_CAP_DEVICE_DEASSIGNMENT
  2009-02-10 12:40 [PATCH 1/4] kvm: define KVM_CAP_DEVICE_DEASSIGNMENT Han, Weidong
  2009-02-11 12:34 ` Avi Kivity
@ 2009-02-11 18:58 ` Mark McLoughlin
  2009-02-12 12:05   ` Avi Kivity
  1 sibling, 1 reply; 4+ messages in thread
From: Mark McLoughlin @ 2009-02-11 18:58 UTC (permalink / raw)
  To: Han, Weidong; +Cc: 'Avi Kivity', 'kvm@vger.kernel.org'

On Tue, 2009-02-10 at 20:40 +0800, Han, Weidong wrote:
> define KVM_CAP_DEVICE_DEASSIGNMENT and KVM_DEASSIGN_PCI_DEVICE
> for device deassignment.

Should add a pointer to the commit which added this ioctl:

  commit 0a920356748df4fb06e86c21c23d2ed6d31d37ad
  Author: Weidong Han <weidong.han@intel.com>
  Date:   Tue Dec 2 21:24:23 2008 +0800

    KVM: support device deassignment
    
    Support device deassignment, it can be used in device hotplug.
    
    Signed-off-by: Weidong Han <weidong.han@intel.com>
    Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>

> Signed-off-by: Weidong Han <weidong.han@intel.com>
> ---
>  include/linux/kvm.h |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/kvm.h b/include/linux/kvm.h
> index 869462c..02dfb1b 100644
> --- a/include/linux/kvm.h
> +++ b/include/linux/kvm.h
> @@ -402,6 +402,9 @@ struct kvm_trace_rec {
>  #ifdef __KVM_HAVE_IOAPIC
>  #define KVM_CAP_IRQ_ROUTING 25
>  #endif
> +#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT
> +#define KVM_CAP_DEVICE_DEASSIGNMENT 26
> +#endif
>  
>  #ifdef KVM_CAP_IRQ_ROUTING
>  
> @@ -466,6 +469,8 @@ struct kvm_irq_routing {
>  #define KVM_ASSIGN_IRQ _IOR(KVMIO, 0x70, \
>  			    struct kvm_assigned_irq)
>  #define KVM_REINJECT_CONTROL      _IO(KVMIO, 0x71)
> +#define KVM_DEASSIGN_PCI_DEVICE _IOR(KVMIO, 0x72, \
> +				     struct kvm_assigned_pci_dev)
>  

Looks good to me, but I wonder why we never used 0x6b-0x6f?

Acked-by: Mark McLoughlin <markmc@redhat.com>

Cheers,
Mark.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/4] kvm: define KVM_CAP_DEVICE_DEASSIGNMENT
  2009-02-11 18:58 ` Mark McLoughlin
@ 2009-02-12 12:05   ` Avi Kivity
  0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2009-02-12 12:05 UTC (permalink / raw)
  To: Mark McLoughlin; +Cc: Han, Weidong, 'kvm@vger.kernel.org'

Mark McLoughlin wrote:
> Looks good to me, but I wonder why we never used 0x6b-0x6f?
>   

Someone went from 0x69 to 0x70.  I later used 0x6a.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-12 12:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-10 12:40 [PATCH 1/4] kvm: define KVM_CAP_DEVICE_DEASSIGNMENT Han, Weidong
2009-02-11 12:34 ` Avi Kivity
2009-02-11 18:58 ` Mark McLoughlin
2009-02-12 12:05   ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox