|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/6] xc: use XENMEM_claim_pages during guest creation.
On Wed, 2013-03-13 at 14:42 +0000, Konrad Rzeszutek Wilk wrote:
> > > @@ -506,10 +517,16 @@ static int setup_guest(xc_interface *xch,
> > > munmap(page0, PAGE_SIZE);
> > > }
> > >
> > > + /* ensure no unclaimed pages are left unused */
> > > + xc_domain_claim_pages(xch, dom, 0 /* cancels the claim */);
> >
> > This cannot fail?
>
> It can (say we use an older hypervisor that does not have this subop), in
> which case any of the operations would return -ENOSYS - which is OK.
Right, that's seems ok
> But in case of the hypervisor having this implemented - yes - this call
> should not fail.
>
> Thought I should probably redo the first call to be more like:
>
> if (claim_mode) {
>
> rc =..
> if ( rc == -ENOSYS)
> rc = 0; // Whatever, hypervisor is out sync.
> if ( rc != 0 )
If I follow correctly then yes, I think that would be better.
I wonder if
+ PERROR("Could not allocate memory for HVM guest.");
and friends ought to say "claim" to distinguish from a later failure to
allocate memory?
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |