All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dong, Eddie" <eddie.dong@intel.com>
To: Tim Deegan <Tim.Deegan@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"Dong, Eddie" <eddie.dong@intel.com>
Subject: RE: [PATCH 07 of 20] Emulation of guest vmptrld
Date: Fri, 3 Jun 2011 14:07:40 +0800	[thread overview]
Message-ID: <1A42CE6F5F474C41B63392A5F80372B256199898@shsmsx501.ccr.corp.intel.com> (raw)
In-Reply-To: <20110602144553.GJ5098@whitby.uk.xensource.com>

> > +    if ( vmcs_reg == IO_BITMAP_A )
> > +    {
> > +        if (nvmx->iobitmap[0]) {
> > +            unmap_domain_page_global(nvmx->iobitmap[0]);
> > +        }
> > +        gpa = __get_vvmcs(vcpu_nestedhvm(v).nv_vvmcx,
> IO_BITMAP_A);
> > +        mfn = mfn_x(gfn_to_mfn(p2m_get_hostp2m(v->domain),
> > +                              gpa >> PAGE_SHIFT, &p2mt));
> > +        nvmx->iobitmap[0] = map_domain_page_global(mfn);
> 
> Why are these maps _global?  It might be OK to use 2 more global
> mappings per VCPU but the reason should probably go in a comment beside
> the call.

Do you mean to use hvm_map_guest_frame_ro? Fine to me.
> 
> Also, I don't see where these mappings get torn down on domain
> destruction.
> 
Yes. Fixed in nvmx_vcpu_destroy.

> (While I'm looking at this code, this function is quite ugly.  Why have
> a single function if you're going to duplicate its contents anyway?)

??? We don't know fi guest changed the bitmap, so we have to check each time.

> 
> +
> > +    if ( nvcpu->nv_vvmcxaddr == VMCX_EADDR )
> > +    {
> > +        mfn = mfn_x(gfn_to_mfn(p2m_get_hostp2m(v->domain),
> > +                               gpa >> PAGE_SHIFT, &p2mt));
> > +        nvcpu->nv_vvmcx = map_domain_page_global(mfn);
> 
> Again, why _global?

Will fix with hvm_map_guest_frame.

Thx, Eddie

  reply	other threads:[~2011-06-03  6:07 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02  8:57 [PATCH 00 of 20] NestedVMX support Eddie Dong
2011-06-02  8:57 ` [PATCH 01 of 20] pre-cleanup1: Extend nhvm_vmcx_guest_intercepts_trap to include errcode to Eddie Dong
2011-06-02  8:57 ` [PATCH 02 of 20] pre-cleanup2: Move IDT_VECTORING processing code out of intr_assist Eddie Dong
2011-06-02  8:57 ` [PATCH 03 of 20] Add data structure for nestedvmx Eddie Dong
2011-06-02  8:57 ` [PATCH 04 of 20] Add APIs for nestedhvm_ops Eddie Dong
2011-06-02  8:57 ` [PATCH 05 of 20] Emulation of guest VMXON/OFF instruction Eddie Dong
2011-06-02 14:36   ` Tim Deegan
2011-06-03  5:54     ` Dong, Eddie
2011-06-02  8:57 ` [PATCH 06 of 20] Define structure and access APIs for virtual VMCS Eddie Dong
2011-06-02  8:57 ` [PATCH 07 of 20] Emulation of guest vmptrld Eddie Dong
2011-06-02 14:45   ` Tim Deegan
2011-06-03  6:07     ` Dong, Eddie [this message]
2011-06-03  8:42       ` Tim Deegan
2011-06-07  1:48         ` Dong, Eddie
2011-06-02  8:57 ` [PATCH 08 of 20] Emulation of guest VMPTRST Eddie Dong
2011-06-02  8:57 ` [PATCH 09 of 20] Emulation of guest VMCLEAR Eddie Dong
2011-06-02  8:57 ` [PATCH 10 of 20] Emulation of guest VMWRITE Eddie Dong
2011-06-02  8:57 ` [PATCH 11 of 20] Emulation of guest VMREAD Eddie Dong
2011-06-02  8:57 ` [PATCH 12 of 20] Add APIs to switch n1/n2 VMCS Eddie Dong
2011-06-02 14:50   ` Tim Deegan
2011-06-03  7:30     ` Dong, Eddie
2011-06-02  8:57 ` [PATCH 13 of 20] Emulation of VMRESUME/VMLAUNCH Eddie Dong
2011-06-02  8:57 ` [PATCH 14 of 20] Extend VMCS control fields for n2 guest Eddie Dong
2011-06-02  8:57 ` [PATCH 15 of 20] Switch shadow/virtual VMCS between n1/n2 guests Eddie Dong
2011-06-02 14:56   ` Tim Deegan
2011-06-03  7:57     ` Dong, Eddie
2011-06-02 14:58   ` Tim Deegan
2011-06-02  8:57 ` [PATCH 16 of 20] interrupt/exception handling for n2 guest Eddie Dong
2011-06-02  8:57 ` [PATCH 17 of 20] VM exit handler of n2-guest Eddie Dong
2011-06-02 14:59   ` Tim Deegan
2011-06-03  8:06     ` Dong, Eddie
2011-06-03  8:43       ` Tim Deegan
2011-06-02  8:57 ` [PATCH 18 of 20] Lazy FPU for n2 guest Eddie Dong
2011-06-02  8:57 ` [PATCH 19 of 20] Add VMXE bits in virtual CR4 Eddie Dong
2011-06-02 15:01   ` Tim Deegan
2011-06-03  8:12     ` Dong, Eddie
2011-06-02  8:57 ` [PATCH 20 of 20] n2 MSR handling and capability exposure Eddie Dong
2011-06-02 15:07   ` Tim Deegan
2011-06-02 15:11     ` Tim Deegan
2011-06-02 19:20       ` Keir Fraser
2011-06-03  8:39       ` Dong, Eddie
2011-06-03  8:25     ` Dong, Eddie
2011-06-02 14:33 ` [PATCH 00 of 20] NestedVMX support Tim Deegan
2011-06-03  5:47   ` Dong, Eddie
2011-06-09  8:25 [PATCH 00 of 20] Rebased Nested VMX v2 Eddie Dong
2011-06-09  8:25 ` [PATCH 07 of 20] Emulation of guest vmptrld Eddie Dong

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=1A42CE6F5F474C41B63392A5F80372B256199898@shsmsx501.ccr.corp.intel.com \
    --to=eddie.dong@intel.com \
    --cc=Tim.Deegan@citrix.com \
    --cc=xen-devel@lists.xensource.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.