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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36F90C07E9D for ; Mon, 26 Sep 2022 15:33:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236700AbiIZPdZ (ORCPT ); Mon, 26 Sep 2022 11:33:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236694AbiIZPcy (ORCPT ); Mon, 26 Sep 2022 11:32:54 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F6764F69D; Mon, 26 Sep 2022 07:18:54 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 322F31F37C; Mon, 26 Sep 2022 14:18:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1664201933; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=IJOwLXU5t8JM8hMm9HW6Yq2/D7SfLk9zyZ5L9cgxtWU=; b=JGtbcNXpGA40iBntCL6y1LJnluPYXxk3hzbip2fUXMIhzCg1Xn8jmfj2iOPpA9x6KAs9NW YFuKaG8NHm486HGNuT/bNwlh+6lojOUffG9Q/iTOc+B+uVsGcwYiAlYTbp+wKKlU1tnWOf b9Ixakc+U1inpqhbv2Gcq6mLZpRVhWI= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CC7D6139BD; Mon, 26 Sep 2022 14:18:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qBw/MMy0MWN/BgAAMHmgww (envelope-from ); Mon, 26 Sep 2022 14:18:52 +0000 From: Juergen Gross To: xen-devel@lists.xenproject.org, x86@kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Juergen Gross , Boris Ostrovsky , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Jonathan Corbet Subject: [PATCH 0/3] xen/pv: sanitize xen pv guest msr accesses Date: Mon, 26 Sep 2022 16:18:46 +0200 Message-Id: <20220926141849.21805-1-jgross@suse.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Historically when running as Xen PV guest all MSR accesses have been silently swallowing any GP faults, even when the kernel was using not the *msr_safe() access functions. Change that by making the behavior controllable via kernel config and via a boot parameter. This will help finding paths where MSRs are being accessed under Xen which are not emulated by the hypervisor. Juergen Gross (3): xen/pv: allow pmu msr accesses to cause GP xen/pv: refactor msr access functions to support safe and unsafe accesses xen/pv: support selecting safe/unsafe msr accesses .../admin-guide/kernel-parameters.txt | 6 ++ arch/x86/xen/Kconfig | 9 ++ arch/x86/xen/enlighten_pv.c | 97 +++++++++++++------ arch/x86/xen/pmu.c | 44 +++++---- 4 files changed, 110 insertions(+), 46 deletions(-) -- 2.35.3