[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/5] hw/i386/intel_iommu: Tear down address spaces before IOM
From: |
Eric Auger |
Subject: |
Re: [PATCH 3/5] hw/i386/intel_iommu: Tear down address spaces before IOMMU reset |
Date: |
Mon, 17 Feb 2025 08:31:16 +0100 |
User-agent: |
Mozilla Thunderbird |
Hi Zhenzhong,
On 2/17/25 4:02 AM, Duan, Zhenzhong wrote:
> Hi Eric,
>
>> -----Original Message-----
>> From: Eric Auger <eric.auger@redhat.com>
>> Subject: [PATCH 3/5] hw/i386/intel_iommu: Tear down address spaces before
>> IOMMU reset
>>
>> From: Peter Xu <peterx@redhat.com>
>>
>> No bug report for this, but logically tearing down of existing address
>> space should happen before reset of IOMMU state / registers, because the
>> current address spaces may still rely on those information.
>>
>> Signed-off-by: Peter Xu <peterx@redhat.com>
>> Signed-off-by: Eric Auger <eric.auger@redhat.com>
>> ---
>> hw/i386/intel_iommu.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
>> index 21a8bf45f8..1bd9ae403b 100644
>> --- a/hw/i386/intel_iommu.c
>> +++ b/hw/i386/intel_iommu.c
>> @@ -4702,8 +4702,8 @@ static void vtd_reset_exit(Object *obj, ResetType type)
>> IntelIOMMUState *s = INTEL_IOMMU_DEVICE(obj);
>>
>> trace_vtd_reset_exit();
>> - vtd_init(s);
>> vtd_address_space_refresh_all(s);
>> + vtd_init(s);
> I'm not sure if we should have this change. vtd_switch_address_space() checks
> s->dmar_enabled and vtd_init() updates s->dmar_enabled. With this change,
> will we leave stale mapping there after reset?
Yes I do agree. This could break the as switch. I will remove this patch.
Eric
>
> Thanks
> Zhenzhong
>
>> }
>>
>> static AddressSpace *vtd_host_dma_iommu(PCIBus *bus, void *opaque, int
>> devfn)
>> --
>> 2.47.1
- [PATCH 0/5] Fix vIOMMU reset order, Eric Auger, 2025/02/06
- [PATCH 1/5] hw/virtio/virtio-iommu: Migrate to 3-phase reset, Eric Auger, 2025/02/06
- [PATCH 2/5] hw/i386/intel-iommu: Migrate to 3-phase reset, Eric Auger, 2025/02/06
- [PATCH 3/5] hw/i386/intel_iommu: Tear down address spaces before IOMMU reset, Eric Auger, 2025/02/06
- [PATCH 4/5] hw/arm/smmuv3: Move reset to exit phase, Eric Auger, 2025/02/06
- Re: [PATCH 4/5] hw/arm/smmuv3: Move reset to exit phase, Peter Maydell, 2025/02/07
- Re: [PATCH 4/5] hw/arm/smmuv3: Move reset to exit phase, Eric Auger, 2025/02/07
- Re: [PATCH 4/5] hw/arm/smmuv3: Move reset to exit phase, Peter Maydell, 2025/02/07
- Re: [PATCH 4/5] hw/arm/smmuv3: Move reset to exit phase, Peter Xu, 2025/02/07
- Re: [PATCH 4/5] hw/arm/smmuv3: Move reset to exit phase, Peter Maydell, 2025/02/07
- Re: [PATCH 4/5] hw/arm/smmuv3: Move reset to exit phase, Eric Auger, 2025/02/10
- Re: [PATCH 4/5] hw/arm/smmuv3: Move reset to exit phase, Peter Xu, 2025/02/10
- Re: [PATCH 4/5] hw/arm/smmuv3: Move reset to exit phase, Peter Maydell, 2025/02/10
- Re: [PATCH 4/5] hw/arm/smmuv3: Move reset to exit phase, Cédric Le Goater, 2025/02/12