>>> On 05.08.15 at 04:02, <feng...@intel.com> wrote: > @@ -491,8 +474,9 @@ static int xen_pt_bar_reg_write(XenPCIPassthroughState > *s, XenPTReg *cfg_entry, > bar_ro_mask = XEN_PT_BAR_IO_RO_MASK | (r_size - 1); > break; > case XEN_PT_BAR_FLAG_UPPER: > + r = &d->io_regions[index-1];
Perhaps worth an assert(index > 0)? Jan