Message ID | 20230811045127.3308641-1-rananta@google.com (mailing list archive) |
---|---|
Headers | show |
Series | KVM: arm64: Add support for FEAT_TLBIRANGE | expand |
On Fri, Aug 11, 2023, Raghavendra Rao Ananta wrote:
> The series is based off of upstream v6.5-rc1.
Lies! :-)
This is based off one of the kvmarm.git topic branches (I didn't bother to figure
out which one), not v6.5-rc1.
Please try to incorporate git format-patch's "--base" option into your workflow,
e.g. I do "git format-patch --base=HEAD~$nr" where $nr is the number of patches
I am posting.
It's not foolproof, e.g. my approach doesn't help if I have a local patch that
I'm not posting, but 99% of the time it Just Works and eliminates any ambuitity.
You can also do "--base=auto", but that only does the right thing if your series
has its upstream branch set to the base/tree that you want your patches applied
to (I use the upstream branch for a completely different purpose for my dev branches).
On Mon, Aug 14, 2023 at 4:16 PM Sean Christopherson <seanjc@google.com> wrote: > > On Fri, Aug 11, 2023, Raghavendra Rao Ananta wrote: > > The series is based off of upstream v6.5-rc1. > > Lies! :-) > > This is based off one of the kvmarm.git topic branches (I didn't bother to figure > out which one), not v6.5-rc1. > Sorry, what am I missing here? My git log is as follows: $ git log --oneline upstream_tlbi_range_v9 5025857507abe (upstream_tlbi_range_v9) KVM: arm64: Use TLBI range-based instructions for unmap 5c0291b99a8fc KVM: arm64: Invalidate the table entries upon a range 8c46b54d4aaec KVM: arm64: Flush only the memslot after write-protect 231abaeb7ffc2 KVM: arm64: Implement kvm_arch_flush_remote_tlbs_range() 5ec291b863309 KVM: arm64: Define kvm_tlb_flush_vmid_range() 5bcd7a085c34e KVM: arm64: Implement __kvm_tlb_flush_vmid_range() ea08f9dff7e5b arm64: tlb: Implement __flush_s2_tlb_range_op() b3178687947c9 arm64: tlb: Refactor the core flush algorithm of __flush_tlb_range a4850fa988eef KVM: Move kvm_arch_flush_remote_tlbs_memslot() to common code 306dc4e6afd37 KVM: Allow range-based TLB invalidation from common code d02785a0a1e01 KVM: Remove CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL 136fa2d254537 KVM: arm64: Use kvm_arch_flush_remote_tlbs() e35c68a75170d KVM: Declare kvm_arch_flush_remote_tlbs() globally 5d592777b9bba KVM: Rename kvm_arch_flush_remote_tlb() to kvm_arch_flush_remote_tlbs() 06c2afb862f9d (tag: v6.5-rc1, tag: linux/v6.5-rc1) Linux 6.5-rc1 c192ac7357683 MAINTAINERS 2: Electric Boogaloo f71f64210d698 Merge tag 'dma-mapping-6.5-2023-07-09' of git://git.infradead.org/users/hch/dma-mapping ... Isn't the commit, 06c2afb862f9d (06c2afb862f9d (tag: v6.5-rc1, tag: linux/v6.5-rc1) Linux 6.5-rc1) the 'base' commit? Thank you. Raghavendra > Please try to incorporate git format-patch's "--base" option into your workflow, > e.g. I do "git format-patch --base=HEAD~$nr" where $nr is the number of patches > I am posting. > > It's not foolproof, e.g. my approach doesn't help if I have a local patch that > I'm not posting, but 99% of the time it Just Works and eliminates any ambuitity. > > You can also do "--base=auto", but that only does the right thing if your series > has its upstream branch set to the base/tree that you want your patches applied > to (I use the upstream branch for a completely different purpose for my dev branches).
On Mon, Aug 14, 2023, Raghavendra Rao Ananta wrote: > On Mon, Aug 14, 2023 at 4:16 PM Sean Christopherson <seanjc@google.com> wrote: > > > > On Fri, Aug 11, 2023, Raghavendra Rao Ananta wrote: > > > The series is based off of upstream v6.5-rc1. > > > > Lies! :-) > > > > This is based off one of the kvmarm.git topic branches (I didn't bother to figure > > out which one), not v6.5-rc1. > > > Sorry, what am I missing here? My git log is as follows: Hmm, not sure what's going on. Maybe I misinterpreted why `git am` was failing? I assumed it was because there were objects in kvmarm that I didn't have locally, and fetching kvmarm allowed am to complete, though with 3-way merges, which IIUC shouldn't have been necessary if I was using the exact same base. Or maybe I messed up and didn't actually reset to 6.5-rc1. > $ git log --oneline upstream_tlbi_range_v9 > 5025857507abe (upstream_tlbi_range_v9) KVM: arm64: Use TLBI > range-based instructions for unmap > 5c0291b99a8fc KVM: arm64: Invalidate the table entries upon a range > 8c46b54d4aaec KVM: arm64: Flush only the memslot after write-protect > 231abaeb7ffc2 KVM: arm64: Implement kvm_arch_flush_remote_tlbs_range() > 5ec291b863309 KVM: arm64: Define kvm_tlb_flush_vmid_range() > 5bcd7a085c34e KVM: arm64: Implement __kvm_tlb_flush_vmid_range() > ea08f9dff7e5b arm64: tlb: Implement __flush_s2_tlb_range_op() > b3178687947c9 arm64: tlb: Refactor the core flush algorithm of __flush_tlb_range > a4850fa988eef KVM: Move kvm_arch_flush_remote_tlbs_memslot() to common code > 306dc4e6afd37 KVM: Allow range-based TLB invalidation from common code > d02785a0a1e01 KVM: Remove CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL > 136fa2d254537 KVM: arm64: Use kvm_arch_flush_remote_tlbs() > e35c68a75170d KVM: Declare kvm_arch_flush_remote_tlbs() globally > 5d592777b9bba KVM: Rename kvm_arch_flush_remote_tlb() to > kvm_arch_flush_remote_tlbs() > 06c2afb862f9d (tag: v6.5-rc1, tag: linux/v6.5-rc1) Linux 6.5-rc1 > c192ac7357683 MAINTAINERS 2: Electric Boogaloo > f71f64210d698 Merge tag 'dma-mapping-6.5-2023-07-09' of > git://git.infradead.org/users/hch/dma-mapping > ... > > Isn't the commit, 06c2afb862f9d (06c2afb862f9d (tag: v6.5-rc1, tag: > linux/v6.5-rc1) Linux 6.5-rc1) the 'base' commit? Ya, should be. Either way, even if this is PEBKAC on my end, using --base would be nice, e.g. then you can definitely say it's my fault ;-) > > Please try to incorporate git format-patch's "--base" option into your workflow, > > e.g. I do "git format-patch --base=HEAD~$nr" where $nr is the number of patches > > I am posting. > > > > It's not foolproof, e.g. my approach doesn't help if I have a local patch that > > I'm not posting, but 99% of the time it Just Works and eliminates any ambuitity. > > > > You can also do "--base=auto", but that only does the right thing if your series > > has its upstream branch set to the base/tree that you want your patches applied > > to (I use the upstream branch for a completely different purpose for my dev branches).
On Mon, Aug 14, 2023 at 5:52 PM Sean Christopherson <seanjc@google.com> wrote: > > On Mon, Aug 14, 2023, Raghavendra Rao Ananta wrote: > > On Mon, Aug 14, 2023 at 4:16 PM Sean Christopherson <seanjc@google.com> wrote: > > > > > > On Fri, Aug 11, 2023, Raghavendra Rao Ananta wrote: > > > > The series is based off of upstream v6.5-rc1. > > > > > > Lies! :-) > > > > > > This is based off one of the kvmarm.git topic branches (I didn't bother to figure > > > out which one), not v6.5-rc1. > > > > > Sorry, what am I missing here? My git log is as follows: > > Hmm, not sure what's going on. Maybe I misinterpreted why `git am` was failing? > I assumed it was because there were objects in kvmarm that I didn't have locally, > and fetching kvmarm allowed am to complete, though with 3-way merges, which IIUC > shouldn't have been necessary if I was using the exact same base. Or maybe I > messed up and didn't actually reset to 6.5-rc1. > > > $ git log --oneline upstream_tlbi_range_v9 > > 5025857507abe (upstream_tlbi_range_v9) KVM: arm64: Use TLBI > > range-based instructions for unmap > > 5c0291b99a8fc KVM: arm64: Invalidate the table entries upon a range > > 8c46b54d4aaec KVM: arm64: Flush only the memslot after write-protect > > 231abaeb7ffc2 KVM: arm64: Implement kvm_arch_flush_remote_tlbs_range() > > 5ec291b863309 KVM: arm64: Define kvm_tlb_flush_vmid_range() > > 5bcd7a085c34e KVM: arm64: Implement __kvm_tlb_flush_vmid_range() > > ea08f9dff7e5b arm64: tlb: Implement __flush_s2_tlb_range_op() > > b3178687947c9 arm64: tlb: Refactor the core flush algorithm of __flush_tlb_range > > a4850fa988eef KVM: Move kvm_arch_flush_remote_tlbs_memslot() to common code > > 306dc4e6afd37 KVM: Allow range-based TLB invalidation from common code > > d02785a0a1e01 KVM: Remove CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL > > 136fa2d254537 KVM: arm64: Use kvm_arch_flush_remote_tlbs() > > e35c68a75170d KVM: Declare kvm_arch_flush_remote_tlbs() globally > > 5d592777b9bba KVM: Rename kvm_arch_flush_remote_tlb() to > > kvm_arch_flush_remote_tlbs() > > 06c2afb862f9d (tag: v6.5-rc1, tag: linux/v6.5-rc1) Linux 6.5-rc1 > > c192ac7357683 MAINTAINERS 2: Electric Boogaloo > > f71f64210d698 Merge tag 'dma-mapping-6.5-2023-07-09' of > > git://git.infradead.org/users/hch/dma-mapping > > ... > > > > Isn't the commit, 06c2afb862f9d (06c2afb862f9d (tag: v6.5-rc1, tag: > > linux/v6.5-rc1) Linux 6.5-rc1) the 'base' commit? > > Ya, should be. > > Either way, even if this is PEBKAC on my end, using --base would be nice, e.g. > then you can definitely say it's my fault ;-) > I'll consider this, and thanks for the confirmation. - Raghavendra > > > Please try to incorporate git format-patch's "--base" option into your workflow, > > > e.g. I do "git format-patch --base=HEAD~$nr" where $nr is the number of patches > > > I am posting. > > > > > > It's not foolproof, e.g. my approach doesn't help if I have a local patch that > > > I'm not posting, but 99% of the time it Just Works and eliminates any ambuitity. > > > > > > You can also do "--base=auto", but that only does the right thing if your series > > > has its upstream branch set to the base/tree that you want your patches applied > > > to (I use the upstream branch for a completely different purpose for my dev branches).
On Tue, Aug 15, 2023, Raghavendra Rao Ananta wrote: > On Mon, Aug 14, 2023 at 5:52 PM Sean Christopherson <seanjc@google.com> wrote: > > > > On Mon, Aug 14, 2023, Raghavendra Rao Ananta wrote: > > > On Mon, Aug 14, 2023 at 4:16 PM Sean Christopherson <seanjc@google.com> wrote: > > > > > > > > On Fri, Aug 11, 2023, Raghavendra Rao Ananta wrote: > > > > > The series is based off of upstream v6.5-rc1. > > > > > > > > Lies! :-) > > > > > > > > This is based off one of the kvmarm.git topic branches (I didn't bother to figure > > > > out which one), not v6.5-rc1. > > > > > > > Sorry, what am I missing here? My git log is as follows: > > > > Hmm, not sure what's going on. Maybe I misinterpreted why `git am` was failing? > > I assumed it was because there were objects in kvmarm that I didn't have locally, > > and fetching kvmarm allowed am to complete, though with 3-way merges, which IIUC > > shouldn't have been necessary if I was using the exact same base. Or maybe I > > messed up and didn't actually reset to 6.5-rc1. > > > > > $ git log --oneline upstream_tlbi_range_v9 > > > 5025857507abe (upstream_tlbi_range_v9) KVM: arm64: Use TLBI > > > range-based instructions for unmap > > > 5c0291b99a8fc KVM: arm64: Invalidate the table entries upon a range > > > 8c46b54d4aaec KVM: arm64: Flush only the memslot after write-protect > > > 231abaeb7ffc2 KVM: arm64: Implement kvm_arch_flush_remote_tlbs_range() > > > 5ec291b863309 KVM: arm64: Define kvm_tlb_flush_vmid_range() > > > 5bcd7a085c34e KVM: arm64: Implement __kvm_tlb_flush_vmid_range() > > > ea08f9dff7e5b arm64: tlb: Implement __flush_s2_tlb_range_op() > > > b3178687947c9 arm64: tlb: Refactor the core flush algorithm of __flush_tlb_range > > > a4850fa988eef KVM: Move kvm_arch_flush_remote_tlbs_memslot() to common code > > > 306dc4e6afd37 KVM: Allow range-based TLB invalidation from common code > > > d02785a0a1e01 KVM: Remove CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL > > > 136fa2d254537 KVM: arm64: Use kvm_arch_flush_remote_tlbs() > > > e35c68a75170d KVM: Declare kvm_arch_flush_remote_tlbs() globally > > > 5d592777b9bba KVM: Rename kvm_arch_flush_remote_tlb() to > > > kvm_arch_flush_remote_tlbs() > > > 06c2afb862f9d (tag: v6.5-rc1, tag: linux/v6.5-rc1) Linux 6.5-rc1 > > > c192ac7357683 MAINTAINERS 2: Electric Boogaloo > > > f71f64210d698 Merge tag 'dma-mapping-6.5-2023-07-09' of > > > git://git.infradead.org/users/hch/dma-mapping > > > ... > > > > > > Isn't the commit, 06c2afb862f9d (06c2afb862f9d (tag: v6.5-rc1, tag: > > > linux/v6.5-rc1) Linux 6.5-rc1) the 'base' commit? > > > > Ya, should be. > > > > Either way, even if this is PEBKAC on my end, using --base would be nice, e.g. > > then you can definitely say it's my fault ;-) > > > I'll consider this, and thanks for the confirmation. Confirmed PEBKAC, I reset to v6.5-rc2, not rc1. My apologies, and thanks for being gentle.
On Fri, 11 Aug 2023 04:51:13 +0000, Raghavendra Rao Ananta wrote: > In certain code paths, KVM/ARM currently invalidates the entire VM's > page-tables instead of just invalidating a necessary range. For example, > when collapsing a table PTE to a block PTE, instead of iterating over > each PTE and flushing them, KVM uses 'vmalls12e1is' TLBI operation to > flush all the entries. This is inefficient since the guest would have > to refill the TLBs again, even for the addresses that aren't covered > by the table entry. The performance impact would scale poorly if many > addresses in the VM is going through this remapping. > > [...] Applied to next, thanks! [01/14] KVM: Rename kvm_arch_flush_remote_tlb() to kvm_arch_flush_remote_tlbs() commit: a1342c8027288e345cc5fd16c6800f9d4eb788ed [02/14] KVM: Declare kvm_arch_flush_remote_tlbs() globally commit: cfb0c08e80120928dda1e951718be135abd49bae [03/14] KVM: arm64: Use kvm_arch_flush_remote_tlbs() commit: 32121c813818a87ba7565b3afce93a9cc3610a22 [04/14] KVM: Remove CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL commit: eddd21481011008792f4e647a5244f6e15970abc [05/14] KVM: Allow range-based TLB invalidation from common code commit: d4788996051e3c07fadc6d9b214073fcf78810a8 [06/14] KVM: Move kvm_arch_flush_remote_tlbs_memslot() to common code commit: 619b5072443c05cf18c31b2c0320cdb42396d411 [07/14] arm64: tlb: Refactor the core flush algorithm of __flush_tlb_range commit: 360839027a6e4c022e8cbaa373dd747185f1e0a5 [08/14] arm64: tlb: Implement __flush_s2_tlb_range_op() commit: 4d73a9c13aaa78b149ac04b02f0ee7973f233bfa [09/14] KVM: arm64: Implement __kvm_tlb_flush_vmid_range() commit: 6354d15052ec88273c24beae4c99e31c3d3889b6 [10/14] KVM: arm64: Define kvm_tlb_flush_vmid_range() commit: 117940aa6e5f8308f1529e1313660980f1dae771 [11/14] KVM: arm64: Implement kvm_arch_flush_remote_tlbs_range() commit: c42b6f0b1cde4dd19e6b5dd052e67b87cc331b01 [12/14] KVM: arm64: Flush only the memslot after write-protect commit: 3756b6f2bb3a242fef0867b39a23607f5aeca138 [13/14] KVM: arm64: Invalidate the table entries upon a range commit: defc8cc7abf0fcee8d73e440ee02827348d060e0 [14/14] KVM: arm64: Use TLBI range-based instructions for unmap commit: 7657ea920c54218f123ddc1b572821695b669c13 Cheers, M.