From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: [PATCH 2/9] x86/pvh: Don't copy to/from trap_ctxt for 32b PVH guests Date: Fri, 19 Jun 2015 23:09:25 -0400 Message-ID: <1434769773-5157-3-git-send-email-boris.ostrovsky@oracle.com> References: <1434769773-5157-1-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1434769773-5157-1-git-send-email-boris.ostrovsky@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: elena.ufimtseva@oracle.com, Keir Fraser , Andrew Cooper , tim@xen.org, Jan Beulich , Boris Ostrovsky , roger.pau@citrix.com List-Id: xen-devel@lists.xenproject.org .. as this field is not used by PVH guests Signed-off-by: Boris Ostrovsky CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper --- xen/arch/x86/domain.c | 9 ++++++--- xen/arch/x86/domctl.c | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index e396c6c..c7ef1e6 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -805,9 +805,12 @@ int arch_set_info_guest( else { XLAT_cpu_user_regs(&v->arch.user_regs, &c.cmp->user_regs); - for ( i = 0; i < ARRAY_SIZE(c.cmp->trap_ctxt); ++i ) - XLAT_trap_info(v->arch.pv_vcpu.trap_ctxt + i, - c.cmp->trap_ctxt + i); + if ( is_pv_domain(d) ) + { + for ( i = 0; i < ARRAY_SIZE(c.cmp->trap_ctxt); ++i ) + XLAT_trap_info(v->arch.pv_vcpu.trap_ctxt + i, + c.cmp->trap_ctxt + i); + } } if ( has_hvm_container_domain(d) ) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index d8ffe2b..82bd818 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -1204,9 +1204,12 @@ void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c) else { XLAT_cpu_user_regs(&c.cmp->user_regs, &v->arch.user_regs); - for ( i = 0; i < ARRAY_SIZE(c.cmp->trap_ctxt); ++i ) - XLAT_trap_info(c.cmp->trap_ctxt + i, - v->arch.pv_vcpu.trap_ctxt + i); + if ( is_pv_domain(d) ) + { + for ( i = 0; i < ARRAY_SIZE(c.cmp->trap_ctxt); ++i ) + XLAT_trap_info(c.cmp->trap_ctxt + i, + v->arch.pv_vcpu.trap_ctxt + i); + } } for ( i = 0; i < ARRAY_SIZE(v->arch.debugreg); ++i ) -- 1.7.1