From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753422AbbH3JNd (ORCPT ); Sun, 30 Aug 2015 05:13:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53074 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753199AbbH3JMx (ORCPT ); Sun, 30 Aug 2015 05:12:53 -0400 Date: Sun, 30 Aug 2015 12:12:50 +0300 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: kvm@vger.kernel.org, Paolo Bonzini Subject: [PATCH RFC 3/3] kvm: add KVM_CAP_IOEVENTFD_PF capability Message-ID: <1440925898-23440-4-git-send-email-mst@redhat.com> References: <1440925898-23440-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1440925898-23440-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Michael S. Tsirkin --- include/uapi/linux/kvm.h | 1 + arch/x86/kvm/x86.c | 1 + Documentation/virtual/kvm/api.txt | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 716ad4a..4509aa3 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -817,6 +817,7 @@ struct kvm_ppc_smmu_info { #define KVM_CAP_DISABLE_QUIRKS 116 #define KVM_CAP_X86_SMM 117 #define KVM_CAP_MULTI_ADDRESS_SPACE 118 +#define KVM_CAP_IOEVENTFD_PF 119 #ifdef KVM_CAP_IRQ_ROUTING diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index c8015fa..f989453 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2629,6 +2629,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) case KVM_CAP_IRQ_INJECT_STATUS: case KVM_CAP_IOEVENTFD: case KVM_CAP_IOEVENTFD_NO_LENGTH: + case KVM_CAP_IOEVENTFD_PF: case KVM_CAP_PIT2: case KVM_CAP_PIT_STATE2: case KVM_CAP_SET_IDENTITY_MAP_ADDR: diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index a7926a9..85a76ad 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -1618,6 +1618,13 @@ The following flags are defined: If datamatch flag is set, the event will be signaled only if the written value to the registered address is equal to datamatch in struct kvm_ioeventfd. +If KVM_CAP_IOEVENTFD_NO_LENGTH is present, and when DATAMATCH flag +is clear, len can be set to 0 to match access of any length. + +If KVM_CAP_IOEVENTFD_PF is present, and when DATAMATCH flag +is clear and len is set to 0, the specified address can overlap +a read-only memory region (as opposed to an MMIO region). + For virtio-ccw devices, addr contains the subchannel id and datamatch the virtqueue index. -- MST