[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfLjYvFUVw+uHbMJCeoNfs6nb4Qh1OoQraA5bTkR9SeRg@mail.gmail.com>
Date: Mon, 27 Jul 2020 17:04:39 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>
Cc: Julia Suvorova <jusual@...hat.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Matthew Wilcox <willy@...radead.org>,
"open list:VFIO DRIVER" <kvm@...r.kernel.org>,
linux-pci <linux-pci@...r.kernel.org>
Subject: Re: [PATCH] x86/PCI: Use MMCONFIG by default for KVM guests
On Wed, Jul 22, 2020 at 12:47 PM Vitaly Kuznetsov <vkuznets@...hat.com> wrote:
> Julia Suvorova <jusual@...hat.com> writes:
> > Scanning for PCI devices at boot takes a long time for KVM guests. It
> > can be reduced if KVM will handle all configuration space accesses for
> > non-existent devices without going to userspace [1]. But for this to
> > work, all accesses must go through MMCONFIG.
> > This change allows to use pci_mmcfg as raw_pci_ops for 64-bit KVM
> > guests making MMCONFIG the default access method.
I'm not sure it won't break anything.
> > [1] https://lkml.org/lkml/2020/5/14/936
use Link: tag and better to use lore.kernel.org.
> This implies mmconfig access method is always functional (when present)
> for all KVM guests, regardless of hypervisor version/which KVM userspace
> is is use/... In case the assumption is true the patch looks good (to
> me) but in case it isn't or if we think that more control over this
> is needed we may want to introduce a PV feature bit for KVM.
>
> Also, I'm thinking about moving this to arch/x86/kernel/kvm.c: we can
> override x86_init.pci.arch_init and reassign raw_pci_ops after doing
> pci_arch_init().
% git grep -n -w x86_init.pci.arch_init -- arch/x86/
arch/x86/hyperv/hv_init.c:400: x86_init.pci.arch_init = hv_pci_init;
arch/x86/kernel/apic/apic_numachip.c:203: x86_init.pci.arch_init
= pci_numachip_init;
arch/x86/kernel/jailhouse.c:207: x86_init.pci.arch_init
= jailhouse_pci_arch_init;
arch/x86/pci/init.c:20: if (x86_init.pci.arch_init && !x86_init.pci.arch_init())
arch/x86/platform/intel-mid/intel-mid.c:172: x86_init.pci.arch_init
= intel_mid_pci_init;
arch/x86/platform/olpc/olpc.c:309: x86_init.pci.arch_init
= pci_olpc_init;
arch/x86/xen/enlighten_pv.c:1411:
x86_init.pci.arch_init = pci_xen_init;
Are you going to update all these? Or how this is supposed to work (I
may be missing something)?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists