DM: wrap ASSERT/DEASSERT IRQ line with Set/Clear IRQ line

- remove ASSERT & DEASSET IRQ line IOCTLs
 - remove PULSE IRQ line IOCTLs, use set/clear
   IRQ line instead.
 - Use IC_SET_IRQLINE to set or clear IRQ line

Tracked-On: #861
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Yonghua Huang
2018-09-27 17:34:25 +08:00
committed by Xie, Nanlin
parent e12f88b8c7
commit b686b562f4
10 changed files with 32 additions and 131 deletions

View File

@@ -350,40 +350,23 @@ struct acrn_set_ioreq_buffer {
uint64_t req_buf;
} __aligned(8);
/** Interrupt type for acrn_irqline: inject interrupt to IOAPIC */
#define ACRN_INTR_TYPE_ISA 0U
/** Interrupt type for acrn_irqline: inject interrupt to both PIC and IOAPIC */
#define ACRN_INTR_TYPE_IOAPIC 1U
/** Operation types for setting IRQ line */
#define GSI_SET_HIGH 0U
#define GSI_SET_LOW 1U
#define GSI_RAISING_PULSE 2U
#define GSI_FALLING_PULSE 3U
/**
* @brief Info to assert/deassert/pulse a virtual IRQ line for a VM
* @brief Info to Set/Clear/Pulse a virtual IRQ line for a VM
*
* the parameter for HC_ASSERT_IRQLINE/HC_DEASSERT_IRQLINE/HC_PULSE_IRQLINE
* hypercall
* the parameter for HC_SET_IRQLINE hypercall
*/
struct acrn_irqline {
/** interrupt type which could be IOAPIC or ISA */
uint32_t intr_type;
/** reserved for alignment padding */
uint32_t reserved;
/** pic IRQ for ISA type */
uint32_t pic_irq;
/** Reserved */
uint32_t reserved0;
/** ioapic IRQ for IOAPIC & ISA TYPE,
* if ~0U then this IRQ will not be injected
*/
uint32_t ioapic_irq;
/** Reserved */
uint32_t reserved1;
struct acrn_irqline_ops {
uint32_t nr_gsi;
uint32_t op;
} __aligned(8);
/**
* @brief Info to inject a MSI interrupt to VM
*

View File

@@ -77,11 +77,9 @@
/* IRQ and Interrupts */
#define IC_ID_IRQ_BASE 0x20UL
#define IC_ASSERT_IRQLINE _IC_ID(IC_ID, IC_ID_IRQ_BASE + 0x00)
#define IC_DEASSERT_IRQLINE _IC_ID(IC_ID, IC_ID_IRQ_BASE + 0x01)
#define IC_PULSE_IRQLINE _IC_ID(IC_ID, IC_ID_IRQ_BASE + 0x02)
#define IC_INJECT_MSI _IC_ID(IC_ID, IC_ID_IRQ_BASE + 0x03)
#define IC_VM_INTR_MONITOR _IC_ID(IC_ID, IC_ID_IRQ_BASE + 0x04)
#define IC_SET_IRQLINE _IC_ID(IC_ID, IC_ID_IRQ_BASE + 0x05)
/* DM ioreq management */
#define IC_ID_IOREQ_BASE 0x30UL