From patchwork Thu Aug 16 13:54:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 1332211 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B33CFDFB34 for ; Thu, 16 Aug 2012 13:55:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932548Ab2HPNz4 (ORCPT ); Thu, 16 Aug 2012 09:55:56 -0400 Received: from goliath.siemens.de ([192.35.17.28]:22707 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757137Ab2HPNym (ORCPT ); Thu, 16 Aug 2012 09:54:42 -0400 Received: from mail1.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id q7GDsYR7030765; Thu, 16 Aug 2012 15:54:35 +0200 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id q7GDsYJG012893; Thu, 16 Aug 2012 15:54:34 +0200 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Cc: kvm@vger.kernel.org, Alex Williamson Subject: [PATCH 06/19] qemu-kvm: Move kvm_device_intx_set_mask service Date: Thu, 16 Aug 2012 15:54:20 +0200 Message-Id: <2d888247deedee0c316c823e619d59bdfb954a47.1345125266.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: References: In-Reply-To: References: Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Move kvm_device_intx_set_mask prototype and implementation to their upstream positions. Signed-off-by: Jan Kiszka --- qemu-kvm.c | 9 --------- qemu-kvm.h | 2 -- target-i386/kvm.c | 9 +++++++++ target-i386/kvm_i386.h | 1 + 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 8bc9857..8416a8d 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -37,15 +37,6 @@ static int kvm_old_assign_irq(KVMState *s, return kvm_vm_ioctl(s, KVM_ASSIGN_IRQ, assigned_irq); } -int kvm_device_intx_set_mask(KVMState *s, uint32_t dev_id, bool masked) -{ - struct kvm_assigned_pci_dev assigned_dev; - - assigned_dev.assigned_dev_id = dev_id; - assigned_dev.flags = masked ? KVM_DEV_ASSIGN_MASK_INTX : 0; - return kvm_vm_ioctl(s, KVM_ASSIGN_SET_INTX_MASK, &assigned_dev); -} - #ifdef KVM_CAP_ASSIGN_DEV_IRQ int kvm_assign_irq(KVMState *s, struct kvm_assigned_irq *assigned_irq) { diff --git a/qemu-kvm.h b/qemu-kvm.h index 1cdface..c247ad0 100644 --- a/qemu-kvm.h +++ b/qemu-kvm.h @@ -43,8 +43,6 @@ */ int kvm_assign_irq(KVMState *s, struct kvm_assigned_irq *assigned_irq); -int kvm_device_intx_set_mask(KVMState *s, uint32_t dev_id, bool masked); - struct kvm_irq_routing_entry; void kvm_add_routing_entry(KVMState *s, struct kvm_irq_routing_entry *entry); diff --git a/target-i386/kvm.c b/target-i386/kvm.c index e2041f4..4941744 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -2116,6 +2116,15 @@ int kvm_device_intx_assign(KVMState *s, uint32_t dev_id, bool use_host_msi, return kvm_assign_irq_internal(s, dev_id, irq_type, guest_irq); } +int kvm_device_intx_set_mask(KVMState *s, uint32_t dev_id, bool masked) +{ + struct kvm_assigned_pci_dev assigned_dev; + + assigned_dev.assigned_dev_id = dev_id; + assigned_dev.flags = masked ? KVM_DEV_ASSIGN_MASK_INTX : 0; + return kvm_vm_ioctl(s, KVM_ASSIGN_SET_INTX_MASK, &assigned_dev); +} + static int kvm_deassign_irq_internal(KVMState *s, uint32_t dev_id, uint32_t type) { diff --git a/target-i386/kvm_i386.h b/target-i386/kvm_i386.h index 5a24168..28f26bb 100644 --- a/target-i386/kvm_i386.h +++ b/target-i386/kvm_i386.h @@ -21,6 +21,7 @@ int kvm_device_pci_deassign(KVMState *s, uint32_t dev_id); int kvm_device_intx_assign(KVMState *s, uint32_t dev_id, bool use_host_msi, uint32_t guest_irq); +int kvm_device_intx_set_mask(KVMState *s, uint32_t dev_id, bool masked); int kvm_device_intx_deassign(KVMState *s, uint32_t dev_id, bool use_host_msi); int kvm_device_msi_deassign(KVMState *s, uint32_t dev_id);