qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Jason Wang <jasowang@redhat.com>, Jiri Pirko <jiri@resnulli.us>
Subject: Re: -nic model=rocker causes qemu to abort
Date: Mon, 25 May 2020 20:45:04 +0200	[thread overview]
Message-ID: <1f540f9c-45f3-d02e-a087-d1059d7a8977@redhat.com> (raw)
In-Reply-To: <eafa7c11-b3af-2247-ddb3-538891ad0732@msgid.tls.msk.ru>

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 <pbonzini@redhat.com>
> 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	other threads:[~2020-05-25 18:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 16:43 -nic model=rocker causes qemu to abort Michael Tokarev
2020-05-25 18:45 ` Thomas Huth [this message]
2020-05-25 19:46   ` Michael Tokarev
2020-05-26  5:17     ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1f540f9c-45f3-d02e-a087-d1059d7a8977@redhat.com \
    --to=thuth@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).