Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1982889rdb; Wed, 31 Jan 2024 15:46:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6hXtdJgZStU1zSsvRXq/94mrMsfyrghiD/1URMr55h2vBc4erfrx65sJGwaheA6e/g8Dx X-Received: by 2002:a17:906:254a:b0:a23:5939:759e with SMTP id j10-20020a170906254a00b00a235939759emr2783136ejb.26.1706744789502; Wed, 31 Jan 2024 15:46:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706744789; cv=pass; d=google.com; s=arc-20160816; b=zEVvZzQ4hootbcazsLgMojDgw4rsVd7mOiOF5dIDvTdSDlBAWl9ByhWD9cbA6oUSM1 VcIEBliElK39DPJ/Zx826BeEpYQPwDkhsXdEwEGszpSQKOU++NBGUCl+TP0wgEqcTSiS vnG1Pmh6xdiSSTPKTdcaYHK4PhRATbqDNyDExNWmlT7z/r5XL3Y+gjs6UN7PHcPiOtUt Pd6b49XS6Vk+DC5akHq9LAIzWgeKJIyX5g2Ih3qYcOctEe44H/ZFcvLeidLI1O+xc/S3 50haB5Ga0Mp6KXO7yGPA0E+InOCtbMUUjKZz3HK+tsJUFeb/SwOGJNg0GgFpz7AWSm1y b6mQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=s+BWRqwRbbb0ZjiffCmlWuwED5KeVg2ZZ25OkfKH+sE=; fh=VTBmXlrGd6MC31G/OQz1UM/gIyL8MV0ctNRM6ALhwLI=; b=RcOW6QyVXlPVT8dUWvMtvCHwY5egr5Xrl1TZIAymVEK5Mg2cwwoq2Gy4GQwdIF42AV fS0BkC8BxcYIFrIthjdu+7iqi/LR5ki99ASUw/B3dTFAePFsb5khIS5Mf+nycYZi5Hck 45NRgzsh2G2d0MPmLwIERw0aLJcmXZiN36LokjWd9wFB0DQc/xuj2i/TwWoU/VApMWYX DT6dF/7DN0Prh/A7fm4QoxELIV4VbRtXUajfhie94ljdsxUKyVagsO61jzUn+QzM8sqA V3E3ZophAmaaGJydwOYtdwVXLFQfM0+ScXXk+b+NL76by0ZLY5DI7+cY6WlxF+CRsk4b lQUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QmYzDbIu; 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-47378-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47378-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCUtvAPmLTmdiqN/P44I8TT0WP0qJaILLX4tfOH2pXMvtFBzhQaWEpDB1KoQDtcB/aHPHCcM3aj7lxa4/V8ck8vc4iLwVJTCGgBteQx39g== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q9-20020a1709060e4900b00a359a7294f3si3682280eji.871.2024.01.31.15.46.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 15:46:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47378-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QmYzDbIu; 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-47378-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47378-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 am.mirrors.kernel.org (Postfix) with ESMTPS id F3F0A1F2D7AF for ; Wed, 31 Jan 2024 23:38:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8CC3A4776F; Wed, 31 Jan 2024 23:31:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QmYzDbIu" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 707393C06B for ; Wed, 31 Jan 2024 23:31:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706743863; cv=none; b=Tcm7rp3rP2GT/+YXSKmT2qCqSvQH4X8oE6QY6gQf2f3rajonHB+PT57Ozolqf5REyG5OZBynDjVj5X9128d6h6unlFb+dH7rRRG8WpKNzmdGsk/8racIres5e2AllXQb5ZMOW7pyLtOvwUGRo79T/kQfOkNTSCnxyIN95H8Kupc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706743863; c=relaxed/simple; bh=Ux18IXW0DZHPKhYAMzyZDNK2COUwdRVoZU6iY0lsftQ=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=u4tK4Y1YyyyMwKSj86FjdKsLeeJn8p2ksKh3VHyz4zDyIwEWd+pHtlsgH3Qc9Wt8bl+sEsGv4jaoMol8zMcOHmu/7jSbEunldZVCjFMh0BcI+mEGyEeAbqEPXmNanoC4DLfmhoxUrzfNFVcncycdvtT5FHYD2uD528UD0RhzWgs= 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=QmYzDbIu; arc=none smtp.client-ip=170.10.133.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=1706743859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s+BWRqwRbbb0ZjiffCmlWuwED5KeVg2ZZ25OkfKH+sE=; b=QmYzDbIu+OKChkYQbK5FdVUUhG+euspl7sMLhTEnFLYSX0JwiY97kwQtR7Ao5pzd41vjIn IDVX7n9vBJseTpQf5ycbER+K0d8RAgxZqkYA4j8eqYPa6AWu/rPGAyFBelDXrZLndViMFp kpR92fKBdw/TKfwStA45kpoH1EqPnZY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-682-sW8m4aLfOom1O4KLKvp6RA-1; Wed, 31 Jan 2024 18:30:57 -0500 X-MC-Unique: sW8m4aLfOom1O4KLKvp6RA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5D9D212501E1; Wed, 31 Jan 2024 23:30:57 +0000 (UTC) Received: from virtlab511.virt.lab.eng.bos.redhat.com (virtlab511.virt.lab.eng.bos.redhat.com [10.19.152.198]) by smtp.corp.redhat.com (Postfix) with ESMTP id 466B5C2590D; Wed, 31 Jan 2024 23:30:57 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH 5/8] KVM: arm64: move ARM-specific defines to uapi/asm/kvm.h Date: Wed, 31 Jan 2024 18:30:53 -0500 Message-Id: <20240131233056.10845-6-pbonzini@redhat.com> In-Reply-To: <20240131233056.10845-1-pbonzini@redhat.com> References: <20240131233056.10845-1-pbonzini@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 While this in principle breaks userspace code that mentions KVM_ARM_DEV_* on architectures other than aarch64, this seems unlikely to be a problem considering that run->s.regs.device_irq_level is only defined on that architecture. Signed-off-by: Paolo Bonzini --- arch/arm64/include/uapi/asm/kvm.h | 5 +++++ include/uapi/linux/kvm.h | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/arm64/include/uapi/asm/kvm.h b/arch/arm64/include/uapi/asm/kvm.h index 6b8b57b97228..75809c8dc2f0 100644 --- a/arch/arm64/include/uapi/asm/kvm.h +++ b/arch/arm64/include/uapi/asm/kvm.h @@ -162,6 +162,11 @@ struct kvm_sync_regs { __u64 device_irq_level; }; +/* Bits for run->s.regs.device_irq_level */ +#define KVM_ARM_DEV_EL1_VTIMER (1 << 0) +#define KVM_ARM_DEV_EL1_PTIMER (1 << 1) +#define KVM_ARM_DEV_PMU (1 << 2) + /* * PMU filter structure. Describe a range of events with a particular * action. To be used with KVM_ARM_VCPU_PMU_V3_FILTER. diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index b7c8054e9d14..00d5cecd057d 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -1384,13 +1384,6 @@ struct kvm_enc_region { #define KVM_GET_SREGS2 _IOR(KVMIO, 0xcc, struct kvm_sregs2) #define KVM_SET_SREGS2 _IOW(KVMIO, 0xcd, struct kvm_sregs2) -/* Available with KVM_CAP_ARM_USER_IRQ */ - -/* Bits for run->s.regs.device_irq_level */ -#define KVM_ARM_DEV_EL1_VTIMER (1 << 0) -#define KVM_ARM_DEV_EL1_PTIMER (1 << 1) -#define KVM_ARM_DEV_PMU (1 << 2) - #define KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE (1 << 0) #define KVM_DIRTY_LOG_INITIALLY_SET (1 << 1) -- 2.39.0