Re: [PATCH] PCI/ASPM: Enable ASPM for links under VMD domain

From: Christoph Hellwig
Date: Tue Aug 25 2020 - 02:56:55 EST


On Tue, Aug 25, 2020 at 02:39:55PM +0800, Kai Heng Feng wrote:
> Hi Christoph,
>
> > On Aug 25, 2020, at 2:23 PM, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> >
> > On Fri, Aug 21, 2020 at 08:32:20PM +0800, Kai-Heng Feng wrote:
> >> New Intel laptops with VMD cannot reach deeper power saving state,
> >> renders very short battery time.
> >
> > So what about just disabling VMD given how bloody pointless it is?
> > Hasn't anyone learned from the AHCI remapping debacle?
> >
> > I'm really pissed at all this pointless crap intel comes up with just
> > to make life hard for absolutely no gain. Is it so hard to just leave
> > a NVMe device as a standard NVMe device instead of f*^&ing everything
> > up in the chipset to make OS support a pain and I/O slower than by
> > doing nothing?
>
> From what I can see from the hardwares at my hand, VMD only enables a PCI domain and PCI bridges behind it.
>
> NVMe works as a regular NVMe under those bridges. No magic remapping happens here.

It definitively is less bad than the AHCI remapping, that is for sure.

But it still requires:

- a new OS driver just to mak the PCIe device show up
- indirections in the irq handling
- indirections in the DMA handling
- hacks for ASPSM
- hacks for X (there were a few more)

while adding absolutely no value. Basically we have to add a large
chunk of kernel code just to undo silicone/firmware Intel added to their
platform to make things complicated. I mean it is their platform and if
they want a "make things complicated" option that is fine, but it should
not be on by default.