From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AE22C4361B for ; Fri, 11 Dec 2020 08:59:19 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9018223F2A for ; Fri, 11 Dec 2020 08:59:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9018223F2A Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.50224.88800 (Exim 4.92) (envelope-from ) id 1kneGY-00050W-2m; Fri, 11 Dec 2020 08:59:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 50224.88800; Fri, 11 Dec 2020 08:59:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kneGX-00050P-W9; Fri, 11 Dec 2020 08:59:05 +0000 Received: by outflank-mailman (input) for mailman id 50224; Fri, 11 Dec 2020 08:59:04 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kneGW-0004zc-KT for xen-devel@lists.xenproject.org; Fri, 11 Dec 2020 08:59:04 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id dbc167af-a1d5-4605-9898-55368be07aab; Fri, 11 Dec 2020 08:58:55 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 20D7AACBD; Fri, 11 Dec 2020 08:58:55 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: dbc167af-a1d5-4605-9898-55368be07aab X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1607677135; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mPnSiuGj9ULrNN2R6pZ+vGFndCcen1k29TTiIOfk5s0=; b=YIqKRN5LcOeGyyMkGW22KyiSgKQ+ZGMbaZKUlN2aq15eiP2w8ujsFIedeFm0PMIkItukNY ERbH2HjfuoVlbcwv5wJefGtbJ8HwwBroo6xQ6J6Jts6jI71Q8LWRBmP9GI0BUMb/nSZ7vg RlsbgQq8Ah8COmXvA1CfE2xOatEwGuo= Subject: Re: dom0 PV looping on search_pre_exception_table() To: Manuel Bouyer Cc: xen-devel@lists.xenproject.org, Andrew Cooper References: <20201209101512.GA1299@antioche.eu.org> <3f7e50bb-24ad-1e32-9ea1-ba87007d3796@citrix.com> <20201209135908.GA4269@antioche.eu.org> <20201209154431.GA4913@antioche.eu.org> <52e1b10d-75d4-63ac-f91e-cb8f0dcca493@citrix.com> <20201209163049.GA6158@antioche.eu.org> <30a71c9d-3eff-3727-9c61-e387b5bccc95@citrix.com> <20201209185714.GS1469@antioche.eu.org> <6c06abf1-7efe-f02c-536a-337a2704e265@citrix.com> <20201210095139.GA455@antioche.eu.org> From: Jan Beulich Message-ID: <2c345ef9-1f05-f883-d294-7ac1b3851f08@suse.com> Date: Fri, 11 Dec 2020 09:58:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20201210095139.GA455@antioche.eu.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 10.12.2020 10:51, Manuel Bouyer wrote: > On Wed, Dec 09, 2020 at 07:08:41PM +0000, Andrew Cooper wrote: >> Oh of course - we don't follow the exit-to-guest path on the way out here. >> >> As a gross hack to check that we've at least diagnosed the issue >> appropriately, could you modify NetBSD to explicitly load the %ss >> selector into %es (or any other free segment) before first entering user >> context? > > If I understood it properly, the user %ss is loaded by Xen from the > trapframe when the guest swictes from kernel to user mode, isn't it ? > So you mean setting %es to the same value in the trapframe ? > > Actually I used %fs because %es is set equal to %ds. > Xen 4.13 boots fine with this change, but with 4.15 I get a loop of: > > > (XEN) *** LDT: gl1e 0000000000000000 not present > (XEN) *** pv_map_ldt_shadow_page(0x40) failed Could you please revert 9ff970564764 ("x86/mm: drop guest_get_eff_l1e()")? I think there was a thinko there in that the change can't be split from the bigger one which was part of the originally planned set for XSA-286. We mustn't avoid the switching of page tables as long as guest_get_eff{,_kern}_l1e() makes use of the linear page tables. Jan