xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Lengyel, Tamas" <tlengyel@novetta.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Kevin Tian <kevin.tian@intel.com>, Keir Fraser <keir@xen.org>,
	Jun Nakajima <jun.nakajima@intel.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 1/2] hvm/vmx: save dr7 during vmx_vmcs_save
Date: Fri, 12 Feb 2016 05:57:05 -0700	[thread overview]
Message-ID: <CAD33N+7Zb6-5Z4W9gqGiSxnuYU4F7uCWsaRPU4VUT18H39DKag@mail.gmail.com> (raw)
In-Reply-To: <56BDB01C02000078000D14CC@prv-mh.provo.novell.com>


[-- Attachment #1.1: Type: text/plain, Size: 1104 bytes --]

On Feb 12, 2016 02:12, "Jan Beulich" <JBeulich@suse.com> wrote:
>
> >>> On 12.02.16 at 01:22, <tlengyel@novetta.com> wrote:
> > Sending the dr7 register during vm_events is useful for various
applications,
> > but the current way the register value is gathered is incorrent. In this
> > patch
> > we extend vmx_vmcs_save so that we get the correct value.
> >
> > Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> Iirc Andrew suggested ...
>
> > --- a/xen/arch/x86/hvm/vmx/vmx.c
> > +++ b/xen/arch/x86/hvm/vmx/vmx.c
> > @@ -490,6 +490,7 @@ static void vmx_vmcs_save(struct vcpu *v, struct
hvm_hw_cpu *c)
> >      __vmread(GUEST_SYSENTER_CS, &c->sysenter_cs);
> >      __vmread(GUEST_SYSENTER_ESP, &c->sysenter_esp);
> >      __vmread(GUEST_SYSENTER_EIP, &c->sysenter_eip);
> > +    __vmread(GUEST_DR7, &c->dr7);
>
> ... just when v == current.
>

Would that check really be necessary? It would complicate the code not just
here but the caller would need to be aware too that in that case dr7 can be
aquired from someplace else. I don't see the harm in just saving dr7 here
in both cases.

Tamas

[-- Attachment #1.2: Type: text/html, Size: 1583 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-02-12 12:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-12  0:22 [PATCH v2 1/2] hvm/vmx: save dr7 during vmx_vmcs_save Tamas K Lengyel
2016-02-12  0:22 ` [PATCH v2 2/2] vm_event: consolidate hvm_event_fill_regs and p2m_vm_event_fill_regs Tamas K Lengyel
2016-02-12  6:57   ` Razvan Cojocaru
2016-02-12  9:07   ` Jan Beulich
2016-02-12  9:57   ` Jan Beulich
2016-02-12 10:19     ` Razvan Cojocaru
2016-02-12 10:41       ` Jan Beulich
2016-02-12 12:50         ` Lengyel, Tamas
2016-02-12 14:57           ` Jan Beulich
2016-02-15 16:19             ` Lengyel, Tamas
2016-02-15 14:17   ` George Dunlap
2016-02-12  6:56 ` [PATCH v2 1/2] hvm/vmx: save dr7 during vmx_vmcs_save Razvan Cojocaru
2016-02-12  9:12 ` Jan Beulich
2016-02-12 12:57   ` Lengyel, Tamas [this message]
2016-02-12 15:00     ` Jan Beulich
2016-02-15 16:27       ` Lengyel, Tamas
2016-02-15 16:48         ` Jan Beulich
2016-02-15 16:55           ` Lengyel, Tamas
2016-02-15 17:06             ` Jan Beulich
2016-02-15 17:17               ` Lengyel, Tamas
2016-02-16  9:17                 ` Jan Beulich

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=CAD33N+7Zb6-5Z4W9gqGiSxnuYU4F7uCWsaRPU4VUT18H39DKag@mail.gmail.com \
    --to=tlengyel@novetta.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=xen-devel@lists.xenproject.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).