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

Han, Weidong
2008-07-28T06:49:40Z

Ben-Ami Yassour wrote:
> From: Kay, Allen M <allen.m.kay@intel.com>
>
> This patch includes the functions to support VT-d for passthrough
> devices.
>
> [Ben: fixed memory pinning, cleanup]
>
> Signed-off-by: Kay, Allen M <allen.m.kay@intel.com>
> Signed-off-by: Weidong Han <weidong.han@intel.com>
> Signed-off-by: Ben-Ami Yassour <benami@il.ibm.com>
> ---
> arch/x86/kvm/Makefile | 2 +-
> arch/x86/kvm/vtd.c | 182
> ++++++++++++++++++++++++++++++++++++++++++++ arch/x86/kvm/x86.c
> | 11 +++ include/asm-x86/kvm_host.h | 3 +
> include/linux/kvm_host.h | 6 ++
> virt/kvm/kvm_main.c | 8 ++-
> 6 files changed, 210 insertions(+), 2 deletions(-)
> create mode 100644 arch/x86/kvm/vtd.c
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 5b470a1..49c4ed3 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -41,6 +41,7 @@
> #include <linux/pagemap.h>
> #include <linux/mman.h>
> #include <linux/swap.h>
> +#include <linux/intel-iommu.h>
>
> #include <asm/processor.h>
> #include <asm/io.h>
> @@ -76,7 +77,7 @@ static inline int valid_vcpu(int n)
> return likely(n >= 0 && n < KVM_MAX_VCPUS);
> }
>
> -static inline int is_mmio_pfn(pfn_t pfn)
> +inline int is_mmio_pfn(pfn_t pfn)
> {
> if (pfn_valid(pfn))
> return PageReserved(pfn_to_page(pfn));

I cannot find this is_mmio_pfn() definition on main KVM tree, and failed
to patch it.

Randy (Weidong)