>-----Original Message----- >From: Peter Xu <[email protected]> >Sent: Friday, March 10, 2023 10:29 PM >To: Duan, Zhenzhong <[email protected]> >Cc: [email protected]; [email protected]; [email protected]; >[email protected]; [email protected]; [email protected]; >[email protected] >Subject: Re: [PATCH] intel-iommu: Set status bit after operation completed > >On Fri, Mar 10, 2023 at 02:32:13AM +0000, Duan, Zhenzhong wrote: >> I think it may break with special designed guest OS, >> E.x: Imagine a guest write GCMD_REG and start a new thread to do further >work. >> New thread find status bit in GTS_REG set and go ahead, but the >> address space switch may not finish yet if guest memory is big, which may >trigger a potential race. > >IMHO it's fine. For MMIO QEMU takes the BQL so if another thread reads the >status reg it should be serialized until the current vcpu finishes. > >See prepare_mmio_access(). Thanks, You are right, just know this, thanks Peter.
Regards Zhenzhong
