All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: "Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>,
	Aravind.Gopalakrishnan@amd.com, suravee.suthikulpanit@amd.com
Subject: Re: AMD support of hvm_vcpu.single_step
Date: Wed, 11 Jun 2014 16:04:03 -0700	[thread overview]
Message-ID: <20140611160403.1297fe92@mantra.us.oracle.com> (raw)
In-Reply-To: <5398DE79.6040305@oracle.com>

On Wed, 11 Jun 2014 18:55:53 -0400
Boris Ostrovsky <boris.ostrovsky@oracle.com> wrote:

> On 06/11/2014 06:32 PM, Mukesh Rathor wrote:
> > On Wed, 11 Jun 2014 11:56:15 -0400
> > Boris Ostrovsky <boris.ostrovsky@oracle.com> wrote:
> >
> >> On 06/10/2014 05:49 PM, Mukesh Rathor wrote:
> >>> Hi AMD folks,
> >>>
> >>> I am unable to see support of single step on amd platform. On
> >>> intel, hvm_vcpu.single_step will cause MTF to be set in
> >>> vmx_intr_assist:
> >>>
> >>>       /* Block event injection when single step with MTF. */
> >>>       if ( unlikely(v->arch.hvm_vcpu.single_step) )
> >>>       {
> >>>           v->arch.hvm_vmx.exec_control |=
> >>> CPU_BASED_MONITOR_TRAP_FLAG; vmx_update_cpu_exec_control(v);
> >>>           return;
> >>>       }
> >>>
> >>> I don't see equivalent on amd?
> >> I think HW performs TF bit manipulations that your patch is
> >> suggesting (per 13.1.4 of APMv2)
> > It only clears it, not set it. Patch on the way.
> 
> 
> Does it need to be set? My understanding is that it is supposed to be 
> clear in the handler (in the guest) but set on the exception's stack
> so when the guest does the IRET it loads TF=1.

If a debugger wants to single step, it needs to set the TF. So this
is for the debugger path. The hardware clears it upon execution of next
instruction, and generates #DB.

-Mukesh

  reply	other threads:[~2014-06-11 23:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-10 21:49 AMD support of hvm_vcpu.single_step Mukesh Rathor
2014-06-11 15:56 ` Boris Ostrovsky
2014-06-11 22:32   ` Mukesh Rathor
2014-06-11 22:55     ` Boris Ostrovsky
2014-06-11 23:04       ` Mukesh Rathor [this message]
2014-06-11 23:46         ` Boris Ostrovsky
2014-06-12  0:14           ` Mukesh Rathor

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=20140611160403.1297fe92@mantra.us.oracle.com \
    --to=mukesh.rathor@oracle.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=Xen-devel@lists.xensource.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=suravee.suthikulpanit@amd.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.