Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1357206
| Path | csiph.com!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 8/8] arm64: kvm: Check support for AArch32 for 32bit guests |
| Date | Mon, 14 Mar 2016 13:30:01 +0100 |
| Message-ID | <rczNf-3Fk-7@gated-at.bofh.it> (permalink) |
| References | <r60Se-1Sg-13@gated-at.bofh.it> <r60Sf-1Sg-31@gated-at.bofh.it> <r8aX8-5yy-7@gated-at.bofh.it> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 42 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | christoffer.dall@linaro.org, will.deacon@arm.com, ynorov@caviumnetworks.com, catalin.marinas@arm.com, mark.rutland@arm.com, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu |
| X-Original-Date | Mon, 14 Mar 2016 12:27:43 +0000 |
| X-Original-Message-ID | <56E6AE3F.2030800@arm.com> |
| X-Original-References | <1456393968-17386-1-git-send-email-suzuki.poulose@arm.com> <1456393968-17386-9-git-send-email-suzuki.poulose@arm.com> <56D6AD72.8010108@arm.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1357206 |
Show key headers only | View raw
On 02/03/16 09:08, Marc Zyngier wrote:
> On 25/02/16 09:52, Suzuki K Poulose wrote:
>> Add a check to make sure the system supports AArch32 state
>> before initialising a 32bit guest.
>>
>> Cc: Christoffer Dall <christoffer.dall@linaro.org>
>> Cc: Marc Zyngier <marc.zyngier@arm.com>
>> Cc: kvmarm@lists.cs.columbia.edu
>> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
...
>> @@ -338,6 +340,12 @@ static inline void kvm_arch_sync_events(struct kvm *kvm) {}
>> static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {}
>> static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
>>
>> +static inline bool kvm_arch_vcpu_validate_features(struct kvm_vcpu_arch *arch_vcpu)
>> +{
>> + return !test_bit(KVM_ARM_VCPU_EL1_32BIT, arch_vcpu->features) ||
>> + system_supports_32bit_el0();
>> +}
>> +
>
> This is really convoluted (it took me 5 minutes staring at the
> expression and remembering that AArch32 EL1 implies AArch32 EL0 to get it).
>
> Now, we already have kvm_reset_vcpu() that validates AArch32 support. It
> would probably be better to move things there. Thoughts?
I think we can leave the kvm bits as it is now, discarding this patch, as
we already do the right thing. Also system_supports_32bit_el0() doesn't
guarantee system_supports_32bit_el1(). The negation and converse are
both true though.
i.e,
!32bit_el0_support => !32bit_el1_support
&
32bit_el1_support => 32bit_el0_support
Thanks
Suzuki
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH v2 8/8] arm64: kvm: Check support for AArch32 for 32bit guests "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> - 2016-03-14 13:30 +0100
csiph-web