[PATCH] KVM: x86: Use MMCONFIG for all PCI config space accesses

2020-07-30 Thread Julia Suvorova
g space below 256 bytes"). That is why a special feature flag is needed. Introduce KVM_FEATURE_PCI_GO_MMCONFIG, which can be enabled when the configuration is known to be safe (e.g. in QEMU). Signed-off-by: Julia Suvorova --- Documentation/virt/kvm/cpuid.rst | 4 arch/x86/incl

Re: [PATCH] KVM: x86: Use MMCONFIG for all PCI config space accesses

2020-07-31 Thread Julia Suvorova
On Fri, Jul 31, 2020 at 11:22 AM Vitaly Kuznetsov wrote: > > Andy Shevchenko writes: > > > On Thu, Jul 30, 2020 at 10:37 PM Julia Suvorova wrote: > >> > >> Using MMCONFIG instead of I/O ports cuts the number of config space > >> accesses in half, whi

Re: [PATCH] x86/PCI: Use MMCONFIG by default for KVM guests

2020-07-26 Thread Julia Suvorova
On Wed, Jul 22, 2020 at 11:43 AM Vitaly Kuznetsov wrote: > > Julia Suvorova 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

Re: [PATCH] x86/PCI: Use MMCONFIG by default for KVM guests

2020-07-26 Thread Julia Suvorova
On Thu, Jul 23, 2020 at 1:19 AM Bjorn Helgaas wrote: > > On Wed, Jul 22, 2020 at 02:15:13AM +0200, Julia Suvorova wrote: > > 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 > &

[PATCH] x86/PCI: Use MMCONFIG by default for KVM guests

2020-07-21 Thread Julia Suvorova
raw_pci_ops for 64-bit KVM guests making MMCONFIG the default access method. [1] https://lkml.org/lkml/2020/5/14/936 Signed-off-by: Julia Suvorova --- arch/x86/pci/direct.c | 5 + arch/x86/pci/mmconfig_64.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/arch/x86/pci/direct.c b/arch