[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Priority of -accel
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: Priority of -accel |
Date: |
Tue, 7 Jan 2020 13:37:48 +0100 |
On Tue, Jan 7, 2020 at 1:34 PM Philippe Mathieu-Daudé <address@hidden> wrote:
> On 1/7/20 1:18 PM, Thomas Huth wrote:
> > On 07/01/2020 11.14, Paolo Bonzini wrote:
> >> On 07/01/20 11:03, Thomas Huth wrote:
> >>>>
> >>>> vm = QEMUMachine(iotests.qemu_prog)
> >>>> -vm.add_args('-machine', 'accel=kvm:tcg')
> >>>> +vm.add_args('-accel', 'kvm', '-accel', 'tcg')
> >>> Looking at this, I wonder whether we really want the "-accel" option to
> >>> prioritize the accelerators in the order of appearance? A lot of other
> >>> CLI tools give the highest priority to the last parameter instead, e.g.
> >>> "gcc -O3 -O1" compiles with -O1, and not with -O3.
> >>>
> >>> Also I think it might be quite common that there are shell scripts which
> >>> call "qemu-system-xxx -accel xyz $*" ... and if we don't invert the
> >>> priorities of -accel, it will be impossible to override -accel in that
> >>> case...
> >>
> >> Hmm, it does match "-machine accel=kvm:tcg" and in general I think it's
> >> more self-explanatory. However, it is indeed less friendly to scripts.
> >> On one hand those could be changed to place "-accel xyz" after $* (or
> >> better "$@"), on the other hand we could also add a priority option to
> >> "-accel". What do you think?
> >
> > I don't think we need a separate priority parameter here. But IMHO it's
> > really rather common practice to prioritize the last option. So while
> > it might be more "self-explanatory" to a CLI newbie if the first
> > occurrence got the highest priority, it might be rather confusing
> > instead for a CLI veteran...?
> >
> > What do others on the list here think about this?
>
> We can make CLI more complex by adding a 'priority' option:
>
> -accel tcg,priority=1 -accel kvm,priority=0
I meant "more explicit" =)
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), (continued)
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), Alex Bennée, 2020/01/08
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), Thomas Huth, 2020/01/08
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), Paolo Bonzini, 2020/01/08
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), Daniel P . Berrangé, 2020/01/08
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), Paolo Bonzini, 2020/01/08
- Re: Priority of -accel, Thomas Huth, 2020/01/08
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), Peter Maydell, 2020/01/08
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), Peter Maydell, 2020/01/10
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), Kevin Wolf, 2020/01/07
- Re: Priority of -accel, Philippe Mathieu-Daudé, 2020/01/07
- Re: Priority of -accel,
Philippe Mathieu-Daudé <=
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), Christophe de Dinechin, 2020/01/07
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), Paolo Bonzini, 2020/01/07
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), Thomas Huth, 2020/01/07
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), Christophe de Dinechin, 2020/01/07
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), Peter Maydell, 2020/01/07
- Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option), Kevin Wolf, 2020/01/08
- Re: Priority of -accel, Markus Armbruster, 2020/01/13
- Re: Priority of -accel, Paolo Bonzini, 2020/01/13
- Re: Priority of -accel, Markus Armbruster, 2020/01/14
- Re: Priority of -accel, Paolo Bonzini, 2020/01/14