mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-21 19:02:30 +00:00
pci: msi: Fix MSG_CTL update through 32 bits write
If the MSG_CTL is being written from a 32 bits write access, the offset won't be 0x2, but 0x0 instead. That's simply because 32 bits access have to be aligned on each double word. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
c81e808e98
commit
1379abb94b
@ -132,7 +132,7 @@ impl MsiCap {
|
||||
4 => {
|
||||
let value = LittleEndian::read_u32(data);
|
||||
match offset {
|
||||
MSI_MSG_CTL_OFFSET => {
|
||||
0x0 => {
|
||||
self.msg_ctl = (self.msg_ctl & !(MSI_CTL_ENABLE | MSI_CTL_MULTI_MSG_ENABLE))
|
||||
| ((value >> 16) as u16 & (MSI_CTL_ENABLE | MSI_CTL_MULTI_MSG_ENABLE))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user