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

Re: [Xen-devel] [PATCH v3 1/2] Xen: Fix live migration while enabling APICV



>>> On 28.01.13 at 05:13, "Li, Jiongxi" <jiongxi.li@xxxxxxxxx> wrote:
> SVI should be restored in case guest is processing virtual interrupt
> while saving a domain state. Otherwise SVI would be missied when
> virtual interrupt delivery is enabled.

Why would RVI not need similar treatment?

> --- a/xen/arch/x86/hvm/vmx/vmx.c
> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -1419,6 +1419,28 @@ static int vmx_virtual_intr_delivery_enabled(void)
>      return cpu_has_vmx_virtual_intr_delivery;
>  }
>  
> +static void vmx_set_svi(int isr, struct vcpu *v)
> +{
> +    unsigned long status;
> +    u8 old;
> +
> +    if ( !cpu_has_vmx_virtual_intr_delivery )
> +        return;
> +
> +    if (isr == -1)

Perhaps better "isr < 0"?

> +        isr = 0;
> +
> +    vmx_vmcs_enter(v);
> +    status = __vmread(GUEST_INTR_STATUS);
> +    old = status >> 8;
> +    if (isr != old) {
> +        status &= 0x0FF;
> +        status |= isr << 8;

Could we get #define-s for all these literal numbers (including
using those in vmx_intr_assist(), where similar literal numbers
exist)?

> --- a/xen/include/asm-x86/hvm/hvm.h
> +++ b/xen/include/asm-x86/hvm/hvm.h
> @@ -183,6 +183,7 @@ struct hvm_function_table {
>      /* Virtual interrupt delivery */
>      void (*update_eoi_exit_bitmap)(struct vcpu *v, u8 vector, u8 trig);
>      int (*virtual_intr_delivery_enabled)(void);
> +    void (*set_svi)(int isr, struct vcpu *v);

Please give this a better, vendor neutral name.

Jan

>  
>      /*Walk nested p2m  */
>      int (*nhvm_hap_walk_L1_p2m)(struct vcpu *v, paddr_t L2_gpa,



_______________________________________________
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®.