All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Krempa <pkrempa@redhat.com>
Cc: kwolf@redhat.com, mst@redhat.com,
	Zhenzhong Duan <zhenzhong.duan@intel.com>,
	qemu-devel@nongnu.org, eblake@redhat.com, pbonzini@redhat.com,
	lersek@redhat.com
Subject: Re: [PATCH] vl: transform QemuOpts device to JSON syntax device
Date: Thu, 24 Feb 2022 09:13:41 +0000	[thread overview]
Message-ID: <YhdMRTUvz6PpkIG2@redhat.com> (raw)
In-Reply-To: <YhdLT7gtPNjYfB6C@angien.pipo.sk>

On Thu, Feb 24, 2022 at 10:09:35AM +0100, Peter Krempa wrote:
> On Thu, Feb 24, 2022 at 09:02:02 +0000, Daniel P. Berrangé wrote:
> > On Thu, Feb 24, 2022 at 02:06:53PM +0800, Zhenzhong Duan wrote:
> > > While there are mixed use of traditional -device option and JSON
> > > syntax option, QEMU reports conflict, e.x:
> > > 
> > > /usr/libexec/qemu-kvm -nodefaults \
> > >   -device '{"driver":"virtio-scsi-pci","id":"scsi0","bus":"pci.0","addr":"0x02.0"}' \
> > >   -device virtio-scsi-pci,id=scsi1,bus=pci.0
> > 
> > Why are you attempting to mix JSON and non-JSON syntax at the same
> > time ? The expectation is that any mgmt app adopting JSON syntax
> > will do so universally and not mix old and new syntax. So in practice
> > the scenario above is not one that QEMU ever intended to have used
> > by apps.
> 
> Based on the previous post they are using some 'qemu:commandline'
> overrides with the legacy syntax with new libvirt which uses JSON
> syntax:
> 
> <qemu:commandline>
>   <qemu:arg value='-netdev'/>
>     <qemu:arg value='user,id=mynet0,hostfwd=tcp::44483-:22'/>
>     <qemu:arg value='-device'/>
>   <qemu:arg value='virtio-net-pci,netdev=mynet0,mac=00:16:3E:68:00:10,romfile='/>
> </qemu:commandline>
> 
> I suggested that they should add the required functionality to libvirt
> instead of trying to hack qemu:
> 
> https://lists.gnu.org/archive/html/qemu-devel/2022-02/msg05068.html

Or the other answer is to switch to use JSON syntax in the above command
line passthrough config.

Or to specify the PCI address so it doesn't clash with other devices
already present.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2022-02-24  9:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24  6:06 [PATCH] vl: transform QemuOpts device to JSON syntax device Zhenzhong Duan
2022-02-24  9:02 ` Daniel P. Berrangé
2022-02-24  9:09   ` Peter Krempa
2022-02-24  9:13     ` Daniel P. Berrangé [this message]
2022-02-24 11:19       ` Duan, Zhenzhong
2022-02-24 11:31 ` Kevin Wolf
2022-02-25  2:02   ` Duan, Zhenzhong

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=YhdMRTUvz6PpkIG2@redhat.com \
    --to=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=pkrempa@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhenzhong.duan@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.