Commit ecb6825f authored by Dmytro Maluka's avatar Dmytro Maluka
Browse files

ANDROID: pkvm: vmx: Don't WARN_ON if pVM executes string IO instruction



Protected VMs are expected to avoid executing string IO instructions
(INS, OUTS etc), since the host cannot emulate them. But if a pVM still
executes such an instruction, it is only an internal problem of that
pVM, not a system-wide problem of the host or pKVM. So don't WARN_ON
in such case.

Moreover, with current implementation of pKVM's exception handlers,
WARN_ON causes pKVM to crash. Obviously it is not ok to allow a buggy
pVM to crash the entire system.

In particular, such pKVM crashes are observed not only when a pVM
intentionally executes a string IO instruction, but also when a pVM
accidentally executes some random code at a wrong address, which happens
to contain bytes with string IO instruction opcodes.

Bug: 391539939
Test: without applying the hotfix aosp/3827166 to the host kernel, run
microdroid or any other pVM with SMP whose kernel was compiled without
the patch aosp/3796083, and check that it the pVM itself crashes or
hangs up but doesn't cause the host to hang up (and can be killed simply
by SIGTERM).
Upstream-Task: 402758258

Fixes: 94cb6d29 ("ANDROID: pkvm: vmx: Handle IO vmexit")
Change-Id: Ic40bd319c908da8372d0940ad1a44e56ea180840
Signed-off-by: default avatarDmytro Maluka <dmaluka@google.com>
parent fba03629
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment