qemu-discuss
[Top][All Lists]
Advanced

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

Re: Questions about virtio DMA operations


From: Peter Maydell
Subject: Re: Questions about virtio DMA operations
Date: Mon, 30 Aug 2021 10:09:00 +0100

On Mon, 30 Aug 2021 at 03:30, Arnabjyoti Kalita
<akalita@cs.stonybrook.edu> wrote:
>
> > That's normal, yes, but you can't guarantee it. The guest can
> > choose to program it to any physical memory it likes.
>
> Is it ? If this is indeterministic, my approach will obviously not
> work.

It's deterministic to the extent that the guest execution
is deterministic. But inside QEMU you can't tell what the
deterministic guest execution will or will not do.

> Is the bounce buffer address determined at initial startup of
> the guest and does it always stay the same during the guest execution?

The bounce buffer is at a fixed host address, because it
is the global "static BounceBuffer bounce;" in physmem.c.

> > I'm not clear on what you're trying to do, but this doesn't
> > sound like the right way to go to me.
>
> So I am trying to record and replay virtio block disk I/O events. I
> plan to record the disk I/O by recording the "used" buffers that the
> virtio block device puts into the virtqueue after the actual disk I/O
> is complete.

This sounds to me like the wrong layer to do this. My first
stab at a design for this would be to record and replay
at the disk block API level. That then does not need to care
at all about any of the details of the virtio device implementation
(and it would work with any block device, eg scsi, as a bonus).
This is how the upstream record-and-replay feature handles block
devices.

-- PMM



reply via email to

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