Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75823C433E1 for ; Thu, 27 Aug 2020 14:54:48 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E03C2054F for ; Thu, 27 Aug 2020 14:54:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E03C2054F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kBJIG-0006mE-Uu; Thu, 27 Aug 2020 14:54:24 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kBJIF-0006m9-TP for xen-devel@lists.xenproject.org; Thu, 27 Aug 2020 14:54:23 +0000 X-Inumbo-ID: a4e18548-27fe-4717-a274-09cc6afa9360 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a4e18548-27fe-4717-a274-09cc6afa9360; Thu, 27 Aug 2020 14:54:23 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 814C9AC2B; Thu, 27 Aug 2020 14:54:54 +0000 (UTC) Subject: Re: [PATCH v6 09/11] x86/domctl: add XEN_DOMCTL_vmtrace_op To: =?UTF-8?Q?Micha=c5=82_Leszczy=c5=84ski?= Cc: xen-devel@lists.xenproject.org, tamas.lengyel@intel.com, luwei.kang@intel.com, Andrew Cooper , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini References: From: Jan Beulich Message-ID: Date: Thu, 27 Aug 2020 16:54:24 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 07.07.2020 21:39, Michał Leszczyński wrote: > --- a/xen/include/public/domctl.h > +++ b/xen/include/public/domctl.h > @@ -1136,6 +1136,30 @@ struct xen_domctl_vuart_op { > */ > }; > > +/* XEN_DOMCTL_vmtrace_op: Perform VM tracing related operation */ > +#if defined(__XEN__) || defined(__XEN_TOOLS__) > + > +struct xen_domctl_vmtrace_op { > + /* IN variable */ > + uint32_t cmd; > +/* Enable/disable external vmtrace for given domain */ > +#define XEN_DOMCTL_vmtrace_pt_enable 1 > +#define XEN_DOMCTL_vmtrace_pt_disable 2 > +#define XEN_DOMCTL_vmtrace_pt_get_offset 3 > + domid_t domain; > + uint16_t pad1; > + uint32_t vcpu; > + uint16_t pad2; > + > + /* OUT variable */ > + uint64_aligned_t size; > + uint64_aligned_t offset; > +}; > +typedef struct xen_domctl_vmtrace_op xen_domctl_vmtrace_op_t; > +DEFINE_XEN_GUEST_HANDLE(xen_domctl_vmtrace_op_t); > + > +#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */ Here and ... > @@ -1277,6 +1302,9 @@ struct xen_domctl { > struct xen_domctl_monitor_op monitor_op; > struct xen_domctl_psr_alloc psr_alloc; > struct xen_domctl_vuart_op vuart_op; > +#if defined(__XEN__) || defined(__XEN_TOOLS__) > + struct xen_domctl_vmtrace_op vmtrace_op; > +#endif ... here I'm struggling with the #ifdef-s - see the very top of the file. Jan