summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorKiryl Shutsemau (Meta) <kas@kernel.org>2026-07-13 14:37:52 +0100
committerDave Hansen <dave.hansen@linux.intel.com>2026-07-13 14:45:07 -0700
commit1fe104b048d77d6cb25bd938e6a67450fb50e61d (patch)
tree26dfc12f7ba7b8c08e96e3866ed819a64e3c932a /tools/perf/scripts/python/task-analyzer.py
parent0f63e656b1c679d32ac595de29d10c03efca6a25 (diff)
x86/insn-eval: Move assign_register() out of KVM as insn_assign_reg()
KVM's instruction emulator has a small helper, assign_register(), that writes a value into a register following the x86 rules for writes to general-purpose registers: an 8- or 16-bit write leaves the rest of the register untouched, a 32-bit write zero-extends the result to 64 bits, and a 64-bit write replaces the whole register. The TDX guest #VE handler needs the same logic for port I/O emulation to get 32-bit zero-extension right. Rather than add a third copy of the same switch, move the helper verbatim to <asm/insn-eval.h>, rename it to insn_assign_reg(), and route KVM's callers through it. Add <asm/insn.h> to the header's includes so it builds standalone in callers that have not pulled it in transitively. No functional change. Signed-off-by: Kiryl Shutsemau (Meta) <kas@kernel.org> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Acked-by: Sean Christopherson <seanjc@google.com> Cc:stable@vger.kernel.org Link: https://patch.msgid.link/20260713133753.223947-3-kirill@shutemov.name
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions