Re: [PATCH v4 6/6] KVM: selftests: Add svm_pmu_host_guest_test for Host-Only/Guest-Only bits

From: Jim Mattson

Date: Mon Apr 06 2026 - 23:23:43 EST


On Mon, Apr 6, 2026 at 6:39 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:

> A blurb in the changelog explaining why _this_ test needs to honor alignment
> while we've managed to squeak by without problems in other tests would also be
> helpful

read_counters() induces the compiler to generate a movdqa instruction
referencing L2's stack, so the stack pointer at entry to
l2_guest_code() must not be 16-byte aligned. (Odd 8-byte alignment?)

Presumably, we've squeaked by without problems in other tests, because
no L2 instructions have required 16-byte (or greater) stack alignment.