Message ID | 20241114100802.4116-25-liju-clr.chen@mediatek.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | GenieZone hypervisor drivers | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
diff --git a/drivers/virt/geniezone/gzvm_exception.c b/drivers/virt/geniezone/gzvm_exception.c index 391168a3f737..7a4e3d76aa7a 100644 --- a/drivers/virt/geniezone/gzvm_exception.c +++ b/drivers/virt/geniezone/gzvm_exception.c @@ -105,3 +105,8 @@ int gzvm_handle_guest_idle(struct gzvm_vcpu *vcpu) return ret; } + +void gzvm_handle_guest_ipi(struct gzvm_vcpu *vcpu) +{ + gzvm_vcpu_wakeup_all(vcpu->gzvm); +} diff --git a/drivers/virt/geniezone/gzvm_vcpu.c b/drivers/virt/geniezone/gzvm_vcpu.c index 247848ee126c..5cdd6ccbe76d 100644 --- a/drivers/virt/geniezone/gzvm_vcpu.c +++ b/drivers/virt/geniezone/gzvm_vcpu.c @@ -184,6 +184,9 @@ static long gzvm_vcpu_run(struct gzvm_vcpu *vcpu, void __user *argp) case GZVM_EXIT_IDLE: gzvm_handle_guest_idle(vcpu); break; + case GZVM_EXIT_IPI: + gzvm_handle_guest_ipi(vcpu); + break; case GZVM_EXIT_UNKNOWN: fallthrough; default: diff --git a/include/linux/soc/mediatek/gzvm_drv.h b/include/linux/soc/mediatek/gzvm_drv.h index 54fa7aea7245..8fc6c6f54227 100644 --- a/include/linux/soc/mediatek/gzvm_drv.h +++ b/include/linux/soc/mediatek/gzvm_drv.h @@ -266,6 +266,7 @@ int gzvm_handle_relinquish(struct gzvm_vcpu *vcpu, phys_addr_t ipa); bool gzvm_handle_guest_hvc(struct gzvm_vcpu *vcpu); bool gzvm_arch_handle_guest_hvc(struct gzvm_vcpu *vcpu); int gzvm_handle_guest_idle(struct gzvm_vcpu *vcpu); +void gzvm_handle_guest_ipi(struct gzvm_vcpu *vcpu); void gzvm_vcpu_wakeup_all(struct gzvm *gzvm); int gzvm_arch_create_device(u16 vm_id, struct gzvm_create_device *gzvm_dev); diff --git a/include/uapi/linux/gzvm.h b/include/uapi/linux/gzvm.h index 61ce53cd9448..d69e1abb21a0 100644 --- a/include/uapi/linux/gzvm.h +++ b/include/uapi/linux/gzvm.h @@ -190,6 +190,7 @@ enum { GZVM_EXIT_SHUTDOWN = 0x92920009, GZVM_EXIT_GZ = 0x9292000a, GZVM_EXIT_IDLE = 0x9292000b, + GZVM_EXIT_IPI = 0x9292000d, }; /* exception definitions of GZVM_EXIT_EXCEPTION */