From: "Jan Beulich" Subject: Re: XSA-60 - how to get back to a sane state Date: Tue, 03 Dec 2013 07:57:48 +0000 Message-ID: <529D9D0C02000078001092B9@nat28.tlf.novell.com> References: <529CA7250200007800108CB8@nat28.tlf.novell.com> <529CE2D5.7030805@eu.citrix.com> <529D4030.6040501@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vnkrj-0001e4-7e for xen-devel@lists.xenproject.org; Tue, 03 Dec 2013 07:57:55 +0000 In-Reply-To: <529D4030.6040501@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , George Dunlap Cc: Jinsong Liu , Keir Fraser , Zhenzhong Duan , Donald D Dugger , Jun Nakajima , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 03.12.13 at 03:21, Andrew Cooper wrote: > 1) has the basic XSA-60 fixes and some wbinvd()s, which are a > significant performance issue and insufficient to completely fix the > problem at hand. As a result, 1) is the worst possible option to stay > with as far as Xen is concerned (irrespective of the upcoming 4.4 release). I should add that another aspect here is the current inconsistency of the code: In a few places we give the appearance of taking care of the required flushing, but we don't really do so everywhere, so whoever is going to read the code in close detail will rightfully say "this can't be correct". Whereas if we revert the wbinvd()s we're at least back to a consistent (even if theoretically broken) state. > 2) will revert us back to the basic XSA-60 with none of the wbinvd()s, > which fixes the security issue and is no worse than before in terms of a > correctness-in-the-case-of-uncachable-hvm-domains point of view. And keep in mind that at present we have no knowledge of guests actually needing to run with caching disabled - to only known use case is that of the guest setting its MTRRs (where the specification requires caching to be disabled, but the OS [as well as correctness] doesn't really require that). > 3) as-is is still insufficient to fix the problem in 1), and would > currently result in a further performance regression. Hmm, I'm not sure about the performance regression: During the sole known usage (see above) there shouldn't be any guest memory writes, and hence the "needs-flushing" flag should rarely if ever get set. > FWIW, my vote is for option 2) which will ease the current performance > regression, in favor of allowing us time to come up with a proper > solution to the pre-existing problem of Xen and Qemu mappings of a UC > domain's memory. Agreed - my preference too is 2 over 3 over 1. Jan