mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-07 12:42:09 +00:00
PPC: KVM: Add stubs for kvm helper functions
We have a bunch of helper functions that don't have any stubs for them in case we don't have CONFIG_KVM enabled. That didn't bite us so far, because gcc can optimize them out pretty well, but we should really provide them. Signed-off-by: Alexander Graf <agraf@suse.de> --- v1 -> v2: - use uint64_t for clockfreq
This commit is contained in:
parent
e95a69cb6d
commit
921e28db8d
@ -11,11 +11,37 @@
|
|||||||
|
|
||||||
void kvmppc_init(void);
|
void kvmppc_init(void);
|
||||||
|
|
||||||
|
#ifdef CONFIG_KVM
|
||||||
|
|
||||||
uint32_t kvmppc_get_tbfreq(void);
|
uint32_t kvmppc_get_tbfreq(void);
|
||||||
uint64_t kvmppc_get_clockfreq(void);
|
uint64_t kvmppc_get_clockfreq(void);
|
||||||
int kvmppc_get_hypercall(CPUState *env, uint8_t *buf, int buf_len);
|
int kvmppc_get_hypercall(CPUState *env, uint8_t *buf, int buf_len);
|
||||||
int kvmppc_set_interrupt(CPUState *env, int irq, int level);
|
int kvmppc_set_interrupt(CPUState *env, int irq, int level);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
static inline uint32_t kvmppc_get_tbfreq(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline uint64_t kvmppc_get_clockfreq(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int kvmppc_get_hypercall(CPUState *env, uint8_t *buf, int buf_len)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int kvmppc_set_interrupt(CPUState *env, int irq, int level)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_KVM
|
#ifndef CONFIG_KVM
|
||||||
#define kvmppc_eieio() do { } while (0)
|
#define kvmppc_eieio() do { } while (0)
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user