[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH] vl: only display available accelerators
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [RFC PATCH] vl: only display available accelerators |
Date: |
Wed, 8 Nov 2017 14:59:05 -0200 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Wed, Nov 08, 2017 at 01:21:33PM -0300, Philippe Mathieu-Daudé wrote:
> On 11/08/2017 10:28 AM, Daniel P. Berrange wrote:
> > On Mon, Oct 30, 2017 at 09:20:29AM +0100, Eduardo Habkost wrote:
> >> On Mon, Oct 30, 2017 at 01:00:56AM -0300, Philippe Mathieu-Daudé wrote:
> >>> examples configuring with '--enable-kvm --disable-tcg'
> >>>
> >>> - before
> >>>
> >>> $ qemu-system-x86_64 -accel help
> >>> Possible accelerators: kvm, xen, hax, tcg
> >>>
> >>> $ qemu-system-x86_64 -accel tcg
> >>> qemu-system-x86_64: -machine accel=tcg: No accelerator found
> >>>
> >>> # qemu-system-x86_64 -accel hax
> >>> qemu-system-x86_64: -machine accel=hax: No accelerator found
> >>>
> >>> # qemu-system-x86_64 -accel xen
> >>> xencall: error: Could not obtain handle on privileged command
> >>> interface: No such file or directory
> >>> xen be core: xen be core: can't open xen interface
> >>> can't open xen interface
> >>> qemu-system-x86_64: failed to initialize Xen: Operation not permitted
> >>>
> >>> - after
> >>>
> >>> $ qemu-system-x86_64 -accel help
> >>> Possible accelerators: kvm
> >>>
> >>> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> >>> ---
> >>> RFC because:
> >>> - I don't think this is the nicest way, too much #ifdef'fery in main()
> >>
> >> I suggest using object_class_get_list(TYPE_ACCEL, false).
> >
> > And check the result of the available() method on the returned classes
> > too, to filter the results.
>
> Good idea! I'll use that.
It looks like QTest is the only accelerator that implements
->available(), and its return value is a build-time constant that
depends only on CONFIG_POSIX.
I wonder why we don't simply avoid compiling the qtest class if
CONFIG_POSIX is unset, making the ->available() method
unnecessary.
--
Eduardo
- Re: [Qemu-devel] [RFC PATCH] vl: only display available accelerators, Eduardo Habkost, 2017/11/02
- Re: [Qemu-devel] [RFC PATCH] vl: only display available accelerators, Daniel P. Berrange, 2017/11/08
- Re: [Qemu-devel] [RFC PATCH] vl: only display available accelerators, Philippe Mathieu-Daudé, 2017/11/08
- Re: [Qemu-devel] [RFC PATCH] vl: only display available accelerators,
Eduardo Habkost <=
- Re: [Qemu-devel] [RFC PATCH] vl: only display available accelerators, Daniel P. Berrange, 2017/11/08
- Re: [Qemu-devel] [RFC PATCH] vl: only display available accelerators, Eduardo Habkost, 2017/11/08
- Re: [Qemu-devel] [RFC PATCH] vl: only display available accelerators, Daniel P. Berrange, 2017/11/08
- Re: [Qemu-devel] [RFC PATCH] vl: only display available accelerators, Philippe Mathieu-Daudé, 2017/11/08
- Re: [Qemu-devel] [RFC PATCH] vl: only display available accelerators, Eduardo Habkost, 2017/11/08
- Re: [Qemu-devel] [RFC PATCH] vl: only display available accelerators, Philippe Mathieu-Daudé, 2017/11/08