From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752712AbdKHVwW (ORCPT ); Wed, 8 Nov 2017 16:52:22 -0500 Received: from mail-pg0-f54.google.com ([74.125.83.54]:51227 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751241AbdKHVwV (ORCPT ); Wed, 8 Nov 2017 16:52:21 -0500 X-Google-Smtp-Source: ABhQp+S32nYL1nm6O3UGuydXis4F7CzP0WK7fIhbKz+UoXnCMwPH4NCi6A2A8nhDjupcyYFbu4UR9g== From: Nadav Amit Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: x86: CR4 update when IRQs are enabled Message-Id: Date: Wed, 8 Nov 2017 13:52:17 -0800 To: LKML , Andy Lutomirski X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I am puzzled by the comment in tlb_state.cr4 , which says: /* * Access to this CR4 shadow and to H/W CR4 is protected by * disabling interrupts when modifying either one. */ This does not seem to be true and adding a warning to CR4 writes when !irqs_disabled() immediately fires in identify_cpu() and __mcheck_cpu_init_generic(). While these two are called during boot, I think there other CR4 changes with enabled IRQs, for example, PR_SET_TSC. So my question(s): Is the comment correct? Is the current behavior correct? Thanks, Nadav