target/i386/hvf: fix the declaration of hvf_handle_io
There is a conflicting declaration for hvf_handle_io in x86_emu.c. The type of the first argument is wrong. There has never been a problem because the first argument is not used in hvf_handle_io. That being said, the code shouldn't contain such an error. Use the proper declaration from hvf-i386.h. Take the chance to change the first argument's type to be CPUState. Signed-off-by: Wei Liu <liuwe@linux.microsoft.com> Link: https://lore.kernel.org/r/1740126987-8483-3-git-send-email-liuwe@linux.microsoft.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
2540917285
commit
bc4fa8c3c9
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx, int reg);
|
uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx, int reg);
|
||||||
|
|
||||||
void hvf_handle_io(CPUArchState *, uint16_t, void *, int, int, int);
|
void hvf_handle_io(CPUState *, uint16_t, void *, int, int, int);
|
||||||
|
|
||||||
/* Host specific functions */
|
/* Host specific functions */
|
||||||
int hvf_inject_interrupt(CPUArchState *env, int vector);
|
int hvf_inject_interrupt(CPUArchState *env, int vector);
|
||||||
|
@ -103,7 +103,7 @@ static void update_apic_tpr(CPUState *cpu)
|
|||||||
|
|
||||||
#define VECTORING_INFO_VECTOR_MASK 0xff
|
#define VECTORING_INFO_VECTOR_MASK 0xff
|
||||||
|
|
||||||
void hvf_handle_io(CPUArchState *env, uint16_t port, void *buffer,
|
void hvf_handle_io(CPUState *env, uint16_t port, void *buffer,
|
||||||
int direction, int size, int count)
|
int direction, int size, int count)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -536,7 +536,7 @@ int hvf_vcpu_exec(CPUState *cpu)
|
|||||||
if (!string && in) {
|
if (!string && in) {
|
||||||
uint64_t val = 0;
|
uint64_t val = 0;
|
||||||
load_regs(cpu);
|
load_regs(cpu);
|
||||||
hvf_handle_io(env, port, &val, 0, size, 1);
|
hvf_handle_io(env_cpu(env), port, &val, 0, size, 1);
|
||||||
if (size == 1) {
|
if (size == 1) {
|
||||||
AL(env) = val;
|
AL(env) = val;
|
||||||
} else if (size == 2) {
|
} else if (size == 2) {
|
||||||
@ -551,7 +551,7 @@ int hvf_vcpu_exec(CPUState *cpu)
|
|||||||
break;
|
break;
|
||||||
} else if (!string && !in) {
|
} else if (!string && !in) {
|
||||||
RAX(env) = rreg(cpu->accel->fd, HV_X86_RAX);
|
RAX(env) = rreg(cpu->accel->fd, HV_X86_RAX);
|
||||||
hvf_handle_io(env, port, &RAX(env), 1, size, 1);
|
hvf_handle_io(env_cpu(env), port, &RAX(env), 1, size, 1);
|
||||||
macvm_set_rip(cpu, rip + ins_len);
|
macvm_set_rip(cpu, rip + ins_len);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -44,9 +44,7 @@
|
|||||||
#include "x86_flags.h"
|
#include "x86_flags.h"
|
||||||
#include "vmcs.h"
|
#include "vmcs.h"
|
||||||
#include "vmx.h"
|
#include "vmx.h"
|
||||||
|
#include "hvf-i386.h"
|
||||||
void hvf_handle_io(CPUState *cs, uint16_t port, void *data,
|
|
||||||
int direction, int size, uint32_t count);
|
|
||||||
|
|
||||||
#define EXEC_2OP_FLAGS_CMD(env, decode, cmd, FLAGS_FUNC, save_res) \
|
#define EXEC_2OP_FLAGS_CMD(env, decode, cmd, FLAGS_FUNC, save_res) \
|
||||||
{ \
|
{ \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user