These fixes fix two issues in KVM for arm/arm64:

- hyp mode initialization issues on certian boards/bootloader combos.
  - incorrect return address from trapped WFI/WFE instrucitons, which
    breaks non-linux guests.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUAE3gAAoJEEtpOizt6ddyJnsH/RNK4EQRrBqYZyykA+nDepU1
 aY9HsS2ecuoJAyj6SJ1BXBVztxLGoVkLbPNLlhW/fnbIp77QJOJNvljKrNTcv61Q
 1BuUJdIjzPK7iTRsUR1zH6nKl9q53J1TSXPGBiyQBUAAY8tV2GLfThCaEA5D5r70
 M8V2wT60TA3GaYmUav01HyiLPHFpfL7eN1gvs0du85URfE+G1DcYafkt9Nh7oPcn
 KEA+ECzwfcxrvXueTz0V/pCS2kW0QeLD2Ar6Wf2gFtw6OaytM8B63Eeu/78Eu/65
 Kcf20dGWDTsdZwHkZOs8+ySmWew4LprJ+YjEgsDIZ/vdVciQ95o28T8OFp88Zqo=
 =5v4D
 -----END PGP SIGNATURE-----

Merge tag 'kvm-arm-for-v3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

These fixes fix two issues in KVM for arm/arm64:
 - hyp mode initialization issues on certian boards/bootloader combos.
 - incorrect return address from trapped WFI/WFE instrucitons, which
   breaks non-linux guests.
This commit is contained in:
Paolo Bonzini 2014-08-29 12:26:54 +02:00
Родитель 0ac625df43 05e0127f9e
Коммит 8d68f67b57
4 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -93,6 +93,8 @@ static int kvm_handle_wfx(struct kvm_vcpu *vcpu, struct kvm_run *run)
else
kvm_vcpu_block(vcpu);
kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu));
return 1;
}

Просмотреть файл

@ -99,6 +99,10 @@ __do_hyp_init:
mrc p15, 0, r0, c10, c2, 1
mcr p15, 4, r0, c10, c2, 1
@ Invalidate the stale TLBs from Bootloader
mcr p15, 4, r0, c8, c7, 0 @ TLBIALLH
dsb ish
@ Set the HSCTLR to:
@ - ARM/THUMB exceptions: Kernel config (Thumb-2 kernel)
@ - Endianness: Kernel config

Просмотреть файл

@ -66,6 +66,8 @@ static int kvm_handle_wfx(struct kvm_vcpu *vcpu, struct kvm_run *run)
else
kvm_vcpu_block(vcpu);
kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu));
return 1;
}

Просмотреть файл

@ -80,6 +80,10 @@ __do_hyp_init:
msr mair_el2, x4
isb
/* Invalidate the stale TLBs from Bootloader */
tlbi alle2
dsb sy
mrs x4, sctlr_el2
and x4, x4, #SCTLR_EL2_EE // preserve endianness of EL2
ldr x5, =SCTLR_EL2_FLAGS