From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?windows-1252?Q?Roger_Pau_Monn=E9?= 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 Message-ID: <5554BEFA.1020500@citrix.com> References: <1431356258-31269-1-git-send-email-roger.pau@citrix.com> <1431356258-31269-2-git-send-email-roger.pau@citrix.com> <55533B220200007800079F0A@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Ysv3h-0002tt-IY for xen-devel@lists.xenproject.org; Thu, 14 May 2015 15:28:25 +0000 In-Reply-To: <55533B220200007800079F0A@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Kevin Tian , Suravee Suthikulpanit , Andrew Cooper , Eddie Dong , Aravind Gopalakrishnan , Jun Nakajima , xen-devel@lists.xenproject.org, Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org El 13/05/15 a les 11.53, Jan Beulich ha escrit: >>>> On 11.05.15 at 16:57, 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 >> #include >> #include >> +#include >> >> /* 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.