From patchwork Tue May 9 10:45:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9717593 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0806460237 for ; Tue, 9 May 2017 10:49:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEE5520683 for ; Tue, 9 May 2017 10:49:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3279283F2; Tue, 9 May 2017 10:49:56 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6596320683 for ; Tue, 9 May 2017 10:49:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=412U0RqwzQw5zDpCdgpDvOFCcssl4XwjBqKNsgl9/Fc=; b=e8in6aUdBEJS22nK9PoBeMX2/G UhZVatU+ugDs+et004DzpthkvRS/puiE7NwFDyScMtFJTZi7h+fTMCvQ/20HN1b/d2izvK6cGmu7/ aPLwXDGYyYMSTdHAVVVoXlFe89zCLyzcfVoJo7IpynpH3ZbVxHcNjk/0BRz22Ns9oCraBBOFT8VTB GBz0WeNqdbUhwoCMrsxYsFxwZffIad3yCXuwbZmwM+YC9aPvsMXw3YGMOeBRdUBNHkTkyOKBjImij Bs1KDg8MS3KD/zyx+M8eWYqM6Fm7hwK3WZF+6hx2i2hzYAFCVux4jXuZbrQ/zRFT0NlctbCmJeloE sXlNleOA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d82iI-0007qU-Pw; Tue, 09 May 2017 10:49:54 +0000 Received: from mail-qk0-x22a.google.com ([2607:f8b0:400d:c09::22a]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d82ec-00030P-Hg for linux-arm-kernel@lists.infradead.org; Tue, 09 May 2017 10:46:09 +0000 Received: by mail-qk0-x22a.google.com with SMTP id a72so58970422qkj.2 for ; Tue, 09 May 2017 03:45:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2IkYT9Kl+oBlh7U2XXoj98p0t3BmG/cqp+Ul5bumVU4=; b=fJ41/ZNnKyH9hhNPV8wwXYSfW92bUOivbYEqwvvSyy3hP9fe4V7CicWygWmdanc03+ XyUg5R5Ki19WrS17mqSed5O8PVAixE/dxB5qy8Ld7CKefYEcrVxhgmhgRlhXLkvIcJYp nFbZQFDfoZUj6qzQGaTC6tthSGAhIw3ggEreY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2IkYT9Kl+oBlh7U2XXoj98p0t3BmG/cqp+Ul5bumVU4=; b=lUhvfqUcc09gl5uBXzUb0ANJPbhJD4m2Q6Z45TX6qJZ4SN5gCuxD2aeuzkLv+Hizll x0gVJGQObdg+A/oL6H4VJtWtrSLdhjwqz6kn/CoX8GsVoDpzKfQG58BrJ2V8dpMRQVJ0 xM/IG+RBeHje6bwTw+iHwHacGG4xam9fZ81MAc/aXjuMkcrYxFrZBhchLM5VUwqcIpfY MdfRUaZbbz2qs6vLVV4JQUo32KPQ+LwmYKJ9PG9NXEQKi71DQ7Iw2d678A/lpRKMRHKy 3xfntTfo5jXLNYsTR0pgKaINwTNQdocYh4lp0efN9YE51EiFYRRnDY9hWBUna3i8pu5B RvcA== X-Gm-Message-State: AN3rC/7V1RbpE+nkpYjtHJmqWYIR5vLXGsPh9PpC4xhALvOv9jHWHrSz WI3UUUgWejlyTZ1g X-Received: by 10.80.192.21 with SMTP id r21mr15525150edb.151.1494326745000; Tue, 09 May 2017 03:45:45 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id o30sm2331510edc.42.2017.05.09.03.45.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 May 2017 03:45:44 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 34/37] KVM: arm/arm64: Get rid of its->initialized field Date: Tue, 9 May 2017 12:45:03 +0200 Message-Id: <20170509104506.30929-35-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170509104506.30929-1-cdall@linaro.org> References: <20170509104506.30929-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170509_034607_016702_D18DAA67 X-CRM114-Status: GOOD ( 11.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christoffer Dall , kvm@vger.kernel.org, Marc Zyngier , Eric Auger , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marc Zyngier The its->initialized doesn't bring much to the table, and creates unnecessary ordering between setting the address and initializing it (which amounts to exactly nothing). Let's kill it altogether, making KVM_DEV_ARM_VGIC_CTRL_INIT the no-op it deserves to be. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger --- include/kvm/arm_vgic.h | 1 - virt/kvm/arm/vgic/vgic-its.c | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h index 4ff65ef..bfde6fb 100644 --- a/include/kvm/arm_vgic.h +++ b/include/kvm/arm_vgic.h @@ -148,7 +148,6 @@ struct vgic_its { gpa_t vgic_its_base; bool enabled; - bool initialized; struct vgic_io_device iodev; struct kvm_device *dev; diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c index 9f7105c..18318c6 100644 --- a/virt/kvm/arm/vgic/vgic-its.c +++ b/virt/kvm/arm/vgic/vgic-its.c @@ -1545,9 +1545,6 @@ static int vgic_register_its_iodev(struct kvm *kvm, struct vgic_its *its) struct vgic_io_device *iodev = &its->iodev; int ret; - if (!its->initialized) - return -EBUSY; - if (IS_VGIC_ADDR_UNDEF(its->vgic_its_base)) return -ENXIO; @@ -1597,7 +1594,6 @@ static int vgic_its_create(struct kvm_device *dev, u32 type) INIT_LIST_HEAD(&its->collection_list); dev->kvm->arch.vgic.has_its = true; - its->initialized = false; its->enabled = false; its->dev = dev; @@ -2397,8 +2393,7 @@ static int vgic_its_set_attr(struct kvm_device *dev, switch (attr->attr) { case KVM_DEV_ARM_VGIC_CTRL_INIT: - its->initialized = true; - + /* Nothing to do */ return 0; case KVM_DEV_ARM_ITS_SAVE_TABLES: return abi->save_tables(its);