Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp434774lqp; Wed, 22 May 2024 08:46:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXXsK2AaeP5WUzw9upGkduNDKt/456aBxKkcsC6Y9cLODK+duc2sDSVce7l2k/duvYYcja4MO0BHlc36qR1wBBU2kPyIfTYRQo3ITmkyw== X-Google-Smtp-Source: AGHT+IF2Ch9EII4cM5/ZUyjvneXDSgzPEFyzrwgsanjjhEbscFkbF2oh4WSdAWX0V/zEqjj8ortd X-Received: by 2002:a05:622a:14ce:b0:43b:a44:f83c with SMTP id d75a77b69052e-43f9e171114mr30806201cf.56.1716392787218; Wed, 22 May 2024 08:46:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716392787; cv=pass; d=google.com; s=arc-20160816; b=VY1FRnx3Y0yVyJ1HmvsasKmo8BjeeMHHH29MgvTMBLsCyRYMKLAXtwigzsuUSG6Qjx wIo12hZNMwZ/kPGi/gqcAf8PjThgmQ18YbOupSdRfWJw+u+Bzq+pJGlYhAP29fma+HiH B2hfuplRBU+2EbTEL2x4o53zGdIlNkDcWR4zfiiTtnj8c16rmOHITuAzWJuSfzOVIMky l0Z5lYQGAMNk7ThVynVPAs9cI7J8x2LLO3o7G9E+c5J4WsgvIX/gjgo3aWhx6WBODNvK 2ELi8RcPWzyvljodn4sziSM3AC7Q7dQJdmJvWDmpIBCXYESOP9+yk6uKjqV0BHspDJDO 2WLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=Mdb4OhrS+xxduGqCQenQjyZiiOEqWnw5Chesp52+Cyw=; fh=oOUUQzutlBJFdnzEihQwCeC575HW9tM11st+nOUenV8=; b=kXj/nmRNEEO5qpLdoiDK0ot/41NaYRsmvDnVDYAe4vmELcoLidhIqFluaC66KXuzjn FYpXrQ3Bxv/r6gORvy6TsDb60R61TSUB0s0UaTCoGh9nicq1K1CB7GeG4xez/yQ+Bjrv No7pyNlD20vlVywk4cN0lOnEWC18hXvCNZh9Lfprtj3fsQlTTOnF718XczIMD5dicGUx u+nPym+YR0C8S9Xbkgzo8s40p0A1+Q5O5Tj/6nSyP+8Iwdk+ka8U/WZrWmN0ZT0MRO2k QThepPOepdL7l/expEr9SaIoGo2woFMH8/PVdA4Ksh6ExQr/xvMRT+PGUZWfmPCxQC/y OgTQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AGAyKEhW; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-186451-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186451-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43df56995eesi305792621cf.457.2024.05.22.08.46.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 08:46:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186451-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AGAyKEhW; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-186451-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186451-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CF2FC1C21295 for ; Wed, 22 May 2024 15:46:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D6A2C1420A9; Wed, 22 May 2024 15:45:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AGAyKEhW" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9115F13E8A0 for ; Wed, 22 May 2024 15:45:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716392759; cv=none; b=eRYH+fgxIYziJau82dUBxhs1ulkv0LMbrGh37V4rUFYtJItf7EHphET9dx3d9M/+Oy3QZeDuc3YMke32zAxSBoqTYFcB+GkHlYB8C4NvvlIOXI+ehUaEzaNj/NJQ3oeQcDdcOlNEtOwU2m537/7JV7qOdLt76wwhDnvMvjle5UY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716392759; c=relaxed/simple; bh=Mdb4OhrS+xxduGqCQenQjyZiiOEqWnw5Chesp52+Cyw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ZTq14YmeK3HJmE2Pen9+Oyfy1ul/8Hoxuseieg3phmGuxweyZCtTJ3tgHuRTHiiiSM2na2O7jeFoC3r6L1eA8WxXei24fqLJ2kxznujp/i5rfT5E5Z6CfF9AXU5zzU3YpyYbdzx2nDYbCaXNz9tqVpUSDm6sSwRDgNHel6P2LtI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=AGAyKEhW; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716392756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Mdb4OhrS+xxduGqCQenQjyZiiOEqWnw5Chesp52+Cyw=; b=AGAyKEhWPHFwhP5csu/9jm+KKi3DAP5+8MAeOOa7diUkO3B6qGZroHxB1za6S68psAtJ8C IeCJyzJzRjR9qCWbeiiGe5wO06FGozTbNXNJ09ihxumeS7h3EMsBM35l9DarWhGaGhbQQM ulgAsFGHu1b2LVuPDXohhoC0ZiyLLQU= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-25-7f18bCruNo-SmbhIfwRwbA-1; Wed, 22 May 2024 11:45:52 -0400 X-MC-Unique: 7f18bCruNo-SmbhIfwRwbA-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-354df3e1b0fso390553f8f.1 for ; Wed, 22 May 2024 08:45:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716392752; x=1716997552; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Mdb4OhrS+xxduGqCQenQjyZiiOEqWnw5Chesp52+Cyw=; b=UazgVT4C2+CfH5LQQlxoY4rXpmeucX/ofwwR1kR0XkUZd6ZnD1JrTY+AI5Q/n0E0YI gh0qAEyzROgTS86KjgbRvfI752pb41dTVaqFGwL433YGuv0N6WjpJOSuT3CdSiA4FIRq axV58AEyU+PbA6xAinepTTUWqPhkjAqtOHF0kxUk0KyX77+4MZpKSjyYDP9U+Cc6FnrW ULODXMAmrbtAnEOksRIF5jAhHldCntQVB+YbBDB61Isz62W3H1VKx2oZ0U+tBfoIDomt +homZLXPPDumKmAVuNtiHX23MQK7hE7W0Iw/kXbcbiiBLbGQcnUThH5ziDySZd4zw1uJ a3Xw== X-Forwarded-Encrypted: i=1; AJvYcCW2lFoMPYaDUcr40dYazNJB0y6ON7c3+Rn+1udTGHI21wpNXLv7OTJzmnpVqa8jjapKEAX9YxuJTKheoTeDINvOx7cBqpiQtzlBmxzR X-Gm-Message-State: AOJu0YyZrR77FQ2NVyKhQjAsII/q7qy8CMhEIKsJ3lk6yNBGbgMfdcdx MC1NOpV3sJjQMITvR0kazRGuRKOvwp3GekMpT2836xzf5kr0tp2aAZxk2OUoKPVp+tBQPt9gINs b346JVkDEI6sysrRk+LiESLeBbEqDYL4p6AfkbFGWeOPDejeJsli4FQLchHUlC9ev6b3K/usxZD lOuX+PhEXQdBDyVYpUlZXk94TxASuf8SFoa+fj X-Received: by 2002:adf:eccd:0:b0:354:f452:c99a with SMTP id ffacd0b85a97d-354f452cc09mr512929f8f.25.1716392751782; Wed, 22 May 2024 08:45:51 -0700 (PDT) X-Received: by 2002:adf:eccd:0:b0:354:f452:c99a with SMTP id ffacd0b85a97d-354f452cc09mr512909f8f.25.1716392751401; Wed, 22 May 2024 08:45:51 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <1257b7b43472fad6287b648ec96fc27a89766eb9.camel@intel.com> <175989e7-2275-4775-9ad8-65c4134184dd@intel.com> <7df9032d-83e4-46a1-ab29-6c7973a2ab0b@redhat.com> In-Reply-To: From: Paolo Bonzini Date: Wed, 22 May 2024 17:45:39 +0200 Message-ID: Subject: Re: [PATCH 02/16] KVM: x86/mmu: Introduce a slot flag to zap only slot leafs on slot deletion To: Yan Zhao Cc: Sean Christopherson , Kai Huang , Rick P Edgecombe , "dmatlack@google.com" , "sagis@google.com" , "linux-kernel@vger.kernel.org" , Erdem Aktas , "kvm@vger.kernel.org" , "isaku.yamahata@gmail.com" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 22, 2024 at 8:49=E2=80=AFAM Yan Zhao wro= te: > > Disabling the quirk would allow KVM to choose between a slow/precise/pa= rtial zap, > > and full/fast zap. > TDX needs to disable the quirk for slow/precise/partial zap, right? Yes - and since TDX is a separate VM type it might even start with the quirk disabled. For sure, the memslot flag is the worst option and I'd really prefer to avoid it. > > I have the same feeling that the bug is probably not reproducible with = latest > > KVM code Or with the latest QEMU code, if it was related somehow to non-atomic changes to the memory map. Paolo