xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: Kevin Tian <kevin.tian@intel.com>, Wei Liu <wei.liu2@citrix.com>,
	suravee.suthikulpanit@amd.com,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Eddie Dong <eddie.dong@intel.com>,
	Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>,
	Jun Nakajima <jun.nakajima@intel.com>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] x86/HVM: honor p2m_ram_ro in hvm_map_guest_frame_rw()
Date: Fri, 31 Jul 2015 12:06:20 -0400	[thread overview]
Message-ID: <55BB9CFC.5010002@oracle.com> (raw)
In-Reply-To: <55B224660200007800095083@prv-mh.provo.novell.com>

On 07/24/2015 05:41 AM, Jan Beulich wrote:
>   
> --- a/xen/arch/x86/hvm/vmx/vvmx.c
> +++ b/xen/arch/x86/hvm/vmx/vvmx.c
> @@ -1619,10 +1619,23 @@ int nvmx_handle_vmptrld(struct cpu_user_
>   
>       if ( nvcpu->nv_vvmcxaddr == VMCX_EADDR )
>       {
> -        nvcpu->nv_vvmcx = hvm_map_guest_frame_rw(gpa >> PAGE_SHIFT, 1);
> -        if ( nvcpu->nv_vvmcx )
> -            nvcpu->nv_vvmcxaddr = gpa;
> -        if ( !nvcpu->nv_vvmcx ||
> +        bool_t writable;
> +        void *vvmcx = hvm_map_guest_frame_rw(paddr_to_pfn(gpa), 1, &writable);
> +

...

> @@ -1693,14 +1703,22 @@ int nvmx_handle_vmclear(struct cpu_user_
>       else
>       {
>           /* Even if this VMCS isn't the current one, we must clear it. */
> -        vvmcs = hvm_map_guest_frame_rw(gpa >> PAGE_SHIFT, 0);
> +        bool_t writable;
> +
> +        vvmcs = hvm_map_guest_frame_rw(gpa >> PAGE_SHIFT, 0, &writable);

Since you replaced 'gpa >> PAGE_SHIFT' with 'paddr_to_pfn(gpa' above, 
perhaps it should be replaced here too.

Other than that,
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

  parent reply	other threads:[~2015-07-31 16:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24  9:41 [PATCH] x86/HVM: honor p2m_ram_ro in hvm_map_guest_frame_rw() Jan Beulich
2015-07-24 10:26 ` Wei Liu
2015-07-24 10:37   ` Jan Beulich
2015-07-24 10:41     ` Wei Liu
2015-07-24 12:02 ` Andrew Cooper
2015-07-24 12:33   ` Jan Beulich
2015-07-27 11:09   ` Tim Deegan
2015-08-11 13:51     ` Jan Beulich
2015-08-11 14:34       ` Tim Deegan
2015-08-11 15:37         ` Jan Beulich
2015-08-11 15:45           ` Tim Deegan
2015-08-11 16:01             ` Jan Beulich
2015-07-31  1:41 ` Tian, Kevin
2015-07-31 16:06 ` Boris Ostrovsky [this message]
2015-08-11 10:32   ` Jan Beulich
2015-08-14 10:38   ` Jan Beulich
2015-08-14 13:26     ` Boris Ostrovsky

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=55BB9CFC.5010002@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=aravind.gopalakrishnan@amd.com \
    --cc=eddie.dong@intel.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=wei.liu2@citrix.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).