Turn on posted interrupt for vcpu if posted interrupt is avaliable.
Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Reviewed-by: Jun Nakajima <jun.nakajima@intel.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com> (from a release perspective)
__vmwrite(GUEST_INTR_STATUS, 0);
}
+ if ( cpu_has_vmx_posted_intr_processing )
+ {
+ __vmwrite(PI_DESC_ADDR, virt_to_maddr(&v->arch.hvm_vmx.pi_desc));
+ __vmwrite(POSTED_INTR_NOTIFICATION_VECTOR, posted_intr_vector);
+ }
+
/* Host data selectors. */
__vmwrite(HOST_SS_SELECTOR, __HYPERVISOR_DS);
__vmwrite(HOST_DS_SELECTOR, __HYPERVISOR_DS);
static int vmx_msr_write_intercept(unsigned int msr, uint64_t msr_content);
static void vmx_invlpg_intercept(unsigned long vaddr);
+uint8_t __read_mostly posted_intr_vector;
+
static int vmx_domain_initialise(struct domain *d)
{
int rc;
setup_ept_dump();
}
+
+ if ( cpu_has_vmx_posted_intr_processing )
+ alloc_direct_apic_vector(&posted_intr_vector, event_check_interrupt);
setup_vmcs_dump();
#include <asm/hvm/io.h>
#include <asm/hvm/vpmu.h>
+#include <irq_vectors.h>
extern void vmcs_dump_vcpu(struct vcpu *v);
extern void setup_vmcs_dump(void);
unsigned long apic_access_mfn;
};
+struct pi_desc {
+ DECLARE_BITMAP(pir, NR_VECTORS);
+ u32 control;
+ u32 rsvd[7];
+} __attribute__ ((aligned (64)));
+
#define ept_get_wl(ept) ((ept)->ept_wl)
#define ept_get_asr(ept) ((ept)->asr)
#define ept_get_eptp(ept) ((ept)->eptp)
uint32_t eoi_exitmap_changed;
uint64_t eoi_exit_bitmap[4];
+ struct pi_desc pi_desc;
unsigned long host_cr0;
#define MODRM_EAX_ECX ".byte 0xc1\n" /* EAX, ECX */
extern u64 vmx_ept_vpid_cap;
+extern uint8_t posted_intr_vector;
#define cpu_has_vmx_ept_exec_only_supported \
(vmx_ept_vpid_cap & VMX_EPT_EXEC_ONLY_SUPPORTED)