public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] x86/tdx: Port I/O emulation fixes
@ 2026-03-31 11:24 Kiryl Shutsemau (Meta)
  2026-03-31 11:24 ` [PATCH 1/2] x86/tdx: Fix off-by-one in port I/O handling Kiryl Shutsemau (Meta)
  2026-03-31 11:24 ` [PATCH 2/2] x86/tdx: Fix zero-extension for 32-bit port I/O Kiryl Shutsemau (Meta)
  0 siblings, 2 replies; 8+ messages in thread
From: Kiryl Shutsemau (Meta) @ 2026-03-31 11:24 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86
  Cc: Kiryl Shutsemau, H . Peter Anvin, Rick Edgecombe,
	Kuppuswamy Sathyanarayanan, Borys Tsyrulnikov, linux-kernel,
	linux-coco, kvm, stable

This series addresses two technical inaccuracies in the TDX guest port
I/O emulation code reported by Borys Tsyrulnikov.

The first patch fixes an off-by-one error in the GENMASK() macro usage
where the mask was being calculated as one bit too wide (e.g., 9 bits for
an 8-bit operation).

The second patch ensures that 32-bit port I/O operations (INL) correctly
zero-extend the result to the full 64-bit RAX register, as required by
 the x86 architecture. Currently, the emulation preserves the upper 32
bits of RAX during such operations.

Both issues were introduced in the initial implementation of the runtime
hypercalls for port I/O.

Kiryl Shutsemau (Meta) (2):
  x86/tdx: Fix off-by-one in port I/O handling
  x86/tdx: Fix zero-extension for 32-bit port I/O

 arch/x86/coco/tdx/tdx.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

-- 
2.51.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-04-01  8:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31 11:24 [PATCH 0/2] x86/tdx: Port I/O emulation fixes Kiryl Shutsemau (Meta)
2026-03-31 11:24 ` [PATCH 1/2] x86/tdx: Fix off-by-one in port I/O handling Kiryl Shutsemau (Meta)
2026-03-31 21:57   ` Kuppuswamy Sathyanarayanan
2026-04-01  8:34     ` Kiryl Shutsemau
2026-03-31 22:06   ` Huang, Kai
2026-03-31 11:24 ` [PATCH 2/2] x86/tdx: Fix zero-extension for 32-bit port I/O Kiryl Shutsemau (Meta)
2026-03-31 22:10   ` Kuppuswamy Sathyanarayanan
2026-03-31 22:13   ` Huang, Kai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox