[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem debugging kernel driver running on guest os

From: Peter Maydell
Subject: Re: Problem debugging kernel driver running on guest os
Date: Tue, 25 Jul 2023 13:04:59 +0100

On Tue, 25 Jul 2023 at 12:50, Mark Wood-Patrick <mwoodpatrick@gmail.com> wrote:
>  I am trying to debug a driver issue where the driver is running on the guest 
> os running under QEMU 7.1.0 using gdb running on the host & connecting to the 
> guest.             When I try to attach I get a message "qemu-system-x86_64: 
> -s: gdbstub: KVM doesn't support guest debugging". This used to work on QEMU 
> 4.2, does anyone know what changed or what the issue is and how to fix it?

I have a suspicion you may be running into a bug in your
host kernel. QEMU used to unconditionally assume that you
could do guest debug on KVM, but this isn't generally
true across host architectures, so somewhere around
QEMU 6.2 we started explicitly checking "does the kernel
say it supports KVM_CAP_SET_GUEST_DEBUG" before trying to
use it. Unfortunately a bug in the kernel meant that on
x86 it wasn't actually advertising that capability even
though it had supported it for a long time.

You should check that your host kernel has
commit b9b2782cd55aaf5a or some backport of that:

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]