]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Add check for APIC access address for vmentry of L2 guests
authorKrish Sadhukhan <krish.sadhukhan@oracle.com>
Wed, 11 Apr 2018 05:10:16 +0000 (01:10 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 Apr 2018 16:36:28 +0000 (18:36 +0200)
commit91f62cb25a68a4708c43ad9dedefbe7c7715300d
tree403b6f899fe7f9e2390c96c7ce68d66b983491b1
parentdd9740946d664d40d428ff5ec7b573c5e47a798a
x86: Add check for APIC access address for vmentry of L2 guests

According to the sub-section titled 'VM-Execution Control Fields' in the
section titled 'Basic VM-Entry Checks' in Intel SDM vol. 3C, the following
vmentry check must be enforced:

    If the 'virtualize APIC-accesses' VM-execution control is 1, the
    APIC-access address must satisfy the following checks:

- Bits 11:0 of the address must be 0.
- The address should not set any bits beyond the processor's
  physical-address width.

This patch adds the necessary check to conform to this rule. If the check
fails, we cause the L2 VMENTRY to fail which is what the associated unit
test (following patch) expects.

Reviewed-by: Mihai Carabas <mihai.carabas@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Wanpeng Li <wanpengli@tencent.com>
Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c