Message ID | 20240105091624.24822-1-yan.y.zhao@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-17682-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp6118875dyb; Fri, 5 Jan 2024 01:46:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHKV+LilwNdjqQzJItwtKbR28DoJzDaNTVI2R0XS1bBL7jMO2xJlJFgtN/ITFIUf0i1awTX X-Received: by 2002:a05:6830:ec4:b0:6dc:2549:3e6c with SMTP id dq4-20020a0568300ec400b006dc25493e6cmr1917855otb.15.1704447968986; Fri, 05 Jan 2024 01:46:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704447968; cv=none; d=google.com; s=arc-20160816; b=Zg0fQE261CUvrgS8CCftFnwKHBhKz/22sP3ijXP68E294ZQYrXmewZaYD/92zojj2l M4wx5nZTQDP80lw6Tg0gqboQ92uMcFnhzvKViAnUwslImkK/vD6Lf+1aB/lEIqNMlvOs Cr+9CO8P/18gqerbWUjEGym/2TMpzTr4fvGfwyjMB4UwJA3p0kerZWV6TIszc8XlawjZ K5ezZY+5nqF9ga0GCxTAGIARicle4slFpoOegjwJjYTSz74lVwNkOkH2athN8XzHKsxL /rEPXVb6l+GHAuCRFyyI4lN0jAVCSfmOD1GZRBDoC26IabM+1urW54KXkw0RK3m16Xsp P/7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=szf+rwTJHrFVbPVxjfEiR3qSFR2jeAJjGD32sAPWQKk=; fh=7+Mp40O15i8480Y3Lx1xUfrNoWlx4dq3oRO8LaTgnuQ=; b=K5hRY6NW+LcYO1Llcd1N+je/4t7+xyIGyxhuE880CdO3zZWyvpJ/htDOsbLrCcmSKv 7ZJhCQV+xcxagmY5VevTSKATW7vAVOyPxgjJtWCfceC2h+zs4mJHtWaB5ojP0CKlbQBz YcEoEOnISOathV8etTJauivusdC91Bm7bJgp2Kj6OpFLlz6qa6bH0e16TeVImGBkwzbu bgkiwKjhVXAL/erpIwdEUbTkeiuHyGtJYhAeo9dAgCikydzvTmWWWF7oMO5T8nlZCgjz Fo8SeHxz5FNM0JR3ykyq00p/+9lKg/xyGZLlLNJAJf4SQu3HbuF+NR+0aBYDDGc6Nsh8 BHGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fnuyo02r; spf=pass (google.com: domain of linux-kernel+bounces-17682-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17682-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id m15-20020a6562cf000000b005ca4098bf5fsi1011420pgv.620.2024.01.05.01.46.08 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 01:46:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17682-ouuuleilei=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=@intel.com header.s=Intel header.b=fnuyo02r; spf=pass (google.com: domain of linux-kernel+bounces-17682-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17682-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 06815B213D8 for <ouuuleilei@gmail.com>; Fri, 5 Jan 2024 09:46:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91AF524B5D; Fri, 5 Jan 2024 09:45:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fnuyo02r" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 A8FE8249E9; Fri, 5 Jan 2024 09:45:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704447943; x=1735983943; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Ipngyt99PQBot25YTtxsZ8y9PD4Q1alyU7StkGQNfLY=; b=fnuyo02rSKwwPWrsZFROs7v/XHn9dr5YDWhie/bbv5+7sNUQx1Kx9e6t 3pLdO95MBos9DmdsTw9bWomhj2XsM4LXWvOp4ESTBClk0nPmgXyZEmYVB WsqbHUHC5qjLzn4RJAjG/+1rFx6kjrqfKp2cafqu797EewAd5/VZQ0bHH CdVekDRYa96g6968LeqNeZEdIBIWn9vizSVeuNERsZEECkbH5rNvkhax+ 98yPQ0dNV7CPZe/p9plKBOir7VhYDbSlHeSkll9bjjLr1wChGshvdFwYh /t3CV6Oxx1nD7ok1wy4E0WJqIweTnd3o1nmexXLUkHq/89ACpKIAPKsFt w==; X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="10959501" X-IronPort-AV: E=Sophos;i="6.04,333,1695711600"; d="scan'208";a="10959501" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2024 01:45:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="784158335" X-IronPort-AV: E=Sophos;i="6.04,333,1695711600"; d="scan'208";a="784158335" Received: from yzhao56-desk.sh.intel.com ([10.239.159.62]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2024 01:45:36 -0800 From: Yan Zhao <yan.y.zhao@intel.com> To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: pbonzini@redhat.com, seanjc@google.com, olvaffe@gmail.com, kevin.tian@intel.com, zhiyuan.lv@intel.com, zhenyu.z.wang@intel.com, yongwei.ma@intel.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, gurchetansingh@chromium.org, kraxel@redhat.com, zzyiwei@google.com, ankita@nvidia.com, jgg@nvidia.com, alex.williamson@redhat.com, maz@kernel.org, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, Yan Zhao <yan.y.zhao@intel.com> Subject: [PATCH 4/4] KVM: selftests: Set KVM_MEM_NON_COHERENT_DMA as a supported memslot flag Date: Fri, 5 Jan 2024 17:16:24 +0800 Message-Id: <20240105091624.24822-1-yan.y.zhao@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240105091237.24577-1-yan.y.zhao@intel.com> References: <20240105091237.24577-1-yan.y.zhao@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787243233697025109 X-GMAIL-MSGID: 1787243233697025109 |
Series |
KVM: Honor guest memory types for virtio GPU devices
|
|
Commit Message
Yan Zhao
Jan. 5, 2024, 9:16 a.m. UTC
Update test_invalid_memory_region_flags() to treat KVM_MEM_NON_COHERENT_DMA
as a supported memslot flag.
Signed-off-by: Yan Zhao <yan.y.zhao@intel.com>
---
tools/testing/selftests/kvm/set_memory_region_test.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/kvm/set_memory_region_test.c b/tools/testing/selftests/kvm/set_memory_region_test.c index 075b80dbe237..2d6f961734db 100644 --- a/tools/testing/selftests/kvm/set_memory_region_test.c +++ b/tools/testing/selftests/kvm/set_memory_region_test.c @@ -335,6 +335,9 @@ static void test_invalid_memory_region_flags(void) #if defined __aarch64__ || defined __x86_64__ supported_flags |= KVM_MEM_READONLY; + + if (kvm_has_cap(KVM_CAP_USER_CONFIGURE_NONCOHERENT_DMA)) + supported_flags |= KVM_MEM_NON_COHERENT_DMA; #endif #ifdef __x86_64__