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

Re: [Xen-devel] Question about the tools/misc/xen-hptool



On 17/04/15 19:48, Meng Xu wrote:
> Hi,
>
> I'm trying to use the xen-hptool to make one memory page offline. I
> tried to search around to see how to use this tool but didn't find any
> manual/tutorial about it.

First off, let me say that I have never used this interface before, so
the rest of this email is somewhat guesswork.

>
> I had a look at the code of xen-hptool.c and tried the command
> 'xen-hptool mem-offline' but it does not work (probably because of
> incorrect system configuration IMO).  I really appreciate if anyone
> could guide me a little bit on how to use this tool. (Maybe a wiki
> page about how to use this tool will be beneficial?)
>
> I used the latest Xen code in staging branch of xen repository. I
> created a guest PV domain vm1 on Xen with credit scheduler.
>
> I first find on page of dom1 which is mfn=0x16c47a by using xen-mfndump tool.
> # xen-mfndump dump-p2m 1
>
>  --- Dumping P2M for domain 1 ---
>
>  Guest Width: 8, PT Levels: 4 P2M size: = 262144
>
> ...(omit the output of other pfn entries)
>
>   pfn=0x1a ==> mfn=0x16c47a (type 0x0)
>
> ...(omit the output of other pfn entries)
>
>
> I want to make mfn 0x16c47a offline, so I issue this following command:
>
> # xen-hptool mem-offline 0x16c47a
>
> Prepare to offline MEMORY mfn 16c47a
>
> DOM1: No suspend port, try live migration
>
> Failed to suspend guest 1 for mfn 16c47a
>
>
> I checked the output of 'xenstore-ls', and found that  dom1 does not
> set up the suspend channel.
>
> This is the part of output of xenstore-ls for dom1
>
> device = ""
>
>     suspend = ""
>
>      event-channel = ""
>
> I'm guessing this is the reason why xen-hptool mem-offline does not work.
>
>
> ===My question are:===
> 1) How should I set up the dom1 so that the xen-hptool mem-offline
> could work and solve this above issue? In other words, how should I
> configure the suspend event-channel for dom1?
> (I'm not so familiar with the event channel mechanism in Xen. Any
> advice/help on how to make this work is really appreciated.)

It is suspend/resume mechanism, and is strictly optional, according to
docs/misc/xenstore-paths.markdown.

>
> 2) Can I use the libxl_domain_suspend(ctx, domid, fd, 0, NULL) to
> suspend the domain instead of using the event channel?
>
> 3) Do I have to suspend the guest domain before making one page of the
> domain offline? Can I just pause the domain and make the page offline?

It would appear that the idea is to simulate a suspend without actually
doing a full suspend, so that when the guest resumes and rescans its
p2m, it notices the broken page.

This a) can only work for PV guests, and b) seems very silly.  A better
alternative would surely be to deliver a RAM MCE to the guest, which
would then also work for HVM guests.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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