A guest can call dma_ops->is_pv_device() to find out if a device is a passthrough'ed device (device passed on to a guest by the host). If this is true, a hypercall will be made to translate DMA mapping operations.
This function can be done away with and just a kvm_is_pv_device() call can be added, which can be no-op on a non-pv guest (or on the host). Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- include/asm-x86/dma-mapping_64.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/asm-x86/dma-mapping_64.h b/include/asm-x86/dma-mapping_64.h index ecd0f61..3943edd 100644 --- a/include/asm-x86/dma-mapping_64.h +++ b/include/asm-x86/dma-mapping_64.h @@ -48,6 +48,8 @@ struct dma_mapping_ops { int direction); int (*dma_supported)(struct device *hwdev, u64 mask); int is_phys; + /* Is this a physical device in a paravirtualized guest? */ + int (*is_pv_device)(struct device *hwdev, const char *name); }; extern dma_addr_t bad_dma_address; -- 1.5.3 ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel