[PATCH] KVM: ARM: ignore guest L2 cache control SMCs on Highbank and OMAP
Peter Maydell
peter.maydell at linaro.org
Wed Aug 14 06:22:04 EDT 2013
On 14 August 2013 10:32, Marc Zyngier <marc.zyngier at arm.com> wrote:
> On 2013-08-14 10:22, Andre Przywara wrote:
>> +static int kvm_ignore_l2x0_call(struct kvm_vcpu *vcpu)
>> +{
>> + unsigned long fn_nr = *vcpu_reg(vcpu, 12) & ~((u32) 0);
>> +
>> + if (fn_nr == 0x102) {
>> + kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu));
>> + return 1;
>> + }
>> +
>> + return 0;
>> +}
>
> And what if I run mach-foo which uses r12 to request bar services from
> secure mode? Is it safe to ignore it? We need something much better than
> just testing random registers to guess what the guest wants.
Definitely. This needs to be addressed via the kernel providing
some mechanism so that userspace and/or a KVM-specific bit
of 'firmware' running in the guest VM can handle the SMC
calls the guest tries to make, because it's totally board
specific.
-- PMM
More information about the linux-arm-kernel
mailing list