Skip to content

Commit 7ec2182

Browse files
committed
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Paolo writes: "KVM fixes for 4.19-rc8 Leftover bugfixes." * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: vmx: hyper-v: don't pass EPT configuration info to vmx_hv_remote_flush_tlb() KVM: x86: support CONFIG_KVM_AMD=y with CONFIG_CRYPTO_DEV_CCP_DD=m ARM: KVM: Correctly order SGI register entries in the cp15 array
2 parents f8ccb14 + 5f8bb00 commit 7ec2182

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

arch/arm/kvm/coproc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,15 +478,15 @@ static const struct coproc_reg cp15_regs[] = {
478478

479479
/* ICC_SGI1R */
480480
{ CRm64(12), Op1( 0), is64, access_gic_sgi},
481-
/* ICC_ASGI1R */
482-
{ CRm64(12), Op1( 1), is64, access_gic_sgi},
483-
/* ICC_SGI0R */
484-
{ CRm64(12), Op1( 2), is64, access_gic_sgi},
485481

486482
/* VBAR: swapped by interrupt.S. */
487483
{ CRn(12), CRm( 0), Op1( 0), Op2( 0), is32,
488484
NULL, reset_val, c12_VBAR, 0x00000000 },
489485

486+
/* ICC_ASGI1R */
487+
{ CRm64(12), Op1( 1), is64, access_gic_sgi},
488+
/* ICC_SGI0R */
489+
{ CRm64(12), Op1( 2), is64, access_gic_sgi},
490490
/* ICC_SRE */
491491
{ CRn(12), CRm(12), Op1( 0), Op2(5), is32, access_gic_sre },
492492

arch/x86/kvm/svm.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,14 +436,18 @@ static inline struct kvm_svm *to_kvm_svm(struct kvm *kvm)
436436

437437
static inline bool svm_sev_enabled(void)
438438
{
439-
return max_sev_asid;
439+
return IS_ENABLED(CONFIG_KVM_AMD_SEV) ? max_sev_asid : 0;
440440
}
441441

442442
static inline bool sev_guest(struct kvm *kvm)
443443
{
444+
#ifdef CONFIG_KVM_AMD_SEV
444445
struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
445446

446447
return sev->active;
448+
#else
449+
return false;
450+
#endif
447451
}
448452

449453
static inline int sev_get_asid(struct kvm *kvm)

arch/x86/kvm/vmx.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1572,8 +1572,12 @@ static int vmx_hv_remote_flush_tlb(struct kvm *kvm)
15721572
goto out;
15731573
}
15741574

1575+
/*
1576+
* FLUSH_GUEST_PHYSICAL_ADDRESS_SPACE hypercall needs the address of the
1577+
* base of EPT PML4 table, strip off EPT configuration information.
1578+
*/
15751579
ret = hyperv_flush_guest_mapping(
1576-
to_vmx(kvm_get_vcpu(kvm, 0))->ept_pointer);
1580+
to_vmx(kvm_get_vcpu(kvm, 0))->ept_pointer & PAGE_MASK);
15771581

15781582
out:
15791583
spin_unlock(&to_kvm_vmx(kvm)->ept_pointer_lock);

0 commit comments

Comments
 (0)