Han, Weidong wrote:
> Ben-Ami Yassour wrote:
>> From: Kay, Allen M <[EMAIL PROTECTED]>
>> 
>> This patch includes the functions to support VT-d for passthrough
>> devices. 
>> 
>> [Ben: fixed memory pinning]
>> 
>> Signed-off-by: Kay, Allen M <[EMAIL PROTECTED]>
>> Signed-off-by: Weidong Han <[EMAIL PROTECTED]>
>> Signed-off-by: Ben-Ami Yassour <[EMAIL PROTECTED]>
>> ---
>>  arch/x86/kvm/Makefile      |    2 +-
>>  arch/x86/kvm/vtd.c         |  191
>>  ++++++++++++++++++++++++++++++++++++++++++++ arch/x86/kvm/vtd.h
>>  |   36 ++++++++ include/asm-x86/kvm_host.h |   17 ++++
>>  include/asm-x86/kvm_para.h |   14 +++
>>  include/linux/kvm_host.h   |    8 ++
>>  6 files changed, 267 insertions(+), 1 deletions(-)
>>  create mode 100644 arch/x86/kvm/vtd.c
>>  create mode 100644 arch/x86/kvm/vtd.h
>> 
>> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
>> index d220b49..39b7c32 100644 --- a/include/linux/kvm_host.h
>> +++ b/include/linux/kvm_host.h
>> @@ -278,6 +278,14 @@ int kvm_cpu_has_interrupt(struct kvm_vcpu *v);
>>  int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu);
>>  void kvm_vcpu_kick(struct kvm_vcpu *vcpu);
>> 
>> +int kvm_iommu_map_pages(struct kvm *kvm, gfn_t base_gfn,
>> +                    unsigned long npages); +int
kvm_iommu_map_guest(struct kvm *kvm,
>> +                    struct kvm_pci_passthrough_dev *pci_pt_dev);
>> +int kvm_iommu_unmap_guest(struct kvm *kvm);
>> +int kvm_intel_iommu_found(void);
>> +u64 kvm_intel_iommu_gfn_to_pfn(struct dmar_domain *domain, u64 gfn);
>> +
> 
> Needn't to add kvm_intel_iommu_gfn_to_pfn() declaration here. It's
> exposed by VT-d driver. 

I think it's better to declare kvm_intel_iommu_gfn_to_pfn() in vtd.h,
because it's only used in vtd.c.

Randy (Weidong)
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to