From: Ian Campbell Subject: Re: [PATCH, v2] add privileged/unprivileged kernel feature indication Date: Thu, 21 Jul 2011 10:02:40 +0100 Message-ID: <1311238960.32010.63.camel@zakaz.uk.xensource.com> References: <4E259FB0020000780004E4BE@nat28.tlf.novell.com> <4E25A00E020000780004E4CA@nat28.tlf.novell.com> <1311158384.20648.184.camel@zakaz.uk.xensource.com> <4E26EB3E020000780004E831@nat28.tlf.novell.com> <1311235276.32010.27.camel@zakaz.uk.xensource.com> <4E27FC7A020000780004EBE6@nat28.tlf.novell.com> <1311237526.32010.48.camel@zakaz.uk.xensource.com> <4E2805A0020000780004EC30@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4E2805A0020000780004EC30@nat28.tlf.novell.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: Jan Beulich Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Thu, 2011-07-21 at 09:55 +0100, Jan Beulich wrote: > >>> On 21.07.11 at 10:38, Ian Campbell wrote: > > On Thu, 2011-07-21 at 09:16 +0100, Jan Beulich wrote: > >> > You also have not explained _why_ a dom0-only guest would be a useful > >> > thing to have and to add extra complexity to our interfaces for, it's > >> > obviously very much a corner case. > >> > >> It's really a decision between having efficient code (i.e. as little > >> unused code as possible in a kernel suiting a particular need) and > >> having a (relatively) general-purpose kernel. > > > > We are talking about half a dozen lines of code to spit out a static > > string ("I don't support domU operation") to the domU and/or a guest > > You still didn't tell where such a message would show up: Printing > such a message isn't a big deal, but pointless if it goes into no-where. > If instead the hypervisor (for Dom0) or the tools (for DomU-s) print > something, this will be visible in a known place. If someone runs a dom0-only kernel as a domU (presumably by mistake) then they are naturally going to look in the domU console ring for error messages when it doesn't work (because they thought they were running a domU, where else would they look?). Placing that message there is basically a memcpy and an evtchn_notify. If someone runs a domU only kernel as a dom0 then the XENFEAT_privileged (or whatever it gets called) is precisely enough to allow the hypervisor to say something useful in that case. Ian.