[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>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Wed, 26 Oct 2022 11:05:54 +0000
  • Accept-language: en-GB, en-US
  • 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=OjkB2EtK+PgSY0hM7qYybrQOJJaKiOjzfOJG+aTe394=; b=RnNKIueynBlvTLHvgyuIWlebfpAE8TDGHFFPlKXnskc/jMvt8A4fvXirqrMNjMAIDTpJmmAdWcoQsvrDo9//wmF+fN/wOY13Rz2ZPzIR/6d5PqW/Uie1mHTb5m6LMAs+8U3tlw6G2zp4/vw4AO4cutX5gbLb7Q5S0oBqfu4UJ3VZSloIVY9HGcH0MhRCspEBa7iIGuY2TXi7RNM9Ygg0eU7HC4oOCaIR6m2C8wj8RNVLP1IJJDc6wH+/Hx16LC6YmxNMOZpcK73dxyzrHwv61t9CAdpWCkIh7rA3+R1P+Le9Jc8W+oi/hC1FsZAGz27LuKmf5iFscKAFXam/W1asxQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EZbESgHOuaNSly0dbqYI6CA5vNnV1Cpf38oup0S+sac9fI8LbnFN8nw4JTyqo+Km1ViH0beMQ6J6dhf4rC9BWeNIL4g+rAU9lFqPlwpuliQOjPhb67SIN4jeP5yw1Q/kO1nl6llTJm+DJwrISX9zk16fv5gw0x+TXcPXB75CZ4Tdoyr+2xFfF6nTX+GWgBkE3YPfxRYm8lZgjFbOOkQXl3Go7MP16tEGmgq91aiEXHgaQS63YuaRMu0W/czNynAedLt9ah1uGCEI+XaMU6GuLXpmvsN9YVRh1U6ReymRtPTylqbeOerBvfoa6eI593woLwPyn+M7sAiv4OwY72ccwA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Wed, 26 Oct 2022 11:06:18 +0000
  • Ironport-data: A9a23:QkQB7aKBErOpQeUDFE+RL5QlxSXFcZb7ZxGr2PjKsXjdYENS0mMFy mYWXTqGOfmMNDamet0lPNjl8BsPsZHVmN9rTQVlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/vOHtIQMcacUghpXwhoVSw9vhxqnu89k+ZAjMOwRgiAo rsemeWGULOe82MyYz98B56r8ks15q2q4m1A5zTSWNgQ1LPgvyhNZH4gDfnZw0vQGuF8AuO8T uDf+7C1lkuxE8AFU47Nfh7TKyXmc5aKVeS8oiM+t5uK23CukhcawKcjXMfwXG8M49m/c3Kd/ /0W3XC4YV9B0qQhA43xWTEAe811FfUuFLMqvRFTGCFcpqHLWyKE/hlgMK05FaoJ5e1NIzlrz NdGFC8HSBeinubmma3uH4GAhux7RCXqFKU2nyg6iBv/XbMhS52FRLjW79hF2jt2ntpJAfvVe 8seb3xocQjEZBpMfFwQDfrSns/x3iW5L2Ie9Q/T/PVpi4TQ5FUZPLz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w+zvngehTPYd228LAu23FQgMyNeJP7dSueVVspj8ys5/0CH8yzYY fHBK5r
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHY58oHJ6gDkVUXak23gaU3RLT7hK4ghkAA
  • Thread-topic: [PATCH] xen/x86: Make XEN_DOMCTL_get_vcpu_msrs more configurable

On 24/10/2022 17:58, 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.
>
> Signed-off-by: Tamas K Lengyel <tamas.lengyel@xxxxxxxxx>

Naming aside, XEN_DOMCTL_{get,set}_vcpu_msrs is supposed to be "get me
all MSRs needed to migrate a vCPU".  (I do intend to retire the
hypercall as part of fixing the Xen side of migration, but that's ages away)

It seems like what you want is something more like
XEN_DOMCTL_{rd,wr}msr_list  (convenient timing, given the recent ISE
update).  I think those would be better as a separate pair of
hypercalls, rather than trying to repurpose an existing hypercall.


As for actually getting the values, please fix up guest_{rd,wr}msr() to
access the perf MSRs safely.  I know the vpmu MSR handling is in a
tragic state, but this new get_msr subop is making the problem even more
tangled.

~Andrew

 


Rackspace

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