Zhai, Edwin
2008-Dec-11 07:09 UTC
[Xen-devel] [PATCH] [HVM] enable MTF for guest single step debug
Monitor Trap Flag (MTF), is a debugging feature that cause vmexit on certain instruction boundaries, which can be used for HVM single step. We prefer MTF over TF, as it make TF free for guest use. This patch try to enable MTF for single step in gdb, and keep backward compatibility on old processor. Pls. see MTF details @ SDM 3b 21.7.2 Thanks, -- best rgds, edwin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Dec-11 11:45 UTC
Re: [Xen-devel] [PATCH] [HVM] enable MTF for guest single step debug
On 11/12/2008 07:09, "Zhai, Edwin" <edwin.zhai@intel.com> wrote:> Monitor Trap Flag (MTF), is a debugging feature that cause vmexit on > certain instruction boundaries, which can be used for HVM single step. > We prefer MTF over TF, as it make TF free for guest use. > > This patch try to enable MTF for single step in gdb, and keep backward > compatibility on old processor. > > Pls. see MTF details @ SDM 3b 21.7.2Don''t need EVENTTYPE_OTHER. Don''t need to modify svm.c at all. The hvm_param is gross since there is no obvious symmetric get() to go with your set() -- please just hack in a domctl, that''d be neater in this case imo even though specific right now to x86 hvm. That''ll do for comments on patch v1... :-) -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Zhai, Edwin
2008-Dec-12 07:03 UTC
Re: [Xen-devel] [PATCH] [HVM] enable MTF for guest single step debug
Thanks for comments. v2 comes :) Keir Fraser wrote:> On 11/12/2008 07:09, "Zhai, Edwin" <edwin.zhai@intel.com> wrote: > > >> Monitor Trap Flag (MTF), is a debugging feature that cause vmexit on >> certain instruction boundaries, which can be used for HVM single step. >> We prefer MTF over TF, as it make TF free for guest use. >> >> This patch try to enable MTF for single step in gdb, and keep backward >> compatibility on old processor. >> >> Pls. see MTF details @ SDM 3b 21.7.2 >> > > Don''t need EVENTTYPE_OTHER. Don''t need to modify svm.c at all. The hvm_param > is gross since there is no obvious symmetric get() to go with your set() -- > please just hack in a domctl, that''d be neater in this case imo even though > specific right now to x86 hvm. > > That''ll do for comments on patch v1... :-) > > -- Keir > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > >-- best rgds, edwin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel