FROMGIT: KVM: nVMX: Check IO instruction VM-exit conditions

commit 35a571346a94fb93b5b3b6a599675ef3384bc75c upstream.

Consult the 'unconditional IO exiting' and 'use IO bitmaps' VM-execution
controls when checking instruction interception. If the 'use IO bitmaps'
VM-execution control is 1, check the instruction access against the IO
bitmaps to determine if the instruction causes a VM-exit.

Signed-off-by: Oliver Upton <oupton@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

BUG=chromium:1055746
TEST=Run VM

(cherry picked from commit 0f042f5e98f17671395f584de9de7013056a09f6
 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y)
Signed-off-by: Guenter Roeck <groeck@chromium.org>

Change-Id: I781990ca59d24bc9838ca70c378280d7c027d290
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2134496
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Guenter Roeck <groeck@chromium.org>
Tested-by: Guenter Roeck <groeck@chromium.org>
2 files changed