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

Re: [Xen-devel] [PATCH v3 10/10] x86/MSI-X: provide hypercall interface for mask-all control



El 23/06/15 a les 9.20, Jan Beulich ha escrit:
>>>> On 22.06.15 at 19:02, <roger.pau@xxxxxxxxxx> 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?

FreeBSD never supported PV Dom0 operation, it only had a very minimal
and crappy i386 PV DomU support which has now been completely removed.
Maybe you are confusing it with NetBSD, which does have PV Dom0 support
since a long time ago?

Yes, FreeBSD only aims to run as PVHVM or PVH (or whatever we call HVM
without a device model guests). I frankly don't mind trying to change
this in FreeBSD if there's a good rational behind it. I'm currently
testing FreeBSD with the change above to see how it behaves.

Why doesn't Linux use the low 256 bytes of the config space and instead
uses the IO ports with PCIe devices?

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.