mirror of
https://github.com/qemu/qemu.git
synced 2024-11-23 19:03:38 +08:00
kvm: Change kvm_{insert,remove}_breakpoint() argument to CPUState
CPUArchState is no longer directly used since converting CPU loops to CPUState. Prepares for changing GDBState::c_cpu to CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
3825b28ff1
commit
6227881415
12
gdbstub.c
12
gdbstub.c
@ -1954,8 +1954,10 @@ static int gdb_breakpoint_insert(target_ulong addr, target_ulong len, int type)
|
||||
CPUArchState *env;
|
||||
int err = 0;
|
||||
|
||||
if (kvm_enabled())
|
||||
return kvm_insert_breakpoint(gdbserver_state->c_cpu, addr, len, type);
|
||||
if (kvm_enabled()) {
|
||||
return kvm_insert_breakpoint(ENV_GET_CPU(gdbserver_state->c_cpu),
|
||||
addr, len, type);
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case GDB_BREAKPOINT_SW:
|
||||
@ -1991,8 +1993,10 @@ static int gdb_breakpoint_remove(target_ulong addr, target_ulong len, int type)
|
||||
CPUArchState *env;
|
||||
int err = 0;
|
||||
|
||||
if (kvm_enabled())
|
||||
return kvm_remove_breakpoint(gdbserver_state->c_cpu, addr, len, type);
|
||||
if (kvm_enabled()) {
|
||||
return kvm_remove_breakpoint(ENV_GET_CPU(gdbserver_state->c_cpu),
|
||||
addr, len, type);
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case GDB_BREAKPOINT_SW:
|
||||
|
@ -169,9 +169,9 @@ void *kvm_arch_ram_alloc(ram_addr_t size);
|
||||
void kvm_setup_guest_memory(void *start, size_t size);
|
||||
void kvm_flush_coalesced_mmio_buffer(void);
|
||||
|
||||
int kvm_insert_breakpoint(CPUArchState *env, target_ulong addr,
|
||||
int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr,
|
||||
target_ulong len, int type);
|
||||
int kvm_remove_breakpoint(CPUArchState *env, target_ulong addr,
|
||||
int kvm_remove_breakpoint(CPUState *cpu, target_ulong addr,
|
||||
target_ulong len, int type);
|
||||
void kvm_remove_all_breakpoints(CPUState *cpu);
|
||||
int kvm_update_guest_debug(CPUArchState *env, unsigned long reinject_trap);
|
||||
|
10
kvm-all.c
10
kvm-all.c
@ -1900,10 +1900,9 @@ int kvm_update_guest_debug(CPUArchState *env, unsigned long reinject_trap)
|
||||
return data.err;
|
||||
}
|
||||
|
||||
int kvm_insert_breakpoint(CPUArchState *env, target_ulong addr,
|
||||
int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr,
|
||||
target_ulong len, int type)
|
||||
{
|
||||
CPUState *cpu = ENV_GET_CPU(env);
|
||||
struct kvm_sw_breakpoint *bp;
|
||||
int err;
|
||||
|
||||
@ -1946,10 +1945,9 @@ int kvm_insert_breakpoint(CPUArchState *env, target_ulong addr,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int kvm_remove_breakpoint(CPUArchState *env, target_ulong addr,
|
||||
int kvm_remove_breakpoint(CPUState *cpu, target_ulong addr,
|
||||
target_ulong len, int type)
|
||||
{
|
||||
CPUState *cpu = ENV_GET_CPU(env);
|
||||
struct kvm_sw_breakpoint *bp;
|
||||
int err;
|
||||
|
||||
@ -2022,13 +2020,13 @@ int kvm_update_guest_debug(CPUArchState *env, unsigned long reinject_trap)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int kvm_insert_breakpoint(CPUArchState *env, target_ulong addr,
|
||||
int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr,
|
||||
target_ulong len, int type)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int kvm_remove_breakpoint(CPUArchState *env, target_ulong addr,
|
||||
int kvm_remove_breakpoint(CPUState *cpu, target_ulong addr,
|
||||
target_ulong len, int type)
|
||||
{
|
||||
return -EINVAL;
|
||||
|
@ -83,13 +83,13 @@ int kvm_update_guest_debug(CPUArchState *env, unsigned long reinject_trap)
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
int kvm_insert_breakpoint(CPUArchState *env, target_ulong addr,
|
||||
int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr,
|
||||
target_ulong len, int type)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int kvm_remove_breakpoint(CPUArchState *env, target_ulong addr,
|
||||
int kvm_remove_breakpoint(CPUState *cpu, target_ulong addr,
|
||||
target_ulong len, int type)
|
||||
{
|
||||
return -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user