From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH kvm-unit-tests 2/4] Introduce a C++ wrapper for the kvm APIs Date: Wed, 24 Nov 2010 08:55:13 -0600 Message-ID: <4CED2751.10407@codemonkey.ws> References: <1290595933-13122-1-git-send-email-avi@redhat.com> <1290595933-13122-3-git-send-email-avi@redhat.com> <4CED1CC6.20603@codemonkey.ws> <4CED2148.60005@redhat.com> <4CED24F4.6060300@codemonkey.ws> <4CED26DB.1060305@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mail-gx0-f174.google.com ([209.85.161.174]:55229 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751985Ab0KXOzq (ORCPT ); Wed, 24 Nov 2010 09:55:46 -0500 Received: by gxk22 with SMTP id 22so775479gxk.19 for ; Wed, 24 Nov 2010 06:55:46 -0800 (PST) In-Reply-To: <4CED26DB.1060305@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/24/2010 08:53 AM, Avi Kivity wrote: >> struct x86_vcpu : public vcpu >> { >> uint64_t eax; >> uint64_t ebx; >> uint64_t ecx; >> //... >> >> void get_gps(void); >> void put_gps(void); >> void get_sregs(void); >> void put_sregs(void); >> >> std::string repr(void); >> }; >> >> I'm not of the opinion that all members need getters and setters. I >> think it's perfectly fine to have public variables if the reads and >> writes don't have side effects. > > > I see. Well that belongs elsewhere, this is intended as a thin > wrapper that doesn't allows you to exercise the API directly. I don't > want things to happen automatically here, this is for a test framework. That's fine. Regards, Anthony Liguori