Re: bounty for virtio 1.0 (now with instructions!)

2020-12-18 Thread Chris Hanson
On Dec 18, 2020, at 2:21 PM, Reinoud Zandijk  wrote:
> 
> Hi Chris,
> 
> On Wed, Dec 16, 2020 at 01:08:23AM -0800, Chris Hanson wrote:
>> NetBSD could also use a VirtIO console device, since that’s all
>> Virtualization.framework offers on macOS 11 (whether on x86-64 or Apple
>> Silicon).
> 
> From what I see in videos on youtube, the tooklit displays a standard VGA
> display with apparently a number of text consoles next to it?

Virtualization.framework does not currently expose any sort of display, 
keyboard or pointing device. All it exposes as a "console" is VirtIO Console. 
It also lets you set up socket, network, mass storage, entropy, and memory 
balloon devices.

> Qemu can create a number of console devices that need to be paired with
> various backends like pipes or sockets etc. I presume the virtualization
> framework on macosX11 is providing terminals for each of the activated
> terminals?

macOS 11's Virtualization.framework does not provide terminals or views. I 
don't know what the videos you're watching are, but the framework is very 
focused right now.

  -- Chris



Re: bounty for virtio 1.0 (now with instructions!)

2020-12-18 Thread Reinoud Zandijk
Hi Chris,

On Wed, Dec 16, 2020 at 01:08:23AM -0800, Chris Hanson wrote:
> NetBSD could also use a VirtIO console device, since that’s all
> Virtualization.framework offers on macOS 11 (whether on x86-64 or Apple
> Silicon).

>From what I see in videos on youtube, the tooklit displays a standard VGA
display with apparently a number of text consoles next to it?

Qemu can create a number of console devices that need to be paired with
various backends like pipes or sockets etc. I presume the virtualization
framework on macosX11 is providing terminals for each of the activated
terminals?

With regards,
Reinoud



Re: bounty for virtio 1.0 (now with instructions!)

2020-12-16 Thread Chris Hanson
NetBSD could also use a VirtIO console device, since that’s all 
Virtualization.framework offers on macOS 11 (whether on x86-64 or Apple 
Silicon).

  — Chris



Re: bounty for virtio 1.0 (now with instructions!)

2020-11-16 Thread Reinoud Zandijk
On Wed, Nov 04, 2020 at 10:55:12AM +0100, Reinoud Zandijk wrote:
> qemu-system-x86_64 -accel nvmm \
>   -device virtio-net-pci \
>   -device virtio-rng \
>   -drive id=mydrive,file=./dummy.fs,format=raw,if=nonea\
>   -device virtio-blk-pci,drive=mydrive 
>   -cdrom boot-com.iso -nographic
> 
> But no luck.
> 
> The disc stuff is working fine, the rng I don't know, the virtio network is
> detected fine but dhcp is not working on it.

it works fine now; the network device had no connection duh.

qemu-system-x86_64 -accel nvmm \
  -netdev tap,id=n1,ifname=tap0,script=no \
  -drive  id=mydrive,file=./dummy2.fs,format=raw,if=none \
  -cdrom  boot.iso \
  -device virtio-net-pci,netdev=n1 \
  -device virtio-rng \
  -device virtio-blk-pci,drive=mydrive \
  -serial stdio -boot once=d

And now vioif0 is working fine.

Reinoud



Re: bounty for virtio 1.0 (now with instructions!)

2020-11-04 Thread Reinoud Zandijk
On Mon, Nov 02, 2020 at 07:54:02PM +, co...@sdf.org wrote:
> touch myfile
> qemu-system-x86_64 \
>  -device virtio-net-pci,disable-legacy=on \
>  -device virtio-rng,disable-legacy=on \
>  -drive id=mydrive,file=./myfile,if=none \
>  -device virtio-blk-pci,drive=mydrive,disable-legacy=on \
>  -cdrom mynetbsd.iso

I've tried the following to get an idea on the current support:

qemu-system-x86_64 -accel nvmm \
  -device virtio-net-pci \
  -device virtio-rng \
  -drive id=mydrive,file=./dummy.fs,format=raw,if=nonea\
  -device virtio-blk-pci,drive=mydrive 
  -cdrom boot-com.iso -nographic

But no luck.

The disc stuff is working fine, the rng I don't know, the virtio network is
detected fine but dhcp is not working on it.

Network is ambiguous, vioif0 is not getting dhcp (IP4all) but wm0 at least
gets the 10.x.y.z with this setup though on the 10.x.y.z network 

Is that common or is the invocation missing something :)

Reinoud



signature.asc
Description: PGP signature


Re: bounty for virtio 1.0 (now with instructions!)

2020-11-04 Thread Reinoud Zandijk
On Wed, Nov 04, 2020 at 03:41:34AM +0100, Kamil Rytarowski wrote:
> On 03.11.2020 23:20, co...@sdf.org wrote:
> > On Tue, Nov 03, 2020 at 10:42:27PM +0100, Martin Husemann wrote:
> > The QEMU people mentioned that even if "legacy virtio" IDs are used,
> > there's a bit to show that it's compatible with newer virtio.  Things that
> > claim old virtio probably do both old & new.
> > 
> 
> "Transitional virtio" supports both, 1.0 and 0.9. I had a draft work with
> the upgrade of virtio, but incomplete..

