From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH] nestedsvm: Support Decodeassist Date: Fri, 3 Jun 2011 17:00:35 +0200 Message-ID: <4DE8F713.5020908@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080100030201040704090805" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --------------080100030201040704090805 Content-Type: text/plain; charset="ISO-8859-15"; format=flowed Content-Transfer-Encoding: 7bit Offer l1 guest to use decode assist if available in hardware. Signed-off-by: Christoph Egger -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --------------080100030201040704090805 Content-Type: text/plain; name="xen_nh_decodeassist.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_nh_decodeassist.diff" Content-Description: xen_nh_decodeassist.diff diff -r 2007b3ab2f11 tools/libxc/xc_cpuid_x86.c --- a/tools/libxc/xc_cpuid_x86.c Wed Jun 01 15:23:04 2011 +0200 +++ b/tools/libxc/xc_cpuid_x86.c Fri Jun 03 16:54:05 2011 +0200 @@ -153,7 +153,8 @@ static void amd_xc_cpuid_policy( * available in hw and which are implemented */ regs[3] &= (SVM_FEATURE_NPT | SVM_FEATURE_LBRV | \ - SVM_FEATURE_NRIPS | SVM_FEATURE_PAUSEFILTER); + SVM_FEATURE_NRIPS | SVM_FEATURE_PAUSEFILTER | \ + SVM_FEATURE_DECODEASSISTS); /* Pass 2: Always enable SVM features which are emulated */ regs[3] |= SVM_FEATURE_VMCBCLEAN; diff -r 2007b3ab2f11 xen/arch/x86/hvm/svm/nestedsvm.c --- a/xen/arch/x86/hvm/svm/nestedsvm.c Wed Jun 01 15:23:04 2011 +0200 +++ b/xen/arch/x86/hvm/svm/nestedsvm.c Fri Jun 03 16:54:05 2011 +0200 @@ -1056,6 +1056,10 @@ nsvm_vmcb_prepare4vmexit(struct vcpu *v) /* NextRIP */ ns_vmcb->nextrip = n2vmcb->nextrip; + /* Decode Assist */ + ns_vmcb->guest_ins_len = n2vmcb->guest_ins_len; + memcpy(ns_vmcb->guest_ins, n2vmcb->guest_ins, sizeof(ns_vmcb->guest_ins)); + /* * VMCB Save State Area */ --------------080100030201040704090805 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------080100030201040704090805--