From: Paolo Bonzini <pbonzini@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
Gleb Natapov <gleb@kernel.org>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH v2] KVM: SVM: Fix reading of DR6
Date: Thu, 02 Jan 2014 09:24:21 +0100 [thread overview]
Message-ID: <52C52235.1040002@redhat.com> (raw)
In-Reply-To: <52C2FEE8.1060001@web.de>
-----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-----
prev parent reply other threads:[~2014-01-02 8:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-19 13:24 [PATCH] KVM: SVM: Fix reading of DR6 Jan Kiszka
2013-12-27 17:21 ` Marcelo Tosatti
2013-12-27 18:17 ` [PATCH v2] " Jan Kiszka
2013-12-31 15:28 ` Paolo Bonzini
2013-12-31 17:29 ` Jan Kiszka
2014-01-02 8:24 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52C52235.1040002@redhat.com \
--to=pbonzini@redhat.com \
--cc=gleb@kernel.org \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.