From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Paul Durrant <paul.durrant@citrix.com>, xen-devel@lists.xenproject.org
Cc: Keir Fraser <keir@xen.org>, Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH 2/2] x86/hvm: implicitly disable an ioreq server when it is destroyed
Date: Thu, 23 Apr 2015 17:02:56 +0100 [thread overview]
Message-ID: <553917B0.30108@citrix.com> (raw)
In-Reply-To: <1429803988-10177-3-git-send-email-paul.durrant@citrix.com>
On 23/04/15 16:46, Paul Durrant wrote:
> Currently, unless a (non-default) ioreq server is explicitly disabled before
> being destroyed, its gmfns will not be placed back into the p2m but still
> released back into the ioreq_gmfn mask. This is somewhat counter-intuitive
> and easily remedied by this small patch.
>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> Cc: Keir Fraser <keir@xen.org>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> xen/arch/x86/hvm/hvm.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
> index f840175..3c62b80 100644
> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -972,6 +972,7 @@ static int hvm_ioreq_server_init(struct hvm_ioreq_server *s, struct domain *d,
> static void hvm_ioreq_server_deinit(struct hvm_ioreq_server *s,
> bool_t is_default)
> {
> + ASSERT(!s->enabled);
> hvm_ioreq_server_remove_all_vcpus(s);
> hvm_ioreq_server_unmap_pages(s, is_default);
> hvm_ioreq_server_free_rangesets(s, is_default);
> @@ -1074,6 +1075,8 @@ static int hvm_destroy_ioreq_server(struct domain *d, ioservid_t id)
>
> domain_pause(d);
>
> + hvm_ioreq_server_disable(s, 0);
> +
> list_del(&s->list_entry);
>
> hvm_ioreq_server_deinit(s, 0);
> @@ -1332,11 +1335,10 @@ static void hvm_destroy_all_ioreq_servers(struct domain *d)
> {
> bool_t is_default = (s == d->arch.hvm_domain.default_ioreq_server);
>
> + hvm_ioreq_server_disable(s, is_default);
> +
> if ( is_default )
> - {
> - hvm_ioreq_server_disable(s, 1);
> d->arch.hvm_domain.default_ioreq_server = NULL;
> - }
>
> list_del(&s->list_entry);
>
prev parent reply other threads:[~2015-04-23 17:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-23 15:46 [PATCH 0/2] x86/hvm: ioreq server fixes Paul Durrant
2015-04-23 15:46 ` [PATCH 1/2] x86/hvm: actually release ioreq server pages Paul Durrant
2015-04-23 15:50 ` Andrew Cooper
2015-04-24 8:01 ` Jan Beulich
2015-04-24 9:28 ` Paul Durrant
2015-04-23 15:46 ` [PATCH 2/2] x86/hvm: implicitly disable an ioreq server when it is destroyed Paul Durrant
2015-04-23 16:02 ` Andrew Cooper [this message]
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=553917B0.30108@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=paul.durrant@citrix.com \
--cc=xen-devel@lists.xenproject.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.