hv: Add bit representation for MSI addr and data

As we enable Interrupt Remapping, bit positions in MSI address and
data registers have a different syntax for programming. This patch adds
bit granularity for MSI address and data structs.

Tracked-On: #2407
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
This commit is contained in:
Sainath Grandhi
2019-01-26 01:31:14 -08:00
committed by wenlingz
parent 6825043078
commit 7d57eb056e
7 changed files with 92 additions and 55 deletions

View File

@@ -907,8 +907,8 @@ static void get_entry_info(const struct ptirq_remapping_info *entry, char *type,
if (is_entry_active(entry)) {
if (entry->intr_type == PTDEV_INTR_MSI) {
(void)strncpy_s(type, 16U, "MSI", 16U);
*dest = (entry->msi.pmsi_addr & 0xFF000U) >> PAGE_SHIFT;
if ((entry->msi.pmsi_data & APIC_TRIGMOD_LEVEL) != 0U) {
*dest = entry->msi.pmsi_addr.bits.dest_field;
if (entry->msi.pmsi_data.bits.trigger_mode == MSI_DATA_TRGRMODE_LEVEL) {
*lvl_tm = true;
} else {
*lvl_tm = false;