Skip to content

Commit

Permalink
s390x: empty function stubs in preparation for __KVM_HAVE_GUEST_DEBUG
Browse files Browse the repository at this point in the history
This patch creates empty function stubs (used by the gdbserver) in preparation
for the hw debugging support by kvm on s390, which will enable the
__KVM_HAVE_GUEST_DEBUG define in the linux headers and require these methods on
the qemu side.

Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
(cherry picked from commit 8c01244)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
  • Loading branch information
David Hildenbrand authored and mdroth committed Jun 25, 2014
1 parent dd8f80b commit 012d778
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions target-s390x/kvm.c
Expand Up @@ -362,6 +362,26 @@ int kvm_arch_remove_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoint *bp)
return 0;
}

int kvm_arch_insert_hw_breakpoint(target_ulong addr,
target_ulong len, int type)
{
return -ENOSYS;
}

int kvm_arch_remove_hw_breakpoint(target_ulong addr,
target_ulong len, int type)
{
return -ENOSYS;
}

void kvm_arch_remove_all_hw_breakpoints(void)
{
}

void kvm_arch_update_guest_debug(CPUState *cpu, struct kvm_guest_debug *dbg)
{
}

void kvm_arch_pre_run(CPUState *cpu, struct kvm_run *run)
{
}
Expand Down Expand Up @@ -812,6 +832,11 @@ static int handle_tsch(S390CPU *cpu)
return ret;
}

static int kvm_arch_handle_debug_exit(S390CPU *cpu)
{
return -ENOSYS;
}

int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run)
{
S390CPU *cpu = S390_CPU(cs);
Expand All @@ -827,6 +852,9 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run)
case KVM_EXIT_S390_TSCH:
ret = handle_tsch(cpu);
break;
case KVM_EXIT_DEBUG:
ret = kvm_arch_handle_debug_exit(cpu);
break;
default:
fprintf(stderr, "Unknown KVM exit: %d\n", run->exit_reason);
break;
Expand Down

0 comments on commit 012d778

Please sign in to comment.