mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
KVM/arm64 fixes for 6.2, take #2
- Pass the correct address to mte_clear_page_tags() on initialising a tagged page - Plug a race against a GICv4.1 doorbell interrupt while saving the vgic-v3 pending state. -----BEGIN PGP SIGNATURE----- iQJDBAABCgAtFiEEn9UcU+C1Yxj9lZw9I9DQutE9ekMFAmPLxmwPHG1hekBrZXJu ZWwub3JnAAoJECPQ0LrRPXpDjuQP/3Fn8HesySYw/J8su4TMkVaS6FqI9uI9yrad fp2uZFz3J8sf0ukkaqkTAkMymS+NOia7QQAgXreQEvml2n3jgQr6d1UMtLgeFgR/ 3DsnpCIK/2wuvoJDh66h6Mjednxa8OhUzIfb+n0j/nrbRY1tmtCnwKykGyBG3lHB lqMJQRF3yFK8EQOEP5vq0izwtacrcnyWZxhSO/gMkT9luvIFEX18+q+ELN40vDTe 2YGcvyNllWb23/4NsH75c7jgNNiwbiHJsWUOR1TgP8Gbps23TTdQ/0CGzIRz8F83 usKKBiY6TuxNoPbF3CDjCyGkwPw3NwhCkZEja6NuGW2co6uC/mJw6+GLrgnJvhr5 g2JBsSRiJZM/YhBh5Qp8ayyrzGhXcgjUjYNUgn8ioZ2dt4mZ4XkVQGEjYSGgEe6C XJA5Fn+5RFG/57xEFfsZ3YYw6HoN5kLVWhg16nHnuSoM5jPfBlcqjDYDSeUqBt/u gNpHYxWsCC8SQR7+jmtpHzT6sfus5oo9YJMIziC3rIDKVO0Ae3O3XHjknf70uG8K s69UL0GeEexdqdaJf7EWtoqxJe4C+7NSKAfWMELGxDyHJBokFhz1/Y/yL1Dst/KQ v7NSekCilvIJvvzTl6/PB0NIl5cV/qkR7/7k0vtBPNEZRNibNLfiK/q304HeR0QN oSf3PrpA =g8uY -----END PGP SIGNATURE----- Merge tag 'kvmarm-fixes-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.2, take #2 - Pass the correct address to mte_clear_page_tags() on initialising a tagged page - Plug a race against a GICv4.1 doorbell interrupt while saving the vgic-v3 pending state.
This commit is contained in:
commit
d732cbf78d
|
|
@ -1079,7 +1079,7 @@ long kvm_vm_ioctl_mte_copy_tags(struct kvm *kvm,
|
|||
|
||||
/* uaccess failed, don't leave stale tags */
|
||||
if (num_tags != MTE_GRANULES_PER_PAGE)
|
||||
mte_clear_page_tags(page);
|
||||
mte_clear_page_tags(maddr);
|
||||
set_page_mte_tagged(page);
|
||||
|
||||
kvm_release_pfn_dirty(pfn);
|
||||
|
|
|
|||
|
|
@ -350,26 +350,23 @@ int vgic_v3_lpi_sync_pending_status(struct kvm *kvm, struct vgic_irq *irq)
|
|||
* The deactivation of the doorbell interrupt will trigger the
|
||||
* unmapping of the associated vPE.
|
||||
*/
|
||||
static void unmap_all_vpes(struct vgic_dist *dist)
|
||||
static void unmap_all_vpes(struct kvm *kvm)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
struct vgic_dist *dist = &kvm->arch.vgic;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < dist->its_vm.nr_vpes; i++) {
|
||||
desc = irq_to_desc(dist->its_vm.vpes[i]->irq);
|
||||
irq_domain_deactivate_irq(irq_desc_get_irq_data(desc));
|
||||
}
|
||||
for (i = 0; i < dist->its_vm.nr_vpes; i++)
|
||||
free_irq(dist->its_vm.vpes[i]->irq, kvm_get_vcpu(kvm, i));
|
||||
}
|
||||
|
||||
static void map_all_vpes(struct vgic_dist *dist)
|
||||
static void map_all_vpes(struct kvm *kvm)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
struct vgic_dist *dist = &kvm->arch.vgic;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < dist->its_vm.nr_vpes; i++) {
|
||||
desc = irq_to_desc(dist->its_vm.vpes[i]->irq);
|
||||
irq_domain_activate_irq(irq_desc_get_irq_data(desc), false);
|
||||
}
|
||||
for (i = 0; i < dist->its_vm.nr_vpes; i++)
|
||||
WARN_ON(vgic_v4_request_vpe_irq(kvm_get_vcpu(kvm, i),
|
||||
dist->its_vm.vpes[i]->irq));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -394,7 +391,7 @@ int vgic_v3_save_pending_tables(struct kvm *kvm)
|
|||
* and enabling of the doorbells have already been done.
|
||||
*/
|
||||
if (kvm_vgic_global_state.has_gicv4_1) {
|
||||
unmap_all_vpes(dist);
|
||||
unmap_all_vpes(kvm);
|
||||
vlpi_avail = true;
|
||||
}
|
||||
|
||||
|
|
@ -444,7 +441,7 @@ int vgic_v3_save_pending_tables(struct kvm *kvm)
|
|||
|
||||
out:
|
||||
if (vlpi_avail)
|
||||
map_all_vpes(dist);
|
||||
map_all_vpes(kvm);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -222,6 +222,11 @@ void vgic_v4_get_vlpi_state(struct vgic_irq *irq, bool *val)
|
|||
*val = !!(*ptr & mask);
|
||||
}
|
||||
|
||||
int vgic_v4_request_vpe_irq(struct kvm_vcpu *vcpu, int irq)
|
||||
{
|
||||
return request_irq(irq, vgic_v4_doorbell_handler, 0, "vcpu", vcpu);
|
||||
}
|
||||
|
||||
/**
|
||||
* vgic_v4_init - Initialize the GICv4 data structures
|
||||
* @kvm: Pointer to the VM being initialized
|
||||
|
|
@ -283,8 +288,7 @@ int vgic_v4_init(struct kvm *kvm)
|
|||
irq_flags &= ~IRQ_NOAUTOEN;
|
||||
irq_set_status_flags(irq, irq_flags);
|
||||
|
||||
ret = request_irq(irq, vgic_v4_doorbell_handler,
|
||||
0, "vcpu", vcpu);
|
||||
ret = vgic_v4_request_vpe_irq(vcpu, irq);
|
||||
if (ret) {
|
||||
kvm_err("failed to allocate vcpu IRQ%d\n", irq);
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -331,5 +331,6 @@ int vgic_v4_init(struct kvm *kvm);
|
|||
void vgic_v4_teardown(struct kvm *kvm);
|
||||
void vgic_v4_configure_vsgis(struct kvm *kvm);
|
||||
void vgic_v4_get_vlpi_state(struct vgic_irq *irq, bool *val);
|
||||
int vgic_v4_request_vpe_irq(struct kvm_vcpu *vcpu, int irq);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user