Re: [Qemu-devel] [RFC v1 3/3] intel_iommu: add scalable-mode option to make scalable mode work

2019-02-15 Thread Jason Wang
On 2019/2/15 下午1:39, Peter Xu wrote: On Fri, Feb 15, 2019 at 01:22:34PM +0800, Yi Sun wrote: [...] +/* TODO: read cap/ecap from host to decide which cap to be exposed. */ +if (s->scalable_mode) { +if (!s->caching_mode) { +error_report("Need to set caching-mode

Re: [Qemu-devel] [RFC v1 3/3] intel_iommu: add scalable-mode option to make scalable mode work

2019-02-14 Thread Yi Sun
On 19-02-15 13:39:05, Peter Xu wrote: > On Fri, Feb 15, 2019 at 01:22:34PM +0800, Yi Sun wrote: > > [...] > > > > > +/* TODO: read cap/ecap from host to decide which cap to be > > > > exposed. */ > > > > +if (s->scalable_mode) { > > > > +if (!s->caching_mode) { > > > > +

Re: [Qemu-devel] [RFC v1 3/3] intel_iommu: add scalable-mode option to make scalable mode work

2019-02-14 Thread Peter Xu
On Fri, Feb 15, 2019 at 01:22:34PM +0800, Yi Sun wrote: [...] > > > +/* TODO: read cap/ecap from host to decide which cap to be exposed. > > > */ > > > +if (s->scalable_mode) { > > > +if (!s->caching_mode) { > > > +error_report("Need to set caching-mode for scalable

Re: [Qemu-devel] [RFC v1 3/3] intel_iommu: add scalable-mode option to make scalable mode work

2019-02-14 Thread Yi Sun
On 19-02-12 14:46:29, Peter Xu wrote: [...] > > diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c > > index 3664a00..447fdf3 100644 > > --- a/hw/i386/intel_iommu.c > > +++ b/hw/i386/intel_iommu.c > > @@ -2492,6 +2492,17 @@ static bool vtd_process_inv_desc(IntelIOMMUState *s) > >

Re: [Qemu-devel] [RFC v1 3/3] intel_iommu: add scalable-mode option to make scalable mode work

2019-02-11 Thread Peter Xu
On Wed, Jan 30, 2019 at 01:09:13PM +0800, Yi Sun wrote: > This patch adds an option to provide flexibility for user to expose > Scalable Mode to guest. User could expose Scalable Mode to guest by > the config as below: > > "-device intel-iommu,caching-mode=on,scalable-mode=on" > > The Linux

[Qemu-devel] [RFC v1 3/3] intel_iommu: add scalable-mode option to make scalable mode work

2019-01-29 Thread Yi Sun
This patch adds an option to provide flexibility for user to expose Scalable Mode to guest. User could expose Scalable Mode to guest by the config as below: "-device intel-iommu,caching-mode=on,scalable-mode=on" The Linux iommu driver has supported scalable mode. Please refer below patch set: