hv: fix issues when msi-x shares same BAR with other data structures

If PBA or other data structures reside in the same BAR with MSI-X,
devicemodel could emulate them and make hypercall SET_MEMORY_REGION
to setup EPT for vm0.

Hypervisor can not intercept the whole range of this BAR, but only
the minimum 4KB pages that cover the MSI-X Table.

Tracked-On: #1568
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Zide Chen
2018-10-31 16:23:56 -07:00
committed by Xie, Nanlin
parent 5cbe079e24
commit 8c398f7d7e
2 changed files with 30 additions and 10 deletions

View File

@@ -77,6 +77,8 @@ struct msix {
uint64_t mmio_gpa;
uint64_t mmio_hva;
uint64_t mmio_size;
uint64_t intercepted_gpa;
uint64_t intercepted_size;
uint32_t capoff;
uint32_t caplen;
uint32_t table_bar;