How far are you progressed?

On quick reading the changes needed, the path I see before me now is to first
make the endianness configuable at runtime for all relevant devices, then
implement the new configuration/arbiter stuff but at first negotiate/demand
the classic setup as much as needed and as last go over each driver and make
them more flexible where needed.

Reinoud



signature.asc
Description: PGP signature


Re: bounty for virtio 1.0 (now with instructions!)

2020-11-03 Thread Martin Husemann
On Tue, Nov 03, 2020 at 10:20:27PM +, co...@sdf.org wrote:
> The QEMU people mentioned that even if "legacy virtio" IDs are used,
> there's a bit to show that it's compatible with newer virtio.
> Things that claim old virtio probably do both old & new.

Yeah, but last I tried there were some environments where really only
0.9 was supported - I've been told this has changed by now (or will soonish),
so indeeded only implementing 1.x might be an option - but we should
double check.

Martin


Re: bounty for virtio 1.0 (now with instructions!)

2020-11-03 Thread Kamil Rytarowski
On 03.11.2020 23:20, co...@sdf.org wrote:
> On Tue, Nov 03, 2020 at 10:42:27PM +0100, Martin Husemann wrote:
>> On Tue, Nov 03, 2020 at 10:23:30PM +0100, Reinoud Zandijk wrote:
>>> To be clear, do we want to (keep) supporting legacy devices? Its not 
>>> required
>>> in 1.0 and could clean up the code a lot!
>>
>> Yes, we need that still, as not all hosts offer the newer ones.
> 
> The QEMU people mentioned that even if "legacy virtio" IDs are used,
> there's a bit to show that it's compatible with newer virtio.
> Things that claim old virtio probably do both old & new.
> 

"Transitional virtio" supports both, 1.0 and 0.9. I had a draft work
with the upgrade of virtio, but incomplete..



signature.asc
Description: OpenPGP digital signature


Re: bounty for virtio 1.0 (now with instructions!)

2020-11-03 Thread coypu
On Tue, Nov 03, 2020 at 10:42:27PM +0100, Martin Husemann wrote:
> On Tue, Nov 03, 2020 at 10:23:30PM +0100, Reinoud Zandijk wrote:
> > To be clear, do we want to (keep) supporting legacy devices? Its not 
> > required
> > in 1.0 and could clean up the code a lot!
> 
> Yes, we need that still, as not all hosts offer the newer ones.

The QEMU people mentioned that even if "legacy virtio" IDs are used,
there's a bit to show that it's compatible with newer virtio.
Things that claim old virtio probably do both old & new.


Re: bounty for virtio 1.0 (now with instructions!)

2020-11-03 Thread Martin Husemann
On Tue, Nov 03, 2020 at 10:23:30PM +0100, Reinoud Zandijk wrote:
> To be clear, do we want to (keep) supporting legacy devices? Its not required
> in 1.0 and could clean up the code a lot!

Yes, we need that still, as not all hosts offer the newer ones.

Martin


Re: bounty for virtio 1.0 (now with instructions!)

2020-11-03 Thread Reinoud Zandijk
On Mon, Nov 02, 2020 at 07:54:02PM +, co...@sdf.org wrote:
> On Tue, Sep 01, 2020 at 01:28:44PM +, co...@sdf.org wrote:
> > - 1af4:1044 VirtIO 1.0 random number generator
> > - 1af4:1042 VirtIO 1.0 block device
> > - 1af4:1041 VirtIO 1.0 network device
> > 
> > Offer valid until 1 January 2021.

To be clear, do we want to (keep) supporting legacy devices? Its not required
in 1.0 and could clean up the code a lot!

Though bhyve states it supports 0.9+additions i.e. `legacy' but extended with
`trim' support etc. Supporting only 1.0 might thus be unwise.

Any thoughts?
Reinoud



Re: bounty for virtio 1.0 (now with instructions!)

2020-11-02 Thread coypu
On Tue, Sep 01, 2020 at 01:28:44PM +, co...@sdf.org wrote:
> Hi all,
> 
> I'd like to offer a bounty for anyone who is interested in working on
> VirtIO 1.0 support. It's a well-documented, simple interface.
> 
> I can offer $750 for anyone to send a patch, or in the case of a
> developer with commit access, commit it, for the following:
> - 1af4:1044 VirtIO 1.0 random number generator
> - 1af4:1042 VirtIO 1.0 block device
> - 1af4:1041 VirtIO 1.0 network device
> 
> Offer valid until 1 January 2021.

If you would like to emulate this, I have a quick command line (that
works with the pkgsrc qemu on netbsd).

touch myfile
qemu-system-x86_64 \
 -device virtio-net-pci,disable-legacy=on \
 -device virtio-rng,disable-legacy=on \
 -drive id=mydrive,file=./myfile,if=none \
 -device virtio-blk-pci,drive=mydrive,disable-legacy=on \
 -cdrom mynetbsd.iso

This will enable all these devices.