hv: properly initialize MSI-X table

Though guests are not supposed to read Message Data/Addr, it's still better
off to initialize them to 0.

vector_control should be initialize to zero besides the mask bit.

Tracked-On: #1568
Signed-off-by: Zide Chen <zide.chen@intel.com>
Reviewed-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
Zide Chen 2018-11-19 15:55:21 -08:00 committed by lijinxia
parent 53971e1974
commit c41c0dab08
1 changed files with 3 additions and 1 deletions

View File

@ -350,7 +350,9 @@ static int vmsix_init(struct pci_vdev *vdev)
/* Mask all table entries */ /* Mask all table entries */
for (i = 0U; i < msix->table_count; i++) { for (i = 0U; i < msix->table_count; i++) {
msix->tables[i].vector_control |= PCIM_MSIX_VCTRL_MASK; msix->tables[i].vector_control = PCIM_MSIX_VCTRL_MASK;
msix->tables[i].addr = 0U;
msix->tables[i].data = 0U;
} }
decode_msix_table_bar(vdev); decode_msix_table_bar(vdev);