[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] hax_enabled() cannot be called in vl.c
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] hax_enabled() cannot be called in vl.c |
Date: |
Tue, 4 Dec 2018 15:48:38 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 |
On 04/12/18 15:45, Peter Maydell wrote:
> kvm_enabled() does a similar thing to what hax_enabled() does,
> but this works out OK because it takes care to avoid
> providing the #define-to-0 implementation except in the
> case where it is building a target-specific file for a
> target where KVM is not enabled; for common files it
> will provide the function prototype which will end up
> linking to a stub implementation. So we could handle hax
> like that too.
Yes, the KVM one is the correct way to do it. The #define-to-0
implementation is used so that the compiler can optimize out more code,
the function acts as a fallback.
Paolo