[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/x86: Make XEN_DOMCTL_get_vcpu_msrs more configurable


  • To: Tamas K Lengyel <tamas.lengyel@xxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 25 Oct 2022 10:13:14 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YX6jqx21pGMDg6Blul6hkJqC8sdjRaTf+MR4wZxV8eI=; b=IYQMyZFEYwJDRvqyP6EK9jZF0SV4mcH4pbEEFz4FcTSF9120yFAUx6q4LW0sll91peIKlZOREIJ+5EVRAx9XJnLlxAxVZzfmRD7Bxu69T44t0d9rL5ZfthpsxIOePYY51JIzAWFyGCBgSu8T8ty0O6jlHmzJ+8/xynAhO8pc1vsLf3ndVSC/njMHeuDum2wNgONKUpjwVwWbZ5qH6+fW0/PLHTNBPELyY7P6AIG2NwWXD7+c/UUcvHw4hAwWooMFnYDeS8jegECo+8gGSQAh7BuwRSbJXzJCd15Wim6Q4Wyi+reot6JtPeEDAYyQTLMFkoGA1RuiEQQHsMg4rsUhvQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DxqvUWHDp4MOHLUfXaqoRuJNDHkkZcbIdF73FEG3Yt9DVV1pXOtidGU5b1noMmNhpRQQBAaObIVoePcAM9e2uS9f1gj3jP44KyEiY1CpYTKRxwjLTzkmS8dYEB+/CSNGTjIE8yUzXHhkj93FGIKtP9cXfSpBHqwIphd8Byzbq8gHoxlIl5p+T2ID6d5/IcdYvnMS6fSDNu2qaZWFtQ7MKDl8AoOfI1GN/wZ6P3u6DN3y9UI9r7NGRkTKc5sgpZxuEDffPgXsGo+aPCCXZPD6dQmCss/+yp7ruTaE8gORn9haZIX5BS0YmTOUzUNICn3FnVYLwsFbTKH4fY/74pSfKQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Tue, 25 Oct 2022 08:13:33 +0000
  • Ironport-data: A9a23:l52eLK64teSsJDXgsE+KmQxR2vbMJbbHMSYv2y7JWF8qXhjsoshV/T9vMzAtp4WMNckWm8diJPyAfru/5I5j2gKE5yuO8bbr9stcgWt1nkbNJVQgTP23j6yiff2+NX+0duchnxjw64xoPKRVkX05WPaRAcXcbFp0/pW8tZ6AY+7rUjAD4mi3gllc1gjwXnTE6jC15i+XeJxUV14mxZ5xk0YSZpOjKn9wEDsYQtD6sJMKBvP6gmuio/OEE45dEds7mXTOUz4W7bFwkmTgTtI7GVH0Wvg6jagK644JxJeeCoyRPhP98H18FI7aAC5f3JfIGi3WEcmHv8PN1PtE7VZbwWRo9NiAerGnlHXm+aJ8nRzb3eM7+aiLgYBoF/iY2zsDcHhrd4TPJWhULjW0bqFgtToSunB/FOZfHRm5jaQ/ufwsiL7Ti1HPdEEmZ2uNx+A1CcxtoFfU/MXoMt2Kn+4gPTSMuNkprJor1GLq2lfPbqBJbi1fllEZhLBkzZIk8pqD+MJnS+ox9QYazUI9K9s5H+v8BnvEcao4WRbm3OxsamQlrbv4Lu3IXJscAGqBq9hMVDI4ZUm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cwbK2fYPzgl0YE8l9hkXuspqhzP+hFlpvCvbExTafAQH9mBR3wR8iuHfzQNm+8iGZbxo+klOQGMVozZmikXQL8dkSpQqaQ/2SWHH/2AtcYUKdTvrtTrdoB6U2crhEeN54aydFk/r6ahnm8Vq49DY2K8w/HSJ64at6b1tOGK+1FE5Rl879IljdmU2wjOZKF4EEYJortxTDaUy4/MdiJ0FhN8RtdPjLK4RXvL/PvoVSPndFJd+Y8RcRepUtPqq3IFjG/SjUMzs1/svfizOXIXpgRJRx+XMw8ccSUMiM4OV2NElTQ7VD1CgPuFE21A3gJl1P8yT/6qRxU+UgFEh+R6S5nUN6Q4UtgWBF3YNzcPzZAF54rduPjki83XtvwZZepZLBwATwd46/VIszKpdTCnsA7B4W8TWlPnA6KTF5ZE3TBUgu8DzarZu67RHOuui0M0lL739A3kC0krlpKobBdKaHFce6WpacirzmwmK4NCw2FJxh352uWNjo5f6q6YUmRLrWbtwzWFSOINQig+6JNx5C17Bjj5ysxEKT2a0LhF1+CA4rIu/DMHiBZWa/H1UvpM/+puVIB9FPR6IMdDqrP0QpPHDoL3piaM7WHG6U9Z+LC9jDTejiEfLrlL1xWGq3ViQPKE/jcfi4zkFTjr19qDWllGyvT8JWNONxra/RNca3k06xHPUlWJmXb9Kcv5ohmv+OzVBCKxXgcQ9Hc7B+GThqp/UqQXNyzqGblZX2lMkcLHRef0GbSFozmPIZuU+KDF+WO/t9xQQdL0flBRRoa18Qb8ANkArsDcYuCbR+U0lzbpnlBOeALcCNxdsYEDRESbVsFwZw5sKRAoCaTMxKfVpbXj4QrD9l9G7HSpHddPMg2+UT7Nv0cqytJmXiCh90owIZbZ/CFOvGCFxapuE77++7Z1pz5sauN9jcFuFfUA4EExY=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Oct 24, 2022 at 12:58:54PM -0400, Tamas K Lengyel wrote:
> Currently the XEN_DOMCTL_get_vcpu_msrs is only capable of gathering a handful
> of predetermined vcpu MSRs. In our use-case gathering the vPMU MSRs by an
> external privileged tool is necessary, thus we extend the domctl to allow for
> querying for any guest MSRs. To remain compatible with the existing setup if
> no specific MSR is requested via the domctl the default list is returned.

I'm afraid I would benefit from some extra description about why you
need to introduce a separate hook instead of using the existing
do_rdmsr hook in arch_vpmu_ops (which is already hooked into
guest_rdmsr()).

Are the MSRs you are trying to fetch not accessible for the guest
itself to read?

It seems fragile to me to add such kind of hook to read MSRs that's
only used by XEN_DOMCTL_get_vcpu_msrs and not guest_rdmsr(), so it
would need some clear justification about why it's needed.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.