2023-10-13 23:48:35

by Sean Christopherson

[permalink] [raw]
Subject: [GIT PULL] KVM: x86: PMU fixes for 6.6

Please pull three PMU fixes for 6.6. These aren't super urgent and have all
existed from some time, i.e. don't absolutely need to go into 6.6, but I also
don't see a good reason to hold them back (they're all tagged for stable, so
it's kind of a moot point).

The following changes since commit 5804c19b80bf625c6a9925317f845e497434d6d3:

Merge tag 'kvm-riscv-fixes-6.6-1' of https://github.com/kvm-riscv/linux into HEAD (2023-09-23 05:35:55 -0400)

are available in the Git repository at:

https://github.com/kvm-x86/linux.git tags/kvm-x86-pmu-6.6-fixes

for you to fetch changes up to 73554b29bd70546c1a9efc9c160641ef1b849358:

KVM: x86/pmu: Synthesize at most one PMI per VM-exit (2023-09-25 14:42:52 -0700)

----------------------------------------------------------------
KVM x86/pmu fixes for 6.6:

- Truncate writes to PMU counters to the counter's width to avoid spurious
overflows when emulating counter events in software.

- Set the LVTPC entry mask bit when handling a PMI (to match Intel-defined
architectural behavior).

- Treat KVM_REQ_PMI as a wake event instead of queueing host IRQ work to
kick the guest out of emulated halt.

----------------------------------------------------------------
Jim Mattson (2):
KVM: x86: Mask LVTPC when handling a PMI
KVM: x86/pmu: Synthesize at most one PMI per VM-exit

Roman Kagan (1):
KVM: x86/pmu: Truncate counter value to allowed width on write

arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/lapic.c | 8 ++++++--
arch/x86/kvm/pmu.c | 27 +--------------------------
arch/x86/kvm/pmu.h | 6 ++++++
arch/x86/kvm/svm/pmu.c | 2 +-
arch/x86/kvm/vmx/pmu_intel.c | 4 ++--
arch/x86/kvm/x86.c | 3 +++
7 files changed, 19 insertions(+), 32 deletions(-)


2023-10-13 23:48:57

by Sean Christopherson

[permalink] [raw]
Subject: [GIT PULL] KVM: x86: Selftests fixes for 6.6

Please pull a fix, a cleanup, and a workaround for 6.6. The guest printf change
really should go into 6.6, as it fixes an issue introduced in 6.6 that causes
affected guest asserts to print garbage. The other two changes are much less
urgent, but I couldn't think of a any reason to hold them back.

The following changes since commit 5804c19b80bf625c6a9925317f845e497434d6d3:

Merge tag 'kvm-riscv-fixes-6.6-1' of https://github.com/kvm-riscv/linux into HEAD (2023-09-23 05:35:55 -0400)

are available in the Git repository at:

https://github.com/kvm-x86/linux.git tags/kvm-x86-selftests-6.6-fixes

for you to fetch changes up to 6313e096dbfaf1377ba8f5f8ccd720cc36c576c6:

KVM: selftests: Zero-initialize entire test_result in memslot perf test (2023-10-05 19:23:47 -0700)

----------------------------------------------------------------
KVM selftests fixes for 6.6:

- Play nice with %llx when formatting guest printf and assert statements.

- Clean up stale test metadata.

- Zero-initialize structures in memslot perf test to workaround a suspected
"may be used uninitialized" false positives from GCC.

----------------------------------------------------------------
Like Xu (1):
KVM: selftests: Remove obsolete and incorrect test case metadata

Sean Christopherson (2):
KVM: selftests: Treat %llx like %lx when formatting guest printf
KVM: selftests: Zero-initialize entire test_result in memslot perf test

tools/testing/selftests/kvm/include/ucall_common.h | 2 --
tools/testing/selftests/kvm/lib/guest_sprintf.c | 7 +++++++
tools/testing/selftests/kvm/lib/x86_64/apic.c | 2 --
tools/testing/selftests/kvm/memslot_perf_test.c | 9 +++------
tools/testing/selftests/kvm/x86_64/hyperv_svm_test.c | 2 --
tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.c | 2 --
tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.sh | 1 -
tools/testing/selftests/kvm/x86_64/tsc_scaling_sync.c | 4 ----
tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c | 4 ----
9 files changed, 10 insertions(+), 23 deletions(-)

2023-10-15 12:26:09

by Paolo Bonzini

[permalink] [raw]
Subject: Re: [GIT PULL] KVM: x86: PMU fixes for 6.6

On Sat, Oct 14, 2023 at 1:48 AM Sean Christopherson <[email protected]> wrote:
>
> Please pull three PMU fixes for 6.6. These aren't super urgent and have all
> existed from some time, i.e. don't absolutely need to go into 6.6, but I also
> don't see a good reason to hold them back (they're all tagged for stable, so
> it's kind of a moot point).

