Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753252AbbKWEwu (ORCPT ); Sun, 22 Nov 2015 23:52:50 -0500 Received: from mga01.intel.com ([192.55.52.88]:23946 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753099AbbKWEwt (ORCPT ); Sun, 22 Nov 2015 23:52:49 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,335,1444719600"; d="scan'208";a="845019741" Message-ID: <56529B7E.6050904@intel.com> Date: Mon, 23 Nov 2015 12:52:14 +0800 From: Jike Song User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Alex Williamson CC: "igvt-g@ml01.01.org" , "Tian, Kevin" , "Reddy, Raghuveer" , qemu-devel , Stefano Stabellini , "White, Michael L" , "Cowperthwaite, David J" , "intel-gfx@lists.freedesktop.org" , "Li, Susie" , "Dong, Eddie" , "linux-kernel@vger.kernel.org" , "xen-devel@lists.xen.org" , Gerd Hoffmann , "Zhou, Chao" , Paolo Bonzini , "Zhu, Libo" , "Wang, Hongbo" , "Lv, Zhiyuan" Subject: Re: [Qemu-devel] [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated Graphics Passthrough Solution from Intel References: <53D215D3.50608@intel.com> <547FCAAD.2060406@intel.com> <54AF967B.3060503@intel.com> <5527CEC4.9080700@intel.com> <559B3E38.1080707@intel.com> <562F4311.9@intel.com> <1447870341.4697.92.camel@redhat.com> <564D78D0.80904@intel.com> <1447948366.4697.119.camel@redhat.com> <564E8C51.6070706@intel.com> <1447993371.4697.257.camel@redhat.com> <564EB4F2.9080605@intel.com> <1448037640.4697.266.camel@redhat.com> In-Reply-To: <1448037640.4697.266.camel@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2401 Lines: 57 On 11/21/2015 12:40 AM, Alex Williamson wrote: >> >> Thanks for confirmation. For QEMU/KVM, I totally agree your point; However, >> if we take XenGT to consider, it will be a bit more complex: with Xen >> hypervisor and Dom0 kernel running in different level, it's not a straight- >> forward way for QEMU to do something like mapping a portion of MMIO BAR >> via VFIO in Dom0 kernel, instead of calling hypercalls directly. > > This would need to be part of the support added for Xen. To directly > map a device MMIO space to the VM, VFIO provides an mmap, QEMU registers > that mmap with KVM, or Xen. It's all just MemoryRegions in QEMU. > Perhaps it's even already supported by Xen. > AFAICT, things are different here for Xen. To establish mappings between Dom0 pfns and DomU gfn, one will have to call Xen hypercalls. In the scene above, either QEMU calls the hypercall directly, or it asks the VFIO in dom0 kernel to do it. I'm not saying that VFIO is not applicable for XenGT. I just want to say that given the VFIO based kernel/QEMU split model, additional effort is needed for XenGT. >> I don't know if there is a better way to handle this. But I do agree that >> channels between kernel and Qemu via VFIO is a good idea, even though we >> may have to split KVMGT/XenGT in Qemu a bit. We are currently working on >> moving all of PCI CFG emulation from kernel to Qemu, hopefully we can >> release it by end of this year and work with you guys to adjust it for >> the agreed method. > > Well, moving PCI config space emulation from kernel to QEMU is exactly > the wrong direction to take for this proposal. Config space access to > the vGPU would occur through the VFIO API. So if you already have > config space emulation in the kernel, that's already one less piece of > work for a VFIO model, it just needs to be "wired up" through the VFIO > API. Thanks, If I understand correctly, the idea of moving PCI CFG to QEMU is actually very similar to your VFIO design: a) VM access a CFG regsiter b) KVM hands over the access to QEMU c) QEMU may emulate it, and when necessary, ioctl into kernel(i915/vgt) > > Alex > > -- Thanks, Jike -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/