Subject: Re: [PATCH] virtio_net: add link status handling

From: Anthony Liguori <[email-masked]>
Date: Tue, 09 Dec 2008 21:11:39 -0600

Rusty Russell wrote:
> On Wednesday 10 December 2008 08:02:14 Anthony Liguori wrote:
>   
>> Mark McLoughlin wrote:
>>     
>>> Allow the host to inform us that the link is down by adding
>>> a VIRTIO_NET_F_STATUS which indicates that device status is
>>> available in virtio_net config.
>>>
>>> This is currently useful for simulating link down conditions
>>> (e.g. using proposed qemu 'set_link' monitor command) but
>>> would also be needed if we were to support device assignment
>>> via virtio.
>>>       
>> It would be nice if the virtio-net card wrote some acknowledgement that 
>> it has received the link status down/up events.
>>     
>
> How about of every status change event? ie. a generic virtio_pci solution?
>   

A really simple way to do it would just be to have another status field 
that was the guest's status (verses the host requested status which the 
current field is).  All config reads/writes result in exits so it's easy 
to track.

Adding YA virtio event may be a little overkill.

Regards,

Anthony Liguori

> Rusty.