Until now, Hypervisor.framework has only been available on x86_64 systems. With Apple Silicon shipping now, it extends its reach to aarch64. To prepare for support for multiple architectures, let's start moving common code out into its own accel directory. This patch moves CPU and memory operations over. While at it, make sure the code is consumable on non-i386 systems. Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Sergio Lopez <slp@redhat.com> Message-id: 20210519202253.76782-4-agraf@csgraf.de Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
37 lines
1.4 KiB
C
37 lines
1.4 KiB
C
/*
|
|
* Copyright (C) 2016 Veertu Inc,
|
|
* Copyright (C) 2017 Google Inc,
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#ifndef X86HVF_H
|
|
#define X86HVF_H
|
|
#include "cpu.h"
|
|
#include "x86_descr.h"
|
|
|
|
int hvf_process_events(CPUState *);
|
|
bool hvf_inject_interrupts(CPUState *);
|
|
void hvf_set_segment(struct CPUState *cpu, struct vmx_segment *vmx_seg,
|
|
SegmentCache *qseg, bool is_tr);
|
|
void hvf_get_segment(SegmentCache *qseg, struct vmx_segment *vmx_seg);
|
|
void hvf_put_xsave(CPUState *cpu_state);
|
|
void hvf_put_segments(CPUState *cpu_state);
|
|
void hvf_put_msrs(CPUState *cpu_state);
|
|
void hvf_get_xsave(CPUState *cpu_state);
|
|
void hvf_get_msrs(CPUState *cpu_state);
|
|
void vmx_clear_int_window_exiting(CPUState *cpu);
|
|
void hvf_get_segments(CPUState *cpu_state);
|
|
void vmx_update_tpr(CPUState *cpu);
|
|
#endif
|