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 54944C433EF for ; Fri, 18 Feb 2022 16:21:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235078AbiBRQWI (ORCPT ); Fri, 18 Feb 2022 11:22:08 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231320AbiBRQWG (ORCPT ); Fri, 18 Feb 2022 11:22:06 -0500 Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE72D3F880 for ; Fri, 18 Feb 2022 08:21:48 -0800 (PST) Received: by mail-ua1-x92b.google.com with SMTP id 60so4519829uae.1 for ; Fri, 18 Feb 2022 08:21:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MBFxmlsp+Ppol0M03sVOJPvD0cRtLe1wxV7SG8UW4lw=; b=MOS0ZKbjI8xl7ER0rzl/N7TIG//ZghuPB3+myCtK980sjjNtXfoG68cs7DQ3UmiurJ 53FT/TZbLegmZ6S3INVntv8MYtcjmRCufuqBSeNGO4tBI/mAkEOicmpJju5Oe03jW8Q3 IZ+mtwdUX19fa/ja86NtCvIPTxzgXmdOV5ZDF3iWcT0TIL8RySDfJ/Ra3IZqTG4ensmo 6pU2bUhI8mOK3cmAcp/y//7nAQNcX2n94uC9SwYW/AUne1MkBgwDWqIzDt7EIEmn8IU0 Hut28l0qhkrkAJCkwXqKGivrwsHPIICRZiVECgMaEzCvmpF7lllWCS7EihA5nEGZfIoQ vSdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MBFxmlsp+Ppol0M03sVOJPvD0cRtLe1wxV7SG8UW4lw=; b=OXUK24VDx+g7wLYC85XkGNoLq1P1UzGW5q7FK0MVTj4zgef74djFjGCvU7ZaXWfQxD RNwHbcrfOcgeKyYUP6heiXcC7DNJPO5QAiRMErDiO5zMCt7DtuntQg+dPFstdWp5Q17f AAx48l6cd/7D2L/QRTsKsD0liXxGRNBvWk0iD59hJgpmw40kBSAOFHt7hRjmvCgyTkZn TE1PsxTRmGH2oZConHUa+fdHmd5DgvVUWpMqXmnhPbv/jtraWPvq1VwB6SDVUUWvP4wa +WoJCyJg5RJia4qeMcEjYjA5Be8/ZqLQ/ZF9hYxaoQF1DcOhriCwPt4XrRa8fdcK/+Gt Wi2g== X-Gm-Message-State: AOAM533kVl/q1X8WwmSTY82JxH554Hj3uOxAI/H+7vrnrNyEeJCxML7Z e0FDA9pQuy7NDsWCjKIImIlBQ+FJhSFaFCfBSzNIwsx90riN+w== X-Google-Smtp-Source: ABdhPJzAl3cdYfXDoi8IHapaMBToDE190zn9xog31chAYhWjAgGvCYxbQV9awiWUVLoK9PNPXBPYF9Eig5kuZXLh/Ok= X-Received: by 2002:ab0:60b1:0:b0:341:543e:c388 with SMTP id f17-20020ab060b1000000b00341543ec388mr3270571uam.80.1645201307736; Fri, 18 Feb 2022 08:21:47 -0800 (PST) MIME-Version: 1.0 References: <20220218013209.2436006-1-juew@google.com> In-Reply-To: From: Jue Wang Date: Fri, 18 Feb 2022 08:21:36 -0800 Message-ID: Subject: Re: [PATCH v2] x86/mce: work around an erratum on fast string copy instructions. To: Borislav Petkov Cc: Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 18, 2022 at 8:14 AM Borislav Petkov wrote: > > On Fri, Feb 18, 2022 at 08:03:24AM -0800, Jue Wang wrote: > > Since MSR_IA32_MISC_ENABLE is not a MCA register, I wonder if we want > > to mix its read/write with the injected MCE code. > > > > I was a bit concerned about potential race with mce-inject and the > > read/write to MSR_IA32_MISC_ENABLE. > > It won't inject anything: > > offset = msr_to_offset(msr); > if (offset < 0) > ret = 0; > Thanks. My concern was that here returns 0 instead the value read from the msr. Maybe this cannot happen? > > Besides, you need to use those routines due to EX_TYPE_{RD,WR}MSR_IN_MCE > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette