Message ID | 20241120135842.79625-1-pbonzini@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [GIT,PULL] First batch of KVM changes for Linux 6.13 merge window | expand |
Hi Paolo,
On Wed, Nov 20, 2024 at 08:58:42AM -0500, Paolo Bonzini wrote:
> riscv: perf: add guest vs host distinction
When merging this PR into linus-next, I've started seeing build errors:
In file included from /builds/linux/arch/riscv/kernel/asm-offsets.c:12:
In file included from /builds/linux/arch/riscv/include/asm/kvm_host.h:23:
In file included from /builds/linux/arch/riscv/include/asm/kvm_vcpu_pmu.h:12:
In file included from /builds/linux/include/linux/perf/riscv_pmu.h:12:
/builds/linux/include/linux/perf_event.h:1679:64: error: too many arguments provided to function-like macro invocation
1679 | extern unsigned long perf_misc_flags(struct perf_event *event, struct pt_regs *regs);
| ^
/builds/linux/arch/riscv/include/asm/perf_event.h:15:9: note: macro 'perf_misc_flags' defined here
15 | #define perf_misc_flags(regs) perf_misc_flags(regs)
| ^
Looks like this is due to 2c47e7a74f44 ("perf/core: Correct perf
sampling with guest VMs") which went in couple of days ago through
Ingo's perf tree and changed the number of parameters for
perf_misc_flags().
On Thu, Nov 21, 2024 at 07:56:23AM -0500, Sasha Levin wrote: > Hi Paolo, > > On Wed, Nov 20, 2024 at 08:58:42AM -0500, Paolo Bonzini wrote: > > riscv: perf: add guest vs host distinction > > When merging this PR into linus-next, I've started seeing build errors: > > In file included from /builds/linux/arch/riscv/kernel/asm-offsets.c:12: > In file included from /builds/linux/arch/riscv/include/asm/kvm_host.h:23: > In file included from /builds/linux/arch/riscv/include/asm/kvm_vcpu_pmu.h:12: > In file included from /builds/linux/include/linux/perf/riscv_pmu.h:12: > /builds/linux/include/linux/perf_event.h:1679:64: error: too many arguments provided to function-like macro invocation > 1679 | extern unsigned long perf_misc_flags(struct perf_event *event, struct pt_regs *regs); > | ^ > /builds/linux/arch/riscv/include/asm/perf_event.h:15:9: note: macro 'perf_misc_flags' defined here > 15 | #define perf_misc_flags(regs) perf_misc_flags(regs) > | ^ > > Looks like this is due to 2c47e7a74f44 ("perf/core: Correct perf > sampling with guest VMs") which went in couple of days ago through > Ingo's perf tree and changed the number of parameters for > perf_misc_flags(). There is a patch out to fix this but it seems like it needs to be applied during this merge? https://lore.kernel.org/20241116160506.5324-1-prabhakar.mahadev-lad.rj@bp.renesas.com/ https://lore.kernel.org/ZzxDvLKGz1ouWzgX@gmail.com/ Cheers, Nathan
On 11/21/24 14:26, Nathan Chancellor wrote: > On Thu, Nov 21, 2024 at 07:56:23AM -0500, Sasha Levin wrote: >> Hi Paolo, >> >> On Wed, Nov 20, 2024 at 08:58:42AM -0500, Paolo Bonzini wrote: >>> riscv: perf: add guest vs host distinction >> >> When merging this PR into linus-next, I've started seeing build errors: >> >> Looks like this is due to 2c47e7a74f44 ("perf/core: Correct perf >> sampling with guest VMs") which went in couple of days ago through >> Ingo's perf tree and changed the number of parameters for >> perf_misc_flags(). Thanks Sasha. :( Looks like Stephen does not build for risc-v. > There is a patch out to fix this but it seems like it needs to be > applied during this merge? > > https://lore.kernel.org/20241116160506.5324-1-prabhakar.mahadev-lad.rj@bp.renesas.com/ Yes, this works. To test it after the merge I did it. curl https://lore.kernel.org/linux-riscv/20241116160506.5324-1-prabhakar.mahadev-lad.rj@bp.renesas.com/raw | patch -p1 git add -p git commit --amend This should have been handled with a topic branch, and there is another nontrivial conflict with Catalin's tree that should have been handled with a topic branch. (I knew about that one, but his topic branch also had a conflict with something else; so I un-pulled it and then forgot about it). Linus, if you prefer to get a reviewed pull request with the topic branches included, then the changes since commit 2c47e7a74f445426d156278e339b7abb259e50de: perf/core: Correct perf sampling with guest VMs (2024-11-14 10:40:01 +0100) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus-with-topic-branches-6.13 for you to fetch changes up to bde387a8d81735a93c115ee4f1bd99718e5d30b0: Merge branch 'for-next/mte' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux into HEAD (2024-11-21 08:53:23 -0500) Alternatively, the best way to get the RISC-V fix is the curl invocation above, and after my signature is the conflict resolution for Catalin's tree. Thanks, Paolo diff --cc arch/arm64/kvm/guest.c index 4cd7ffa76794,e738a353b20e..12dad841f2a5 --- a/arch/arm64/kvm/guest.c +++ b/arch/arm64/kvm/guest.c @@@ -1051,11 -1051,13 +1051,12 @@@ int kvm_vm_ioctl_mte_copy_tags(struct k } while (length > 0) { - kvm_pfn_t pfn = gfn_to_pfn_prot(kvm, gfn, write, NULL); + struct page *page = __gfn_to_page(kvm, gfn, write); void *maddr; unsigned long num_tags; - struct page *page; + struct folio *folio; - if (is_error_noslot_pfn(pfn)) { + if (!page) { ret = -EFAULT; goto out; } @@@ -1090,8 -1099,12 +1097,12 @@@ /* uaccess failed, don't leave stale tags */ if (num_tags != MTE_GRANULES_PER_PAGE) mte_clear_page_tags(maddr); - set_page_mte_tagged(page); + if (folio_test_hugetlb(folio)) + folio_set_hugetlb_mte_tagged(folio); + else + set_page_mte_tagged(page); + - kvm_release_pfn_dirty(pfn); + kvm_release_page_dirty(page); } if (num_tags != MTE_GRANULES_PER_PAGE) {
On Thu, Nov 21, 2024 at 03:07:03PM +0100, Paolo Bonzini wrote: >On 11/21/24 14:26, Nathan Chancellor wrote: >>On Thu, Nov 21, 2024 at 07:56:23AM -0500, Sasha Levin wrote: >>>Hi Paolo, >>> >>>On Wed, Nov 20, 2024 at 08:58:42AM -0500, Paolo Bonzini wrote: >>>> riscv: perf: add guest vs host distinction >>> >>>When merging this PR into linus-next, I've started seeing build errors: >>> >>>Looks like this is due to 2c47e7a74f44 ("perf/core: Correct perf >>>sampling with guest VMs") which went in couple of days ago through >>>Ingo's perf tree and changed the number of parameters for >>>perf_misc_flags(). > >Thanks Sasha. :( Looks like Stephen does not build for risc-v. He does :) This issue was reported[1] about a week ago in linux-next and a fix was sent out (the one you linked to be used for conflict resolution), but it looks like it wasn't picked up by either the perf tree or the KVM tree. [1] https://lore.kernel.org/all/CA+G9fYv=qPeZKkF+ntWxUXbAKjz4gXnBM8y60C4F=YHv+jgZZw@mail.gmail.com/
On 11/21/24 15:34, Sasha Levin wrote: > On Thu, Nov 21, 2024 at 03:07:03PM +0100, Paolo Bonzini wrote: >> On 11/21/24 14:26, Nathan Chancellor wrote: >>> On Thu, Nov 21, 2024 at 07:56:23AM -0500, Sasha Levin wrote: >>>> Hi Paolo, >>>> >>>> On Wed, Nov 20, 2024 at 08:58:42AM -0500, Paolo Bonzini wrote: >>>>> riscv: perf: add guest vs host distinction >>>> >>>> When merging this PR into linus-next, I've started seeing build errors: >>>> >>>> Looks like this is due to 2c47e7a74f44 ("perf/core: Correct perf >>>> sampling with guest VMs") which went in couple of days ago through >>>> Ingo's perf tree and changed the number of parameters for >>>> perf_misc_flags(). >> >> Thanks Sasha. :( Looks like Stephen does not build for risc-v. > > He does :) > > This issue was reported[1] about a week ago in linux-next Yeah, that's Linaro not Stephen. > and a fix was > sent out (the one you linked to be used for conflict resolution), but it > looks like it wasn't picked up by either the perf tree or the KVM tree. Yeah, that's not surprising. :( Neither KVM nor I weren't CC'd on either the report or the bugfix; and the perf tree didn't have the code at all as Ingo pointed out (https://lore.kernel.org/all/ZzxDvLKGz1ouWzgX@gmail.com/). Anup was CC'd on the bugfix but he must have missed too and didn't notify me. Paolo
On Thu, Nov 21, 2024 at 11:49 PM Paolo Bonzini <pbonzini@redhat.com> wrote: > > On 11/21/24 15:34, Sasha Levin wrote: > > On Thu, Nov 21, 2024 at 03:07:03PM +0100, Paolo Bonzini wrote: > >> On 11/21/24 14:26, Nathan Chancellor wrote: > >>> On Thu, Nov 21, 2024 at 07:56:23AM -0500, Sasha Levin wrote: > >>>> Hi Paolo, > >>>> > >>>> On Wed, Nov 20, 2024 at 08:58:42AM -0500, Paolo Bonzini wrote: > >>>>> riscv: perf: add guest vs host distinction > >>>> > >>>> When merging this PR into linus-next, I've started seeing build errors: > >>>> > >>>> Looks like this is due to 2c47e7a74f44 ("perf/core: Correct perf > >>>> sampling with guest VMs") which went in couple of days ago through > >>>> Ingo's perf tree and changed the number of parameters for > >>>> perf_misc_flags(). > >> > >> Thanks Sasha. :( Looks like Stephen does not build for risc-v. > > > > He does :) > > > > This issue was reported[1] about a week ago in linux-next > > Yeah, that's Linaro not Stephen. > > > and a fix was > > sent out (the one you linked to be used for conflict resolution), but it > > looks like it wasn't picked up by either the perf tree or the KVM tree. > > Yeah, that's not surprising. :( Neither KVM nor I weren't CC'd on > either the report or the bugfix; and the perf tree didn't have the code > at all as Ingo pointed out > (https://lore.kernel.org/all/ZzxDvLKGz1ouWzgX@gmail.com/). Anup was > CC'd on the bugfix but he must have missed too and didn't notify me. > Sorry, I totally missed this one. I generally rely on linux-next to report cross-tree conflicts or issues but this one was somehow not reported. Let me know if you need any action from my side. Regards, Anup
The pull request you sent on Wed, 20 Nov 2024 08:58:42 -0500:
> https://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/9f16d5e6f220661f73b36a4be1b21575651d8833
Thank you!