hv: pirq: do not indicate priority when allocate vector

It's not necessary to specify priority for dynamic allocated vector, because
nested irq is not supported on HV, and irq of any priority would cause VM exit.

This commit makes the following changes:
 - remove the argument indicating priority in struct irq_request_info and
   following functions:
    ptdev_activate_entry()
    find_available_vector()
    irq_desc_alloc_vector()
    normal_register_handler()
 - change the macro of vector ranges:
    VECTOR_DYNAMIC_START/END for dynamically allocable vectors;
    VECTOR_FIXED_START/END for fixed allocated vectors, such as vector for
    timer etc.

Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Yan, Like
2018-08-06 17:48:45 +08:00
committed by lijinxia
parent 229bf32eb5
commit c492a14e53
9 changed files with 27 additions and 49 deletions

View File

@@ -629,7 +629,6 @@ int ptdev_msix_remap(struct vm *vm, uint16_t virt_bdf,
struct ptdev_msi_info *info)
{
struct ptdev_remapping_info *entry;
bool lowpri = !is_vm0(vm);
/*
* Device Model should pre-hold the mapping entries by calling
@@ -668,7 +667,7 @@ int ptdev_msix_remap(struct vm *vm, uint16_t virt_bdf,
if (!is_entry_active(entry)) {
/* update msi source and active entry */
ptdev_activate_entry(entry, IRQ_INVALID, lowpri);
ptdev_activate_entry(entry, IRQ_INVALID);
}
/* build physical config MSI, update to info->pmsi_xxx */
@@ -738,7 +737,6 @@ int ptdev_intx_pin_remap(struct vm *vm, struct ptdev_intx_info *info)
union ioapic_rte rte;
uint32_t phys_irq;
uint8_t phys_pin;
bool lowpri = !is_vm0(vm);
bool need_switch_vpin_src = false;
struct ptdev_intx_info *intx;
@@ -874,7 +872,7 @@ int ptdev_intx_pin_remap(struct vm *vm, struct ptdev_intx_info *info)
activate_physical_ioapic(vm, entry);
} else {
/* active entry */
ptdev_activate_entry(entry, phys_irq, lowpri);
ptdev_activate_entry(entry, phys_irq);
activate_physical_ioapic(vm, entry);