mbox

[PULL,RESEND,v2,0/4] KVM/ARM Fixes for v4.19

Message ID 20180907131256.2412-1-christoffer.dall@arm.com
State New
Headers show

Pull-request

git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git tags/kvm-arm-fixes-for-v4.19-v2

Message

Christoffer Dall Sept. 7, 2018, 1:12 p.m. UTC
Hi Radim and Paolo,

Here is the first small round of fixes for KVM/ARM for v4.19.  The
changes include:

 - Fix a VFP corruption in 32-bit guest
 - Add missing cache invalidation for CoW pages
 - Two small cleanups

This is a v2 because I forgot to add the appropriate cc stable on the first two
patches, otherwise there is no difference.

The following changes since commit 5b394b2ddf0347bef56e50c69a58773c94343ff3:

  Linux 4.19-rc1 (2018-08-26 14:11:59 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git tags/kvm-arm-fixes-for-v4.19-v2

for you to fetch changes up to df3190e22016abf74ef67c9691e9fa1012a66bd5:

  arm64: KVM: Remove pgd_lock (2018-09-07 15:06:03 +0200)

---
Marc Zyngier (3):
      KVM: arm/arm64: Clean dcache to PoC when changing PTE due to CoW
      arm64: KVM: Only force FPEXC32_EL2.EN if trapping FPSIMD
      KVM: Remove obsolete kvm_unmap_hva notifier backend

Steven Price (1):
      arm64: KVM: Remove pgd_lock

 arch/arm/include/asm/kvm_host.h   |  1 -
 arch/arm64/include/asm/kvm_host.h |  4 +---
 arch/arm64/kvm/hyp/switch.c       |  9 ++++++---
 arch/mips/include/asm/kvm_host.h  |  1 -
 arch/mips/kvm/mmu.c               | 10 ----------
 arch/x86/include/asm/kvm_host.h   |  1 -
 arch/x86/kvm/mmu.c                |  5 -----
 virt/kvm/arm/mmu.c                | 21 ++++++++-------------
 virt/kvm/arm/trace.h              | 15 ---------------
 9 files changed, 15 insertions(+), 52 deletions(-)

Comments

James Hogan Sept. 10, 2018, 6:13 a.m. UTC | #1
On 7 September 2018 14:12:55 BST, Christoffer Dall <christoffer.dall@arm.com> wrote:
>From: Marc Zyngier <marc.zyngier@arm.com>
>
>kvm_unmap_hva is long gone, and we only have kvm_unmap_hva_range to
>deal with. Drop the now obsolete code.
>
>Fixes: fb1522e099f0 ("KVM: update to new mmu_notifier semantic v2")
>Cc: James Hogan <jhogan@kernel.org>
>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
>Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
>---

> arch/mips/include/asm/kvm_host.h  |  1 -
> arch/mips/kvm/mmu.c               | 10 ----------

>diff --git a/arch/mips/include/asm/kvm_host.h
>b/arch/mips/include/asm/kvm_host.h
>index a9af1d2dcd69..2c1c53d12179 100644
>--- a/arch/mips/include/asm/kvm_host.h
>+++ b/arch/mips/include/asm/kvm_host.h
>@@ -931,7 +931,6 @@ enum kvm_mips_fault_result
>kvm_trap_emul_gva_fault(struct kvm_vcpu *vcpu,
> 						   bool write);
> 
> #define KVM_ARCH_WANT_MMU_NOTIFIER
>-int kvm_unmap_hva(struct kvm *kvm, unsigned long hva);
> int kvm_unmap_hva_range(struct kvm *kvm,
> 			unsigned long start, unsigned long end);
> void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte);
>diff --git a/arch/mips/kvm/mmu.c b/arch/mips/kvm/mmu.c
>index ee64db032793..d8dcdb350405 100644
>--- a/arch/mips/kvm/mmu.c
>+++ b/arch/mips/kvm/mmu.c
>@@ -512,16 +512,6 @@ static int kvm_unmap_hva_handler(struct kvm *kvm,
>gfn_t gfn, gfn_t gfn_end,
> 	return 1;
> }
> 
>-int kvm_unmap_hva(struct kvm *kvm, unsigned long hva)
>-{
>-	unsigned long end = hva + PAGE_SIZE;
>-
>-	handle_hva_to_gpa(kvm, hva, end, &kvm_unmap_hva_handler, NULL);
>-
>-	kvm_mips_callbacks->flush_shadow_all(kvm);
>-	return 0;
>-}
>-
>int kvm_unmap_hva_range(struct kvm *kvm, unsigned long start, unsigned
>long end)
> {
> 	handle_hva_to_gpa(kvm, start, end, &kvm_unmap_hva_handler, NULL);

Looks good to me. For MIPS:

Acked-by: James Hogan <jhogan@kernel.org>

thanks
James