Received: by 2002:a05:6a10:c7d3:0:0:0:0 with SMTP id h19csp617656pxy; Sat, 14 Aug 2021 18:03:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQBVoBWQXtH/+MpjSngGknn8birHgDfqLBxVOd2ANKvv9Er3us33Q448t3N8iMVnqtSmD1 X-Received: by 2002:a92:dd88:: with SMTP id g8mr7074507iln.158.1628989438039; Sat, 14 Aug 2021 18:03:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628989438; cv=none; d=google.com; s=arc-20160816; b=XU2/UibWn4uRovtRSluf1nc7DmOJ1FivzbgmwHmzlLAo1A6Y48c1LbXRtG5m4Q7wWM JJllDLgqR6R1SUINE5RczfxgCJrLX/CKx+YAcMYyDZAp/ntYRnU6ubJUGRNXt0dg6/Ct yyAOERtSDUNr1KFm/CRosgsAodP4UieqND3cZCBmeAdkBQTkolaKBlE9qFlqDMiQIW0a vN1tZCCwNuDTosS9s33X75H4Pj/1QvgzilOUi0KidqsZuGX8Uw5QLjJ5JSPY41pzCVJR gB5tAM2CVr3Gr85cWLdP3j8yYJ3XMK43dFmzqAT1eqY8loxpxwSnTSK2NzxeBvNgTdK1 m9/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=88N+p1H52aFWa1qAO1bnhEhJK9rOvXpt4szntFewDdM=; b=jYfPQdqx0OVy0xCZ8GO4L8/39cQNLv2U8BOpGG7tGjO0t/r+ZFISv76Bhx6uTFT/yA gLJyW1VNjyKnVrOWzywaS4VEagnQvNGQErgHiAeDRsqsujvOR4J9JNcLWATkmrOJpjyk CegL19hoDyB3DeedVg+KreJYnttWWTkGzEWXaIxKYfUx69NaEdNj01SJupVuMul1Fzfd ZmhMDJ9E7veBnp+Idkkzs9VvS8QZ477LlxiyWG5LbFYIXi/UL2ONPs3W9eR9n/FvnQGn queywqTHNn/yM/isSZlcQwhfhcsWAEPuOS31XYrYb8axSqDqo2XHGT4enGAJR3EslJsB q4bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=b4QBA4Di; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m43si6656253jav.124.2021.08.14.18.03.47; Sat, 14 Aug 2021 18:03:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=b4QBA4Di; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235934AbhHOBCt (ORCPT + 99 others); Sat, 14 Aug 2021 21:02:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32327 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234494AbhHOBCo (ORCPT ); Sat, 14 Aug 2021 21:02:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628989335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=88N+p1H52aFWa1qAO1bnhEhJK9rOvXpt4szntFewDdM=; b=b4QBA4Dib9PFHhamykaEMswbabnhniL/GXYBdllw66oeQIMQ+Y+jpTZ/SpGssuVTEn5vL8 Hr6MgGpA8JomOZ1OxKPWnzZqHJlG9lSWrT/B0mjsLFWq77T7APkM+grw8zK38kte7C6D3v TrlA0loa/AW+9KzXY64vrYZh3IOy9xk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-288-CUo5fvpvMxuh573TVCXGSA-1; Sat, 14 Aug 2021 21:02:14 -0400 X-MC-Unique: CUo5fvpvMxuh573TVCXGSA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AF58B1008061; Sun, 15 Aug 2021 01:02:12 +0000 (UTC) Received: from gshan.redhat.com (vpn2-54-103.bne.redhat.com [10.64.54.103]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C1C046091B; Sun, 15 Aug 2021 01:02:08 +0000 (UTC) From: Gavin Shan To: kvmarm@lists.cs.columbia.edu Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, james.morse@arm.com, mark.rutland@arm.com, Jonathan.Cameron@huawei.com, will@kernel.org, maz@kernel.org, pbonzini@redhat.com, vkuznets@redhat.com, shan.gavin@gmail.com Subject: [PATCH v4 06/15] KVM: arm64: Add paravirtualization header files Date: Sun, 15 Aug 2021 08:59:38 +0800 Message-Id: <20210815005947.83699-7-gshan@redhat.com> In-Reply-To: <20210815005947.83699-1-gshan@redhat.com> References: <20210815005947.83699-1-gshan@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need put more stuff in the paravirtualization header files when the asynchronous page fault is supported. The generic header files can't meet the goal. This duplicate the generic header files to be our platform specific header files. It's the preparatory work to support the asynchronous page fault in the subsequent patches: include/uapi/asm-generic/kvm_para.h include/asm-generic/kvm_para.h arch/arm64/include/uapi/asm/kvm_para.h arch/arm64/include/asm/kvm_para.h Signed-off-by: Gavin Shan --- arch/arm64/include/asm/kvm_para.h | 27 ++++++++++++++++++++++++++ arch/arm64/include/uapi/asm/Kbuild | 2 -- arch/arm64/include/uapi/asm/kvm_para.h | 5 +++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 arch/arm64/include/asm/kvm_para.h create mode 100644 arch/arm64/include/uapi/asm/kvm_para.h diff --git a/arch/arm64/include/asm/kvm_para.h b/arch/arm64/include/asm/kvm_para.h new file mode 100644 index 000000000000..0ea481dd1c7a --- /dev/null +++ b/arch/arm64/include/asm/kvm_para.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_ARM_KVM_PARA_H +#define _ASM_ARM_KVM_PARA_H + +#include + +static inline bool kvm_check_and_clear_guest_paused(void) +{ + return false; +} + +static inline unsigned int kvm_arch_para_features(void) +{ + return 0; +} + +static inline unsigned int kvm_arch_para_hints(void) +{ + return 0; +} + +static inline bool kvm_para_available(void) +{ + return false; +} + +#endif /* _ASM_ARM_KVM_PARA_H */ diff --git a/arch/arm64/include/uapi/asm/Kbuild b/arch/arm64/include/uapi/asm/Kbuild index 602d137932dc..f66554cd5c45 100644 --- a/arch/arm64/include/uapi/asm/Kbuild +++ b/arch/arm64/include/uapi/asm/Kbuild @@ -1,3 +1 @@ # SPDX-License-Identifier: GPL-2.0 - -generic-y += kvm_para.h diff --git a/arch/arm64/include/uapi/asm/kvm_para.h b/arch/arm64/include/uapi/asm/kvm_para.h new file mode 100644 index 000000000000..cd212282b90c --- /dev/null +++ b/arch/arm64/include/uapi/asm/kvm_para.h @@ -0,0 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef _UAPI_ASM_ARM_KVM_PARA_H +#define _UAPI_ASM_ARM_KVM_PARA_H + +#endif /* _UAPI_ASM_ARM_KVM_PARA_H */ -- 2.23.0