From mboxrd@z Thu Jan 1 00:00:00 1970 From: gleb@redhat.com (Gleb Natapov) Date: Mon, 26 Aug 2013 13:55:35 +0300 Subject: [PATCH 2/3] KVM: ARM: Get rid of KVM_HPAGE_ defines In-Reply-To: <2A584690-A736-4DFA-B455-ABBD15298618@suse.de> References: <1376021239-10532-1-git-send-email-christoffer.dall@linaro.org> <1376058613-26400-1-git-send-email-christoffer.dall@linaro.org> <20130825140529.GT8218@redhat.com> <20130825144847.GV8218@redhat.com> <2A584690-A736-4DFA-B455-ABBD15298618@suse.de> Message-ID: <20130826105535.GB8218@redhat.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Sun, Aug 25, 2013 at 04:27:14PM +0100, Alexander Graf wrote: > > On 25.08.2013, at 16:18, Peter Maydell wrote: > > > On 25 August 2013 15:48, Gleb Natapov wrote: > >> On Sun, Aug 25, 2013 at 03:29:17PM +0100, Peter Maydell wrote: > >>> Smiley noted, but this is pretty unlikely since it's not possible > >>> to lie to the guest about which mode it's in, so you can't make > >>> a guest think it's in Hyp mode. > >>> > >> I suspected this, but forgot most that I read about Hyp mode by now. > >> Need to refresh my memory ASAP. Is it impossible even with a lot of > >> emulation? Can guest detect that it is not in a Hyp mode without > >> trapping into hypervisor? > > > > Yes. The current mode is in the the low bits of the CPSR, which > > is readable without causing a trap. This is just the most obvious > > roadblock; I bet there are more. If you really had to run Hyp mode > > code in a VM you probably have to do it by having it all emulated > > via TCG. > > Or in an in-kernel instruction emulator that we have lying around anyways. For kvm-in-kvm that should be good enough, as we only need to execute a few instructions in HYP mode. > Will require emulation on each trap to Hyp mode tough. But since you already have ideas about nested Hyp I consider it done :) -- Gleb.