[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] VT-d: return full destination ID for IO-APIC reads



commit 24469e6a383e32edfb1000550b4a6dcd6416a994
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Apr 3 10:15:54 2019 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Apr 3 10:15:54 2019 +0200

    VT-d: return full destination ID for IO-APIC reads
    
    In x2APIC mode it is 32 bits wide. Not having returned the full value
    was mostly benign: We never modify the ID based on its original value;
    full new values get written at all times. It was "just" debug logging
    which ended up wrong this way (and which will need adjustment itself as
    well, to also consume the full value).
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx>
---
 xen/drivers/passthrough/vtd/intremap.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/xen/drivers/passthrough/vtd/intremap.c 
b/xen/drivers/passthrough/vtd/intremap.c
index 1d19856091..09f15a51d8 100644
--- a/xen/drivers/passthrough/vtd/intremap.c
+++ b/xen/drivers/passthrough/vtd/intremap.c
@@ -314,8 +314,13 @@ static int remap_entry_to_ioapic_rte(
     old_rte->dest_mode = iremap_entry->remap.dm;
     old_rte->trigger = iremap_entry->remap.tm;
     old_rte->__reserved_2 = 0;
-    old_rte->dest.logical.__reserved_1 = 0;
-    old_rte->dest.logical.logical_dest = iremap_entry->remap.dst >> 8;
+    if ( x2apic_enabled )
+        old_rte->dest.dest32 = iremap_entry->remap.dst;
+    else
+    {
+        old_rte->dest.logical.__reserved_1 = 0;
+        old_rte->dest.logical.logical_dest = iremap_entry->remap.dst >> 8;
+    }
 
     unmap_vtd_domain_page(iremap_entries);
     spin_unlock_irqrestore(&ir_ctrl->iremap_lock, flags);
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.