From: "Jan Beulich" Subject: Re: Bisected Xen-unstable: "Segment register inaccessible for d1v0" when starting HVM guest on intel Date: Wed, 02 Jul 2014 14:22:27 +0100 Message-ID: <53B423B3020000780001F8C5@mail.emea.novell.com> References: <1057886355.20140628222158@eikelenboom.it> <53B1A244020000780001EA4D@mail.emea.novell.com> <1081819750.20140630183750@eikelenboom.it> <53B19EEB.4060603@citrix.com> <53B27902020000780001ED8B@mail.emea.novell.com> <53B29E03020000780001EF03@mail.emea.novell.com> <53B3CA8A020000780001F4B4@mail.emea.novell.com> <53B3D5D2020000780001F4F8@mail.emea.novell.com> <53B3ECEE020000780001F61F@mail.emea.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 1X2KUX-00088i-SK for xen-devel@lists.xenproject.org; Wed, 02 Jul 2014 13:22:31 +0000 In-Reply-To: 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: Feng Wu Cc: Andrew Cooper , "xen-devel@lists.xenproject.org" , Sander Eikelenboom List-Id: xen-devel@lists.xenproject.org >>> On 02.07.14 at 15:15, wrote: >> From: Jan Beulich [mailto:JBeulich@suse.com] >> This being a PV extension to the base architecture, the hardware >> specification is meaningless. What we need to do here is _extend_ what >> the hardware has specified for those extra accesses. We have three >> options basically: >> 1) never do any checking on such accesses >> 2) honor CPL and EFLAGS.AC >> 3) always do the checking >> The first one obviously is bad from a security POV. Since the third one is >> more strict than the second and since I assume adding some override is >> going to be the simpler change than altering the point in time when the >> VMCS gets loaded during context switch (the suggestion of which no one >> at all commented on so far), I'd prefer that one, but wouldn't mind >> option 2 to be implemented instead. >> > > So here is my understanding for this: > For option 2, we don't need to change the code in guest_walk_tables(), what > we > should do is to adjust the time when VMCS gets loaded to make sure we can > safely get guest SS for the two cases you mentioned previously in this > thread. > > For option 3, we need to pass some override for these cases to check SMAP > unconditionally, so no need to get guest SS. Hence this issue will not > exist. > > Is this correct? Thanks a lot! That's my understanding, so I hope it is correct. Jan