From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sean Christopherson Date: Wed, 28 Feb 2024 16:53:39 -0800 Subject: [PATCH v9 07/11] KVM: selftests: Allow tagging protected memory in guest page tables In-Reply-To: References: <20240223004258.3104051-1-seanjc@google.com> <20240223004258.3104051-8-seanjc@google.com> <75d37243-e2a3-421a-b74f-ccbe307fef96@intel.com> Message-ID: List-Id: To: kvm-riscv@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue, Feb 27, 2024, Sean Christopherson wrote: > On Wed, Feb 28, 2024, Xiaoyao Li wrote: > > On 2/23/2024 8:42 AM, Sean Christopherson wrote: > > ... > > > diff --git a/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h > > > new file mode 100644 > > > index 000000000000..218f5cdf0d86 > > > --- /dev/null > > > +++ b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h > > > @@ -0,0 +1,7 @@ > > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > > +#ifndef _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H > > > +#define _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H > > > > Since the file name is changed from kvm_host.h (in v7) to kvm_util_arch.h, > > we need to update it as well. > > > > Ditto for other archs > > Ugh, nice catch. I'll fixup and force push (likely tomorrow). Here's the diff of my fixup: diff --git a/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h index 218f5cdf0d86..e43a57d99b56 100644 --- a/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H -#define _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H struct kvm_vm_arch {}; -#endif // _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H diff --git a/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h b/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h index c8280d5659ce..e43a57d99b56 100644 --- a/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_RISCV_KVM_HOST_H -#define _TOOLS_LINUX_ASM_RISCV_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H struct kvm_vm_arch {}; -#endif // _TOOLS_LINUX_ASM_RISCV_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H diff --git a/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h b/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h index 4c4c1c1e4bf8..e43a57d99b56 100644 --- a/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_S390_KVM_HOST_H -#define _TOOLS_LINUX_ASM_S390_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H struct kvm_vm_arch {}; -#endif // _TOOLS_LINUX_ASM_S390_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H diff --git a/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h b/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h index 205ed788aeb8..9f1725192aa2 100644 --- a/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_X86_KVM_HOST_H -#define _TOOLS_LINUX_ASM_X86_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H #include #include @@ -20,4 +20,4 @@ static inline bool __vm_arch_has_protected_memory(struct kvm_vm_arch *arch) #define vm_arch_has_protected_memory(vm) \ __vm_arch_has_protected_memory(&(vm)->arch) -#endif // _TOOLS_LINUX_ASM_X86_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D86C517554 for ; Thu, 29 Feb 2024 00:53:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709168023; cv=none; b=UzF9K0O4Wz9tp6z04fJFN5d4y+feEu1euDufoqYAElOmZgTGt4LfpYmhFTIqrYNfjClRTrptkIYhDrdcc3rpHurE1gj7WoDiTHgIvb+065sXyDmoissgLPeXDvvrBJovyW2AllHsR7bLI0eVWWYM00F+Nj7HhRpTDtU5AuQNQZ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709168023; c=relaxed/simple; bh=ixPn/WA/IkkMHbVj9xbnA+a/EFMiv0ErX3XQ1lo3UFc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=YnIvk+csto2bYJJkknNusTSee66KBkjz3ORTy/WzjXnE8n24t5uXo0HARkvDIAvQ4mGulWfUhy/Hg8G02mkV6OriJOdLn5EWpJwCHQoiDEPP9E7teiKX1XKVweS4CdLb3W7bFq2jAJ7G+yyGviTHBRzNFaa04Ib0e7Ht5NwMIFQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=BG528EHs; arc=none smtp.client-ip=209.85.216.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="BG528EHs" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-299727c3e8bso203287a91.1 for ; Wed, 28 Feb 2024 16:53:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709168021; x=1709772821; darn=lists.linux.dev; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Q1fAxVxcSGJDtvwC4OA6vg9SQpipa+6cd4wlsruGTgI=; b=BG528EHsBnO4wcE9OEEhDlnCi9OrfeucIUbwPXdPp8pdaUdgzRV/EFGOpXO/JyT611 Q4ZdFLbU/QDJylwFX9NoGm5+/djh4SrtR6GT3S3Yfs7BGIl0Y0+0/5n5MR+zWd5loXZn GgBlhVBOZkBeQ9GDXQQnrTzPVYgjCQssjeHinHrPeEEcAZjuuIvTw5NAXurUvpILDDdI xoMYpBl9NDcmHFM266nmv0/aqq4s2Ts0yMEqQsC6T0Mq0gek2a+1alhnQas1VWkH/niA O1HHzP6XGVNxCrJZGQVDd3Bkh9fYyriTXJ9Win1b8tbAzw933/mZdiTUwXVKOyBASpWg xmfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709168021; x=1709772821; 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=Q1fAxVxcSGJDtvwC4OA6vg9SQpipa+6cd4wlsruGTgI=; b=mWp/fE52i9cCFIEoXHcLLGX62ddgGzJy8HJDOJhC1eutzJ7oPM0FsXuIEqo3EtZBvO iJsWRNEfqmp0bAaQ/t3qYdapAzF7HDwfk9+eEfvBWjsIw1HhIRiOXreymzIvByGbVZxd BIQkNt4pGuPibJ9JhL6j99Im7ZQZ3NxaWPcxGIyMS08A3xj6D39EKMNjYE8SAjY2kBdQ /TMYGhMAc79bhvIW3ReMoELGEXxyEv4w5M6EJheQ0L+r19I2mJDWycC1SyjkAXJzPtTh I91d4iWhcn2w0s95yJkIAHwbwAkSjaB6N21L2LapkGiRm6hueAA4s0VSwaBnxfIXkws8 Gbpw== X-Forwarded-Encrypted: i=1; AJvYcCXazZc3T2ahScGsCWl29Kv7OVAed9qBqXLHiEi2myAiQ6lwRU/scdf1JhuAaXUmVj7zbWo6tAvflurTOPF/vhnS8YpLYD2b X-Gm-Message-State: AOJu0Yz22AYcT8O/ccxTX+n8da2xMzo0nC3HTJWNGSFBKC8eJDkDXmfd vZ1n1dX3wnoT5hPbBTjWJkqDho8HbnxeoxgABBeXV75O2PdbljpTVdiRwgvBy0abLtZfg+vbLCJ 3uA== X-Google-Smtp-Source: AGHT+IEGDx9KNnQuVlFL1a+o7VDJ3fqoKiHSZ9fod3C0H0yXTT9TpbbqlundidtZGFnRpu3hKNN8Sj3g9iY= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90b:4f44:b0:29a:c5e6:c5f1 with SMTP id pj4-20020a17090b4f4400b0029ac5e6c5f1mr15628pjb.6.1709168021232; Wed, 28 Feb 2024 16:53:41 -0800 (PST) Date: Wed, 28 Feb 2024 16:53:39 -0800 In-Reply-To: Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240223004258.3104051-1-seanjc@google.com> <20240223004258.3104051-8-seanjc@google.com> <75d37243-e2a3-421a-b74f-ccbe307fef96@intel.com> Message-ID: Subject: Re: [PATCH v9 07/11] KVM: selftests: Allow tagging protected memory in guest page tables From: Sean Christopherson To: Xiaoyao Li Cc: Paolo Bonzini , Marc Zyngier , Oliver Upton , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Vishal Annapurve , Ackerley Tng , Andrew Jones , Tom Lendacky , Michael Roth , Carlos Bilbao , Peter Gonda , Itaru Kitayama Content-Type: text/plain; charset="us-ascii" On Tue, Feb 27, 2024, Sean Christopherson wrote: > On Wed, Feb 28, 2024, Xiaoyao Li wrote: > > On 2/23/2024 8:42 AM, Sean Christopherson wrote: > > ... > > > diff --git a/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h > > > new file mode 100644 > > > index 000000000000..218f5cdf0d86 > > > --- /dev/null > > > +++ b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h > > > @@ -0,0 +1,7 @@ > > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > > +#ifndef _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H > > > +#define _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H > > > > Since the file name is changed from kvm_host.h (in v7) to kvm_util_arch.h, > > we need to update it as well. > > > > Ditto for other archs > > Ugh, nice catch. I'll fixup and force push (likely tomorrow). Here's the diff of my fixup: diff --git a/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h index 218f5cdf0d86..e43a57d99b56 100644 --- a/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H -#define _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H struct kvm_vm_arch {}; -#endif // _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H diff --git a/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h b/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h index c8280d5659ce..e43a57d99b56 100644 --- a/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_RISCV_KVM_HOST_H -#define _TOOLS_LINUX_ASM_RISCV_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H struct kvm_vm_arch {}; -#endif // _TOOLS_LINUX_ASM_RISCV_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H diff --git a/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h b/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h index 4c4c1c1e4bf8..e43a57d99b56 100644 --- a/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_S390_KVM_HOST_H -#define _TOOLS_LINUX_ASM_S390_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H struct kvm_vm_arch {}; -#endif // _TOOLS_LINUX_ASM_S390_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H diff --git a/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h b/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h index 205ed788aeb8..9f1725192aa2 100644 --- a/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_X86_KVM_HOST_H -#define _TOOLS_LINUX_ASM_X86_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H #include #include @@ -20,4 +20,4 @@ static inline bool __vm_arch_has_protected_memory(struct kvm_vm_arch *arch) #define vm_arch_has_protected_memory(vm) \ __vm_arch_has_protected_memory(&(vm)->arch) -#endif // _TOOLS_LINUX_ASM_X86_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H 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 B039EC5475B for ; Thu, 29 Feb 2024 00:53:52 +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=wzmFudRNKFNyCQqclUvDXubvuukoT77dwYLozwge7Gw=; b=X75E+MfBtHVGHBYg8AAOr2alpT 8prW7H3X7VLuWjFBUie9/uF6ytZIBu2SKPih9C2/lxEacpEDSZIyS0WYaQZD8jDsFZ41zpgKg2EjF 5koe32ljc8tDOBJngCrZnhbz9Z+8ZPRtFhv/MdSFge53CmbJZJZxT7YFRji/FVqasN6yhKiacZ6t8 NJRiCvppf4TWN0v7wOdo6+SYp6OWSaHTiR8BE+3y2UXZXi7jacruWbxA9Zbie7ElrtiXZj6VEcAGH n4pzz7+qb3UskByQ6o/JAbQF+9Yk9yK+yoHcW9i5LZtk/tYK76IHl4kwoIW6fGHk2dfyDjn3G1b6R /A2K4ngg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfUgF-0000000BTSA-21ie; Thu, 29 Feb 2024 00:53:47 +0000 Received: from mail-pj1-x1049.google.com ([2607:f8b0:4864:20::1049]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfUgA-0000000BTPg-49vk for linux-riscv@lists.infradead.org; Thu, 29 Feb 2024 00:53:44 +0000 Received: by mail-pj1-x1049.google.com with SMTP id 98e67ed59e1d1-29b0ac33382so104059a91.3 for ; Wed, 28 Feb 2024 16:53:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709168021; x=1709772821; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Q1fAxVxcSGJDtvwC4OA6vg9SQpipa+6cd4wlsruGTgI=; b=J0Rhn6GIlLUtDplYTJVP9t8b0kBnfCrGP4ZTFmtKNeqSqw7knQbo+EL5LfboF7va5d pe8oOLfmXmQgft6KEPriWGnnHOrTueKyvUDuw7f4dnsDv4+EgSTvrSEevBkl489tx29w uVGEJR9dy7KQ6zPCM0jSbBjWgCpPeeRqEsf71vDRTx6r/BQ82YJfbHk8PIXJo22rhnOZ 2R9BGqiUUtxJBEyt7bgBKx3wi3kN5wvrMhZgyyjxfKTlKE/sNbf+aKWfCCT4ervVEo5T oSDJLqVgB4gsCYXPV6eqWj9/oB4t2p3NHwGj5gpl64nvC2ALRvm+tE+IyLEeZbdOe3Lf OEQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709168021; x=1709772821; 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=Q1fAxVxcSGJDtvwC4OA6vg9SQpipa+6cd4wlsruGTgI=; b=o/bi4xYBWBBFGVn93djP7ZgoJ2zslQ+6LwuGsAlQn6L8K5bx/JSkN2Jl2C/fujopsA hYj0kSX5Z9v/UopbPD4lMPV9ED/A7EsyID3aB9gc3Nn4YQaCi8gmqc9ijlSxcW3y+Q4V KwJQJ33EHfPUVv4ZdqYdUSgNOhKRSTx5brgtG9Pg2U/97DLZBwveHn9OdDXLtzf9lhn3 uCyDTfDf1giBlpPQzlgzXatSNUacujO+gMd5C5mPeA8uENopRZNI5pj3eOfRCzNEZZ0p Ja802UQKMTjQgz68dvmw630dfl+Jg45Yy1dDWuyQoUFn9T8TmrCd1CDpiQDlXpymUcxk u7Ow== X-Forwarded-Encrypted: i=1; AJvYcCXQ7qGa7T9GizUJMxRNmIW5fzk1X05vUiFK2We1kFX7oqAdQbOYLdaLx3AdirVRYB4zhMpMd0gfC2XPst6zsY/ERsKOYdX5hoK4Z8QpnWol X-Gm-Message-State: AOJu0YzjVInwx7ccoO4ZrRd9zd+qPfHQQQHnhD/5SVh/mMoSFiWlXUd+ 9NTLzFCUMCeamTdpqsb5Ug4Nqm4wqJfWJXP2jGMBZODrqj1Eb4tPruB9gvg8FxzmXDE3htD24HB eUA== X-Google-Smtp-Source: AGHT+IEGDx9KNnQuVlFL1a+o7VDJ3fqoKiHSZ9fod3C0H0yXTT9TpbbqlundidtZGFnRpu3hKNN8Sj3g9iY= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90b:4f44:b0:29a:c5e6:c5f1 with SMTP id pj4-20020a17090b4f4400b0029ac5e6c5f1mr15628pjb.6.1709168021232; Wed, 28 Feb 2024 16:53:41 -0800 (PST) Date: Wed, 28 Feb 2024 16:53:39 -0800 In-Reply-To: Mime-Version: 1.0 References: <20240223004258.3104051-1-seanjc@google.com> <20240223004258.3104051-8-seanjc@google.com> <75d37243-e2a3-421a-b74f-ccbe307fef96@intel.com> Message-ID: Subject: Re: [PATCH v9 07/11] KVM: selftests: Allow tagging protected memory in guest page tables From: Sean Christopherson To: Xiaoyao Li Cc: Paolo Bonzini , Marc Zyngier , Oliver Upton , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Vishal Annapurve , Ackerley Tng , Andrew Jones , Tom Lendacky , Michael Roth , Carlos Bilbao , Peter Gonda , Itaru Kitayama X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240228_165343_053408_D707B6C3 X-CRM114-Status: GOOD ( 15.32 ) X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Tue, Feb 27, 2024, Sean Christopherson wrote: > On Wed, Feb 28, 2024, Xiaoyao Li wrote: > > On 2/23/2024 8:42 AM, Sean Christopherson wrote: > > ... > > > diff --git a/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h > > > new file mode 100644 > > > index 000000000000..218f5cdf0d86 > > > --- /dev/null > > > +++ b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h > > > @@ -0,0 +1,7 @@ > > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > > +#ifndef _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H > > > +#define _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H > > > > Since the file name is changed from kvm_host.h (in v7) to kvm_util_arch.h, > > we need to update it as well. > > > > Ditto for other archs > > Ugh, nice catch. I'll fixup and force push (likely tomorrow). Here's the diff of my fixup: diff --git a/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h index 218f5cdf0d86..e43a57d99b56 100644 --- a/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H -#define _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H struct kvm_vm_arch {}; -#endif // _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H diff --git a/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h b/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h index c8280d5659ce..e43a57d99b56 100644 --- a/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_RISCV_KVM_HOST_H -#define _TOOLS_LINUX_ASM_RISCV_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H struct kvm_vm_arch {}; -#endif // _TOOLS_LINUX_ASM_RISCV_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H diff --git a/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h b/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h index 4c4c1c1e4bf8..e43a57d99b56 100644 --- a/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_S390_KVM_HOST_H -#define _TOOLS_LINUX_ASM_S390_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H struct kvm_vm_arch {}; -#endif // _TOOLS_LINUX_ASM_S390_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H diff --git a/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h b/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h index 205ed788aeb8..9f1725192aa2 100644 --- a/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_X86_KVM_HOST_H -#define _TOOLS_LINUX_ASM_X86_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H #include #include @@ -20,4 +20,4 @@ static inline bool __vm_arch_has_protected_memory(struct kvm_vm_arch *arch) #define vm_arch_has_protected_memory(vm) \ __vm_arch_has_protected_memory(&(vm)->arch) -#endif // _TOOLS_LINUX_ASM_X86_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 582F1C5475B for ; Thu, 29 Feb 2024 00:53:56 +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=/+RAcmfgmCFAdiPCl2s+/efV58fuOkswUUUSPD0HaMc=; b=DuY+bhut7ojgRg6hWA+1EpvbRP Z8mveXxPv5ig2kZUcoppWQ8cfIioqQ2WPeF5IrfeMV25H8oyFFUwI102njl89uI35bMpP0J+/3dlD LqN0WQrWKn4e9+Bq8gt+AtQyb7IgQtxalf6mnG2Xw6WFJtt6LetpdxUO0JxzNuTzjjWlisbZeJ2y5 ssS5uZsdn0rbpUxKl0xpmfzTwmRDyMlUcXj760bVEBaCNMB0siGMg63SI5U6lzy3vrltEd8jPeghU ak/vSXcmVMLco4tk0NlBWqu3CdZPkbNdv5M1BvX9asE0YYrKt5kjg+uVU6jJLKQ8xdhNaBrZzHztt QI4osavQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfUgE-0000000BTRo-3PfN; Thu, 29 Feb 2024 00:53:46 +0000 Received: from mail-pj1-x1049.google.com ([2607:f8b0:4864:20::1049]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfUgA-0000000BTPf-45Pu for linux-arm-kernel@lists.infradead.org; Thu, 29 Feb 2024 00:53:44 +0000 Received: by mail-pj1-x1049.google.com with SMTP id 98e67ed59e1d1-299727c3e8bso203288a91.1 for ; Wed, 28 Feb 2024 16:53:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709168021; x=1709772821; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Q1fAxVxcSGJDtvwC4OA6vg9SQpipa+6cd4wlsruGTgI=; b=J0Rhn6GIlLUtDplYTJVP9t8b0kBnfCrGP4ZTFmtKNeqSqw7knQbo+EL5LfboF7va5d pe8oOLfmXmQgft6KEPriWGnnHOrTueKyvUDuw7f4dnsDv4+EgSTvrSEevBkl489tx29w uVGEJR9dy7KQ6zPCM0jSbBjWgCpPeeRqEsf71vDRTx6r/BQ82YJfbHk8PIXJo22rhnOZ 2R9BGqiUUtxJBEyt7bgBKx3wi3kN5wvrMhZgyyjxfKTlKE/sNbf+aKWfCCT4ervVEo5T oSDJLqVgB4gsCYXPV6eqWj9/oB4t2p3NHwGj5gpl64nvC2ALRvm+tE+IyLEeZbdOe3Lf OEQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709168021; x=1709772821; 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=Q1fAxVxcSGJDtvwC4OA6vg9SQpipa+6cd4wlsruGTgI=; b=AYMgaGFuQgF3PMOMXBif/alvJ+lhIHmEXMw8jXAj57BYwU0KHBRr8aBzY37WbyEBPJ XB1szdUjPhZ9/smZ8gS63hXWCIKvg2j9KGtTDCCfx+IFmkFP1NnGoHyYJGxFkpwZqVa4 RahhTiq2t0EXFD8fajnQ9r1BMIG3lENcuZg3wviOna/3iUVJCWZnr3Lbut4/cIO8G8EZ 5GSdkln0ZcSw+tNSYHpgPa4+r4KTO7vh0r270Qfc6SYTHHJBkbcWBP/eNB8iPaqwqe74 wMvWUp2cRPQ3HZOf1etOS5IZNQS/QzROEihIRiiDs5sHesZzZe4HSARIGQac+/Xrlyp9 pSIg== X-Forwarded-Encrypted: i=1; AJvYcCVMt4dh4Gm9IdBtr44r3ynrPyfAYT7TUfAd5lAU+/AsYekqMtZdJOPpPAYFVl/Ouu27pMeg6UIJBCi3JaBKZtPJMiu2ZYakIxnK0B8lGVkxc+UNg0c= X-Gm-Message-State: AOJu0YzB9X/bkfuSU+zeHbsVqgAYXyev3ZF2L8p1OgyMb1WhpGkA8Cbz qKyB5BIRrXzBYRNjzSlby79kO3A62/f/3zJoAXeM5uDt9vJbY7qGPZ4wp1RLNifRfbcDboOnZ/e uXg== X-Google-Smtp-Source: AGHT+IEGDx9KNnQuVlFL1a+o7VDJ3fqoKiHSZ9fod3C0H0yXTT9TpbbqlundidtZGFnRpu3hKNN8Sj3g9iY= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90b:4f44:b0:29a:c5e6:c5f1 with SMTP id pj4-20020a17090b4f4400b0029ac5e6c5f1mr15628pjb.6.1709168021232; Wed, 28 Feb 2024 16:53:41 -0800 (PST) Date: Wed, 28 Feb 2024 16:53:39 -0800 In-Reply-To: Mime-Version: 1.0 References: <20240223004258.3104051-1-seanjc@google.com> <20240223004258.3104051-8-seanjc@google.com> <75d37243-e2a3-421a-b74f-ccbe307fef96@intel.com> Message-ID: Subject: Re: [PATCH v9 07/11] KVM: selftests: Allow tagging protected memory in guest page tables From: Sean Christopherson To: Xiaoyao Li Cc: Paolo Bonzini , Marc Zyngier , Oliver Upton , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Vishal Annapurve , Ackerley Tng , Andrew Jones , Tom Lendacky , Michael Roth , Carlos Bilbao , Peter Gonda , Itaru Kitayama X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240228_165343_043529_66027B90 X-CRM114-Status: GOOD ( 16.90 ) 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 Tue, Feb 27, 2024, Sean Christopherson wrote: > On Wed, Feb 28, 2024, Xiaoyao Li wrote: > > On 2/23/2024 8:42 AM, Sean Christopherson wrote: > > ... > > > diff --git a/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h > > > new file mode 100644 > > > index 000000000000..218f5cdf0d86 > > > --- /dev/null > > > +++ b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h > > > @@ -0,0 +1,7 @@ > > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > > +#ifndef _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H > > > +#define _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H > > > > Since the file name is changed from kvm_host.h (in v7) to kvm_util_arch.h, > > we need to update it as well. > > > > Ditto for other archs > > Ugh, nice catch. I'll fixup and force push (likely tomorrow). Here's the diff of my fixup: diff --git a/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h index 218f5cdf0d86..e43a57d99b56 100644 --- a/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H -#define _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H struct kvm_vm_arch {}; -#endif // _TOOLS_LINUX_ASM_ARM64_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H diff --git a/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h b/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h index c8280d5659ce..e43a57d99b56 100644 --- a/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/riscv/kvm_util_arch.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_RISCV_KVM_HOST_H -#define _TOOLS_LINUX_ASM_RISCV_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H struct kvm_vm_arch {}; -#endif // _TOOLS_LINUX_ASM_RISCV_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H diff --git a/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h b/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h index 4c4c1c1e4bf8..e43a57d99b56 100644 --- a/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_S390_KVM_HOST_H -#define _TOOLS_LINUX_ASM_S390_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H struct kvm_vm_arch {}; -#endif // _TOOLS_LINUX_ASM_S390_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H diff --git a/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h b/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h index 205ed788aeb8..9f1725192aa2 100644 --- a/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _TOOLS_LINUX_ASM_X86_KVM_HOST_H -#define _TOOLS_LINUX_ASM_X86_KVM_HOST_H +#ifndef SELFTEST_KVM_UTIL_ARCH_H +#define SELFTEST_KVM_UTIL_ARCH_H #include #include @@ -20,4 +20,4 @@ static inline bool __vm_arch_has_protected_memory(struct kvm_vm_arch *arch) #define vm_arch_has_protected_memory(vm) \ __vm_arch_has_protected_memory(&(vm)->arch) -#endif // _TOOLS_LINUX_ASM_X86_KVM_HOST_H +#endif // SELFTEST_KVM_UTIL_ARCH_H _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel