qemu-devel
[Top][All Lists]
Advanced

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

Re: -nic model=rocker causes qemu to abort


From: Thomas Huth
Subject: Re: -nic model=rocker causes qemu to abort
Date: Mon, 25 May 2020 20:45:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 29/04/2020 18.43, Michael Tokarev wrote:
> Hi!
> 
> Just a fun case of (invalid) usage of qemu-system command line.
> Someone tried -nic model=rocker, and qemu does this:
> 
>  Unexpected error in object_property_find() at 
> /build/qemu/git/qom/object.c:1029:
>  qemu-system-x86_64: Property '.mac' not found
>  Aborted
> 
> This happens after this commit:
> 
> commit 52310c3fa7dc854dd2376ae8a518141abcdb78f3
> Author: Paolo Bonzini <address@hidden>
> Date:   Fri Mar 2 10:30:50 2018 +0100
> 
>     net: allow using any PCI NICs in -net or -nic
> 
> 
> Previously rocker rightly wasn't usable as a nic model,
> and after this commit it is now possible.
> 
> While I agree this is invalid usage, perhaps qemu should not
> abort like this?  Maybe it should check the required property
> too, before allowing this device to be a nic model?

QEMU theoretically should never abort() - abort() means there is
something wrong in the code ... so we should definitely fix this by
other means. Some questions:

1) How is that rocker device normally used? Similar to a normal network
card? Or completely different?

2) In case it is similar to a normal network card, would it make sense
to allow it with -nic or -net, too? Or should we simply disallow it
here? I think we could either use a list of devices that should never be
allowed here, or we check for the availability of that "mac" property...

 Thomas




reply via email to

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