All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] VT-d: return full destination ID for IO-APIC reads
@ 2019-04-02 12:56 Jan Beulich
  2019-04-02 13:01 ` Andrew Cooper
  2019-04-03  1:02 ` Tian, Kevin
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2019-04-02 12:56 UTC (permalink / raw)
  To: xen-devel; +Cc: Kevin Tian

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@suse.com>

--- 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);



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] VT-d: return full destination ID for IO-APIC reads
  2019-04-02 12:56 [PATCH] VT-d: return full destination ID for IO-APIC reads Jan Beulich
@ 2019-04-02 13:01 ` Andrew Cooper
  2019-04-03  1:02 ` Tian, Kevin
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2019-04-02 13:01 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Kevin Tian

On 02/04/2019 13:56, Jan Beulich wrote:
> 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@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] VT-d: return full destination ID for IO-APIC reads
  2019-04-02 12:56 [PATCH] VT-d: return full destination ID for IO-APIC reads Jan Beulich
  2019-04-02 13:01 ` Andrew Cooper
@ 2019-04-03  1:02 ` Tian, Kevin
  1 sibling, 0 replies; 3+ messages in thread
From: Tian, Kevin @ 2019-04-03  1:02 UTC (permalink / raw)
  To: Jan Beulich, xen-devel

> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: Tuesday, April 2, 2019 8:57 PM
> 
> 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@suse.com>

Acked-by: Kevin Tian <kevin.tian@intel.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-03  1:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-02 12:56 [PATCH] VT-d: return full destination ID for IO-APIC reads Jan Beulich
2019-04-02 13:01 ` Andrew Cooper
2019-04-03  1:02 ` Tian, Kevin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.