All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Eddie Dong <eddie.dong@intel.com>,
	Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	xen-devel@lists.xenproject.org,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH v6 1/2] xen/pvh: use a custom IO bitmap for PVH hardware domains
Date: Thu, 14 May 2015 17:27:54 +0200	[thread overview]
Message-ID: <5554BEFA.1020500@citrix.com> (raw)
In-Reply-To: <55533B220200007800079F0A@mail.emea.novell.com>

El 13/05/15 a les 11.53, Jan Beulich ha escrit:
>>>> On 11.05.15 at 16:57, <roger.pau@citrix.com> wrote:
>> --- a/xen/arch/x86/setup.c
>> +++ b/xen/arch/x86/setup.c
>> @@ -1446,6 +1446,9 @@ void __init noreturn __start_xen(unsigned long mbi_p)
>>  
>>      dmi_end_boot();
>>  
>> +    if ( is_hardware_domain(dom0) )
>> +        setup_io_bitmap(dom0);
> 
> Is it indeed possible for is_hardware_domain() to be false for dom0
> at this point?

No, I will remove this check in the next version.

>> --- a/xen/common/domain.c
>> +++ b/xen/common/domain.c
>> @@ -42,6 +42,7 @@
>>  #include <xsm/xsm.h>
>>  #include <xen/trace.h>
>>  #include <xen/tmem.h>
>> +#include <asm/setup.h>
>>  
>>  /* Linux config option: propageted to domain0 */
>>  /* xen_processor_pmbits: xen control Cx, Px, ... */
>> @@ -219,6 +220,7 @@ static int late_hwdom_init(struct domain *d)
>>      rangeset_swap(d->iomem_caps, dom0->iomem_caps);
>>  #ifdef CONFIG_X86
>>      rangeset_swap(d->arch.ioport_caps, dom0->arch.ioport_caps);
>> +    setup_io_bitmap(d);
>>  #endif
> 
> Considering that rangesets are getting swapped rather than
> copied, I think you also need to reset Dom0's I/O bitmap here
> to the ordinary, non-hardware domain one.

Yes. Would it be fine to memset it and just call setup_io_bitmap on it
again, or would you prefer to exchange it with the static one and free it?

Roger.

  reply	other threads:[~2015-05-14 15:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 14:57 [PATCH v6 0/3] xen/pvh: use a custom IO bitmap for PVH hardware domains Roger Pau Monne
2015-05-11 14:57 ` [PATCH v6 1/2] " Roger Pau Monne
2015-05-13  9:53   ` Jan Beulich
2015-05-14 15:27     ` Roger Pau Monné [this message]
2015-05-15  6:36       ` Jan Beulich
2015-05-15  7:34         ` Roger Pau Monné
2015-05-15  7:42           ` Jan Beulich
2015-05-15 20:09             ` Daniel De Graaf
2015-05-18  7:12               ` Jan Beulich
2015-05-11 14:57 ` [PATCH v6 2/2] xen/pvh: trap access to sensitive IO ports Roger Pau Monne

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=5554BEFA.1020500@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=eddie.dong@intel.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=suravee.suthikulpanit@amd.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.