Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-21 Thread Sean Christopherson
On Fri, Sep 18, 2020 at 08:34:37AM -0400, Michael S. Tsirkin wrote: > On Fri, Sep 11, 2020 at 10:00:31AM -0700, Sean Christopherson wrote: > > On Mon, Sep 07, 2020 at 07:32:23AM -0400, Michael S. Tsirkin wrote: > > > I suspect microvms will need pci eventually. I would much rather KVM > > > had an

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-18 Thread Michael S. Tsirkin
On Fri, Sep 11, 2020 at 10:00:31AM -0700, Sean Christopherson wrote: > On Mon, Sep 07, 2020 at 07:32:23AM -0400, Michael S. Tsirkin wrote: > > On Mon, Sep 07, 2020 at 10:37:39AM +0200, Vitaly Kuznetsov wrote: > > > Sean Christopherson writes: > > > > > > > On Fri, Sep 04, 2020 at 09:29:05AM +0200

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-18 Thread Gerd Hoffmann
Hi, > > We could probably wire up ecam (arm/virt style) for pcie support, once > > the acpi support for mictovm finally landed (we need acpi for that > > because otherwise the kernel wouldn't find the pcie bus). > > > > Question is whenever there is a good reason to do so. Why would someone >

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-18 Thread Gerd Hoffmann
Hi, > I see a similar ~8k PCI hole reads with a -kernel boot w/ OVMF. All but 60 > of those are from pcibios_fixup_peer_bridges(), and all are from the kernel. pcibios_fixup_peer_bridges() looks at pcibios_last_bus, and that in turn seems to be set according to the mmconfig size (in arch/x86/p

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-11 Thread Sean Christopherson
On Mon, Sep 07, 2020 at 07:32:23AM -0400, Michael S. Tsirkin wrote: > On Mon, Sep 07, 2020 at 10:37:39AM +0200, Vitaly Kuznetsov wrote: > > Sean Christopherson writes: > > > > > On Fri, Sep 04, 2020 at 09:29:05AM +0200, Gerd Hoffmann wrote: > > >> Hi, > > >> > > >> > Unless I'm mistaken, micro

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-07 Thread Michael S. Tsirkin
On Mon, Sep 07, 2020 at 10:37:39AM +0200, Vitaly Kuznetsov wrote: > Sean Christopherson writes: > > > On Fri, Sep 04, 2020 at 09:29:05AM +0200, Gerd Hoffmann wrote: > >> Hi, > >> > >> > Unless I'm mistaken, microvm doesn't even support PCI, does it? > >> > >> Correct, no pci support right now

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-07 Thread Michael S. Tsirkin
On Thu, Sep 03, 2020 at 11:12:12PM -0700, Sean Christopherson wrote: > On Wed, Sep 02, 2020 at 10:59:20AM +0200, Vitaly Kuznetsov wrote: > > Peter Xu writes: > > > My whole point was more about trying to understand the problem behind. > > > Providing a fast path for reading pci holes seems to be r

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-07 Thread Michael S. Tsirkin
On Fri, Sep 04, 2020 at 09:29:05AM +0200, Gerd Hoffmann wrote: > Hi, > > > Unless I'm mistaken, microvm doesn't even support PCI, does it? > > Correct, no pci support right now. > > We could probably wire up ecam (arm/virt style) for pcie support, once > the acpi support for mictovm finally la

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-07 Thread Vitaly Kuznetsov
Sean Christopherson writes: > On Fri, Sep 04, 2020 at 09:29:05AM +0200, Gerd Hoffmann wrote: >> Hi, >> >> > Unless I'm mistaken, microvm doesn't even support PCI, does it? >> >> Correct, no pci support right now. >> >> We could probably wire up ecam (arm/virt style) for pcie support, once >>

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-04 Thread Sean Christopherson
On Fri, Sep 04, 2020 at 09:29:05AM +0200, Gerd Hoffmann wrote: > Hi, > > > Unless I'm mistaken, microvm doesn't even support PCI, does it? > > Correct, no pci support right now. > > We could probably wire up ecam (arm/virt style) for pcie support, once > the acpi support for mictovm finally la

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-04 Thread Gerd Hoffmann
Hi, > Unless I'm mistaken, microvm doesn't even support PCI, does it? Correct, no pci support right now. We could probably wire up ecam (arm/virt style) for pcie support, once the acpi support for mictovm finally landed (we need acpi for that because otherwise the kernel wouldn't find the pcie

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-04 Thread Gerd Hoffmann
Hi, > attached. Though those should be far less than 8000+, and those should also > be > pio rather than mmio. Well, seabios 1.14 (qemu 5.1) added mmio support (to speed up boot a little bit, mmio is one and pio is two vmexits). Depends on q35 obviously, and a few pio accesses remain b/c sea

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-03 Thread Sean Christopherson
On Wed, Sep 02, 2020 at 10:59:20AM +0200, Vitaly Kuznetsov wrote: > Peter Xu writes: > > My whole point was more about trying to understand the problem behind. > > Providing a fast path for reading pci holes seems to be reasonable as is, > > however it's just that I'm confused on why there're so m

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-02 Thread Vitaly Kuznetsov
Peter Xu writes: > On Tue, Sep 01, 2020 at 04:43:25PM +0200, Vitaly Kuznetsov wrote: >> Peter Xu writes: >> >> > On Fri, Aug 07, 2020 at 04:12:29PM +0200, Vitaly Kuznetsov wrote: >> >> When testing Linux kernel boot with QEMU q35 VM and direct kernel boot >> >> I observed 8193 accesses to PCI h

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-01 Thread Peter Xu
On Tue, Sep 01, 2020 at 04:43:25PM +0200, Vitaly Kuznetsov wrote: > Peter Xu writes: > > > On Fri, Aug 07, 2020 at 04:12:29PM +0200, Vitaly Kuznetsov wrote: > >> When testing Linux kernel boot with QEMU q35 VM and direct kernel boot > >> I observed 8193 accesses to PCI hole memory. When such exit

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-09-01 Thread Vitaly Kuznetsov
Peter Xu writes: > On Fri, Aug 07, 2020 at 04:12:29PM +0200, Vitaly Kuznetsov wrote: >> When testing Linux kernel boot with QEMU q35 VM and direct kernel boot >> I observed 8193 accesses to PCI hole memory. When such exit is handled >> in KVM without exiting to userspace, it takes roughly 0.0

Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory

2020-08-25 Thread Peter Xu
On Fri, Aug 07, 2020 at 04:12:29PM +0200, Vitaly Kuznetsov wrote: > When testing Linux kernel boot with QEMU q35 VM and direct kernel boot > I observed 8193 accesses to PCI hole memory. When such exit is handled > in KVM without exiting to userspace, it takes roughly 0.01 sec. > Handling the sa