Mailing List Archive

[PATCH v3 06/10] nEPT: Sync PDPTR fields if L2 guest in PAE paging mode
From: Zhang Xiantao <xiantao.zhang@intel.com>

For PAE L2 guest, GUEST_DPPTR registers needs to be synced for each virtual
vmentry.
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
---
xen/arch/x86/hvm/vmx/vvmx.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index 2ae6f6a..1f7de7a 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -826,7 +826,14 @@ static void load_shadow_guest_state(struct vcpu *v)
vvmcs_to_shadow(vvmcs, CR0_GUEST_HOST_MASK);
vvmcs_to_shadow(vvmcs, CR4_GUEST_HOST_MASK);

- /* TODO: PDPTRs for nested ept */
+ if ( nvmx_ept_enabled(v) && hvm_pae_enabled(v) &&
+ (v->arch.hvm_vcpu.guest_efer & EFER_LMA) ) {
+ vvmcs_to_shadow(vvmcs, GUEST_PDPTR0);
+ vvmcs_to_shadow(vvmcs, GUEST_PDPTR1);
+ vvmcs_to_shadow(vvmcs, GUEST_PDPTR2);
+ vvmcs_to_shadow(vvmcs, GUEST_PDPTR3);
+ }
+
/* TODO: CR3 target control */
}

--
1.7.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
Re: [PATCH v3 06/10] nEPT: Sync PDPTR fields if L2 guest in PAE paging mode [ In reply to ]
>>> On 20.12.12 at 16:43, Xiantao Zhang <xiantao.zhang@intel.com> wrote:
> From: Zhang Xiantao <xiantao.zhang@intel.com>
>
> For PAE L2 guest, GUEST_DPPTR registers needs to be synced for each virtual
> vmentry.
> Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
> ---
> xen/arch/x86/hvm/vmx/vvmx.c | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
> index 2ae6f6a..1f7de7a 100644
> --- a/xen/arch/x86/hvm/vmx/vvmx.c
> +++ b/xen/arch/x86/hvm/vmx/vvmx.c
> @@ -826,7 +826,14 @@ static void load_shadow_guest_state(struct vcpu *v)
> vvmcs_to_shadow(vvmcs, CR0_GUEST_HOST_MASK);
> vvmcs_to_shadow(vvmcs, CR4_GUEST_HOST_MASK);
>
> - /* TODO: PDPTRs for nested ept */
> + if ( nvmx_ept_enabled(v) && hvm_pae_enabled(v) &&
> + (v->arch.hvm_vcpu.guest_efer & EFER_LMA) ) {
> + vvmcs_to_shadow(vvmcs, GUEST_PDPTR0);
> + vvmcs_to_shadow(vvmcs, GUEST_PDPTR1);
> + vvmcs_to_shadow(vvmcs, GUEST_PDPTR2);
> + vvmcs_to_shadow(vvmcs, GUEST_PDPTR3);

When I commented on the previous version's white space issue
in one of the patches, I really expected you to check all patches.
Yet here we have tabs again, and the placement of the opening
brace isn't right either, nor is the indentation of the continued
if() clause.

Please, before re-submitting, make sure you look through all of
the patches for further coding style issues.

Jan

> + }
> +
> /* TODO: CR3 target control */
> }
>
> --
> 1.7.1




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
Re: [PATCH v3 06/10] nEPT: Sync PDPTR fields if L2 guest in PAE paging mode [ In reply to ]
At 23:43 +0800 on 20 Dec (1356047027), Xiantao Zhang wrote:
> From: Zhang Xiantao <xiantao.zhang@intel.com>
>
> For PAE L2 guest, GUEST_DPPTR registers needs to be synced for each virtual
> vmentry.
> Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>

Apart from the whitespace mangling that Jan pointed out,

Acked-by: Tim Deegan <tim@xen.org>

> ---
> xen/arch/x86/hvm/vmx/vvmx.c | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
> index 2ae6f6a..1f7de7a 100644
> --- a/xen/arch/x86/hvm/vmx/vvmx.c
> +++ b/xen/arch/x86/hvm/vmx/vvmx.c
> @@ -826,7 +826,14 @@ static void load_shadow_guest_state(struct vcpu *v)
> vvmcs_to_shadow(vvmcs, CR0_GUEST_HOST_MASK);
> vvmcs_to_shadow(vvmcs, CR4_GUEST_HOST_MASK);
>
> - /* TODO: PDPTRs for nested ept */
> + if ( nvmx_ept_enabled(v) && hvm_pae_enabled(v) &&
> + (v->arch.hvm_vcpu.guest_efer & EFER_LMA) ) {
> + vvmcs_to_shadow(vvmcs, GUEST_PDPTR0);
> + vvmcs_to_shadow(vvmcs, GUEST_PDPTR1);
> + vvmcs_to_shadow(vvmcs, GUEST_PDPTR2);
> + vvmcs_to_shadow(vvmcs, GUEST_PDPTR3);
> + }
> +
> /* TODO: CR3 target control */
> }
>
> --
> 1.7.1
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

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