From 9c6e7c4a4b8abf360bcc9d6c69405e9ed2842ee3 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 17 Feb 2022 10:07:49 +0000 Subject: [PATCH] pci: Support DWORD/4-byte writes to the MSI-X control register The PCI spec does not specify that the access has to be of a specific size. Fixes: #3714 Signed-off-by: Rob Bradford --- pci/src/configuration.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pci/src/configuration.rs b/pci/src/configuration.rs index a8ce1da7b..9922a3780 100644 --- a/pci/src/configuration.rs +++ b/pci/src/configuration.rs @@ -742,6 +742,11 @@ impl PciConfiguration { .lock() .unwrap() .set_msg_ctl(LittleEndian::read_u16(data)); + } else if msix_cap_reg_idx == reg_idx && offset == 0 && data.len() == 4 { + msix_config + .lock() + .unwrap() + .set_msg_ctl((LittleEndian::read_u32(data) >> 16) as u16); } } }