On 19-03-01 15:04:14, Peter Xu wrote:
[...]
> > @@ -3540,6 +3555,15 @@ static void vtd_init(IntelIOMMUState *s)
> > s->cap |= VTD_CAP_CM;
> > }
> >
> > + /* TODO: read cap/ecap from host to decide which cap to be exposed. */
> > + if (s->scalable_mode) {
> > + if (!s->dma_drain) {
> > + error_report("Need to set dma_drain for scalable mode");
> > + exit(1);
> > + }
>
> This patch looks mostly good to me, only that can we move this check
> to vtd_decide_config()? That's where most similar checks are done.
>
I think that is fine. Thanks!