Skip to content

Commit 2c12fcf

Browse files
committed
KVM: pVMX: Implement setup_mce operation
Enable the pKVM VMX host to setup guest MCE via the setup_mce PV interface. Signed-off-by: Chuanxiao Dong <[email protected]>
1 parent 90ee915 commit 2c12fcf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

arch/x86/kvm/vmx/pkvm_host.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,11 @@ static struct kvm_x86_nested_ops pkvm_nested_ops = {
10161016
.write_log_dirty = pkvm_nested_write_pml_buffer,
10171017
};
10181018

1019+
static void pkvm_setup_mce(struct kvm_vcpu *vcpu)
1020+
{
1021+
KVM_BUG_ON(pkvm_hypercall(setup_mce), vcpu->kvm);
1022+
}
1023+
10191024
static bool pkvm_apic_init_signal_blocked(struct kvm_vcpu *vcpu)
10201025
{
10211026
/*
@@ -1119,6 +1124,8 @@ struct kvm_x86_ops pkvm_host_vt_x86_ops __initdata = {
11191124
.pi_update_irte = vmx_pi_update_irte,
11201125
.pi_start_bypass = vmx_pi_start_bypass,
11211126

1127+
.setup_mce = pkvm_setup_mce,
1128+
11221129
.apic_init_signal_blocked = pkvm_apic_init_signal_blocked,
11231130

11241131
.vcpu_deliver_sipi_vector = kvm_vcpu_deliver_sipi_vector,

0 commit comments

Comments
 (0)