From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH] KVM: arm/arm64: Add VGICv3 save/restore API documentation Date: Fri, 09 Oct 2015 09:29:35 +0100 Message-ID: <56177AEF.50304@arm.com> References: <1444247430-14808-1-git-send-email-christoffer.dall@linaro.org> <00e601d10264$61cdafb0$25690f10$@samsung.com> <56177592.2080702@arm.com> <00ec01d10269$f6c82af0$e45880d0$@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, 'Andre Przywara' , 'Peter Maydell' , 'Eric Auger' To: Pavel Fedin , 'Christoffer Dall' , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Return-path: Received: from foss.arm.com ([217.140.101.70]:37832 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933490AbbJII3j (ORCPT ); Fri, 9 Oct 2015 04:29:39 -0400 In-Reply-To: <00ec01d10269$f6c82af0$e45880d0$@samsung.com> Sender: kvm-owner@vger.kernel.org List-ID: On 09/10/15 09:10, Pavel Fedin wrote: > Hello! > >> How do you reconcile the two? What's the point of trying to shoehorn a >> different concept into the existing API? > > Keeping amount of #define's as small as possible, and try to reuse everything that can be reused. Reusing existing code is a noble goal, but I think that having clear abstractions and following the architecture trumps it completely. Experience has shown that trying to be clever with userspace interfaces comes and bites us in the rear sooner or later. Not enough bits, being unable to represent valid architecture features, pointlessly complicated code that is hard to maintain. Those are the things I care about today. So a #define is completely free, additional code is still very cheap. My brain cells are few, and I like to look at the code and get this warm fuzzy feeling that it is doing the right thing. Having separate interfaces for different devices is a very good way to ensure the above. Thanks, M. -- Jazz is not dead. It just smells funny...