From patchwork Fri Oct 12 16:12:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongjiu Geng X-Patchwork-Id: 10638833 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 38A2C112B for ; Fri, 12 Oct 2018 16:13:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2811B1FFD9 for ; Fri, 12 Oct 2018 16:13:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C1872AFF4; Fri, 12 Oct 2018 16:13:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 910141FFD9 for ; Fri, 12 Oct 2018 16:13:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729009AbeJLXqh (ORCPT ); Fri, 12 Oct 2018 19:46:37 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:56567 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728882AbeJLXqg (ORCPT ); Fri, 12 Oct 2018 19:46:36 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id CA2D6E6D7B956; Sat, 13 Oct 2018 00:13:19 +0800 (CST) Received: from SHA150392835-N.china.huawei.com (10.45.49.222) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.399.0; Sat, 13 Oct 2018 00:13:13 +0800 From: Dongjiu Geng To: , , , , , , , , , CC: Subject: [PATCH v4 2/2] arm/arm64: KVM: enable 32 bits kvm vcpu events support Date: Sat, 13 Oct 2018 00:12:49 +0800 Message-ID: <20181012161249.9236-3-gengdongjiu@huawei.com> X-Mailer: git-send-email 2.11.0.windows.1 In-Reply-To: <20181012161249.9236-1-gengdongjiu@huawei.com> References: <20181012161249.9236-1-gengdongjiu@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.45.49.222] X-CFilter-Loop: Reflected Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The commit 539aee0edb9f ("KVM: arm64: Share the parts of get/set events useful to 32bit") shares the get/set events helper for arm64 and arm32, but forgot to share the cap extension code. User space will check whether KVM supports vcpu events by checking the KVM_CAP_VCPU_EVENTS extension Cc: James Morse Reviewed-by : Suzuki K Poulose Signed-off-by: Dongjiu Geng Acked-by: James Morse --- For the 32 bits kvm migration, it needs to enable the vcpu events, this patch will enable it. The user space QEMU patch is here: https://patchwork.ozlabs.org/patch/975615/ --- arch/arm64/kvm/reset.c | 1 - virt/kvm/arm/arm.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c index fd37c53..e50245e 100644 --- a/arch/arm64/kvm/reset.c +++ b/arch/arm64/kvm/reset.c @@ -82,7 +82,6 @@ int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext) break; case KVM_CAP_SET_GUEST_DEBUG: case KVM_CAP_VCPU_ATTRIBUTES: - case KVM_CAP_VCPU_EVENTS: r = 1; break; default: diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c index 40e79ea..64e5d97 100644 --- a/virt/kvm/arm/arm.c +++ b/virt/kvm/arm/arm.c @@ -212,6 +212,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) case KVM_CAP_READONLY_MEM: case KVM_CAP_MP_STATE: case KVM_CAP_IMMEDIATE_EXIT: + case KVM_CAP_VCPU_EVENTS: r = 1; break; case KVM_CAP_ARM_SET_DEVICE_ADDR: