From: Christoph Egger Subject: [PATCH] svm: use wrmsrl Date: Fri, 25 Jun 2010 16:39:01 +0200 Message-ID: <201006251639.02072.Christoph.Egger@amd.com> Reply-To: Christoph.Egger@amd.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_G+LJMXQpySEAkKa" 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 --Boundary-00=_G+LJMXQpySEAkKa Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Attached patch uses wrmsrl in svm and cleans up surrounding code. Signed-off-by: Christoph Egger -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_G+LJMXQpySEAkKa Content-Type: text/x-diff; charset="iso 8859-15"; name="xen_svm.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_svm.diff" diff -r 4001ab0d5785 xen/arch/x86/hvm/svm/svm.c --- a/xen/arch/x86/hvm/svm/svm.c Fri Jun 25 13:23:49 2010 +0100 +++ b/xen/arch/x86/hvm/svm/svm.c Fri Jun 25 16:36:43 2010 +0200 @@ -862,8 +862,7 @@ static void svm_init_erratum_383(struct static int svm_cpu_up(void) { - u32 phys_hsa_lo, phys_hsa_hi; - uint64_t phys_hsa, msr_content; + uint64_t msr_content; int rc, cpu = smp_processor_id(); struct cpuinfo_x86 *c = &cpu_data[cpu]; @@ -881,10 +880,7 @@ static int svm_cpu_up(void) write_efer(read_efer() | EFER_SVME); /* Initialize the HSA for this core. */ - phys_hsa = (u64)virt_to_maddr(hsa[cpu]); - phys_hsa_lo = (u32)phys_hsa; - phys_hsa_hi = (u32)(phys_hsa >> 32); - wrmsr(MSR_K8_VM_HSAVE_PA, phys_hsa_lo, phys_hsa_hi); + wrmsrl(MSR_K8_VM_HSAVE_PA, (uint64_t)virt_to_maddr(hsa[cpu])); /* check for erratum 383 */ svm_init_erratum_383(c); --Boundary-00=_G+LJMXQpySEAkKa 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 --Boundary-00=_G+LJMXQpySEAkKa--