> From: Peter Xu [mailto:zhexu@xxxxxxxxxx] > Sent: Tuesday, July 9, 2019 12:48 PM > To: Liu, Yi L <yi.l.liu@xxxxxxxxx> > Cc: qemu-devel@xxxxxxxxxx; mst@xxxxxxxxxx; pbonzini@xxxxxxxxxx; > alex.williamson@xxxxxxxxxx; eric.auger@xxxxxxxxxx; > david@xxxxxxxxxxxxxxxxxxxxx; tianyu.lan@xxxxxxxxx; Tian, Kevin > <kevin.tian@xxxxxxxxx>; Tian, Jun J <jun.j.tian@xxxxxxxxx>; Sun, Yi Y > <yi.y.sun@xxxxxxxxx>; kvm@xxxxxxxxxxxxxxx; Jacob Pan > <jacob.jun.pan@xxxxxxxxxxxxxxx>; Yi Sun <yi.y.sun@xxxxxxxxxxxxxxx> > 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