Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3348170yba; Tue, 16 Apr 2019 09:31:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHmb8DxcIdsoY8o1UWfGXCQoyxwDgHYKWuKfYSRyl9SRaKI6bX3452N9dBEJIvIDP/1g3n X-Received: by 2002:a63:5149:: with SMTP id r9mr74357227pgl.177.1555432308002; Tue, 16 Apr 2019 09:31:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555432307; cv=none; d=google.com; s=arc-20160816; b=L3NTBeLckNweTAaC5B/QTml1YNFrWUx5r9UZudri0dhcokmwmcn/m90yTZ4Y2Bh7xA ZxaUbwpN8aIsBoxHaip56aJnMrxjx06yWVtx56YFM8wR6cuVfGfCimDsLC58ttzh6ajh rMIIAkrIqJQISZXAqYlvSjG4Q3zqieagNAJrsu0uF96YJtNDWFauV67vnCpdLGYQtsyf Dy3NS52iEZ0RIAoBWYsTH4SjzRizHeIYLFgebyVX6m2CxQi3j9ZlAVg7KpLSLBxe1a7E zy+rGrh7GUTL+2+q36dyaFS0NgDrGZz/Px2jlHuPvxnMWKIlCMekTP/gTH5m00IyZx4P Oc8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=NsNRDGVorQICoGqre4VzkR4J0gYL+IUIEqKezwXui6w=; b=lnaq24lgdt+VYlWdORcNEiB0o/cHo5sREGqV2YdqV32qE7z06lasoiLUQHblzIhVKh XwPtT79G1OoJOu99rjiVtjFY4P6L3e77+VyPcx+qJW9P6G6LqjozmpTmdy5NjGHV0sDt hebU5ESDENGRq9w/gGTVHsRFT8DZLvbxMdgaPUmKZ9eLk7KqnuMOJntNG9OEr+NuWT4N UqrGoK7PP9YjNODNnd0HWusK63TAB8qfB57oyxqS02fjeT2Di3FYSVr2GuWUz418eGBY YeFuwHEVo8ENw5F6rZpRyGdRwDD6o+ICSf6vP/Ha5I+y3KT+0LeA3eAhsFv45y9kDl1T iT1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8si36934215pfd.105.2019.04.16.09.31.32; Tue, 16 Apr 2019 09:31:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729924AbfDPQaz (ORCPT + 99 others); Tue, 16 Apr 2019 12:30:55 -0400 Received: from foss.arm.com ([217.140.101.70]:59296 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbfDPQaz (ORCPT ); Tue, 16 Apr 2019 12:30:55 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A27E015A2; Tue, 16 Apr 2019 09:30:54 -0700 (PDT) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 04FD13F59C; Tue, 16 Apr 2019 09:30:52 -0700 (PDT) Date: Tue, 16 Apr 2019 17:30:50 +0100 From: Dave Martin To: Amit Daniel Kachhap Cc: linux-arm-kernel@lists.infradead.org, Marc Zyngier , Catalin Marinas , Will Deacon , Kristina Martsenko , kvmarm@lists.cs.columbia.edu, Ramana Radhakrishnan , linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 1/5] KVM: arm64: Add a vcpu flag to control ptrauth for guest Message-ID: <20190416163050.GV3567@e103592.cambridge.arm.com> References: <1555039236-10608-1-git-send-email-amit.kachhap@arm.com> <1555039236-10608-2-git-send-email-amit.kachhap@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1555039236-10608-2-git-send-email-amit.kachhap@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 12, 2019 at 08:50:32AM +0530, Amit Daniel Kachhap wrote: > A per vcpu flag is added to check if pointer authentication is > enabled for the vcpu or not. This flag may be enabled according to > the necessary user policies and host capabilities. > > This patch also adds a helper to check the flag. > > Signed-off-by: Amit Daniel Kachhap > Cc: Mark Rutland > Cc: Marc Zyngier > Cc: Christoffer Dall > Cc: kvmarm@lists.cs.columbia.edu Reviewed-by: Dave Martin > --- > > Changes since v8: > * Added a new per vcpu flag which will store Pointer Authentication enable > status instead of checking them again. [Dave Martin] > > arch/arm64/include/asm/kvm_host.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h > index 9d57cf8..31dbc7c 100644 > --- a/arch/arm64/include/asm/kvm_host.h > +++ b/arch/arm64/include/asm/kvm_host.h > @@ -355,10 +355,14 @@ struct kvm_vcpu_arch { > #define KVM_ARM64_HOST_SVE_ENABLED (1 << 4) /* SVE enabled for EL0 */ > #define KVM_ARM64_GUEST_HAS_SVE (1 << 5) /* SVE exposed to guest */ > #define KVM_ARM64_VCPU_SVE_FINALIZED (1 << 6) /* SVE config completed */ > +#define KVM_ARM64_GUEST_HAS_PTRAUTH (1 << 7) /* PTRAUTH exposed to guest */ > > #define vcpu_has_sve(vcpu) (system_supports_sve() && \ > ((vcpu)->arch.flags & KVM_ARM64_GUEST_HAS_SVE)) > > +#define vcpu_has_ptrauth(vcpu) \ > + ((vcpu)->arch.flags & KVM_ARM64_GUEST_HAS_PTRAUTH) > + > #define vcpu_gp_regs(v) (&(v)->arch.ctxt.gp_regs) > > /* > -- > 2.7.4 > > _______________________________________________ > kvmarm mailing list > kvmarm@lists.cs.columbia.edu > https://lists.cs.columbia.edu/mailman/listinfo/kvmarm