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=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=unavailable 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 2D8EDC433DB for ; Sat, 6 Feb 2021 05:01:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EDE0664F91 for ; Sat, 6 Feb 2021 05:01:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230018AbhBFFB2 (ORCPT ); Sat, 6 Feb 2021 00:01:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229866AbhBFDlb (ORCPT ); Fri, 5 Feb 2021 22:41:31 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E10EBC08EE28 for ; Fri, 5 Feb 2021 16:27:04 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id w18so5400583pfu.9 for ; Fri, 05 Feb 2021 16:27:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=EH3HRE/ibAwzd4o+wOpnfLPBD+oAmovzGutqmDQDCIg=; b=lc8Qw0kNFzTtqe6BIDMx231cY0gFUoT9MZSiM+wnbBFQlaHgTDDk6kcV1GHTXnJhQo KBTF79P9Zaax+amNTdEv9MGPTyOugyxRV0Q5NFBKrlcvwJfktwrS/ldssoNeQgbimTEA jA6mRYrrznUQS/0osskEWOnkfXEy1vzRAHwS33kbFdujVkNmnu95KK/k/AVVIkNXrjzr 7xdyMk4EWNbkJbmrEbEFIZOGYEareyNfyJjDKkJVqqPAmKpZEoCiVh5gsY1Jy/k/f6i+ 81AwnITy97MEdorNUdiRVxCQ7RNaQ47ohBhgoZSqaiA7tfwJsxTRld5l7EjscB4Qa6EB nuSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=EH3HRE/ibAwzd4o+wOpnfLPBD+oAmovzGutqmDQDCIg=; b=rKZSNt2oZ0PrxaPR+WWqPaA1WhZP8XIj/N7XN98w955TvuP87i0YhSWfwUcRd3EjC9 jZ3rpYAG/Ami1gOVQQilNmniN7NTRxEN6LqSlv0miXRJ5Xn9TU1Z+nSgJO4OBjgEKYl3 3EQsdaiM+Qav51N/WPM9gIQQEdic96foouhdg4FMsFZSKKdjOw9ca/zdBPhqaWCnFd7B CTc6SV+3sadBMDfAUkJcVUbTCOxvT3EyKf81Owpp2LyaupMEcyMchIiKmhNI8Q/SD/W7 uBhEICCsymJussdfYuc9TDZAP/hRnQk/Ol72Q4j5SvYAnxntFqyhys27cBdZHP1xomUm IdXw== X-Gm-Message-State: AOAM533luvJbTBtfZurFORG9kelBGjvDpbuyUjK6OeQ4+8RDGboBpuRZ xvkX2WJddfkKfwnRUc8FzOgxSA== X-Google-Smtp-Source: ABdhPJwFPakzZi7F4YXbdMIn58tmOenc4WF1friZt/+b0HiEN1gqMvgZgMvx8X1RrcdLO6JKGXn7qw== X-Received: by 2002:aa7:92c6:0:b029:1cb:1c6f:c605 with SMTP id k6-20020aa792c60000b02901cb1c6fc605mr7100209pfa.4.1612571224287; Fri, 05 Feb 2021 16:27:04 -0800 (PST) Received: from google.com ([2620:15c:f:10:d169:a9f7:513:e5]) by smtp.gmail.com with ESMTPSA id t6sm10993068pfe.177.2021.02.05.16.27.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 16:27:03 -0800 (PST) Date: Fri, 5 Feb 2021 16:26:57 -0800 From: Sean Christopherson To: Paolo Bonzini Cc: Ben Gardon , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Peter Xu , Peter Shier , Peter Feiner , Junaid Shahid , Jim Mattson , Yulei Zhang , Wanpeng Li , Vitaly Kuznetsov , Xiao Guangrong Subject: Re: [PATCH v2 20/28] KVM: x86/mmu: Use atomic ops to set SPTEs in TDP MMU map Message-ID: References: <20210202185734.1680553-1-bgardon@google.com> <20210202185734.1680553-21-bgardon@google.com> <81f13e36-b2f9-a4bc-ab8e-75cedb88bbb1@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <81f13e36-b2f9-a4bc-ab8e-75cedb88bbb1@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 03, 2021, Paolo Bonzini wrote: > On 02/02/21 19:57, Ben Gardon wrote: > > To prepare for handling page faults in parallel, change the TDP MMU > > page fault handler to use atomic operations to set SPTEs so that changes > > are not lost if multiple threads attempt to modify the same SPTE. > > > > Reviewed-by: Peter Feiner > > Signed-off-by: Ben Gardon > > > > --- > > > > v1 -> v2 > > - Rename "atomic" arg to "shared" in multiple functions > > - Merged the commit that protects the lists of TDP MMU pages with a new > > lock > > - Merged the commits to add an atomic option for setting SPTEs and to > > use that option in the TDP MMU page fault handler > > I'll look at the kernel test robot report if nobody beats me to it. It's just a vanilla i386 compilation issue, the xchg() is on an 8-byte value. We could fudge around it via #ifdef around the xchg(). Making all of tdp_mmu.c x86-64 only would be nice to avoid future annoyance, though the number of stubs required would be painful...