9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] [PATCH] vmx: fix PCI ID for virtio block devices
@ 2022-01-24 23:48 Michael Forney
  2022-01-27 16:39 ` ori
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Forney @ 2022-01-24 23:48 UTC (permalink / raw)
  To: 9front


The transitional PCI device ID for block devices is 0x1001, and the
virtio spec says that devices must have the transitional device ID or
0x1040 + the virtio device ID (2).
---
diff 60adc40118dda2edf2a238d22d050a7bae5e0d66 950eab9262196472c5b086d1b33fadc9fc1c211b
--- a/sys/src/cmd/vmx/virtio.c	Sun Jan 23 13:33:58 2022
+++ b/sys/src/cmd/vmx/virtio.c	Mon Jan 24 15:48:13 2022
@@ -792,7 +792,7 @@
 	
 	fd = open(fn, ORDWR);
 	if(fd < 0) return -1;
-	d = mkviodev(0x1000, 0x018000, 2, 1);
+	d = mkviodev(0x1001, 0x018000, 2, 1);
 	mkvioqueue(d, 32, viowakeup);
 	d->io = vioblkio;
 	d->blk.fd = fd;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9front] [PATCH] vmx: fix PCI ID for virtio block devices
  2022-01-24 23:48 [9front] [PATCH] vmx: fix PCI ID for virtio block devices Michael Forney
@ 2022-01-27 16:39 ` ori
  0 siblings, 0 replies; 2+ messages in thread
From: ori @ 2022-01-27 16:39 UTC (permalink / raw)
  To: 9front

Quoth Michael Forney <mforney@mforney.org>:
> 
> The transitional PCI device ID for block devices is 0x1001, and the
> virtio spec says that devices must have the transitional device ID or
> 0x1040 + the virtio device ID (2).
> ---
> diff 60adc40118dda2edf2a238d22d050a7bae5e0d66 950eab9262196472c5b086d1b33fadc9fc1c211b
> --- a/sys/src/cmd/vmx/virtio.c	Sun Jan 23 13:33:58 2022
> +++ b/sys/src/cmd/vmx/virtio.c	Mon Jan 24 15:48:13 2022
> @@ -792,7 +792,7 @@
>  	
>  	fd = open(fn, ORDWR);
>  	if(fd < 0) return -1;
> -	d = mkviodev(0x1000, 0x018000, 2, 1);
> +	d = mkviodev(0x1001, 0x018000, 2, 1);
>  	mkvioqueue(d, 32, viowakeup);
>  	d->io = vioblkio;
>  	d->blk.fd = fd;
> 

read the spec, confirmed -- looks good to me, and
openbsd still boots in vmx.

thanks, pushed.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-27 16:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 23:48 [9front] [PATCH] vmx: fix PCI ID for virtio block devices Michael Forney
2022-01-27 16:39 ` ori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).