Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5254670imm; Tue, 21 Aug 2018 08:40:44 -0700 (PDT) X-Google-Smtp-Source: AA+uWPx92xjgrrgcgPNjcZfCnqh73aruV1kVskWo2d69JoaCCnm20lt7UrrIly98+z3utzqkp9Am X-Received: by 2002:aa7:850b:: with SMTP id v11-v6mr53099065pfn.165.1534866044260; Tue, 21 Aug 2018 08:40:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534866044; cv=none; d=google.com; s=arc-20160816; b=WV7JKy3gzHnWX5g3P7z7dfD0UuTZ1Dc33Iu/cuVL7V5WckvDqX7dLrjrGtLaSldOzO KqkOL2UXjohXiep2oS4sYECCUBlLfkrO6QoFfNUUTeg7nizdv8mFE4TgLBp1l8scttvn B9ditXqaN0VsGJAh2FTwnD9D95eLeQ7E7VFn/o07YomKC6hqtcZcJ4YqXvlQFZroWzhG Moq5sFgCaYZl2yjnm61V3IPqUr/MgVab+yEolcQYhQjWD80nMrc9+5mDQsjVN9yq+w76 Io+TpStXqYuVZ8rysRf/FhIK1pSeTBxR8Og9hoUHsA8ZRqovMOFuIeBjhinrqX1OAGRZ ifzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=5zJF4//r8+2jO8hOjc1ts+bTwXweDgq6nbz9BPrZkCY=; b=hSQu7jClsFLf0Wdp0P9szB0NxtknPH6OGALedVqKX5egXZunJ38WHZnVS8rXkhqghA xT4jwn7NsucE3j74ltX8FcoE2La/XM/I2K+F3GWgcNWMnNdRUQMnaKw3uUdU+iRFTKdS UuOd0ktp3lZizt8LxQ0/slRiVCn0p/4Jjzvn23spPuzOIQ77EPXjOqords1R89hajsVJ +1I/CC2XVS5TrR0CeMkOQSnlZhsbPCC3kBDAyObfkyq9xADNAltbieFLX23JLubb4bLY 7yfWGaKgRDgm2OTGT7pVx7+6sb2s9tjDZcofO7tsibMQnEBO92GQIFlw474pNoHtZw6/ n7Gw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e82-v6si13555063pfh.64.2018.08.21.08.40.28; Tue, 21 Aug 2018 08:40:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727999AbeHUS6n (ORCPT + 99 others); Tue, 21 Aug 2018 14:58:43 -0400 Received: from mx2.suse.de ([195.135.220.15]:50300 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727353AbeHUS6m (ORCPT ); Tue, 21 Aug 2018 14:58:42 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 14B02AD4D; Tue, 21 Aug 2018 15:38:04 +0000 (UTC) From: Juergen Gross To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org Cc: boris.ostrovsky@oracle.com, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, Juergen Gross Subject: [PATCH v2 0/2] x86/xen: avoid 32-bit writes to PTEs in PV PAE guests Date: Tue, 21 Aug 2018 17:37:53 +0200 Message-Id: <20180821153755.30462-1-jgross@suse.com> X-Mailer: git-send-email 2.13.7 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While the hypervisor emulates plain writes to PTEs happily, this is much slower than issuing a hypercall for PTE modifcations. And writing a PTE via two 32-bit write instructions (especially when clearing the PTE) will result in an intermediate L1TF vulnerable PTE. Writes to PAE PTEs should always be done with 64-bit writes or via hypercalls. Juergen Gross (2): x86/xen: don't write ptes directly in 32-bit PV guests x86/pae: use 64 bit atomic xchg function in native_ptep_get_and_clear arch/x86/include/asm/pgtable-3level.h | 7 +++---- arch/x86/xen/mmu_pv.c | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) -- 2.13.7