From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v3 4/4] x86/PV: enable the emulated PIT Date: Mon, 18 Jan 2016 16:10:45 +0000 Message-ID: <569D0E85.7040504@citrix.com> References: <5699358D02000078000C7800@prv-mh.provo.novell.com> <1452879951-76391-1-git-send-email-roger.pau@citrix.com> <569CA5CB02000078000C7C43@prv-mh.provo.novell.com> <569CB067.7070905@citrix.com> <569CC22402000078000C7D9C@prv-mh.provo.novell.com> <569CC143.9030703@citrix.com> <569CD53402000078000C7ED2@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aLCOI-0001mp-KI for xen-devel@lists.xenproject.org; Mon, 18 Jan 2016 16:10:50 +0000 In-Reply-To: <569CD53402000078000C7ED2@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel@lists.xenproject.org, Roger Pau Monne , Ian Jackson , Wei Liu , Ian Campbell List-Id: xen-devel@lists.xenproject.org On 18/01/16 11:06, Jan Beulich wrote: >> Which gets us to the second, broader issue: These flags shouldn't >> be forced to a particular value during migration, but instead they >> should be part of the state getting migrated. Incoming domains >> then would - if the field is missing due to coming from an older >> hypervisor - have the flag default to 1. >>>> There is sadly another ratsnest here. >>> I've been afraid of that. >>> >>>> These values are needed for domain creation, which means that putting >>>> them anywhere in the migration stream is already too late, as the domain >>>> has been created before the stream header is read. >>> Is that an inherent requirement, or just a result of current code >>> structure? >> Depends. As far as libxc/libxl migration levels go, current code structure. > I.e. fixable. > >> Whatever (eventually) gets used to set these values will however be >> present in the xl configuration, which is at the very start of the >> stream, and is what is used to create the new domain. > Which makes me repeat the question: Is this an inherent property > or just "that's the way it is right now"? And then of course the > question arises whether setting those flags at domain creation time > is the right model. I.e. ... > >> We really don't want the libxc migrate code to be making the >> DOMCTL_createdomain hypercall itself; it opens up a whole new attack >> surface via cunningly-crafted save image. The best we can do is have a >> sanity check later on. > ... what about deriving the emulation flags from the various > pieces of state getting loaded, at least when there are matching > pairs (which namely is the case for PIT)? How would you suggest setting theses flags up in the plain domain build case then? ~Andrew