From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] arm64: KVM: Turn kvm_ksym_ref into a NOP on VHE Date: Mon, 21 Mar 2016 13:36:10 +0100 Message-ID: <56EFEABA.3010604@redhat.com> References: <1458321959-11728-1-git-send-email-marc.zyngier@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: KVM devel mailing list , Catalin Marinas , "kvmarm@lists.cs.columbia.edu" , "linux-arm-kernel@lists.infradead.org" To: Ard Biesheuvel , Marc Zyngier Return-path: Received: from mail-wm0-f45.google.com ([74.125.82.45]:38002 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755156AbcCUMgP (ORCPT ); Mon, 21 Mar 2016 08:36:15 -0400 Received: by mail-wm0-f45.google.com with SMTP id l68so120057466wml.1 for ; Mon, 21 Mar 2016 05:36:14 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 21/03/2016 09:47, Ard Biesheuvel wrote: > On 18 March 2016 at 18:25, Marc Zyngier wrote: >> When running with VHE, there is no need to translate kernel pointers >> to the EL2 memory space, since we're already there (and we have a much >> saner memory map to start with). >> >> Unfortunately, kvm_ksym_ref is getting in the way, and the first >> call into the "hypervisor" section is going to end up in fireworks, >> since we're now branching into nowhereland. Meh. >> >> A potential solution is to test if VHE is engaged or not, and only >> perform the translation in the negative case. With this in place, >> VHE is able to run again. >> >> Signed-off-by: Marc Zyngier > > I think you need the & when initializing val, otherwise, it will > silently refer to the value rather than the address of a void* symbol > if we ever end up using this macro on one. > > That was the whoie point of the opaque struct type in the original > patch that introduced this macro, to disallow references lacking the > &, but unfortunately, that was incompatible with the other VHE > changes. > > With that fixed > > Acked-by: Ard Biesheuvel Marc, if you send a v2 I can merge it directly without a pull request. Paolo