ACRN: DM: Fix the MSI mask and unmask bugs.

The patch fix many bugs about the pci msi capabilities.
 1. Fix the clear msi mask bit issues.
 2. Initialize the offset of pci capabilities this variable will used as
 the output of pci_emul_find_capability function.
 3. Replace 16-read with 32-read because both mask and pending are 32bit.
 4. Add mask and pending element in msicap struct and intialize the struct
 value to zero, because we need r/w mask and pending value.

Tracked-On: #7762
Signed-off-by: Liu Long <long.liu@linux.intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
Liu Long
2022-06-08 09:51:02 +08:00
committed by acrnsi-robot
parent 038335367d
commit bd8c0de62b
2 changed files with 10 additions and 8 deletions

View File

@@ -200,8 +200,11 @@ struct msicap {
uint32_t addrlo;
uint32_t addrhi;
uint16_t msgdata;
uint16_t reserve;
uint32_t maskbit;
uint32_t pendbit;
} __attribute__((packed));
static_assert(sizeof(struct msicap) == 14, "compile-time assertion failed");
static_assert(sizeof(struct msicap) == 24, "compile-time assertion failed");
struct msixcap {
uint8_t capid;