diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-09-04 14:43:20 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-09-07 13:32:37 +0200 |
commit | 33bc5f1d32e84a9f85b4484e1a31d18743a95b40 (patch) | |
tree | f3230baeda08cc4f01121afa703972fb24e3509e | |
parent | ef1cf6890f38073181edbc334b49192a6434d396 (diff) | |
download | qemu-33bc5f1d32e84a9f85b4484e1a31d18743a95b40.zip qemu-33bc5f1d32e84a9f85b4484e1a31d18743a95b40.tar.gz qemu-33bc5f1d32e84a9f85b4484e1a31d18743a95b40.tar.bz2 |
target/i386: Restrict declarations specific to CONFIG_KVM
Keep the function accessed by target/i386/ and hw/i386/
exposed, restrict the ones accessed by target/i386/kvm/.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20230904124325.79040-10-philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | target/i386/kvm/kvm_i386.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index 470627b..ff309ba 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -31,30 +31,35 @@ #endif /* CONFIG_KVM */ bool kvm_has_smm(void); +bool kvm_enable_x2apic(void); +bool kvm_hv_vpindex_settable(void); + +bool kvm_enable_sgx_provisioning(KVMState *s); +bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp); + +void kvm_arch_reset_vcpu(X86CPU *cs); +void kvm_arch_after_reset_vcpu(X86CPU *cpu); +void kvm_arch_do_init_vcpu(X86CPU *cs); + +void kvm_set_max_apic_id(uint32_t max_apic_id); +void kvm_request_xsave_components(X86CPU *cpu, uint64_t mask); + +#ifdef CONFIG_KVM + bool kvm_has_adjust_clock(void); bool kvm_has_adjust_clock_stable(void); bool kvm_has_exception_payload(void); void kvm_synchronize_all_tsc(void); -void kvm_arch_reset_vcpu(X86CPU *cs); -void kvm_arch_after_reset_vcpu(X86CPU *cpu); -void kvm_arch_do_init_vcpu(X86CPU *cs); void kvm_put_apicbase(X86CPU *cpu, uint64_t value); -bool kvm_enable_x2apic(void); bool kvm_has_x2apic_api(void); bool kvm_has_waitpkg(void); -bool kvm_hv_vpindex_settable(void); -bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp); - uint64_t kvm_swizzle_msi_ext_dest_id(uint64_t address); void kvm_update_msi_routes_all(void *private, bool global, uint32_t index, uint32_t mask); -bool kvm_enable_sgx_provisioning(KVMState *s); -void kvm_request_xsave_components(X86CPU *cpu, uint64_t mask); - typedef bool QEMURDMSRHandler(X86CPU *cpu, uint32_t msr, uint64_t *val); typedef bool QEMUWRMSRHandler(X86CPU *cpu, uint32_t msr, uint64_t val); typedef struct kvm_msr_handlers { @@ -66,6 +71,6 @@ typedef struct kvm_msr_handlers { bool kvm_filter_msr(KVMState *s, uint32_t msr, QEMURDMSRHandler *rdmsr, QEMUWRMSRHandler *wrmsr); -void kvm_set_max_apic_id(uint32_t max_apic_id); +#endif /* CONFIG_KVM */ #endif |