[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC v1 52/74] xen: mark xenstore/console pages as RAM and add them to dom_io



On Tue, Jan 09, 2018 at 04:03:25AM -0700, Jan Beulich wrote:
> >>> On 09.01.18 at 10:25, <roger.pau@xxxxxxxxxx> wrote:
> > On Mon, Jan 08, 2018 at 06:49:21AM -0700, Jan Beulich wrote:
> >> >>> On 04.01.18 at 14:06, <wei.liu2@xxxxxxxxxx> wrote:
> >> > +void __init hypervisor_init_memory(void)
> >> > +{
> >> > +    uint64_t pfn = 0;
> >> > +    long rc;
> >> > +
> >> > +    if ( !xen_guest )
> >> > +        return;
> >> > +
> >> > +#define SHARE_PARAM(p) ({                                               
> >> >     \
> >> > +    rc = xen_hypercall_hvm_get_param(p, &pfn);                          
> >> >    \
> >> > +    if ( rc )                                                           
> >> >     \
> >> > +        panic("Unable to get " #p);                                     
> >> >     \
> >> > +    share_xen_page_with_guest(mfn_to_page(pfn), dom_io, 
> >> > XENSHARE_writable); \
> >> 
> >> Why dom_io rather than the client domain?
> > 
> > The client domain is not yet created at this point. This is exactly
> > the same that Xen does for the low 1MiB for example.
> 
> The low 1Mb is being treated as MMIO, hence remains assigned
> to dom_io.
> 
> >> The more that dom_io
> >> pages can only be mapped by privileged guests (and hence I
> >> assume you need another tweak somewhere this way).
> > 
> > I just use unshare_xen_page and share it again with the guest.
> 
> And there is no option of simply doing the sharing here later,
> when the domain is already in existence?

I'm afraid that if I don't add the pages to dom_io at this point they
would be added to the free memory pool, and thus might be used for
anything. Maybe I'm missing something, but I didn't find any other way
to deal with this given the short time.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.