]> git.baikalelectronics.ru Git - kernel.git/commit
x86/sev-es: Fix SEV-ES OUT/IN immediate opcode vc handling
authorPeter Gonda <pgonda@google.com>
Tue, 5 Jan 2021 16:33:11 +0000 (08:33 -0800)
committerBorislav Petkov <bp@suse.de>
Tue, 5 Jan 2021 17:55:00 +0000 (18:55 +0100)
commiteac108fbe1b71a0786a50634a09fe8df2c297d19
tree27736d459831e12c6fb5f39a59884b87c29cb247
parent647571be33665d9e3793a6f18da8f11ed18f764d
x86/sev-es: Fix SEV-ES OUT/IN immediate opcode vc handling

The IN and OUT instructions with port address as an immediate operand
only use an 8-bit immediate (imm8). The current VC handler uses the
entire 32-bit immediate value but these instructions only set the first
bytes.

Cast the operand to an u8 for that.

 [ bp: Massage commit message. ]

Fixes: 73e18b4841f59 ("x86/sev-es: Add support for handling IOIO exceptions")
Signed-off-by: Peter Gonda <pgonda@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: David Rientjes <rientjes@google.com>
Link: https://lkml.kernel.org/r/20210105163311.221490-1-pgonda@google.com
arch/x86/kernel/sev-es-shared.c