qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] vIOMMU Posted-interrupt implementation - atomic operati


From: Tian, Kevin
Subject: Re: [Qemu-devel] vIOMMU Posted-interrupt implementation - atomic operation?
Date: Tue, 5 Jun 2018 06:54:17 +0000

> From: Jintack Lim
> Sent: Friday, June 1, 2018 11:47 AM
> 
> Hi,
> 
> I'm implementing Posted-interrupt functionality in vIOMMU. According
> to Vt-d spec 5.2.3, IOMMU performs a coherent atomic read-modify-write
> operation of the posted-interrupt descriptor. I wonder how can we
> achieve this considering the guest can modify the same
> posted-interrupt descriptor anytime. Is there any existing mechanism
> that I can use in QEMU?
> 

I don't think it's possible to emulate such operation in software, unless
you want to change guest to be cooperative. Actually it is not necessary.
VT-d does so due to some hardware implementation consideration. 
Since you are emulating on CPU, could just follow how CPU posted 
interrupt is conducted. If you look at SDM (29.6 Posted-Interrupt
Processing):

        "There is a requirement, however, that such modifications be 
done using locked read-modify-write instructions."

[instructions] means you can do update multiple times when posting an
interrupt, as long as each update is atomic.

Thanks
Kevin


reply via email to

[Prev in Thread] Current Thread [Next in Thread]