Re: [kvm-unit-tests PATCH v7 12/13] pci: Add pci-testdev PCI bus test device

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

 



On Wed, Oct 12, 2016 at 06:54:28PM +0200, Alexander Gordeev wrote:
> On Fri, Sep 23, 2016 at 03:25:42PM +0800, Peter Xu wrote:
> > > +	width = ops->io_readb(&test->width);
> > > +	if (width != 1 && width != 2 && width != 4)
> > > +		return false;
> > 
> > IIUC we only have 1?
> 
> I guess it boils what *have* does mean here.
> 
> pci-testdev protocol allows it to be any, but hw/misc/pci-testdev.c
> implements just 1 (yet?).

Do we have other possible implementations for pci-testdev protocol?

> 
> > > +
> > > +	sig = ops->io_readl(&test->data);
> > > +	off = ops->io_readl(&test->offset);
> > > +
> > > +	for (i = 0; i < nr_writes; i++) {
> > > +		switch (width) {
> > > +		case 1: ops->io_writeb(sig, (void *)test + off); break;
> > > +		case 2: ops->io_writew(sig, (void *)test + off); break;
> > > +		case 4: ops->io_writel(sig, (void *)test + off); break;
> > 
> > Here as well. Could I ask why we are handling 2/4?
> 
> Basically, because x86 had it and this implementation mimics it.

Yes, actually I didn't notice that before. So I have the same question
for vmexit.c. But of course I don't think this question is a blocker
for the series.

[...]

> > x86/vmexit.c is using pci-testdev as well. Maybe we can generalize the
> > init part and share it? (Actually there is patch in my local tree for
> > this, but haven't posted :)
> 
> Yep, I have x86 enabler and it is very simple. But x86 is just too
> different to try to generalize and we're not pursuing it right now.

Could I ask what's the difficulties? Again this is not a block for
sure, so, looking forward to your next version.

Thanks,

-- peterx
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux