Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372091
b: refs/heads/master
c: 9c7a643
h: refs/heads/master
i:
  372089: 01eb194
  372087: c0b010e
v: v3
  • Loading branch information
Marc Zyngier authored and Christoffer Dall committed Mar 6, 2013
1 parent 7911d16 commit 8220869
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e7858c58d52237a4519e2fdb1ce8f2d9805ce0ce
refs/heads/master: 9c7a6432fb081563f084b25bbd2774b1547c4fad
6 changes: 4 additions & 2 deletions trunk/arch/arm/include/asm/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ struct kvm_vcpu_fault_info {
u32 hyp_pc; /* PC when exception was taken from Hyp mode */
};

typedef struct vfp_hard_struct kvm_kernel_vfp_t;

struct kvm_vcpu_arch {
struct kvm_regs regs;

Expand All @@ -103,8 +105,8 @@ struct kvm_vcpu_arch {
struct kvm_vcpu_fault_info fault;

/* Floating point registers (VFP and Advanced SIMD/NEON) */
struct vfp_hard_struct vfp_guest;
struct vfp_hard_struct *vfp_host;
kvm_kernel_vfp_t vfp_guest;
kvm_kernel_vfp_t *vfp_host;

/* VGIC state */
struct vgic_cpu vgic_cpu;
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/kvm/arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ __asm__(".arch_extension virt");
#endif

static DEFINE_PER_CPU(unsigned long, kvm_arm_hyp_stack_page);
static struct vfp_hard_struct __percpu *kvm_host_vfp_state;
static kvm_kernel_vfp_t __percpu *kvm_host_vfp_state;
static unsigned long hyp_default_vectors;

/* Per-CPU variable containing the currently running vcpu. */
Expand Down Expand Up @@ -908,15 +908,15 @@ static int init_hyp_mode(void)
/*
* Map the host VFP structures
*/
kvm_host_vfp_state = alloc_percpu(struct vfp_hard_struct);
kvm_host_vfp_state = alloc_percpu(kvm_kernel_vfp_t);
if (!kvm_host_vfp_state) {
err = -ENOMEM;
kvm_err("Cannot allocate host VFP state\n");
goto out_free_mappings;
}

for_each_possible_cpu(cpu) {
struct vfp_hard_struct *vfp;
kvm_kernel_vfp_t *vfp;

vfp = per_cpu_ptr(kvm_host_vfp_state, cpu);
err = create_hyp_mappings(vfp, vfp + 1);
Expand Down

0 comments on commit 8220869

Please sign in to comment.