[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/hvm: implement save/restore for posted interrupts



Olaf Hering wrote on 2014-08-04:
> On Mon, Aug 04, Zhang, Yang Z wrote:
> 
>> This is really strange. With this patch, i cannot reproduce the issue
>> with sles11sp3 on latest Xen.
>> 
>> Besides, according the response from John, the issue they observed is
>> exactly the eoi bitmap update issue.
>> 
>> BTW, my patch is based on your sync_pir_to_irr changes. I am not
>> sure whether you applied the following changes when doing testing.
>> But you should see the failure ratio is reduced obviously even
>> without it, right?
> 
> I have used this patch now, the sync_pir_to_irr part was indeed missing.
> But, still no joy for me. This is what I used:

Have you tired latest Xen? With this patch, i didn't see any issue after more 
than 20 rounds migration testing. Without it, the problem is observed with less 
than 10 rounds migration.

> 
> 
> ---
>  xen/arch/x86/hvm/vlapic.c        |    3 +++
>  xen/arch/x86/hvm/vmx/vmx.c       |   10 ++++++++++
>  xen/include/asm-x86/hvm/vlapic.h |    2 ++
>  3 files changed, 15 insertions(+)
> Index: xen-4.2.4-testing/xen/arch/x86/hvm/vlapic.c
> ================================================================ === ---
> xen-4.2.4-testing.orig/xen/arch/x86/hvm/vlapic.c +++
> xen-4.2.4-testing/xen/arch/x86/hvm/vlapic.c @@ -1164,6 +1164,9 @@ static
> int lapic_save_regs(struct domain
> 
>      for_each_vcpu ( d, v )
>      {
> +        if ( hvm_funcs.sync_pir_to_irr )
> +            hvm_funcs.sync_pir_to_irr(v);
> +
>          s = vcpu_vlapic(v);
>          if ( (rc = hvm_save_entry(LAPIC_REGS, v->vcpu_id, h, s->regs)) != 0 )
>              break;
> Index: xen-4.2.4-testing/xen/arch/x86/hvm/vmx/vmx.c
> ================================================================ === ---
> xen-4.2.4-testing.orig/xen/arch/x86/hvm/vmx/vmx.c +++
> xen-4.2.4-testing/xen/arch/x86/hvm/vmx/vmx.c @@ -1606,6 +1606,8 @@
> static void vmx_process_isr(int isr, str  {
>      unsigned long status;
>      u8 old;
> +    int vector;
> +    struct vlapic *s = vcpu_vlapic(v);
> 
>      if ( !cpu_has_vmx_virtual_intr_delivery )
>          return; @@ -1622,6 +1624,14 @@ static void vmx_process_isr(int
>          isr, str status |= isr << VMX_GUEST_INTR_STATUS_SVI_OFFSET;
>          __vmwrite(GUEST_INTR_STATUS, status);
>      }
> +    for ( vector = 0; vector < NR_VECTORS; vector++ ) +        if
> (vlapic_test_vector(vector, &s->regs->data[APIC_ISR])) +           
> set_bit(vector,  v->arch.hvm_vmx.eoi_exit_bitmap); + +   
> __vmwrite(0x201c, v->arch.hvm_vmx.eoi_exit_bitmap[0]); +   
> __vmwrite(0x201e, v->arch.hvm_vmx.eoi_exit_bitmap[1]); +   
> __vmwrite(0x2020, v->arch.hvm_vmx.eoi_exit_bitmap[2]); +   
> __vmwrite(0x2022, v->arch.hvm_vmx.eoi_exit_bitmap[3]);
>      vmx_vmcs_exit(v);
>  }
> Index: xen-4.2.4-testing/xen/include/asm-x86/hvm/vlapic.h
> ================================================================ === ---
> xen-4.2.4-testing.orig/xen/include/asm-x86/hvm/vlapic.h +++
> xen-4.2.4-testing/xen/include/asm-x86/hvm/vlapic.h @@ -60,6 +60,8 @@
> 
>  #define VEC_POS(v) ((v) % 32)
>  #define REG_POS(v) (((v) / 32) * 0x10)
> +#define vlapic_test_vector(vec, bitmap)                         \
> +    test_bit(VEC_POS(vec), (uint32_t *)((bitmap) + REG_POS(vec)))
>  #define vlapic_test_and_set_vector(vec, bitmap) \
>      test_and_set_bit(VEC_POS(vec), (uint32_t *)((bitmap) +
> REG_POS(vec)))  #define vlapic_test_and_clear_vector(vec, bitmap) \
> 
> 
> Olaf


Best regards,
Yang


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.