Re: Questions regarding the still unpublished qemu series https://github.com/yiliu1765/qemu/tree/zhenzhong/wip/iommufd_nesting_rfcv1

2023-12-23 Thread Joel Granados
On Thu, Dec 21, 2023 at 03:33:47AM +, Duan, Zhenzhong wrote:
> Hi Joel,
> 
> >-Original Message-
> >From: Joel Granados 
> >Subject: Questions regarding the still unpublished qemu series
> >https://github.com/yiliu1765/qemu/tree/zhenzhong/wip/iommufd_nesting
> >_rfcv1
> >
> >Hello Everyone
> >
> >While running
> >https://github.com/yiliu1765/qemu/tree/zhenzhong/wip/iommufd_nesting
> >_rfcv1
> >I have come across particular code path that seems odd:
> >
> >I'm hitting an assert in softmmu/memory.c:1994 after calling a
> >notification from vtd_flt_page_walk_level. The code in memory.c:1994
> >makes sure that when type==IOMMU_NOTIFIER_UNMAP, the permissions
> >are
> >IOMMU_NONE. But the code in vtd_flt_page_walk_level sets the
> >permissions to read|write. This is part of the "intel_iommu: piotlb
> >invalidation should notify unmap" commit in the iommufd_nesting_rfcv1
> >series.
> >
> >Question is: Why assert on the permissions being NONE if they might be
> >read|write?
> >
> >Hope this makes sense. Don't hesitate to get back to me if you see that
> >there is something missing in my explanation.
> 
> Thanks for your report, you are right. We had seen the same issue with
> vhost device and have it fixed internally. Did you also use a vhost device
> or not?
> 
> The link you used is a bit old, could you try with 
> https//:github.com/yiliu1765/qemu/commits/zhenzhong/iommufd_nesting_rfcv1/
I thought it was the same branch, but I see that it does not have the
"wip" in the path.

Great!. I'll try this as soon as I get some free cycles (they are
difficult to find in holiday season:) and get back to you if I run into
anything else.

Thx for the link.

Best

> 
> Thanks
> Zhenzhong

-- 

Joel Granados


signature.asc
Description: PGP signature


RE: Questions regarding the still unpublished qemu series https://github.com/yiliu1765/qemu/tree/zhenzhong/wip/iommufd_nesting_rfcv1

2023-12-20 Thread Duan, Zhenzhong
Hi Joel,

>-Original Message-
>From: Joel Granados 
>Subject: Questions regarding the still unpublished qemu series
>https://github.com/yiliu1765/qemu/tree/zhenzhong/wip/iommufd_nesting
>_rfcv1
>
>Hello Everyone
>
>While running
>https://github.com/yiliu1765/qemu/tree/zhenzhong/wip/iommufd_nesting
>_rfcv1
>I have come across particular code path that seems odd:
>
>I'm hitting an assert in softmmu/memory.c:1994 after calling a
>notification from vtd_flt_page_walk_level. The code in memory.c:1994
>makes sure that when type==IOMMU_NOTIFIER_UNMAP, the permissions
>are
>IOMMU_NONE. But the code in vtd_flt_page_walk_level sets the
>permissions to read|write. This is part of the "intel_iommu: piotlb
>invalidation should notify unmap" commit in the iommufd_nesting_rfcv1
>series.
>
>Question is: Why assert on the permissions being NONE if they might be
>read|write?
>
>Hope this makes sense. Don't hesitate to get back to me if you see that
>there is something missing in my explanation.

Thanks for your report, you are right. We had seen the same issue with
vhost device and have it fixed internally. Did you also use a vhost device
or not?

The link you used is a bit old, could you try with 
https://github.com/yiliu1765/qemu/commits/zhenzhong/iommufd_nesting_rfcv1/

Thanks
Zhenzhong