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 4D6F3C433EF for ; Thu, 9 Dec 2021 06:06:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232931AbhLIGJv (ORCPT ); Thu, 9 Dec 2021 01:09:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232667AbhLIGJl (ORCPT ); Thu, 9 Dec 2021 01:09:41 -0500 Received: from mail-pf1-x44a.google.com (mail-pf1-x44a.google.com [IPv6:2607:f8b0:4864:20::44a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AD39C0617A1 for ; Wed, 8 Dec 2021 22:06:08 -0800 (PST) Received: by mail-pf1-x44a.google.com with SMTP id u4-20020a056a00098400b004946fc3e863so3002224pfg.8 for ; Wed, 08 Dec 2021 22:06:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=reply-to:date:in-reply-to:message-id:mime-version:references :subject:from:to:cc; bh=XwK2aAeo0fjHkfXaWz8Ty6BZAoD9TIYvMIly0IdtTNg=; b=glHYd3IfOdm/ruPB1ckcqVGmkTWoY14hms3x9IVRLhesxoBhtEvOUbt9GALZqioU9Q rir8X0BBlnuzO7TrsXpwZ8dI2ksTdUmgDfgAALNLc9cm89xjUOLICQm3VDSs8TUMXoK6 +l095fs3AU0bSQW2EILAV3VAji+9CyTovjKHNbnOJOZLzUYBssAlXdqejp4c7iXP3v1G V/ySM6oKkOPBsYZqDJjkAcT2YpVmQVZhID7hS7q+uh06h1GN+HoNr0d2my7sDsbAbATL F4oeQWNnqv0gIWtTSKMjtSTRB4goVtUuqpfz44JrLg/QAAN/Bipdeum9vQyo/rWtGGWR 72DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:reply-to:date:in-reply-to:message-id :mime-version:references:subject:from:to:cc; bh=XwK2aAeo0fjHkfXaWz8Ty6BZAoD9TIYvMIly0IdtTNg=; b=DHZFBkefozv/vmZQAIp6eVvSekYhC0hVCKV2w3NRmdSc/HF24dEmn3Sg0E0qHTPRfb qn6wqRaNmrLWMZm1cRMOx48e9m3Qnj4oGYZMu8Gl9p6Xeo9znK5IgQwDlkLPfqRsD2kF Jw/M79diCejdTAPABjz8JQ+KrQE0MFjBzjt36xFUtctsmXoSEV6fQVZ4EjYr0N03lmF+ ce3lrT5wzerAlLB0wbcyaToIjsFSNfRC8Iub8y+rKWjcdOhokyHdYRkvE5KTFrbBJO3I L3v5m5FQl1WEUvFZT8mzuswl428bhWXUeK6CnO30ydOF7Wm/NmiNlMBnHjQJLEDxtrKb rSqA== X-Gm-Message-State: AOAM5337mVcQ8nCJfE6nOWr0dfwzF9vGT7qrDvqecRBGjBDdlBVij/MP QlQxDV/ismBQD/KcJ1oAXBSP5DPZWSw= X-Google-Smtp-Source: ABdhPJwAxGMilsaKQMdRlY2eJvELfH4FCF3pawk1uAC6wXcbVHFPq6wxid7Lug8YvA98RvPMJfO3zNBqpJM= X-Received: from seanjc.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:3e5]) (user=seanjc job=sendgmr) by 2002:a05:6a00:1693:b0:44c:64a3:d318 with SMTP id k19-20020a056a00169300b0044c64a3d318mr10028797pfc.81.1639029967795; Wed, 08 Dec 2021 22:06:07 -0800 (PST) Reply-To: Sean Christopherson Date: Thu, 9 Dec 2021 06:05:51 +0000 In-Reply-To: <20211209060552.2956723-1-seanjc@google.com> Message-Id: <20211209060552.2956723-7-seanjc@google.com> Mime-Version: 1.0 References: <20211209060552.2956723-1-seanjc@google.com> X-Mailer: git-send-email 2.34.1.400.ga245620fadb-goog Subject: [PATCH 6/7] KVM: Drop KVM_REQ_MMU_RELOAD and update vcpu-requests.rst documentation From: Sean Christopherson To: Paolo Bonzini , Christian Borntraeger , Janosch Frank Cc: David Hildenbrand , Claudio Imbrenda , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Maxim Levitsky , Ben Gardon , Lai Jiangshan Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove the now unused KVM_REQ_MMU_RELOAD, shift KVM_REQ_VM_DEAD into the unoccupied space, and update vcpu-requests.rst, which was missing an entry for KVM_REQ_VM_DEAD. Switching KVM_REQ_VM_DEAD to entry '1' also fixes the stale comment about bits 4-7 being reserved. Signed-off-by: Sean Christopherson --- Documentation/virt/kvm/vcpu-requests.rst | 7 +++---- include/linux/kvm_host.h | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Documentation/virt/kvm/vcpu-requests.rst b/Documentation/virt/kvm/vcpu-requests.rst index ad2915ef7020..98b8f02b7a19 100644 --- a/Documentation/virt/kvm/vcpu-requests.rst +++ b/Documentation/virt/kvm/vcpu-requests.rst @@ -112,11 +112,10 @@ KVM_REQ_TLB_FLUSH choose to use the common kvm_flush_remote_tlbs() implementation will need to handle this VCPU request. -KVM_REQ_MMU_RELOAD +KVM_REQ_VM_DEAD - When shadow page tables are used and memory slots are removed it's - necessary to inform each VCPU to completely refresh the tables. This - request is used for that. + This request informs all VCPUs that the VM is dead and unusable, e.g. due to + fatal error or because the VMs state has been intentionally destroyed. KVM_REQ_UNBLOCK diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 636e62c09964..7e444c4e406d 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -151,10 +151,9 @@ static inline bool is_error_page(struct page *page) * Bits 4-7 are reserved for more arch-independent bits. */ #define KVM_REQ_TLB_FLUSH (0 | KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP) -#define KVM_REQ_MMU_RELOAD (1 | KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP) +#define KVM_REQ_VM_DEAD (1 | KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP) #define KVM_REQ_UNBLOCK 2 #define KVM_REQ_UNHALT 3 -#define KVM_REQ_VM_DEAD (4 | KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP) #define KVM_REQUEST_ARCH_BASE 8 #define KVM_ARCH_REQ_FLAGS(nr, flags) ({ \ -- 2.34.1.400.ga245620fadb-goog