Re: virtio hard disk on qemu

Mark Cave-Ayland <[email protected]> Wed, 25 Jan 2023 16:10:28 +0000
Newsgroups gmane.os.netbsd.ports.sparc64
Message-ID <[email protected]>
On 25/01/2023 13:41, Jason Thorpe wrote:

>> On Jan 24, 2023, at 9:20 PM, Tyler Mitchell <[email protected]> wrote:
>>
>> Hi,
>>
>> Has anyone tried using virtio hard disks on NetBSD/sparc64 on QEMU?
>>
>> I gave it a go today, but the kernel didn't finish booting. From
>> what I can gather, it hung while trying to read the disklabel (on a
>> blank, unformatted disk, in my case).
> 
> Last I checked, there is a bug (or maybe it’s intentional, I dunno) in Qemu where the Virtio code assumes that DMA addresses == CPU addresses for RAM.  This would impact sparc64 and alpha (which is where I noticed it).  I haven’t looked for a while now, but I guess this hasn’t been fixed yet (it also might be the case that the Qemu maintainers don’t consider it a bug.)

There was actually a follow-up to this here: 
https://lists.nongnu.org/archive/html/qemu-devel/2021-10/msg01031.html. In short, it 
looks like in order to use a different address space for DMA the virtio guest in 
NetBSD should be negotiating VIRTIO_F_ACCESS_PLATFORM.


ATB,

Mark.