From patchwork Thu Feb 19 10:54:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 5850881 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7FF81BF440 for ; Thu, 19 Feb 2015 10:55:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 92BCE202A1 for ; Thu, 19 Feb 2015 10:55:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BB53A20272 for ; Thu, 19 Feb 2015 10:55:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753091AbbBSKzM (ORCPT ); Thu, 19 Feb 2015 05:55:12 -0500 Received: from mail-wg0-f51.google.com ([74.125.82.51]:46825 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752796AbbBSKzK (ORCPT ); Thu, 19 Feb 2015 05:55:10 -0500 Received: by mail-wg0-f51.google.com with SMTP id y19so6411721wgg.10 for ; Thu, 19 Feb 2015 02:55:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NYfAzwpm4oSe5Xto5gcnNqWFIrpc3nO8IJKlMhh2vZo=; b=aVssm1YuqIwRpS0ixvEEdTYVrbdOib/SMKyetA7krNZl+XUr9+sV7AQ50C57v/hI6w wk6SJJyCM/PkC+gbhPQxiEUv5vjMTL4NYjG8mKCCG4yZz720gJdc+ZZuu+ecG7AK7yqu pgPvQ60K2xZ5A414LFz7LhCDtZqkj6gJJICd+Irzr6koHT3xULSAY+SiNY01qDTaBRSr rNr8C6WZ3M2UOr1Z20bDAxYFqq9r3F5piFHiX3EjXgkRUcDdE1zOSDwclVIbFC4+Ce6C mTouD8XnFQ4DIALER2h8/wQrrr8x1OqxSMdzo4+/bH6wbY4SoEjoFDdp0rAMIO/88byj xGLQ== X-Gm-Message-State: ALoCoQlm1rZ9dUPW0n7wvfBdEcsPShJiGQzGHj2m/ZNWqOKsUScL7IQq2R6fHCORgGb45sAibhfG X-Received: by 10.194.62.198 with SMTP id a6mr8189274wjs.90.1424343309545; Thu, 19 Feb 2015 02:55:09 -0800 (PST) Received: from ards-macbook-pro.local (237.102.108.93.rev.vodafone.pt. [93.108.102.237]) by mx.google.com with ESMTPSA id a1sm29642361wiy.10.2015.02.19.02.55.06 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Feb 2015 02:55:08 -0800 (PST) From: Ard Biesheuvel To: lersek@redhat.com, christoffer.dall@linaro.org, marc.zyngier@arm.com, linux-arm-kernel@lists.infradead.org, peter.maydell@linaro.org Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, agraf@suse.de, pbonzini@redhat.com, Ard Biesheuvel Subject: [RFC/RFT PATCH 3/3] arm64: KVM: keep trapping of VM sysreg writes enabled Date: Thu, 19 Feb 2015 10:54:46 +0000 Message-Id: <1424343286-6792-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1424343286-6792-1-git-send-email-ard.biesheuvel@linaro.org> References: <1424343286-6792-1-git-send-email-ard.biesheuvel@linaro.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP --- arch/arm/kvm/mmu.c | 2 +- arch/arm64/include/asm/kvm_arm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index 136662547ca6..fa8ec55220ea 100644 --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c @@ -1530,7 +1530,7 @@ void kvm_toggle_cache(struct kvm_vcpu *vcpu, bool was_enabled) stage2_flush_vm(vcpu->kvm); /* Caches are now on, stop trapping VM ops (until a S/W op) */ - if (now_enabled) + if (0)//now_enabled) vcpu_set_hcr(vcpu, vcpu_get_hcr(vcpu) & ~HCR_TVM); trace_kvm_toggle_cache(*vcpu_pc(vcpu), was_enabled, now_enabled); diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h index 8afb863f5a9e..437e1ec17539 100644 --- a/arch/arm64/include/asm/kvm_arm.h +++ b/arch/arm64/include/asm/kvm_arm.h @@ -75,7 +75,7 @@ * FMO: Override CPSR.F and enable signaling with VF * SWIO: Turn set/way invalidates into set/way clean+invalidate */ -#define HCR_GUEST_FLAGS (HCR_TSC | HCR_TSW | HCR_TWE | HCR_TWI | HCR_VM | \ +#define HCR_GUEST_FLAGS (HCR_TSC | /* HCR_TSW | */ HCR_TWE | HCR_TWI | HCR_VM | \ HCR_TVM | HCR_BSU_IS | HCR_FB | HCR_TAC | \ HCR_AMO | HCR_SWIO | HCR_TIDCP | HCR_RW) #define HCR_VIRT_EXCP_MASK (HCR_VA | HCR_VI | HCR_VF)