[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Modularizing QEMU RFC
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] Modularizing QEMU RFC |
Date: |
Mon, 3 Aug 2015 08:51:12 +0100 |
On 3 August 2015 at 04:09, Fam Zheng <address@hidden> wrote:
> bdrv_probe_all is harder. If we modularize a format driver, its .bdrv_probe
> code will be in the module. If we want to do the format detection, we need to
> load all format drivers. This means if the command line has an unspecified
> format, we'll still need to load all drivers at starting phase. (I wish all
> formats are probed according to magic bytes at offset 0, so we can simplify
> the
> .bdrv_probe logic and do it with data matching in block.c like the protocol
> case, but that's not true for VMDK :( )
If you wanted, you could have a might_be_format_foo() function which
gives its best guess at whether a file is of that format, erring on
the side of saying 'yes'. (So for VMDK you just always say 'yes', for
ones where you can conveniently match you do the match test, and so on.)
Then you can use that to decide whether to load the module for the format
or not. So you'd end up still loading modules for formats that aren't
trivially probed for, but you could avoid loading most of them.
-- PMM
- Re: [Qemu-devel] Modularizing QEMU RFC, Fam Zheng, 2015/08/02
- Re: [Qemu-devel] Modularizing QEMU RFC,
Peter Maydell <=
- Re: [Qemu-devel] Modularizing QEMU RFC, Marc Marí, 2015/08/03
- Re: [Qemu-devel] Modularizing QEMU RFC, Fam Zheng, 2015/08/03
- Re: [Qemu-devel] Modularizing QEMU RFC, Marc Marí, 2015/08/03
- Re: [Qemu-devel] Modularizing QEMU RFC, Alex Bennée, 2015/08/03
- Re: [Qemu-devel] Modularizing QEMU RFC, Marc Marí, 2015/08/03
- Re: [Qemu-devel] Modularizing QEMU RFC, Alex Bennée, 2015/08/03
- Re: [Qemu-devel] Modularizing QEMU RFC, Daniel P. Berrange, 2015/08/03
- Re: [Qemu-devel] Modularizing QEMU RFC, Daniel P. Berrange, 2015/08/03
- Re: [Qemu-devel] Modularizing QEMU RFC, Fam Zheng, 2015/08/03
- Re: [Qemu-devel] Modularizing QEMU RFC, Marc Marí, 2015/08/03