qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v4 2/5] kvm-all: Introduce kvm_set_singleste


From: David Gibson
Subject: Re: [Qemu-devel] [RFC PATCH v4 2/5] kvm-all: Introduce kvm_set_singlestep
Date: Wed, 13 Mar 2019 15:25:16 +1100
User-agent: Mutt/1.11.3 (2019-02-01)

On Fri, Mar 08, 2019 at 04:09:56PM -0300, Fabiano Rosas wrote:
> David Gibson <address@hidden> writes:
> 
> >> +/* Whether the KVM_SET_GUEST_DEBUG ioctl supports single stepping */
> >> +int kvm_has_guestdbg_singlestep(void)
> >> +{
> >> +    /* return kvm_check_extension(kvm_state, KVM_CAP_GUEST_DEBUG_SSTEP); 
> >> */
> >
> > I don't see a KVM_CAP_GUEST_DEBUG_SSTEP in either the qemu or kernel
> > trees.  Where does that come from?
> >
> 
> I realized that this will cause a regression for the other architectures
> (and even PPC-PR) that already have the feature when we run QEMU on
> older kernels without this capability.
> 
> I am becoming inclined to rely on kvmppc_is_pr. Do you see another way
> around this?

It's ok to use that for fallback cases.  However it's best if you can
design things so that modern kernels will provide a clear answer via
the CAP, either positive or negative, and only fallback to
kvmppc_is_pr() in the case where it's an old kernel.

That obviously also won't cover the other arch case.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

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