WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] small cleanup in vpmu

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] small cleanup in vpmu
From: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx>
Date: Mon, 21 Sep 2009 09:24:15 +0200
Delivery-date: Mon, 21 Sep 2009 00:24:44 -0700
Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=ts.fujitsu.com; i=dietmar.hahn@xxxxxxxxxxxxxx; q=dns/txt; s=s1536b; t=1253517872; x=1285053872; h=from:sender:reply-to:subject:date:message-id:to:cc: mime-version:content-transfer-encoding:content-id: content-description:resent-date:resent-from:resent-sender: resent-to:resent-cc:resent-message-id:in-reply-to: references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; z=From:=20Dietmar=20Hahn=20<dietmar.hahn@xxxxxxxxxxxxxx> |Subject:=20[PATCH]=20small=20cleanup=20in=20vpmu|Date: =20Mon,=2021=20Sep=202009=2009:24:15=20+0200|Message-Id: =20<200909210924.15440.dietmar.hahn@xxxxxxxxxxxxxx>|To: =20"xen-devel@xxxxxxxxxxxxxxxxxxx"=20<xen-devel@xxxxxxxxx source.com>|MIME-Version:=201.0 |Content-Transfer-Encoding:=207bit; bh=W7ZJFapX/cIkj9+w7JaSx55Soz/hqoj6GJIVFlkqkS0=; b=UJmzAB4fpXbbuuXW6n69sx8+Im262VKRlIecfRmnxQ7F+1/s7iVQjhJu X7dL9AOkjOfveKQ7B7eU1MGsGHjVah/tTikKlL6sU9wgJtmm6FwpTuaio ZnfEY+iioeth4oQzGnOEOd2nfWdXxV1Qsh4NeIL4USBI55nvtOySAn2GQ WKP+VljxE2xqds9eTMRfjaN6MrPqqqiVskCM+37QcnFVVJaVqUaFCCWPW CEpK2v35j/WnopLOWj7xl6MpVn6Bl;
Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Received:From:To:Subject:Date:User-Agent: MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id; b=q5YdhnZ1tR5FFCnlODhM+8Kq7BPy+e7tfpT5SuKLCxoz+bgn1LOXtVHg dQhfploIo9jTQbjRrLA0UJaiOYe/UJixSIdzdj5XeHrv6oGeIXdGGGWXW 3Tl/a7N9JOOOrTleaHKxSGag7tRuw7polBbUCjF5GEAPPK24vPdG/34Ys porCurjl3gcHfz+chxw6rSk1eEnAP4Fy0vF1RrIq3bj8WCd4ZZfD6ptOO c/ilmJ8yJj5EJCOnBTIestxYGMNRh;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.12.1 (Linux/2.6.27.29-0.1-pae; KDE/4.3.1; i686; ; )
The patch is only a small cleanup.
It replaces the special vpmu define LVTPC_HVM_PMU with the global
used define PMU_APIC_VECTOR to avoid different names for the
same thing.

Thanks.
Dietmar

Signed-off-by: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx>

diff -r 3a71e070e3c5 -r d7b2984c934e xen/arch/x86/hvm/vmx/vpmu_core2.c
--- a/xen/arch/x86/hvm/vmx/vpmu_core2.c Fri Sep 18 14:45:40 2009 +0100
+++ b/xen/arch/x86/hvm/vmx/vpmu_core2.c Mon Sep 21 08:01:54 2009 +0200
@@ -178,7 +178,7 @@
     for ( i = 0; i < core2_get_pmc_count(); i++ )
         rdmsrl(MSR_IA32_PERFCTR0+i, core2_vpmu_cxt->arch_msr_pair[i].counter);
     core2_vpmu_cxt->hw_lapic_lvtpc = apic_read(APIC_LVTPC);
-    apic_write(APIC_LVTPC, LVTPC_HVM_PMU | APIC_LVT_MASKED);
+    apic_write(APIC_LVTPC, PMU_APIC_VECTOR | APIC_LVT_MASKED);
 }
 
 static void core2_vpmu_save(struct vcpu *v)
@@ -398,9 +398,9 @@
     /* Setup LVTPC in local apic */
     if ( vpmu->flags & VPMU_RUNNING &&
          is_vlapic_lvtpc_enabled(vcpu_vlapic(v)) )
-        apic_write_around(APIC_LVTPC, LVTPC_HVM_PMU);
+        apic_write_around(APIC_LVTPC, PMU_APIC_VECTOR);
     else
-        apic_write_around(APIC_LVTPC, LVTPC_HVM_PMU | APIC_LVT_MASKED);
+        apic_write_around(APIC_LVTPC, PMU_APIC_VECTOR | APIC_LVT_MASKED);
 
     core2_vpmu_save_msr_context(v, type, index, msr_content);
     if ( type != MSR_TYPE_GLOBAL )
diff -r 3a71e070e3c5 -r d7b2984c934e xen/include/asm-x86/hvm/vmx/vpmu.h
--- a/xen/include/asm-x86/hvm/vmx/vpmu.h        Fri Sep 18 14:45:40 2009 +0100
+++ b/xen/include/asm-x86/hvm/vmx/vpmu.h        Mon Sep 21 08:01:54 2009 +0200
@@ -34,8 +34,6 @@
 #define MSR_TYPE_ARCH_COUNTER       3
 #define MSR_TYPE_ARCH_CTRL          4
 
-#define LVTPC_HVM_PMU            0xf8
-
 struct pmumsr {
     unsigned int num;
     u32 *msr;

-- 
Company details: http://ts.fujitsu.com/imprint.html

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] small cleanup in vpmu, Dietmar Hahn <=