On Fri, Mar 08, 2019 at 04:09:56PM -0300, Fabiano Rosas wrote: > David Gibson <[email protected]> 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
signature.asc
Description: PGP signature
