Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1347926
| 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 | 2016-03-02 11:30 +0100 |
| Message-ID | <r8ccy-6iu-1@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> |
| Organization | linux.* mail to news gateway |
On 02/03/16 09:08, Marc Zyngier wrote: > On 25/02/16 09:52, Suzuki K Poulose wrote: >> I really wanted to pass kvm_vcpu down to the helpers. But then, I can't >> define the arch specific helper in asm/kvm_host.h due to lack of kvm_vcpu's >> definition yet: >> >> In file included from include/linux/kvm_host.h:35:0, >> from arch/arm64/kernel/asm-offsets.c:24: >> ./arch/arm64/include/asm/kvm_host.h: In function ‘kvm_arch_vcpu_validate_features’: >> ./arch/arm64/include/asm/kvm_host.h:344:48: error: dereferencing pointer to incomplete type >> return !test_bit(KVM_ARM_VCPU_EL1_32BIT, vcpu->arch.features) || > > Why don't you just have the prototype in kvm_host.h, and move the actual > implementation to something like guest.c? But I think there is a better > approach, see below. I thought it would better be a static inline. But, the GCC can do that, silly me :) > > 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? Definitely. I overlooked the function name to do something specific to resetting the CPU than doing some checks :(. I will respin it. Cheers Suzuki
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 8/8] arm64: kvm: Check support for AArch32 for 32bit guests Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-02-25 11:00 +0100
Re: [PATCH v2 8/8] arm64: kvm: Check support for AArch32 for 32bit guests Marc Zyngier <marc.zyngier@arm.com> - 2016-03-02 10:10 +0100
Re: [PATCH v2 8/8] arm64: kvm: Check support for AArch32 for 32bit guests "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> - 2016-03-02 11:30 +0100
csiph-web