All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>
Cc: kevin.tian@intel.com, xen-devel@lists.xen.org,
	boris.ostrovsky@oracle.com, sherry.hurwitz@amd.com
Subject: Re: [PATCH v3] x86/HVM: Fix teardown ordering in hvm_vcpu_destroy()
Date: Tue, 10 Jan 2017 07:42:03 -0700	[thread overview]
Message-ID: <587500CB020000780012EC1C@prv-mh.provo.novell.com> (raw)
In-Reply-To: <36cdfbe4-5e83-888f-dae1-45a56c8b18a3@citrix.com>

>>> On 10.01.17 at 15:26, <andrew.cooper3@citrix.com> wrote:
> On 10/01/17 14:15, Andrew Cooper wrote:
>> On 10/01/17 14:03, Suravee Suthikulpanit wrote:
>>> The order of destroy function calls in hvm_vcpu_destroy() should be
>>> the reverse of init calls in hvm_vcpu_initialise().
>>>
>>> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
>>> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>>> Reviewed-by: Kevin Tian <kevin.tian@intel.com>
>>> Cc: Jan Beulich <jbeulich@suse.com>
>>> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> and queued.
> 
> Wait no.

Which clearly suggests that the earlier R-b-s should have been
dropped too.

> The order in vcpu_initialise is
> 
> hvm_vcpu_cacheattr_init()
> vlapic_init()
> hvm_funcs.vcpu_initialise()
> softirq_tasklet_init()
> setup_compat_arg_xlat()
> 
> Therefore, moving the tasklet_kill() is wrong.
> 
> The overall delta should be:
> 
> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -1626,12 +1626,12 @@ void hvm_vcpu_destroy(struct vcpu *v)
>      free_compat_arg_xlat(v);
>  
>      tasklet_kill(&v->arch.hvm_vcpu.assert_evtchn_irq_tasklet);
> -    hvm_vcpu_cacheattr_destroy(v);
> +    hvm_funcs.vcpu_destroy(v);
>  
>      if ( is_hvm_vcpu(v) )
>          vlapic_destroy(v);
>  
> -    hvm_funcs.vcpu_destroy(v);
> +    hvm_vcpu_cacheattr_destroy(v);
>  }
>  
> IIRC.
> 
> If you agree, I will fold this correction in while committing.

This variant is
Reviewed-by: Jan Beulich <jbeulich@suse.com>

Jan


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

  reply	other threads:[~2017-01-10 14:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 14:03 [PATCH v3] x86/HVM: Fix teardown ordering in hvm_vcpu_destroy() Suravee Suthikulpanit
2017-01-10 14:15 ` Andrew Cooper
2017-01-10 14:26   ` Andrew Cooper
2017-01-10 14:42     ` Jan Beulich [this message]
2017-01-11  5:50       ` Tian, Kevin
2017-01-10 16:29     ` Suravee Suthikulpanit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=587500CB020000780012EC1C@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=kevin.tian@intel.com \
    --cc=sherry.hurwitz@amd.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.