Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2006308ybh; Fri, 24 Jul 2020 01:56:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU8qA6nc4378lBQrDe9pLvAthXpHdSUxpcBD2qnaDJH2o00Ftq32Xh7C/87tQYilzyJVug X-Received: by 2002:aa7:dd49:: with SMTP id o9mr6783370edw.92.1595581016595; Fri, 24 Jul 2020 01:56:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595581016; cv=none; d=google.com; s=arc-20160816; b=mB1xpKLw5zwd79CE6hltlirOmNRp1JhDvGaVVbKf1jtl2eyUXgov6TE+LB5TMEyK7v JuWLarBbuvyA5ftoyScXBJC+cr7s1tOCqEFHbh3Rp8OWUVrr8pQhzGNdgrekUbiHUSOL fMEXqB07bASW8lCPh13dhe4NGxMnUXsuuua4nNKpX7NhMgGuXr3qBZ59puIyfPYy/Umq jSy7CyyN1hAufpzut7MjrCEDVthmTCLGqYe0L+6p+v3wRE2wDW+KQFmAQlBcWIvDSJ85 +b4aSLPpSHZzM+xwxRoh0QUEHPL2DCMRpMwhUzANDWiegpLyiEMCXA5JRdQbJ+iXNvab EEpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=kAtWa0w3alEwwQmqXrL+iJdYm580cVBEL1kXuLI1i8w=; b=njTKeX8FtJ755dfaUgAblfZ3+vdWxeNgp+0FcW5ljAI4gDxNzllQoYNsEVOdts/iO9 NY3VZM3SpakbwFHctQWgwx/i9A4TO7GPhU0L3fJdX5v0riq2IyywoUlA2qe5h2BD7jqV dA1V8XeiN9nWxvi1/UneN4lT522gDA+tse8Ad8eW32SGnxvjqkj43OevTP4uukc4uU5c TbvM5fKAH+RrlI4NZGT/UoKZaTQzWONRGRnr5I2s3zu9e0CYDG/V8sxFiOKiBBmJI1ry RRY6Oi3wSG1w4k9MrYF4FkONOeMdKD6mo3TeRtbCNTnsGR1Rp2Utuhmm4nCKW+7mXWC8 xitw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s19si187011ejq.719.2020.07.24.01.56.34; Fri, 24 Jul 2020 01:56:56 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727877AbgGXIzt (ORCPT + 99 others); Fri, 24 Jul 2020 04:55:49 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:55940 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727112AbgGXIzt (ORCPT ); Fri, 24 Jul 2020 04:55:49 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id DDC697F4DEC214F115C6; Fri, 24 Jul 2020 16:55:38 +0800 (CST) Received: from huawei.com (10.174.187.31) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.487.0; Fri, 24 Jul 2020 16:55:28 +0800 From: Yifei Jiang To: , , , CC: , , , , , , , , , , , Yifei Jiang Subject: [RFC 1/2] RISC-V: KVM: enable ioeventfd capability and compile for risc-v Date: Fri, 24 Jul 2020 16:54:40 +0800 Message-ID: <20200724085441.1514-2-jiangyifei@huawei.com> X-Mailer: git-send-email 2.26.2.windows.1 In-Reply-To: <20200724085441.1514-1-jiangyifei@huawei.com> References: <20200724085441.1514-1-jiangyifei@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Originating-IP: [10.174.187.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li --- arch/riscv/kvm/Kconfig | 2 ++ arch/riscv/kvm/Makefile | 2 +- arch/riscv/kvm/vm.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/riscv/kvm/Kconfig b/arch/riscv/kvm/Kconfig index 2356dc52ebb3..95d85d893ab6 100644 --- a/arch/riscv/kvm/Kconfig +++ b/arch/riscv/kvm/Kconfig @@ -4,6 +4,7 @@ # source "virt/kvm/Kconfig" +source "drivers/vhost/Kconfig" menuconfig VIRTUALIZATION bool "Virtualization" @@ -26,6 +27,7 @@ config KVM select KVM_MMIO select HAVE_KVM_VCPU_ASYNC_IOCTL select SRCU + select HAVE_KVM_EVENTFD help Support hosting virtualized guest machines. diff --git a/arch/riscv/kvm/Makefile b/arch/riscv/kvm/Makefile index b56dc1650d2c..3ad46fe44900 100644 --- a/arch/riscv/kvm/Makefile +++ b/arch/riscv/kvm/Makefile @@ -2,7 +2,7 @@ # Makefile for RISC-V KVM support # -common-objs-y = $(addprefix ../../../virt/kvm/, kvm_main.o coalesced_mmio.o) +common-objs-y = $(addprefix ../../../virt/kvm/, kvm_main.o coalesced_mmio.o eventfd.o) ccflags-y := -Ivirt/kvm -Iarch/riscv/kvm diff --git a/arch/riscv/kvm/vm.c b/arch/riscv/kvm/vm.c index 4f2498198cb5..473299e71f68 100644 --- a/arch/riscv/kvm/vm.c +++ b/arch/riscv/kvm/vm.c @@ -52,6 +52,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) int r; switch (ext) { + case KVM_CAP_IOEVENTFD: case KVM_CAP_DEVICE_CTRL: case KVM_CAP_USER_MEMORY: case KVM_CAP_SYNC_MMU: -- 2.19.1