Date: Tue, 5 May 2015 13:37:37 +0000 From: Eric Badger <eric_badger@dell.com> To: "current@freebsd.org" <current@FreeBSD.ORG>, "rstone@FreeBSD.org" <rstone@FreeBSD.org> Subject: PCI PF memory decode disable when sizing VF BARs Message-ID: <cf159bad8bda4d87b1323daae1db6333@mspexmb1.Beer.Town>
next in thread | raw e-mail | index | archive | help
Hi Ryan and -current, During IOV config, when setting up VF bars, several calls are made to 'pci_= read_bar' (in sys/dev/pci/pci.c) in order to size VF BARs, which causes mem= ory decoding to be turned off temporarily for the PF associated with those = VFs. I'm finding that this can interfere with an already running PF. I've s= everal thoughts about how this might be handled, but I'm not convinced I un= derstand all of the consequences each of them entails, so any thoughts from= others would be appreciated. Here are ideas I've considered: 1. Check the value of the 'reg' arg to 'pci_read_bar' and, if it is outside= a standard BAR range, don't disable memory decoding. This is simple, but f= eels a little hackish and may have consequences I'm missing. 2. Pass some flag/context through such that pci_read_bar knows it is config= uring VF BARs (we might instead disable VF MSE in this case, if it is enabl= ed). It would be necessary to carry this flag/context through several funct= ion calls before reaching pci_read_bar, which might end up being ugly. 3. Rearrange the calls so that VF BARs are sized when the PF is not yet run= ning, and that info saved until VFs are created. Probably it would be done = when the PF BARs are sized for any device supporting IOV, even if that devi= ce never creates VFs. Thanks, Eric
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cf159bad8bda4d87b1323daae1db6333>