Patch for MS Hyper V (virtualization)

Sergey Babkin babkin at verizon.net
Tue Apr 14 17:36:52 PDT 2009


John Baldwin wrote:
> 
> On Tuesday 07 April 2009 9:14:26 pm Sergey Babkin wrote:
> > John Baldwin wrote:
> > >
> > > On Monday 06 April 2009 11:12:33 pm Sergey Babkin wrote:
> >
> > > > Anyway, as far as I can tell, it's only the base register of
> > > > the simulated DEC21140 device that has this issue, so it's
> > > > quite possible that the bug is in that device's simulator.
> > > >
> > > > I've attached a modified patch that checks conservatively for this
> > > > precise situation, so it should not break compatibility with
> > > > anything else. I've tested it on Hyper-V.
> > >
> > > Can you test unmodified FreeBSD 8 on Hyper-V?  It has an extra fix
> relative to
> > > 7 to disable decoding via the PCI command register while sizing BARs that
> may
> > > address this.
> >
> > 8.0 (February snapshot) seems to have the same issue.
> 
> Ok.
> 
> > I've also saved the log of writes that 7.1 does for this device:
> >
> > reg 10 val ec01
> > reg 14 val febff000
> > reg 18 val 0
> > reg 1c val 0
> > reg 20 val 0
> > reg 24 val 0
> > reg 30 val febe0000
> > reg 4 val 117
> > reg 3c val b
> > reg 3d val 1
> > reg 3e val 14
> > reg 3f val 28
> > reg c val 8
> > reg d val 40
> > reg 9 val 0
> > reg 8 val 20
> > reg 10 val ec00
> > reg 14 val febff000
> > reg 4 val 117
> > reg 4 val 117
> >
> > I don't see any ffffffff values.
> 
> Your printf() probably isn't in the right place.  pci_add_map() uses
> PCIB_READ_CONFIG() directly and doesn't use pci_read_config(), so if your
> printf is in pci_read_config_method() in pci.c it won't see them.  Try
> hooking the cfg operations in sys/amd64/pci/pci_cfgreg.c instead.

The printf was in pci_write_config().

-SB


More information about the freebsd-hackers mailing list