mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 03:59:52 +00:00
719d109b7f
MIPS has two types of KVM: TE & VZ, and TE is the default type. Now we can't create a VZ guest in QEMU because it lacks the kvm_type() hook in MachineClass. This patch add the the kvm_type() hook to support both of the two types. [AM: Added "if defined" guards.] Reviewed-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Signed-off-by: Huacai Chen <chenhc@lemote.com> Co-developed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Message-Id: <1592995531-32600-2-git-send-email-chenhc@lemote.com>
38 lines
890 B
C
38 lines
890 B
C
/*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* KVM/MIPS: MIPS specific KVM APIs
|
|
*
|
|
* Copyright (C) 2012-2014 Imagination Technologies Ltd.
|
|
* Authors: Sanjay Lal <sanjayl@kymasys.com>
|
|
*/
|
|
|
|
#ifndef KVM_MIPS_H
|
|
#define KVM_MIPS_H
|
|
|
|
#include "cpu.h"
|
|
|
|
/**
|
|
* kvm_mips_reset_vcpu:
|
|
* @cpu: MIPSCPU
|
|
*
|
|
* Called at reset time to set kernel registers to their initial values.
|
|
*/
|
|
void kvm_mips_reset_vcpu(MIPSCPU *cpu);
|
|
|
|
int kvm_mips_set_interrupt(MIPSCPU *cpu, int irq, int level);
|
|
int kvm_mips_set_ipi_interrupt(MIPSCPU *cpu, int irq, int level);
|
|
|
|
#ifdef CONFIG_KVM
|
|
int mips_kvm_type(MachineState *machine, const char *vm_type);
|
|
#else
|
|
static inline int mips_kvm_type(MachineState *machine, const char *vm_type)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
#endif /* KVM_MIPS_H */
|