x86/sev: Fix SEV-ES INS/OUTS instructions for word, dword, and qword
Properly type the operands being passed to __put_user()/__get_user().
Otherwise, these routines truncate data for dependent instructions
(e.g., INSW) and only read/write one byte.
This has been tested by sending a string with REP OUTSW to a port and
then reading it back in with REP INSW on the same port.
Previous behavior was to only send and receive the first char of the
size. For example, word operations for "abcd" would only read/write
"ac". With change, the full string is now written and read back.
Fixes: f980f9c31a923 (x86/sev-es: Compile early handler code into kernel image)
Signed-off-by: Michael Sterritt <email@example.com>
Signed-off-by: Borislav Petkov <firstname.lastname@example.org>
Reviewed-by: Paolo Bonzini <email@example.com>
Reviewed-by: Marc Orr <firstname.lastname@example.org>
Reviewed-by: Peter Gonda <email@example.com>
Reviewed-by: Joerg Roedel <firstname.lastname@example.org>
1 file changed