Re: Exposing host debug capabilities to userspace

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

 



Alex Bennée <alex.bennee@xxxxxxxxxx> writes:

<snip>
> Alex Bennée <alex.bennee@xxxxxxxxxx> writes:
>
>> Hi,
>>
>> I've almost finished the ARMv8 guest debug support but I have one
>> problem left to solve. userspace needs to know how many hardware debug
>> registers are available for GDB to use. This information is available
>> from the ID_AA64DFR0_EL1 register.
<Snip>
>> So far the options I've examined are:
>>
>> * KVM ioctl GET_ONE_REG(ID_AA64DFR0_EL1)
>> * ptrace(PTRACE_GETREGSET, NT_ARM_HW_WATCH)
>> * KVM ioctl KVM_GET_DEBUGREGS
>> * Export the information via sysfs
>> * Expand /proc/cpuinfo
>> * Add another KVM ioctl?

Alexander Graf pointed out that KVM_CHECK_EXTENSION can return any
positive number for success. How about using:

max_hw_bps = kvm_check_extension(kvm_state, KVM_CAP_GUEST_DEBUG_HW_BPS);
max_hw_wps = kvm_check_extension(kvm_state, KVM_CAP_GUEST_DEBUG_HW_WPS);

Seems pretty sane, doesn't change the semantics of an API and is
architecture agnostic if others need the number?

-- 
Alex Bennée
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux