[PATCH OLK-6.6 0/1] KVM: arm64: fix the issue of vNMI not supporting live migration

Jinqian Yang (1): KVM: arm64: fix the issue of vNMI not supporting live migration arch/arm64/kvm/vgic/vgic-mmio-v3.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) -- 2.33.0

virt inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/ICVB8V CVE: NA -------------------------------- Add the migration of GICR_INMIR0. vNMI migration for SPI is not supported, only supports SGI and PPI in guest. Sign-off-by: Jinqian Yang <yangjinqian1@huawei.com> --- arch/arm64/kvm/vgic/vgic-mmio-v3.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/vgic/vgic-mmio-v3.c b/arch/arm64/kvm/vgic/vgic-mmio-v3.c index f9f47c91ee03..3289f2501ac0 100644 --- a/arch/arm64/kvm/vgic/vgic-mmio-v3.c +++ b/arch/arm64/kvm/vgic/vgic-mmio-v3.c @@ -642,6 +642,12 @@ static unsigned long vgic_mmio_read_nmi(struct kvm_vcpu *vcpu, return value; } +static unsigned long vgic_uaccess_read_nmi(struct kvm_vcpu *vcpu, + gpa_t addr, unsigned int len) +{ + return vgic_mmio_read_nmi(vcpu, addr, len); +} + static void vgic_mmio_write_nmi(struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len, unsigned long val) { @@ -671,6 +677,13 @@ static void vgic_mmio_write_nmi(struct kvm_vcpu *vcpu, gpa_t addr, } } +static int vgic_uaccess_write_nmi(struct kvm_vcpu *vcpu, gpa_t addr, + unsigned int len, unsigned long val) +{ + vgic_mmio_write_nmi(vcpu, addr, len, val); + return 0; +} + /* * The GICv3 per-IRQ registers are split to control PPIs and SGIs in the * redistributors, while SPIs are covered by registers in the distributor @@ -831,8 +844,9 @@ static const struct vgic_register_region vgic_v3_rd_registers[] = { REGISTER_DESC_WITH_LENGTH(SZ_64K + GICR_NSACR, vgic_mmio_read_raz, vgic_mmio_write_wi, 4, VGIC_ACCESS_32bit), - REGISTER_DESC_WITH_LENGTH(SZ_64K + GICR_INMIR0, - vgic_mmio_read_nmi, vgic_mmio_write_nmi, 4, + REGISTER_DESC_WITH_LENGTH_UACCESS(SZ_64K + GICR_INMIR0, + vgic_mmio_read_nmi, vgic_mmio_write_nmi, + vgic_uaccess_read_nmi, vgic_uaccess_write_nmi, 4, VGIC_ACCESS_32bit), }; -- 2.33.0

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/17802 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/6D3... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/17802 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/6D3...
participants (2)
-
Jinqian Yang
-
patchwork bot