| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC v1 05/15] vmx: Initialize VT-d Posted-Interrupts Descriptor
 On 25/03/15 12:31, Feng Wu wrote: This patch initializes the VT-d Posted-interrupt Descriptor. Signed-off-by: Feng Wu <feng.wu@xxxxxxxxx> --- xen/arch/x86/hvm/vmx/vmcs.c | 3 +++ xen/include/asm-x86/hvm/vmx/vmx.h | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index d614638..942f4b7 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -1004,6 +1004,9 @@ static int construct_vmcs(struct vcpu *v)if ( cpu_has_vmx_posted_intr_processing ) Being a boolean, please shorten this to "if ( iommu_intpost )" 
 This is called during construct_vmcs(). You safely rely on the fact that all memory is safely zeroed, so you don't need this clear bit, nor the lower setting of ndm. + v->arch.hvm_vmx.pi_desc.nv = posted_intr_vector; + + /* Physical mode for Notificaiton Event */ + v->arch.hvm_vmx.pi_desc.ndm = 0; + dest = cpu_physical_id(v->processor); + + if ( x2apic_enabled ) + v->arch.hvm_vmx.pi_desc.ndst = dest; + else + v->arch.hvm_vmx.pi_desc.ndst = (dest << 8) & 0xFF00; What takes care of ensuring that this ndst field gets updated whenever v->processor changes? ~Andrew +} + /* * Exit Reasons */ @@ -265,7 +285,6 @@ static inline unsigned long pi_get_pir(struct pi_desc *pi_desc, int group) #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 \ _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel 
 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |