OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking




On 11/6/2023 6:33 PM, Michael S. Tsirkin wrote:
On Mon, Nov 06, 2023 at 11:58:03AM +0800, Zhu, Lingshan wrote:

On 11/6/2023 12:12 AM, Michael S. Tsirkin wrote:
On Fri, Nov 03, 2023 at 03:47:34PM +0000, Parav Pandit wrote:
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg00475.h
tml
you still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in direct control of the hypervisor.
The device is directly controlled by the guest including the device status and when it resets the device all the things stored in the device are lost.
I think the idea is that when this gateway is in the device then
device reset has to trap. At a high level, ok. But then what?
No, when device reset, the device is expected to forget everything and
re-intialize.
That's a problem then - memory that was already written will not be
detected as such.
Two cases:
1) memory written and has sent an interrupt. Then CPU has acknowledged the data, it should process the data
2) memory written but no interrupt, this should be lost as expected.

Is a full scan of all memory required until device reset is complete?
Who scan the memory? The device tracks its own dirty pages.
yes but reset erases this information.
should be, or the hypervisor will copy invalid information, cause a conflict.

I remember Jason as given an example on this.


Drivers currently tend to busy poll the reset register,
if this takes very long we might start seeing soft lockup
messages. What is the idea then? Maybe for this we need a separate
weaker reset that does not touch this capability?
When reset, how can we expect the LM progress continue running.

For example, when the device DMA writes something, then reset before sending
an interrupt,
the DMA-ed pages should be lost as expected, right?
interrupt is going to guest, has nothing to do with it.

device writes data into memory
device sends interrupt
driver sees data
At this point, the guest CPU owns the dirty pages, owns the data
driver sends reset
At this point, the device should forget everything

meanwhile hypervisor did not see any dirty pages

now what? hypervisor must apparently retrieve all
dirty page data before it can reset the device.
It is not the hypervisor, once an interrupt has sent,
the guest take over the pages.




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]