Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1995212rdb; Wed, 31 Jan 2024 16:15:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHv/1TY5PTMIa+lGXo0vXDN5kNCJCTHJtILzBc0u4hYrklgmAGaJcDEL+L6fGDS8n4tEYEa X-Received: by 2002:a17:903:234b:b0:1d7:7d1a:7697 with SMTP id c11-20020a170903234b00b001d77d1a7697mr3481142plh.68.1706746530957; Wed, 31 Jan 2024 16:15:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706746530; cv=pass; d=google.com; s=arc-20160816; b=NYIqQWQD46Oe99mP7QtBZ8O8Ww+oPzhlQwvda5f4FAPVl/ZIJNPaUmFJhbb9tTrv9f mFcckDuwQ94bPO2GNePp2ATOeTZmrdrKYTvnOFyWikmnWPAnvEDhz34eXGXHg17ITQFS JrpTmg7QHL8TMUXlKjFWNsoi8Cqlf4TNalNDK39ovZZPXl42A5NzwpnSXDbHcWF0B0aN WMWrNAcxCnOzmQg6AXOBhEMo22MkxQoP8tkmmHtu12zlx6WGUI6ecV49I+1YFcdeewSV eeAw8nvRDcQJwJnIEWYFAVkh3kzYANHWuQOyx4hBx7DYti7FCYjOnBJbq9knGh0LsfPD BcZw== 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=iYdr1te2ILd/6IkmSv7D89eUotSlyqhI35b5jGhDKoM=; fh=f3IX1euCxBtMLsw1u/0NOirgLcy6wdzV5PJCCDa00Ak=; b=gkQplAO6mkil1z/cEGPb4QrVZZYY9DW4NzXEQzUtTEwDyGl/VvTE4twYfqJFNfqvT2 0JgrgKFb1ji43Zw//OPckOKnooG1LBh3mSk8m7ZBdg3I4wiPP2cYcqgyQ14wTUkURUde hj5nTRHcvKtUKu+pB2melAK/0FPHsJaVrVd8c7PHgvMDgHkxIf5CEeFGv9IAI+2JSazv ACwaYZkVQdr9PDF/qk1RwZhIBjLd6mciW8kqEkfhdn/5ue+Oph+03qAQB/eoJ25h7oQk bMGNfPB6cD97UpxcfIO2vaOqZwMCKbP/6hFTUs3+qKHlIJ1CUprwXkdD5SshSoCVj+3m nzGw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NkdNjZxe; 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-47377-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47377-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; AJvYcCU++8QPWpSrY0ey9Tu4Ix1rlwEp87LC1RkS/qOcoZUlKd7aVZe1vHS8+CLjYTs1zoQ6z6sfW4I8GWSbzgvRkbZLUAnLibNOufgtZDO8Jw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id v18-20020a1709028d9200b001d70c1aa4c9si10581082plo.393.2024.01.31.16.15.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 16:15:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47377-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NkdNjZxe; 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-47377-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47377-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 1823AB276F3 for ; Wed, 31 Jan 2024 23:38:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F01C446433; Wed, 31 Jan 2024 23:31:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NkdNjZxe" 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 B57E93C468 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=1706743862; cv=none; b=XFTCZlMg2yOLAqpCUMP5q0JJPt7tlV3XY8RppaxjKj7IRm9byrG5azcdNGlRk3DE5jpV9hkFmXPKheBEJXVvrxKF6stOtSLCcP6bDrsqvo+MYQTutM2mopaZJ1E4hT6VmRnOkiWOfLmamr0Gfdkylcbhm5mhF8fY1Ryw0BIfok4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706743862; c=relaxed/simple; bh=egLDFiRNJB+gLZ9vOhV8oqUV2GakvOlt+YHEeaEXTHo=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=mdtNuXE9DK81kY6TVykbPKt7aDfB1RNzupIqjM0Ou5GU8ElbgYpXpCHg39ZWL3xl4pLc5yVl0O6nqWxZgCdDc2pmS2Is8JpbUFpO05vKaGNz1aAzFMiA/jqvgF5ZOnTHq5mh/CPY9eBjAaM6yILqHTmEMXyruHNrXUAlNoEaxDc= 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=NkdNjZxe; 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=iYdr1te2ILd/6IkmSv7D89eUotSlyqhI35b5jGhDKoM=; b=NkdNjZxelVWMAhl3WdMjCq5kzkq77a+wkY1GUpq3bFAXe2nZA1e6U5fICkm7ypDHpbexOg PQTVaZlHGrqI44XNoNCLH81y9Itac1Zlb5Ns5P175MzMsbyfizYSn89zsH7AO8h00Ld6tp NbQ2rW0k5A036/zEY8j/i3fpVRDSE9c= 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-204-YRnxORxcPxeonId5K0r4iQ-1; Wed, 31 Jan 2024 18:30:57 -0500 X-MC-Unique: YRnxORxcPxeonId5K0r4iQ-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 9CF97867944; 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 85273C2590D; Wed, 31 Jan 2024 23:30:57 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH 7/8] KVM: define __KVM_HAVE_GUEST_DEBUG unconditionally Date: Wed, 31 Jan 2024 18:30:55 -0500 Message-Id: <20240131233056.10845-8-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 Since all architectures (for historical reasons) have to define struct kvm_guest_debug_arch, and since userspace has to check KVM_CHECK_EXTENSION(KVM_CAP_SET_GUEST_DEBUG) anyway, there is no advantage in masking the capability #define itself. Remove the #define __KVM_HAVE_GUEST_DEBUG from architecture-specific headers. Signed-off-by: Paolo Bonzini --- arch/arm64/include/uapi/asm/kvm.h | 1 - arch/powerpc/include/uapi/asm/kvm.h | 1 - arch/s390/include/uapi/asm/kvm.h | 1 - arch/x86/include/uapi/asm/kvm.h | 1 - include/uapi/linux/kvm.h | 3 +-- 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm64/include/uapi/asm/kvm.h b/arch/arm64/include/uapi/asm/kvm.h index 9c1040dad4eb..964df31da975 100644 --- a/arch/arm64/include/uapi/asm/kvm.h +++ b/arch/arm64/include/uapi/asm/kvm.h @@ -37,7 +37,6 @@ #include #include -#define __KVM_HAVE_GUEST_DEBUG #define __KVM_HAVE_IRQ_LINE #define __KVM_HAVE_VCPU_EVENTS diff --git a/arch/powerpc/include/uapi/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h index a96ef6b36bba..1691297a766a 100644 --- a/arch/powerpc/include/uapi/asm/kvm.h +++ b/arch/powerpc/include/uapi/asm/kvm.h @@ -28,7 +28,6 @@ #define __KVM_HAVE_PPC_SMT #define __KVM_HAVE_IRQCHIP #define __KVM_HAVE_IRQ_LINE -#define __KVM_HAVE_GUEST_DEBUG /* Not always available, but if it is, this is the correct offset. */ #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 diff --git a/arch/s390/include/uapi/asm/kvm.h b/arch/s390/include/uapi/asm/kvm.h index fee712ff1cf8..05eaf6db3ad4 100644 --- a/arch/s390/include/uapi/asm/kvm.h +++ b/arch/s390/include/uapi/asm/kvm.h @@ -12,7 +12,6 @@ #include #define __KVM_S390 -#define __KVM_HAVE_GUEST_DEBUG struct kvm_s390_skeys { __u64 start_gfn; diff --git a/arch/x86/include/uapi/asm/kvm.h b/arch/x86/include/uapi/asm/kvm.h index c5e682ee7726..0ad6bda1fc39 100644 --- a/arch/x86/include/uapi/asm/kvm.h +++ b/arch/x86/include/uapi/asm/kvm.h @@ -42,7 +42,6 @@ #define __KVM_HAVE_IRQ_LINE #define __KVM_HAVE_MSI #define __KVM_HAVE_USER_NMI -#define __KVM_HAVE_GUEST_DEBUG #define __KVM_HAVE_MSIX #define __KVM_HAVE_MCE #define __KVM_HAVE_PIT_STATE2 diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 00d5cecd057d..fd5aa4bf77f7 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -16,6 +16,11 @@ #define KVM_API_VERSION 12 +/* + * Backwards-compatible definitions. + */ +#define __KVM_HAVE_GUEST_DEBUG + /* for KVM_SET_USER_MEMORY_REGION */ struct kvm_userspace_memory_region { __u32 slot; @@ -689,9 +690,7 @@ struct kvm_enable_cap { /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21 #define KVM_CAP_USER_NMI 22 -#ifdef __KVM_HAVE_GUEST_DEBUG #define KVM_CAP_SET_GUEST_DEBUG 23 -#endif #ifdef __KVM_HAVE_PIT #define KVM_CAP_REINJECT_CONTROL 24 #endif -- 2.39.0