* [PATCH] vt-d: Fix IM bit unmask of Fault Event Control Register in init_vtd_hw().
@ 2015-09-25 7:22 Quan Xu
2015-09-25 18:57 ` Wei Liu
0 siblings, 1 reply; 2+ messages in thread
From: Quan Xu @ 2015-09-25 7:22 UTC (permalink / raw)
To: yang.z.zhang, kevin.tian, xen-devel; +Cc: Quan Xu, jbeulich
Bit 0:29 in Fault Event Control Register are 'Reserved and Preserved',
software cannot write 0 to it unconditionally. Software must preserve
the value read for writes.
Signed-off-by: Quan Xu <quan.xu@intel.com>
Reported-by: Jan Beulich <jbeulich@suse.com>
---
xen/drivers/passthrough/vtd/iommu.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index f31d41b..bf9d6e8 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -2277,6 +2277,7 @@ static int init_vtd_hw(void)
struct iommu_flush *flush = NULL;
int ret;
unsigned long flags;
+ u32 sts;
/*
* Basic VT-d HW init: set VT-d interrupt, clear VT-d faults.
@@ -2290,7 +2291,9 @@ static int init_vtd_hw(void)
clear_fault_bits(iommu);
spin_lock_irqsave(&iommu->register_lock, flags);
- dmar_writel(iommu->reg, DMAR_FECTL_REG, 0);
+ sts = dmar_readl(iommu->reg, DMAR_FECTL_REG);
+ sts &= ~DMA_FECTL_IM;
+ dmar_writel(iommu->reg, DMAR_FECTL_REG, sts);
spin_unlock_irqrestore(&iommu->register_lock, flags);
}
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] vt-d: Fix IM bit unmask of Fault Event Control Register in init_vtd_hw().
2015-09-25 7:22 [PATCH] vt-d: Fix IM bit unmask of Fault Event Control Register in init_vtd_hw() Quan Xu
@ 2015-09-25 18:57 ` Wei Liu
0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2015-09-25 18:57 UTC (permalink / raw)
To: Quan Xu; +Cc: yang.z.zhang, kevin.tian, wei.liu2, jbeulich, xen-devel
On Fri, Sep 25, 2015 at 03:22:35PM +0800, Quan Xu wrote:
> Bit 0:29 in Fault Event Control Register are 'Reserved and Preserved',
> software cannot write 0 to it unconditionally. Software must preserve
> the value read for writes.
>
> Signed-off-by: Quan Xu <quan.xu@intel.com>
> Reported-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-25 18:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-25 7:22 [PATCH] vt-d: Fix IM bit unmask of Fault Event Control Register in init_vtd_hw() Quan Xu
2015-09-25 18:57 ` Wei Liu
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).