From: Ian Campbell Subject: Re: [PATCH] libxl: disallow PCI device assignment for HVM guest when PoD is enabled Date: Mon, 13 Jan 2014 11:47:31 +0000 Message-ID: <1389613651.13654.45.camel@kazak.uk.xensource.com> References: <1389353262-27668-1-git-send-email-wei.liu2@citrix.com> <20140113105413.GB5698@zion.uk.xensource.com> <1389611480.13654.33.camel@kazak.uk.xensource.com> <20140113114535.GE5698@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140113114535.GE5698@zion.uk.xensource.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: Wei Liu Cc: Ian Jackson , Xiantao Zhang , Suravee Suthikulpanit , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, 2014-01-13 at 11:45 +0000, Wei Liu wrote: > On Mon, Jan 13, 2014 at 11:11:20AM +0000, Ian Campbell wrote: > > On Mon, 2014-01-13 at 10:54 +0000, Wei Liu wrote: > > > Any more comments on code logic and / or the location of the new > > > snippet? Should I send a new version with code comment fixed? > > > [...] > > > > + /* If target_memkb is smaller than max_memkb, the subsequent call > > > > + * to libxc when building HVM domain will enable PoD mode. > > > > + */ > > > > + pod_enabled = (d_config->c_info.type == LIBXL_DOMAIN_TYPE_HVM) && > > > > + (d_config->b_info.target_memkb < d_config->b_info.max_memkb); > > > > I suppose this corresponds to exactly when PoD would be enabled? > > > > Yes. In libxc if maxmem > target_mem then pod_mode is set. See > tools/libxc/xc_hvm_build_x86.c:setup_guest. Putting this into a common place might be a nice future cleanup... Ian.