From: Keir Fraser <keir@xen.org>
To: Daniel De Graaf <dgdegra@tycho.nsa.gov>, xen-devel@lists.xen.org
Cc: Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH] arch/x86/hvm: Bind xen-created event channels to building domain
Date: Wed, 09 Jan 2013 08:51:13 +0000 [thread overview]
Message-ID: <CD12E001.57E5A%keir@xen.org> (raw)
In-Reply-To: <1357237738-17787-1-git-send-email-dgdegra@tycho.nsa.gov>
On 03/01/2013 18:28, "Daniel De Graaf" <dgdegra@tycho.nsa.gov> wrote:
> Instead of using a hardcoded domain 0 as the endpoint for the event
> channels created in hvm_vcpu_initialise, use the domain ID of the
> building domain so that a domain builder in a domain other than dom0 has
> the expected access to the event channels.
This should be done by setting HVM_PARAM_DM_DOMAIN appropriately after the
guest is created. As it is, HVM_PARAM_DM_DOMAIN can be out of sync with the
event-channel bindings after this patch.
I see this patch is already applied, and I propose to revert it. Is that
okay with you, Jan?
-- Keir
> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
> Cc: Keir Fraser <keir@xen.org>
> Cc: Jan Beulich <jbeulich@suse.com>
> ---
> xen/arch/x86/hvm/hvm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
> index 40c1ab2..682d934 100644
> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -1071,7 +1071,7 @@ int hvm_vcpu_initialise(struct vcpu *v)
> goto fail3;
>
> /* Create ioreq event channel. */
> - rc = alloc_unbound_xen_event_channel(v, 0, NULL);
> + rc = alloc_unbound_xen_event_channel(v, current->domain->domain_id,
> NULL);
> if ( rc < 0 )
> goto fail4;
>
> @@ -1081,7 +1081,7 @@ int hvm_vcpu_initialise(struct vcpu *v)
> if ( v->vcpu_id == 0 )
> {
> /* Create bufioreq event channel. */
> - rc = alloc_unbound_xen_event_channel(v, 0, NULL);
> + rc = alloc_unbound_xen_event_channel(v, current->domain->domain_id,
> NULL);
> if ( rc < 0 )
> goto fail2;
> v->domain->arch.hvm_domain.params[HVM_PARAM_BUFIOREQ_EVTCHN] = rc;
next prev parent reply other threads:[~2013-01-09 8:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-03 18:28 [PATCH] arch/x86/hvm: Bind xen-created event channels to building domain Daniel De Graaf
2013-01-09 8:51 ` Keir Fraser [this message]
2013-01-09 10:27 ` Jan Beulich
2013-01-09 11:12 ` Ian Campbell
2013-01-09 14:43 ` Daniel De Graaf
2013-01-09 14:56 ` Ian Campbell
2013-01-09 15:30 ` Daniel De Graaf
2013-01-09 15:38 ` Keir Fraser
2013-01-09 16:24 ` Ian Campbell
2013-01-09 15:02 ` Keir Fraser
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=CD12E001.57E5A%keir@xen.org \
--to=keir@xen.org \
--cc=dgdegra@tycho.nsa.gov \
--cc=jbeulich@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).