[PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-07 Thread Ben-Ami Yassour
Based on a patch by: Kay, Allen M <[EMAIL PROTECTED]> This patch enables pci device assignment based on VT-d support. When a device is assigned to the guest, the guest memory is pinned and the mapping is updated in the VT-d IOMMU. Signed-off-by: Kay, Allen M <[EMAIL PROTECTED]> Signed-off-by: Wei

[PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-21 Thread Ben-Ami Yassour
Based on a patch by: Kay, Allen M <[EMAIL PROTECTED]> This patch enables pci device assignment based on VT-d support. When a device is assigned to the guest, the guest memory is pinned and the mapping is updated in the VT-d IOMMU. Signed-off-by: Kay, Allen M <[EMAIL PROTECTED]> Signed-off-by: Wei

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-13 Thread Yang, Sheng
On Thursday 07 August 2008 22:14:47 Ben-Ami Yassour wrote: > Based on a patch by: Kay, Allen M <[EMAIL PROTECTED]> > > This patch enables pci device assignment based on VT-d support. > When a device is assigned to the guest, the guest memory is pinned > and the mapping is updated in the VT-d IOMMU.

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-13 Thread Avi Kivity
Yang, Sheng wrote: On Thursday 07 August 2008 22:14:47 Ben-Ami Yassour wrote: Based on a patch by: Kay, Allen M <[EMAIL PROTECTED]> This patch enables pci device assignment based on VT-d support. When a device is assigned to the guest, the guest memory is pinned and the mapping is updated in

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-13 Thread Yang, Sheng
On Wednesday 13 August 2008 17:46:03 Avi Kivity wrote: > Yang, Sheng wrote: > > On Thursday 07 August 2008 22:14:47 Ben-Ami Yassour wrote: > >> Based on a patch by: Kay, Allen M <[EMAIL PROTECTED]> > >> > >> This patch enables pci device assignment based on VT-d support. > >> When a device is assig

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-20 Thread Amit Shah
* On Thursday 07 Aug 2008 19:44:47 Ben-Ami Yassour wrote: > Based on a patch by: Kay, Allen M <[EMAIL PROTECTED]> > > This patch enables pci device assignment based on VT-d support. > When a device is assigned to the guest, the guest memory is pinned and > the mapping is updated in the VT-d IOMMU.

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-21 Thread Ben-Ami Yassour
On Thu, 2008-08-21 at 12:13 +0530, Amit Shah wrote: > * On Thursday 07 Aug 2008 19:44:47 Ben-Ami Yassour wrote: > > Based on a patch by: Kay, Allen M <[EMAIL PROTECTED]> > > > > This patch enables pci device assignment based on VT-d support. > > When a device is assigned to the guest, the guest mem

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-21 Thread Amit Shah
* On Thursday 21 Aug 2008 16:35:57 Ben-Ami Yassour wrote: > On Thu, 2008-08-21 at 12:13 +0530, Amit Shah wrote: > > * On Thursday 07 Aug 2008 19:44:47 Ben-Ami Yassour wrote: > > > Based on a patch by: Kay, Allen M <[EMAIL PROTECTED]> > > > > > > This patch enables pci device assignment based on VT-

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-22 Thread Amit Shah
* On Thursday 21 Aug 2008 16:35:57 Ben-Ami Yassour wrote: > On Thu, 2008-08-21 at 12:13 +0530, Amit Shah wrote: > > * On Thursday 07 Aug 2008 19:44:47 Ben-Ami Yassour wrote: > > > Based on a patch by: Kay, Allen M <[EMAIL PROTECTED]> > > > > > > This patch enables pci device assignment based on VT-

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-22 Thread Avi Kivity
Amit Shah wrote: > diff --git a/include/linux/kvm.h b/include/linux/kvm.h > index d9ef7d3..2956e35 100644 > --- a/include/linux/kvm.h > +++ b/include/linux/kvm.h > @@ -495,4 +495,6 @@ struct kvm_assigned_irq { > __u32 flags; > }; > > +#define KVM_DEV_ASSIGN_USE_VTD (1 << 1) > + > #endif >

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-23 Thread Amit Shah
* On Friday 22 Aug 2008 23:48:42 Avi Kivity wrote: > Amit Shah wrote: > > diff --git a/include/linux/kvm.h b/include/linux/kvm.h > > index d9ef7d3..2956e35 100644 > > --- a/include/linux/kvm.h > > +++ b/include/linux/kvm.h > > @@ -495,4 +495,6 @@ struct kvm_assigned_irq { > > __u32 flags; >

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-23 Thread Avi Kivity
Amit Shah wrote: * On Friday 22 Aug 2008 23:48:42 Avi Kivity wrote: Amit Shah wrote: diff --git a/include/linux/kvm.h b/include/linux/kvm.h index d9ef7d3..2956e35 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h @@ -495,4 +495,6 @@ struct kvm_assigned_irq { __u32 flags

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-23 Thread Amit Shah
* On Saturday 23 Aug 2008 14:58:50 Avi Kivity wrote: > Amit Shah wrote: > > Also, is KVM_CAP_foo needed for this? This is the only #define that'll be > > used and we can simply do something like > > > > #ifdef KVM_DEV_ASSIGN_USE_VTD > > flags |= KVM_DEV_ASSIGN_USE_VTD > > #endif > > > > ? > > That

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-24 Thread Avi Kivity
Amit Shah wrote: That only detects if the headers have the flag, not if the kernel actually supports it (and whether there is an iommu in the host). We need run-time detection. Which means we expose KVM_CAP_IOMMU only if one was detected? Yes. How to do this correctly? I don't k

RE: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-24 Thread Han, Weidong
Avi Kivity wrote: > Amit Shah wrote: >>> That only detects if the headers have the flag, not if the kernel >>> actually supports it (and whether there is an iommu in the host). >>> We need run-time detection. >>> >> >> Which means we expose KVM_CAP_IOMMU only if one was detected? > > Yes. > >

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-26 Thread Amit Shah
* On Friday 22 Aug 2008 23:48:42 Avi Kivity wrote: > Amit Shah wrote: > > diff --git a/include/linux/kvm.h b/include/linux/kvm.h > > index d9ef7d3..2956e35 100644 > > --- a/include/linux/kvm.h > > +++ b/include/linux/kvm.h > > @@ -495,4 +495,6 @@ struct kvm_assigned_irq { > > __u32 flags; >

Re: [PATCH 2/2] KVM: Device assignemnt with VT-d

2008-08-26 Thread Avi Kivity
Amit Shah wrote: (1 >> 0)? This is a userspace inteface, so use a generic name like iommu. We also need a KVM_CAP so userspace can check whether an iommu is present or not. How about this? Looks fine. -- error compiling committee.c: too many arguments to function -- To unsubscribe