[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-6.0 1/6] qapi: Add query-accel command
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH for-6.0 1/6] qapi: Add query-accel command |
Date: |
Wed, 18 Nov 2020 11:56:12 +0000 |
User-agent: |
Mutt/1.14.6 (2020-07-11) |
On Wed, Nov 18, 2020 at 12:28:45PM +0100, Kevin Wolf wrote:
> Am 18.11.2020 um 09:36 hat Markus Armbruster geschrieben:
> > >> >> [...] Even better would be
> > >> >> returning an array of KvmInfo with information on all supported
> > >> >> accelerators at once, rather than making the user call this command
> > >> >> once
> > >> >> per name.
> > >> >
> > >> > Maybe. It would save us the work of answering the question
> > >> > above, but is this (querying information for all accelerators at
> > >> > once) going to be a common use case?
> > >>
> > >> I recommend to scratch the query-accel parameter, and return information
> > >> on all accelerators in this build of QEMU. Simple, and consistent with
> > >> similar ad hoc queries. If a client is interested in just one, fishing
> > >> it out of the list is easy enough.
> > >>
> > >
> > > Works for me. I'll then leave KvmInfo as is and will introduce AccelInfo
> > > with two fields: name and enabled. enabled will be true only for
> > > currently active accelerator.
> >
> > Please document that at most on result can have 'enabled': true.
>
> This doesn't feel right.
>
> If I understand right, the proposal is to get a result like this:
>
> [ { 'name': 'kvm', 'enabled': true },
> { 'name': 'tcg', 'enabled': false },
> { 'name': 'xen', 'enabled': false } ]
>
> The condition that only one field can be enabled would only be in the
> documentation instead of being enforced.
>
> Instead, consider a response like this:
>
> { 'available': [ 'kvm', 'tcg', 'xen' ],
> 'active': 'kvm' }
>
> This is not only shorter, but also makes sure that only one accelerator
> can be reported as active.
I guess this can be extended with a union to report extra props for the
accelerator, discriminated on the 'active' field eg
{ 'available': [ 'kvm', 'tcg', 'xen' ],
'active': 'kvm',
'data': {
"allow-nested": true,
}
}
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 :|
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, (continued)
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Markus Armbruster, 2020/11/17
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Roman Bolshakov, 2020/11/17
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Markus Armbruster, 2020/11/18
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Paolo Bonzini, 2020/11/18
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Markus Armbruster, 2020/11/18
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Paolo Bonzini, 2020/11/18
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Markus Armbruster, 2020/11/18
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Paolo Bonzini, 2020/11/18
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Roman Bolshakov, 2020/11/18
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Kevin Wolf, 2020/11/18
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command,
Daniel P . Berrangé <=
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Markus Armbruster, 2020/11/18
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Eduardo Habkost, 2020/11/18
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Eric Blake, 2020/11/18
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Eduardo Habkost, 2020/11/18
- Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Markus Armbruster, 2020/11/19
Re: [PATCH for-6.0 1/6] qapi: Add query-accel command, Philippe Mathieu-Daudé, 2020/11/30
[PATCH for-6.0 2/6] qapi: Rename KvmInfo to AccelInfo, Roman Bolshakov, 2020/11/16
[PATCH for-6.0 4/6] softmmu: Remove kvm_available(), Roman Bolshakov, 2020/11/16