From: Jan Beulich Date: Thu, 4 Oct 2012 07:28:25 +0000 (+0200) Subject: VT-d: make remap_entry_to_msi_msg() return consistent message X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~7821 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fb0c65ba0dc5fcf7582aef335565de3ae5771fda;p=xen.git VT-d: make remap_entry_to_msi_msg() return consistent message During debugging of another problem I found that in x2APIC mode, the destination field of the low address value wasn't passed back correctly. While this is benign in most cases (as the value isn't being used anywhere), it can be confusing (and misguiding) when printing the value read or when comparing it to the one previously passed into the inverse function. Signed-off-by: Jan Beulich Acked-by: Keir Fraser --- diff --git a/xen/drivers/passthrough/vtd/intremap.c b/xen/drivers/passthrough/vtd/intremap.c index 5b6066995d..5f3531ac00 100644 --- a/xen/drivers/passthrough/vtd/intremap.c +++ b/xen/drivers/passthrough/vtd/intremap.c @@ -521,8 +521,8 @@ static int remap_entry_to_msi_msg( if ( x2apic_enabled ) msg->dest32 = iremap_entry->lo.dst; else - msg->address_lo |= - ((iremap_entry->lo.dst >> 8) & 0xff ) << MSI_ADDR_DEST_ID_SHIFT; + msg->dest32 = (iremap_entry->lo.dst >> 8) & 0xff; + msg->address_lo |= (msg->dest32 & 0xff) << MSI_ADDR_DEST_ID_SHIFT; msg->data = MSI_DATA_TRIGGER_EDGE |