Re: [PATCH v2] KVM: SVM: Fix reading of DR6

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Il 31/12/2013 18:29, Jan Kiszka ha scritto:
>> Also, set_dr7 is only called when !(vcpu->guest_debug & 
>> KVM_GUESTDBG_USE_HW_BP).  I think it makes sense to do the same
>> for all the new hooks you need to introduce (get_dr6, set_dr6 and
>> possibly get_dr7).
> 
> We could make set_dr6 conditional, but it doesn't make a difference
> in practice.

No, it doesn't indeed.  It's just a matter of consistency.

> If guest debugging is enabled, we effectively only use DR6 when
> leaving the guest, i.e. when the hardware defined DR6.
> 
> Hmm, SVM is not updating kvm_run::debug.arch.dr6/7... There might
> be more broken, need to check. But that would not be guest visible
> then.
> 
>> 
>> And finally, is it necessary to write to both vcpu->arch.dr6/7
>> and svm->vmcb->save.dr6/7, or is it simply okay to do that?
> 
> arch.dr6/7 holds the guest visible state, save.dr6/7 the effective
> one.
> 
> Jan
> 
> PS: I'll look into a kvm unit test for hardware debugging features
> these days. Guest-side at least, no idea yet how to implement
> host-side debugging with unit tests.

It would be possible to do it with infrastructure like qtest or
autotest.  You could speak the gdbserver protocol yourself, or open a
pty to gdb.  But guest-side is already an improvement over nothing!

Paolo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSxSI0AAoJEBvWZb6bTYbyoiYP/REKgPL/dUwJoSA8AEm7h6Ip
wkXlaxBcyBiKlIzfiN3abBXBOZvDy7dSzNfXUZ4bY6DitQIJZYSVc93XfvWYRToY
ORC6qZej+P/bD/rNwATpvVhGG6RbRpmihmVgkoX5w5J3GWZ52QREcyoW7mZEhIoR
fCMJmNCq2l9vxa5hhXLAuiLYtq7mto6hQpFE8TXG81PyzE+c3WWK1D5vy/2cpv48
qabaVsJs7aj0KV2rVDvyQkO+GSdm+8SDpf4GyJcLo1Y1yYjPW97xC0Ey4ZyEXXWf
37zb3oOoH9NPPXtt1oJhUFCFZ34v1MxW2j0IIGvtUfRPSjphW+T/nQ5y17GG+efQ
TbKnSlibNP0L7fX/xa/sytaYcslIJVIKvvq0Wz9a3Ka1OHNufgtBIreUjtAPvSmy
TLxTm2w2s0S/mD3yMDK62uAtQMV/FW7qV6WHTHHZzj8VJpgfAAO0j4gkN0PlLB91
XfuR8ANmYoAKm9yafOSlr6Xw4uzHh41ZODMIY9w/pwB6nGB8SMRVBUWAILkyiyoN
btJdVCFdmxTlUmszAeHGTkd4VMtOMqva8MmgnV5isVEUy5A6gJZwNSZ8KJCdny+J
N+jRLj/j3SUlxGFnsK4FPBlMQzK1DDYS3C2QKd+Z5No42kZg4w2g4n0zQamDi2XR
2lcuexvRePHTZglNkP82
=dDQc
-----END PGP SIGNATURE-----
--
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