[PATCH] bhyve: relax emulator binary value check

Michal Privoznik mprivozn at redhat.com
Fri Feb 5 08:54:21 UTC 2021


On 2/4/21 4:47 PM, Roman Bogorodskiy wrote:
> Currently, requesting domain capabilities fails when the specified
> emulator binary does not equal to "/usr/sbin/bhyve". Relax this check
> to allow any path with basename "bhyve", as it's a common case when
> binary is specified without an absolute path.
> 
> Signed-off-by: Roman Bogorodskiy <bogorodskiy at gmail.com>
> ---
> I'm not sure how useful is this check in general: at this point we don't
> use the user specified emulator value anyway, just use BHYVE constant.
> Probably it would be better to just drop the entire "else" block?

Yes, I was just about to suggest that. We don't do any check like this 
for QEMU driver. Just execute user provided binary (with sume arguments 
appended to get QMP monitor) and query caps.

Looking into bhyve driver code though, it doesn't use <emulator/> from 
domain XML, does it? What I'm getting at is that there is no way for a 
user to specify different binary to run than /usr/sbin/bhyve. So it 
doesn't really make sense to provide emulatorbin at all.

Since I can argue both ways, merge this patch or just remove the block 
completely.

Reviewed-by: Michal Privoznik <mprivozn at redhat.com>

Michal




More information about the libvir-list mailing list