Subject: [PATCH] arm64/kvm: Add generic v8 KVM target

From: [email-masked] (Marc Zyngier)
Date: Mon, 22 Jun 2015 07:47:59 +0100

On Fri, 19 Jun 2015 21:31:27 +0100
Timur Tabi <[email-masked]> wrote:

> On 06/17/2015 04:00 AM, Suzuki K. Poulose wrote:
> >   					  &genericv8_target_table);
> >   	kvm_register_target_sys_reg_table(KVM_ARM_TARGET_XGENE_POTENZA,
> >   					  &genericv8_target_table);
> > +
> > kvm_register_target_sys_reg_table(KVM_ARM_TARGET_GENERIC_V8,
> > +					  &genericv8_target_table);
> >
> 
> Shouldn't you also remove all of the previous lines that return 
> &genericv8_target_table?

No. KVM_ARM_TARGET_* are part of the uapi, and existing userspace knows
about them. You can't just drop them.

What you *could* do would be to map the existing targets to the generic
one in a way that leaves userspace blissfully unaware of the underlying
change (for example, KVM_ARM_PREFERRED_TARGET should still return
KVM_ARM_TARGET_XGENE_POTENZA on an XGene platform, and
KVM_ARM_VCPU_INIT should still be accept it).

What would be the gain of such a mapping? Added complexity, hardly
anything else. We're much better off considering the generic target as
a new one, both inside the kernel and in the view we export to
userspace.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny.