Skip to contentSkip to conversation

Concern about AMD IOMMU HPET msi remapping

DISCUSSION Andrew Cooper 2 participants 2 messages Nov 19, 2012

lore
Share & tools
lore
#0 lore raw

Hello,

In the committed patch
http://xenbits.xen.org/hg/staging/xen-unstable.hg/rev/9025a10c0561

The bdf parameter to update_intremap_entry_from_msi_msg() is declared as u8. The single caller of this function passes bdf as an int (which is only ever filled with a u16), while the this function passes bdf to get_{dma,intremap}_requestor_id(), which expect u16's

Is there not a truncation issue by doing this, or am I missing something?

Signature · 2 lines
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com
#1 lore raw
Quoted 6 lines
Quoted 1 line
Quoted 1 line · Andrew Cooper

Hello,

In the committed patch
http://xenbits.xen.org/hg/staging/xen-unstable.hg/rev/9025a10c0561

Quoted 6 lines

The bdf parameter to update_intremap_entry_from_msi_msg() is declared as u8. The single caller of this function passes bdf as an int (which is only ever filled with a u16), while the this function passes bdf to get_{dma,intremap}_requestor_id(), which expect u16's

Is there not a truncation issue by doing this, or am I missing something?

Oh, indeed - thanks for spotting. Will fix this right away.

Jan