> So you found it by checking the debugfs output, and it looks to miss
> the DW bit. is it? Put a clearer commit message would be helpful.
Yes, it is. So, "dropped the value of DW field" is indeed a bug?
> Please address Michael's comment, add a "Fixes: xxx" tag and resend.
OK, I will.
On 2024/7/23 10:40, Yee Li wrote:
When dmar_readq or devmem2 read the DW of IQA always 0UL because
"& VTD_IQA_QS". So, try to fix it.
case:
after vtd_mem_write
IQA val: 0x100206801
after vtd_mem_read
IQA val: 0x100206001
Signed-off-by: yeeli
I think you may need to capitalize the first char
> or devmem2 read the reg:
>
> "devmem2 0xfed90090"
> "/dev/mem opened."
> "Memory mapped at address 0x7f983014f000."
> "Value at address 0xFED90090 (0x7f983014f000): 0x0"
Sorry, correct the devmem2 read value.
"Value at address 0xFED90090 (0x7f983014f000): 0x1DA801"
> > When dmar_readq or devmem2 read the DW of IQA always 0UL because
> > "& VTD_IQA_QS". So, try to fix it.
> >
> > case:
> > after vtd_mem_write
> > IQA val: 0x100206801
> >
> > after vtd_mem_read
> > IQA val: 0x100206001
> >
> > Signed-off-by: yeeli
>
>
> how was this tested?
If VT-D hardware s
On Thu, Jul 04, 2024 at 11:53:02AM +0800, YeeLi wrote:
> From: yeeli
>
> When dmar_readq or devmem2 read the DW of IQA always 0UL because
> "& VTD_IQA_QS". So, try to fix it.
>
> case:
> after vtd_mem_write
> IQA val: 0x100206801
>
> after vtd_mem_read
> IQA val: 0x100206001
>
> Signed-off-by:
On Thu, Jul 04, 2024 at 02:54:00PM +0800, Yee Li wrote:
> Sorry, the patch missing "(( ))"
> Replace "& VTD_IQA_QS" with "& (VTD_IQA_QS | VTD_IQA_DW_MASK))" is correct.
> Revised patch as follows,
>
So submit it properly.
Also, how did you test the patch?
> Signed-off-by: yeeli
> ---
> hw
Sorry, the patch missing "(( ))"
Replace "& VTD_IQA_QS" with "& (VTD_IQA_QS | VTD_IQA_DW_MASK))" is correct.
Revised patch as follows,
Signed-off-by: yeeli
---
hw/i386/intel_iommu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu
From: yeeli
When dmar_readq or devmem2 read the DW of IQA always 0UL because
"& VTD_IQA_QS". So, try to fix it.
case:
after vtd_mem_write
IQA val: 0x100206801
after vtd_mem_read
IQA val: 0x100206001
Signed-off-by: yeeli
---
hw/i386/intel_iommu.c | 3 ++-
1 file changed, 2 insertions(+), 1 de