[PATCH] gvt/kvmgt: fill info for ROM/VGA region

Zhenyu Wang zhenyuw at linux.intel.com
Fri Dec 8 02:46:26 UTC 2017


Look good to me. Could you fix patch title like "drm/i915/gvt/kvmgt: xxx"?

On 2017.12.06 15:47:09 +0800, Pei Zhang wrote:
> Both ROM/VGA region are not supported for vGPU in GVT. But if the device
> model want to get those region, we should return the correct information
> but not leave the structure with random data. Change to same operation
> of BAR3-BAR5 which are also not supported by vGPU.
> 
> Refer to function @intel_vgpu_rw.
> 
> Signed-off-by: Pei Zhang <pei.zhang at intel.com>
> ---
>  drivers/gpu/drm/i915/gvt/kvmgt.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c
> index b17a5b0..92f9258 100644
> --- a/drivers/gpu/drm/i915/gvt/kvmgt.c
> +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
> @@ -1013,13 +1013,17 @@ static long intel_vgpu_ioctl(struct mdev_device *mdev, unsigned int cmd,
>  		case VFIO_PCI_BAR3_REGION_INDEX ... VFIO_PCI_BAR5_REGION_INDEX:
>  			info.offset = VFIO_PCI_INDEX_TO_OFFSET(info.index);
>  			info.size = 0;
> -
>  			info.flags = 0;
> +
>  			gvt_dbg_core("get region info bar:%d\n", info.index);
>  			break;
>  
>  		case VFIO_PCI_ROM_REGION_INDEX:
>  		case VFIO_PCI_VGA_REGION_INDEX:
> +			info.offset = VFIO_PCI_INDEX_TO_OFFSET(info.index);
> +			info.size = 0;
> +			info.flags = 0;
> +
>  			gvt_dbg_core("get region info index:%d\n", info.index);
>  			break;
>  		default:
> -- 
> 2.7.4
> 
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20171208/f8e6261b/attachment.sig>


More information about the intel-gvt-dev mailing list