Pulled, thanks.

Paolo

> The following changes since commit 5804c19b80bf625c6a9925317f845e497434d6d3:
>
> Merge tag 'kvm-riscv-fixes-6.6-1' of https://github.com/kvm-riscv/linux into HEAD (2023-09-23 05:35:55 -0400)
>
> are available in the Git repository at:
>
> https://github.com/kvm-x86/linux.git tags/kvm-x86-pmu-6.6-fixes
>
> for you to fetch changes up to 73554b29bd70546c1a9efc9c160641ef1b849358:
>
> KVM: x86/pmu: Synthesize at most one PMI per VM-exit (2023-09-25 14:42:52 -0700)
>
> ----------------------------------------------------------------
> KVM x86/pmu fixes for 6.6:
>
> - Truncate writes to PMU counters to the counter's width to avoid spurious
> overflows when emulating counter events in software.
>
> - Set the LVTPC entry mask bit when handling a PMI (to match Intel-defined
> architectural behavior).
>
> - Treat KVM_REQ_PMI as a wake event instead of queueing host IRQ work to
> kick the guest out of emulated halt.
>
> ----------------------------------------------------------------
> Jim Mattson (2):
> KVM: x86: Mask LVTPC when handling a PMI
> KVM: x86/pmu: Synthesize at most one PMI per VM-exit
>
> Roman Kagan (1):
> KVM: x86/pmu: Truncate counter value to allowed width on write
>
> arch/x86/include/asm/kvm_host.h | 1 -
> arch/x86/kvm/lapic.c | 8 ++++++--
> arch/x86/kvm/pmu.c | 27 +--------------------------
> arch/x86/kvm/pmu.h | 6 ++++++
> arch/x86/kvm/svm/pmu.c | 2 +-
> arch/x86/kvm/vmx/pmu_intel.c | 4 ++--
> arch/x86/kvm/x86.c | 3 +++
> 7 files changed, 19 insertions(+), 32 deletions(-)
>

2023-10-15 12:26:53

by Paolo Bonzini

[permalink] [raw]
Subject: Re: [GIT PULL] KVM: x86: Selftests fixes for 6.6

On Sat, Oct 14, 2023 at 1:48 AM Sean Christopherson <[email protected]> wrote:
>
> Please pull a fix, a cleanup, and a workaround for 6.6. The guest printf change
> really should go into 6.6, as it fixes an issue introduced in 6.6 that causes
> affected guest asserts to print garbage. The other two changes are much less
> urgent, but I couldn't think of a any reason to hold them back.

The printf one I had already applied, but the double commit is not a huge issue.

Pulled, thanks.

Paolo

> The following changes since commit 5804c19b80bf625c6a9925317f845e497434d6d3:
>
> Merge tag 'kvm-riscv-fixes-6.6-1' of https://github.com/kvm-riscv/linux into HEAD (2023-09-23 05:35:55 -0400)
>
> are available in the Git repository at:
>
> https://github.com/kvm-x86/linux.git tags/kvm-x86-selftests-6.6-fixes
>
> for you to fetch changes up to 6313e096dbfaf1377ba8f5f8ccd720cc36c576c6:
>
> KVM: selftests: Zero-initialize entire test_result in memslot perf test (2023-10-05 19:23:47 -0700)
>
> ----------------------------------------------------------------
> KVM selftests fixes for 6.6:
>
> - Play nice with %llx when formatting guest printf and assert statements.
>
> - Clean up stale test metadata.
>
> - Zero-initialize structures in memslot perf test to workaround a suspected
> "may be used uninitialized" false positives from GCC.
>
> ----------------------------------------------------------------
> Like Xu (1):
> KVM: selftests: Remove obsolete and incorrect test case metadata
>
> Sean Christopherson (2):
> KVM: selftests: Treat %llx like %lx when formatting guest printf
> KVM: selftests: Zero-initialize entire test_result in memslot perf test
>
> tools/testing/selftests/kvm/include/ucall_common.h | 2 --
> tools/testing/selftests/kvm/lib/guest_sprintf.c | 7 +++++++
> tools/testing/selftests/kvm/lib/x86_64/apic.c | 2 --
> tools/testing/selftests/kvm/memslot_perf_test.c | 9 +++------
> tools/testing/selftests/kvm/x86_64/hyperv_svm_test.c | 2 --
> tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.c | 2 --
> tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.sh | 1 -
> tools/testing/selftests/kvm/x86_64/tsc_scaling_sync.c | 4 ----
> tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c | 4 ----
> 9 files changed, 10 insertions(+), 23 deletions(-)
>