From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH v3 10/10] x86/MSI-X: provide hypercall interface for mask-all control Date: Tue, 23 Jun 2015 08:20:23 +0100 Message-ID: <558924D70200007800087ED8@mail.emea.novell.com> References: <55719F9D0200007800081425@mail.emea.novell.com> <5571A3F202000078000814CA@mail.emea.novell.com> <557964870200007800083706@mail.emea.novell.com> <55795A3D.7060304@citrix.com> <55842E9702000078000870C9@mail.emea.novell.com> <5584222F.90707@citrix.com> <55844A39020000780008717F@mail.emea.novell.com> <55883F8A.20304@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z7IVb-0000Ih-Bj for xen-devel@lists.xenproject.org; Tue, 23 Jun 2015 07:20:39 +0000 In-Reply-To: <55883F8A.20304@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: =?UTF-8?Q?Roger=20Pau=20Monn=C3=A9?= Cc: Wei Liu , Stefano Stabellini , Andrew Cooper , Ian Jackson , Ian Campbell , xen-devel , dgdegra@tycho.nsa.gov, Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> On 22.06.15 at 19:02, wrote: > OK, I didn't get the part of the question. AFAICT yes, FreeBSD will > access the low 256 bytes of the config space. For example the stub to > write to a cfg register is as follows: > > void > pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int > bytes) > { > > if (cfgmech == CFGMECH_PCIE && > (bus >= pcie_minbus && bus <= pcie_maxbus) && > (bus != 0 || !(1 << slot & pcie_badslots))) > pciereg_cfgwrite(bus, slot, func, reg, data, bytes); > else > pcireg_cfgwrite(bus, slot, func, reg, data, bytes); > } > > I take that you would prefer it to be: > > void > pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int > bytes) > { > > if (cfgmech == CFGMECH_PCIE && > (bus >= pcie_minbus && bus <= pcie_maxbus) && > (bus != 0 || !(1 << slot & pcie_badslots)) && > (reg > PCI_REGMAX)) > pciereg_cfgwrite(bus, slot, func, reg, data, bytes); > else > pcireg_cfgwrite(bus, slot, func, reg, data, bytes); > } > > Where 'PCI_REGMAX' is 255. Indeed that would have been nice, but we have to live with what OSes do. But then again - did I understand correctly that FreeBSD doesn't support PV Dom0 operation anymore, but wants to only run in PVH mode? Was that a recent change, i.e. are PV Dom0-s assumed to still be in use? Jan