xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] intel_iommu: allow updating FEADDR and FEUADDR with one 64bit write
@ 2018-01-24 14:18 Marek Marczykowski-Górecki
  2018-02-16 21:23 ` Marek Marczykowski-Górecki
  2018-02-22  9:44 ` Roger Pau Monné
  0 siblings, 2 replies; 3+ messages in thread
From: Marek Marczykowski-Górecki @ 2018-01-24 14:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: xen-devel, Marek Marczykowski-Górecki

Allow updating those two adjacent 32bit fields with one 64bit write.
This fixes qemu crash when booting Xen inside.

See discussion on Xen side of the thing here:
http://xen.markmail.org/message/6mrmemrnmhxvaxba

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
 hw/i386/intel_iommu.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 2e841cde27..d214dce277 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -2129,8 +2129,12 @@ static void vtd_mem_write(void *opaque, hwaddr addr,
 
     /* Fault Event Address Register, 32-bit */
     case DMAR_FEADDR_REG:
-        assert(size == 4);
-        vtd_set_long(s, addr, val);
+        assert(size == 4 || size == 8);
+        if (size == 4) {
+            vtd_set_long(s, addr, val);
+        } else {
+            vtd_set_quad(s, addr, val);
+        }
         break;
 
     /* Fault Event Upper Address Register, 32-bit */
-- 
2.13.6


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

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

end of thread, other threads:[~2018-02-22  9:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-24 14:18 [PATCH] intel_iommu: allow updating FEADDR and FEUADDR with one 64bit write Marek Marczykowski-Górecki
2018-02-16 21:23 ` Marek Marczykowski-Górecki
2018-02-22  9:44 ` Roger Pau Monné

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).