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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3CD55EB64DA for ; Wed, 19 Jul 2023 14:17:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ZGAw6FKRliU2szHUkfNc08LRVXFCFTRTntYP2/1zxTU=; b=y/RsqPQhqpcfKU2WHtAeG73kBm buJg10IPqh3RfG2d2dShpHEUd/kzX/iYrtG+zxFRSDbR3eGA6ZZM3Tgojf2j1fDFdGiMKfMSZj5Li grqBXLH+PJCN3dg9PEeQYwv4w6Fid2fO7DqypwVKpH2D+E9kCDfMF7XrknB9eudK/BLXmV39bvC+b TXWc1KOf8j+HRr3oxOT3PrxQ3Pdbn7kdtOuWPJsl/iC14IviMYqau6Qb3TPE9J2/ILLg2Jvd8MhVj hn1zo+8uXrbwvQKxRcIUBCACKuvhfVPMvnvnSdZZVeZTs5GZQMBbPzk+goYiJbDeCh+hNAekVS3si zYMulunQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qM7zB-007h37-1k; Wed, 19 Jul 2023 14:17:01 +0000 Received: from mail-pj1-x104a.google.com ([2607:f8b0:4864:20::104a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qM7z7-007h1I-2w for linux-arm-kernel@lists.infradead.org; Wed, 19 Jul 2023 14:16:59 +0000 Received: by mail-pj1-x104a.google.com with SMTP id 98e67ed59e1d1-262cf62e9b4so5353432a91.0 for ; Wed, 19 Jul 2023 07:16:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1689776216; x=1692368216; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Ply9vOQ7PKiPIjqcvpgXEIwEBxatqkRJB2ZRy5lS2Xc=; b=QCgn5pm8yPPImP/ZfLF2Ea0jJXDpcGNQ/LF2jNeNTBG71TLZwae17UnwEuo78ONGHP atCG9sArqHfv277Ky9HWUevcQtozR/I9rfoMFWMGzH2p/tn1UptotifJkTzwcjUzjGM4 2mRccC+Qe6eelyvVpzgsii1Dz38eewFROpWBRyPZo22w72yv1RXU/kRjiIgbgdf4vOiO m+eFtOZOtzemALwYg0UpO5hPIX4qNwingmWVGWsEqCwrs8u/CIQrQXsRy9c4nWVOA7nY TgAf9p3r7jbBOiu0L+1TlKBrMt3e7HNn72eYqwvkzNmnIVVzm8emG5isi9/yOnMB2w1e eLcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689776216; x=1692368216; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ply9vOQ7PKiPIjqcvpgXEIwEBxatqkRJB2ZRy5lS2Xc=; b=Oml45PvI1ReLgVvIz5ztHjWkTQL1PuNmxO9xxlWvtLDNQUlwvsY0fSonQ/tp87MBEa m10p3izMgicUWwvr9Muy+nSDEGcQcwYZ/tTrFlnLPmkW123EJENZkfr6Zb+zkaAExbQy M8ukVTRcWhQ2D3gx5/KaWrNzmI3A33P2FS97e90pvLOYcCwf5yNF8m7SYhZo/YQIKgLr Um7swWJhOZCFxqhCL+apGYUMUeVci+/ONkLw6jHGAX/mh8ueY2cWTMY1bfcEDpodeZ5/ Iq7FX0aH9HmgELyehXn5ohngHtCNb9XPTJLKdAWzN6v3tEazrMWeOVVeDIQIOQ4AHVnf D9kQ== X-Gm-Message-State: ABy/qLYZIpw+Nw1qWW2EspdcL3vwXCpNoQKpAuKaQ+4QmzX0eoS+h4NS bP0Y7YBPJd5F3+QrNKWhMASvUSS4yC0= X-Google-Smtp-Source: APBJJlHe5KmJdZof+vQtZ6M87xlqjK1Ejx8t4AB5DMX6de6h21FipxJ2lQkyFnlQoXRyf3eYpC2jq3S2bQ0= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90a:e542:b0:25b:f9e3:deab with SMTP id ei2-20020a17090ae54200b0025bf9e3deabmr136275pjb.9.1689776216142; Wed, 19 Jul 2023 07:16:56 -0700 (PDT) Date: Wed, 19 Jul 2023 07:16:54 -0700 In-Reply-To: <20230719075440.m3h653frqggaiusc@yy-desk-7060> Mime-Version: 1.0 References: <20230718234512.1690985-1-seanjc@google.com> <20230718234512.1690985-8-seanjc@google.com> <20230719075440.m3h653frqggaiusc@yy-desk-7060> Message-ID: Subject: Re: [RFC PATCH v11 07/29] KVM: Add KVM_EXIT_MEMORY_FAULT exit From: Sean Christopherson To: Yuan Yao Cc: Paolo Bonzini , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Matthew Wilcox (Oracle)" , Andrew Morton , Paul Moore , James Morris , "Serge E. Hallyn" , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Chao Peng , Fuad Tabba , Jarkko Sakkinen , Yu Zhang , Vishal Annapurve , Ackerley Tng , Maciej Szmigiero , Vlastimil Babka , David Hildenbrand , Quentin Perret , Michael Roth , Wang , Liam Merwick , Isaku Yamahata , "Kirill A . Shutemov" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230719_071657_948954_6FF45539 X-CRM114-Status: GOOD ( 14.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jul 19, 2023, Yuan Yao wrote: > On Tue, Jul 18, 2023 at 04:44:50PM -0700, Sean Christopherson wrote: > > From: Chao Peng > > > > This new KVM exit allows userspace to handle memory-related errors. It > > indicates an error happens in KVM at guest memory range [gpa, gpa+size). > > The flags includes additional information for userspace to handle the > > error. Currently bit 0 is defined as 'private memory' where '1' > > indicates error happens due to private memory access and '0' indicates > > error happens due to shared memory access. > > Now it's bit 3: Yeah, I need to update (or write) a lot of changelogs. > #define KVM_MEMORY_EXIT_FLAG_PRIVATE (1ULL << 3) > > I remember some other attributes were introduced in v10 yet: > > #define KVM_MEMORY_ATTRIBUTE_READ (1ULL << 0) > #define KVM_MEMORY_ATTRIBUTE_WRITE (1ULL << 1) > #define KVM_MEMORY_ATTRIBUTE_EXECUTE (1ULL << 2) > #define KVM_MEMORY_ATTRIBUTE_PRIVATE (1ULL << 3) > > So KVM_MEMORY_EXIT_FLAG_PRIVATE changed to bit 3 due to above things, > or other reason ? (Sorry I didn't follow v10 too much before). Yep, I want to reserve space for the RWX bits. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel