ia64/xen-unstable

changeset 14583:ec3b843dd733

hvm svm: Rename svm_do_vmmcall_reset_to_realmode() and some small
cleanups.
Signed-off-by: Mats Petersson <mats.petersson@amd.com>
author kfraser@localhost.localdomain
date Tue Mar 27 11:53:07 2007 +0100 (2007-03-27)
parents c9dc33338ccc
children 79449efbdd80
files xen/arch/x86/hvm/svm/svm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/svm/svm.c	Tue Mar 27 11:50:43 2007 +0100
     1.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Tue Mar 27 11:53:07 2007 +0100
     1.3 @@ -64,8 +64,8 @@ extern void svm_dump_inst(unsigned long 
     1.4  extern int svm_dbg_on;
     1.5  void svm_dump_regs(const char *from, struct cpu_user_regs *regs);
     1.6  
     1.7 -static int svm_do_vmmcall_reset_to_realmode(struct vcpu *v,
     1.8 -                                            struct cpu_user_regs *regs);
     1.9 +static int svm_reset_to_realmode(struct vcpu *v,
    1.10 +                                 struct cpu_user_regs *regs);
    1.11  
    1.12  /* va of hardware host save area     */
    1.13  static void *hsa[NR_CPUS] __read_mostly;
    1.14 @@ -749,19 +749,21 @@ static void svm_init_ap_context(
    1.15      struct vcpu_guest_context *ctxt, int vcpuid, int trampoline_vector)
    1.16  {
    1.17      struct vcpu *v;
    1.18 +    struct vmcb_struct *vmcb;
    1.19      cpu_user_regs_t *regs;
    1.20      u16 cs_sel;
    1.21  
    1.22      /* We know this is safe because hvm_bringup_ap() does it */
    1.23      v = current->domain->vcpu[vcpuid];
    1.24 +    vmcb = v->arch.hvm_svm.vmcb;
    1.25      regs = &v->arch.guest_context.user_regs;
    1.26  
    1.27      memset(ctxt, 0, sizeof(*ctxt));
    1.28  
    1.29      /*
    1.30       * We execute the trampoline code in real mode. The trampoline vector
    1.31 -     * passed to us is page alligned and is the physicall frame number for
    1.32 -     * the code. We will execute this code in real mode. 
    1.33 +     * passed to us is page alligned and is the physical frame number for
    1.34 +     * the code. We will execute this code in real mode.
    1.35       */
    1.36      cs_sel = trampoline_vector << 8;
    1.37      ctxt->user_regs.eip = 0x0;
    1.38 @@ -771,11 +773,11 @@ static void svm_init_ap_context(
    1.39       * This is the launch of an AP; set state so that we begin executing
    1.40       * the trampoline code in real-mode.
    1.41       */
    1.42 -    svm_do_vmmcall_reset_to_realmode(v, regs);  
    1.43 +    svm_reset_to_realmode(v, regs);  
    1.44      /* Adjust the vmcb's hidden register state. */
    1.45 -    v->arch.hvm_svm.vmcb->rip = 0;
    1.46 -    v->arch.hvm_svm.vmcb->cs.sel = cs_sel;
    1.47 -    v->arch.hvm_svm.vmcb->cs.base = (cs_sel << 4);
    1.48 +    vmcb->rip = 0;
    1.49 +    vmcb->cs.sel = cs_sel;
    1.50 +    vmcb->cs.base = (cs_sel << 4);
    1.51  }
    1.52  
    1.53  static void svm_init_hypercall_page(struct domain *d, void *hypercall_page)
    1.54 @@ -2494,8 +2496,8 @@ void svm_handle_invlpg(const short invlp
    1.55   *
    1.56   * returns 0 on success, non-zero otherwise
    1.57   */
    1.58 -static int svm_do_vmmcall_reset_to_realmode(struct vcpu *v, 
    1.59 -                                            struct cpu_user_regs *regs)
    1.60 +static int svm_reset_to_realmode(struct vcpu *v, 
    1.61 +                                 struct cpu_user_regs *regs)
    1.62  {
    1.63      struct vmcb_struct *vmcb;
    1.64