From: Ian Campbell Subject: Re: are there any hidden domains inside Xen when it is running? Date: Wed, 04 Jun 2008 09:11:18 +0100 Message-ID: <1212567078.7052.81.camel@zakaz.uk.xensource.com> References: <200806041208581718534@126.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200806041208581718534@126.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: fhf25@126.com Cc: xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org On Wed, 2008-06-04 at 12:08 +0800, Haifeng Fang wrote: > hi, all: > > i have programmed a little tool which can dump some information of key > data-struct inside xen. > with the tool, i obtained some data related to "frame_table" as > follows: > > page_offset, page_number, count_info, is_allocated, reference, inuse_domain_id, free_list_order > > 502636KB, 125659, 80000002, allocated, 2, 1, 0 > 516092KB, 129023, 80000002, allocated, 2, 0, 0 > 516096KB, 129024, 80000001, allocated, 1, 32754, 0 > 523248KB, 130812, 80000003, allocated, 3, 32753, 0 > > in my testing, i have brought up two domains, i.e. domain0(0), > domainU(1). But from the list above, there are another two domains, > who are they? They are DOMID_XEN and DOMID_IO. From xen/include/public/xen.h: /* * DOMID_IO is used to restrict page-table updates to mapping I/O memory. * Although no Foreign Domain need be specified to map I/O pages, DOMID_IO * is useful to ensure that no mappings to the OS's own heap are accidentally * installed. (e.g., in Linux this could cause havoc as reference counts * aren't adjusted on the I/O-mapping code path). * This only makes sense in MMUEXT_SET_FOREIGNDOM, but in that context can * be specified by any calling domain. */ #define DOMID_IO (0x7FF1U) /* * DOMID_XEN is used to allow privileged domains to map restricted parts of * Xen's heap space (e.g., the machine_to_phys table). * This only makes sense in MMUEXT_SET_FOREIGNDOM, and is only permitted if * the caller is privileged. */ #define DOMID_XEN (0x7FF2U) Ian. >