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: 44809 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 302D721553 for ; Thu, 19 Feb 2015 10:57:54 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id l15sf5064812wiw.0 for ; Thu, 19 Feb 2015 02:57:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=BteAKKI1WZrJT6BtdPpVX24MX2Um53HxDYpKYAsBc2g=; b=Z5cGmPKxKMXK4Jqfd9IXqEQCfntpSG5FGLfkkjyHJHvaE733t0W3x4upumvJJRMiwX CM/5KRw9T2y6kk6khyBkgw550h5Evx1SVmm9K4mfM3lWKLw6vtIu2HAk6ETYi02r0XPq UZgJKxCTjckYWhgsDS2C8arrhnfVUIqyU8ykAPq27a3YI0C+WhNlw33zkgXwA+T9k3pe 2NeFmhY2lArk5saTCkeYAHgBpF+saF/qKNXJfPJLGiCKlxv35yeDs7PGTz3GQWFXbmpm wPuR++rlq2u9vnx9jbyahC826UrJIM7prPeaN38hPIbDCJu5sxjdpHYXQWsWxfilrl0N 3Vbg== X-Gm-Message-State: ALoCoQmVC+F0+ErgMaA26xw9YIlHa3179npqzHv6p0SOqt07oIhMKrOoyJ5eA4LRNO6/y1jwQMd9 X-Received: by 10.152.37.200 with SMTP id a8mr486466lak.5.1424343473476; Thu, 19 Feb 2015 02:57:53 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.121.1 with SMTP id lg1ls128972lab.34.gmail; Thu, 19 Feb 2015 02:57:53 -0800 (PST) X-Received: by 10.152.22.67 with SMTP id b3mr3209544laf.117.1424343473164; Thu, 19 Feb 2015 02:57:53 -0800 (PST) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id us19si14970044lbb.35.2015.02.19.02.57.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Feb 2015 02:57:53 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by lams18 with SMTP id s18so6770741lam.13 for ; Thu, 19 Feb 2015 02:57:53 -0800 (PST) X-Received: by 10.112.167.36 with SMTP id zl4mr3642963lbb.32.1424343473071; Thu, 19 Feb 2015 02:57:53 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp412807lbj; Thu, 19 Feb 2015 02:57:52 -0800 (PST) X-Received: by 10.68.125.164 with SMTP id mr4mr6535246pbb.27.1424343471390; Thu, 19 Feb 2015 02:57:51 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id oj2si6272815pdb.83.2015.02.19.02.57.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Feb 2015 02:57:51 -0800 (PST) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YOOmM-00070r-Sh; Thu, 19 Feb 2015 10:56:22 +0000 Received: from mail-wg0-f48.google.com ([74.125.82.48]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YOOlX-0006Wl-7Y for linux-arm-kernel@lists.infradead.org; Thu, 19 Feb 2015 10:55:31 +0000 Received: by mail-wg0-f48.google.com with SMTP id l18so6456322wgh.7 for ; Thu, 19 Feb 2015 02:55:09 -0800 (PST) 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150219_025531_489212_5D6A1FF1 X-CRM114-Status: UNSURE ( 9.14 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.48 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.48 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: pbonzini@redhat.com, Ard Biesheuvel , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, agraf@suse.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 --- 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)