From: "Jan Beulich" Subject: Re: [PATCH v10 09/20] x86/VPMU: Add public xenpmu.h Date: Thu, 11 Sep 2014 07:39:38 +0100 Message-ID: <54115FCA0200007800033A6C@mail.emea.novell.com> References: <1409802080-6160-1-git-send-email-boris.ostrovsky@oracle.com> <1409802080-6160-10-git-send-email-boris.ostrovsky@oracle.com> <54108045020000780003362D@mail.emea.novell.com> <5410890B.9010900@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5410890B.9010900@oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky Cc: tim@xen.org, kevin.tian@intel.com, keir@xen.org, suravee.suthikulpanit@amd.com, andrew.cooper3@citrix.com, eddie.dong@intel.com, xen-devel@lists.xen.org, Aravind.Gopalakrishnan@amd.com, jun.nakajima@intel.com List-Id: xen-devel@lists.xenproject.org >>> On 10.09.14 at 19:23, wrote: > On 09/10/2014 10:45 AM, Jan Beulich wrote: >>>>> On 04.09.14 at 05:41, wrote: >>> +struct xen_pmu_arch { >>> + union { >>> + struct cpu_user_regs regs; >>> + uint8_t pad[256]; >>> + } r; >> Can you remind me again what you need the union and padding for >> here? > > This structure is laid out in a shared page with a (possibly 32-bit) > guest who need to access fields that follow this union. Hmm, okay. But how would such a guest make reasonable use of the regs field then? And then - why 256 and not 200? struct cpu_user_regs can't change size anyway. Plus, finally, why do you expose the GPRs but not any of the other register state? Yes, I realize I should have thought of these earlier, but better now than after the new ABI got established. Jan