xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Wang2 <wei.wang2@amd.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH 2/4] VPMU: Make vpmu stucture visiable for both vmx and svm
Date: Wed, 12 May 2010 18:25:11 +0200	[thread overview]
Message-ID: <201005121825.11827.wei.wang2@amd.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

Signed-off-by: Wei Wang <wei.wang2@amd.com>
-- 
AMD GmbH, Germany
Operating System Research Center

Legal Information:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34
85609 Dornach b. München

Geschäftsführer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis München
Registergericht München, HRB Nr. 43632

[-- Attachment #2: header_vpmu.patch --]
[-- Type: text/x-diff, Size: 1602 bytes --]

diff -r dcb9da42bfd0 xen/include/asm-x86/hvm/vcpu.h
--- a/xen/include/asm-x86/hvm/vcpu.h	Tue May 11 15:03:37 2010 +0200
+++ b/xen/include/asm-x86/hvm/vcpu.h	Tue May 11 15:33:12 2010 +0200
@@ -75,6 +75,9 @@ struct hvm_vcpu {
 
     u32                 msr_tsc_aux;
 
+    /* VPMU */
+    struct vpmu_struct  vpmu;
+
     union {
         struct arch_vmx_struct vmx;
         struct arch_svm_struct svm;
diff -r dcb9da42bfd0 xen/include/asm-x86/hvm/vmx/vmcs.h
--- a/xen/include/asm-x86/hvm/vmx/vmcs.h	Tue May 11 15:03:37 2010 +0200
+++ b/xen/include/asm-x86/hvm/vmx/vmcs.h	Tue May 11 15:33:12 2010 +0200
@@ -90,9 +90,6 @@ struct arch_vmx_struct {
     /* Cache of cpu execution control. */
     u32                  exec_control;
     u32                  secondary_exec_control;
-
-    /* PMU */
-    struct vpmu_struct   vpmu;
 
 #ifdef __x86_64__
     struct vmx_msr_state msr_state;
diff -r dcb9da42bfd0 xen/include/asm-x86/hvm/vpmu.h
--- a/xen/include/asm-x86/hvm/vpmu.h	Tue May 11 15:03:37 2010 +0200
+++ b/xen/include/asm-x86/hvm/vpmu.h	Tue May 11 15:33:12 2010 +0200
@@ -23,9 +23,9 @@
 #define __ASM_X86_HVM_VPMU_H_
 
 #define msraddr_to_bitpos(x) (((x)&0xffff) + ((x)>>31)*0x2000)
-#define vcpu_vpmu(vcpu)   (&(vcpu)->arch.hvm_vcpu.u.vmx.vpmu)
+#define vcpu_vpmu(vcpu)   (&((vcpu)->arch.hvm_vcpu.vpmu))
 #define vpmu_vcpu(vpmu)   (container_of((vpmu), struct vcpu, \
-                                          arch.hvm_vcpu.u.vmx.vpmu))
+                                          arch.hvm_vcpu.vpmu))
 #define vpmu_domain(vpmu) (vpmu_vcpu(vpmu)->domain)
 
 #define MSR_TYPE_COUNTER            0

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

                 reply	other threads:[~2010-05-12 16:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201005121825.11827.wei.wang2@amd.com \
    --to=wei.wang2@amd.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).