qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v1 09/18] intel_iommu: process pasid cache invalid


From: Liu, Yi L
Subject: Re: [Qemu-devel] [RFC v1 09/18] intel_iommu: process pasid cache invalidation
Date: Thu, 11 Jul 2019 06:22:25 +0000

> From: Peter Xu [mailto:address@hidden]
> Sent: Tuesday, July 9, 2019 12:48 PM
> To: Liu, Yi L <address@hidden>
> Cc: address@hidden; address@hidden; address@hidden;
> address@hidden; address@hidden;
> address@hidden; address@hidden; Tian, Kevin
> <address@hidden>; Tian, Jun J <address@hidden>; Sun, Yi Y
> <address@hidden>; address@hidden; Jacob Pan
> <address@hidden>; Yi Sun <address@hidden>
> Subject: Re: [RFC v1 09/18] intel_iommu: process pasid cache invalidation
> 
> On Fri, Jul 05, 2019 at 07:01:42PM +0800, Liu Yi L wrote:
> > +static bool vtd_process_pasid_desc(IntelIOMMUState *s,
> > +                                   VTDInvDesc *inv_desc) {
> > +    if ((inv_desc->val[0] & VTD_INV_DESC_PASIDC_RSVD_VAL0) ||
> > +        (inv_desc->val[1] & VTD_INV_DESC_PASIDC_RSVD_VAL1) ||
> > +        (inv_desc->val[2] & VTD_INV_DESC_PASIDC_RSVD_VAL2) ||
> > +        (inv_desc->val[3] & VTD_INV_DESC_PASIDC_RSVD_VAL3)) {
> > +        trace_vtd_inv_desc("non-zero-field-in-pc_inv_desc",
> > +                            inv_desc->val[1], inv_desc->val[0]);
> 
> The first parameter of trace_vtd_inv_desc() should be the type.
> 
> Can use error_report_once() here.

I think so, let me switch to use it in next version.

> > +        return false;
> > +    }
> > +
> > +    switch (inv_desc->val[0] & VTD_INV_DESC_PASIDC_G) {
> > +    case VTD_INV_DESC_PASIDC_DSI:
> > +        break;
> > +
> > +    case VTD_INV_DESC_PASIDC_PASID_SI:
> > +        break;
> > +
> > +    case VTD_INV_DESC_PASIDC_GLOBAL:
> > +        break;
> > +
> > +    default:
> > +        trace_vtd_inv_desc("invalid-inv-granu-in-pc_inv_desc",
> > +                            inv_desc->val[1], inv_desc->val[0]);
> 
> Here too.

Got it.

Thanks,
Yi Liu

> > +        return false;
> > +    }
> > +
> > +    return true;
> > +}
> 
> Regards,
> 
> --
> Peter Xu

reply via email to

[Prev in Thread] Current Thread [Next in Thread]