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 B344BC433F5 for ; Fri, 25 Feb 2022 18:23:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232504AbiBYSXz (ORCPT ); Fri, 25 Feb 2022 13:23:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232566AbiBYSXd (ORCPT ); Fri, 25 Feb 2022 13:23:33 -0500 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA49712A75B for ; Fri, 25 Feb 2022 10:23:00 -0800 (PST) Received: by mail-pl1-x64a.google.com with SMTP id x18-20020a170902b41200b0014fc2665bddso3408248plr.0 for ; Fri, 25 Feb 2022 10:23:00 -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=OKpSENCWyXwHBdjGJ3gByFACo60D6cjEVL83LoqsyAI=; b=b9RI+WDrYKbDwWxRpfBrGKJ+M0uWUYG/R9HMlU4/mEqPTWu7oVtS1VUBgFgWjZ++ZP qR7+DT+WJGieOarv8OsgBF6aZHUnul3W3dcki20lr/dtvbRybp2muAitL2U05f51Ishp 6keyKWiJjZBWG/rIx5ewTqUShB0uvTvoNxYZOCz/NIiY5uOzPagL0MB+A1+anitssEbE NmT/DbUfJ8sAXFaBQmTOfpKmmqacNgBbRIxzbZPqI7vmHCB5kmBDot/QnQIzwiitk4ob cDTNizSkwp2Xg707XqCJDUTVTz0k3eXvcUkGGZ76FFJ+7R81vfgTkmat4/9b4wuNQGJK tPqQ== 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=OKpSENCWyXwHBdjGJ3gByFACo60D6cjEVL83LoqsyAI=; b=OPK2gwwwioNBBV/gFJeQA9fZz9kLCcIFocGO72tHGd8EXO0fW18BEX++SP+HnO5RyJ 7aZJQ1629lSol305xgBvc696TkRpVAJJiIL8slK8VB7oLG12PVfNA1o3CgWzTBzKgKtZ JpU3dHA0WxqRx/s6kCCxIp/6KCIqbc0CSmY/WbIK7fNzEnGSVu6ESECedpmWwBxIhZAp xNM+Xgctn7B7j62pIi+lZyTbK0dMTk1Jt3FfWRmpMk/aq4ITUv8xOXQTiUHRpQQzJ1Ep DWxU2lrvVtZ/QX63uMQyps6y1qQQNs6t64wD5YLIikDaee3x9k25slSRPCYqV3uzt0Xf cPCg== X-Gm-Message-State: AOAM532401niM7VIBKScxKk49U+Qj2ApUfuw3AGWKzxB1qr1vVkmEVDN s7RLtX3AmCLaYXfs97A9dlpZkIArcAw= X-Google-Smtp-Source: ABdhPJwUNaTUFvmEZHBOnSpxwiw/lZ+XqgCu1OS+l26XAQ4480iv62UAgTn9TFAeEJvztnJGJ5LksjK+jVc= X-Received: from seanjc.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:3e5]) (user=seanjc job=sendgmr) by 2002:a17:90b:3c01:b0:1bc:b160:7811 with SMTP id pb1-20020a17090b3c0100b001bcb1607811mr4342903pjb.164.1645813379912; Fri, 25 Feb 2022 10:22:59 -0800 (PST) Reply-To: Sean Christopherson Date: Fri, 25 Feb 2022 18:22:47 +0000 In-Reply-To: <20220225182248.3812651-1-seanjc@google.com> Message-Id: <20220225182248.3812651-7-seanjc@google.com> Mime-Version: 1.0 References: <20220225182248.3812651-1-seanjc@google.com> X-Mailer: git-send-email 2.35.1.574.g5d30c73bfb-goog Subject: [PATCH v2 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, 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. Reviewed-by: Claudio Imbrenda 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..b61d48aec36c 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 VM's state has been intentionally destroyed. KVM_REQ_UNBLOCK diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 0aeb47cffd43..9536ffa0473b 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -153,10 +153,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_REQ_GPC_INVALIDATE (5 | KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP) #define KVM_REQUEST_ARCH_BASE 8 -- 2.35.1.574.g5d30c73bfb-goog