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

Re: About support for memory event on AMD CPUs


  • To: YAN Untitled <yanluyi2010@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 24 Nov 2021 08:54:03 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=V+13BCXAyNHYs2Ox/WODnL1ZpDDuEqkFxsUTr0ND1E8=; b=UfyX8ZIYHC50yVEcRP9QnG//9AbfnR7UzOdULi8YYmPVw+AjfMr8q8vJD3x9S1SF1OC5cZh2WIq+bmUunOcv0P+fbqphQyerBkS/Stji2IvQwiZLxckJKqUD3ipcZd+Pvn4CRzB7Pmc9qB6qofBl3EvHAdYwNdETsS23T3aOh7EAHGZ2sz8iY769vKnKTFDn8QS2wk0aOtNpRFDEVm4t5G/5AYsm3aCdqaKxeIHThslGqYTlQbLEJpFFL1Ts/IpasNM93WMdlFOnoEFNuMObp+LEHhg/TGY2d/SYR1SnRYN3N6hA0zl6gYAl1XFpQuDNWgTL7XLiKRcsl5MhwSSE1A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dmpDw1D94v9Jq5nX4M8nsu6kWDso/Gglh2k1ijGfa+rgGMEmxfZNISKv1OBKEf3BjphZx2OX1psPTbNJa3pT11wHDDXiBKErUrHrPekifXuiP4RSRqRCaPR52Yi+mRDelyOuKNyQRSqRweePNILc7ZPEI5NhFuZ4U1UM+qlwE/tYfu3tkk2Ug1f0lQB+y7bPvgTtIHXdv8ISKWk1IIDQ0c2EoFKG1/6sUUSlxzURr/q+eaWSSeygeDIPCHY5LIe5suAVY5mbvQOyKJl0fmb44LyL8gp3KHVZJxGgQDA/pGADxRUxTo0asWZsONmXikO/q7obsH1QQkyl/I0MxhWh9A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "tamas@xxxxxxxxxxxxx" <tamas@xxxxxxxxxxxxx>, "aisaila@xxxxxxxxxxxxxxx" <aisaila@xxxxxxxxxxxxxxx>, "ppircalabu@xxxxxxxxxxxxxxx" <ppircalabu@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 24 Nov 2021 07:54:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23.11.2021 18:14, YAN Untitled wrote:
> Dear developers,
> 
> Short version: is memory event supported on AMD CPUs or is it going to be
> supported?
> 
> Long version:
> 
> Environment: LibVMI 0.15.0 + Xen 4.14.3 on an **AMD CPU** (5950x), 64-bit
> Debian 11 Dom0.
> 
> What I am trying to accomplish: register a **memory event** handler, so that
> I can capture all memory accesses within a specific range issued by any 
> thread,
> or all memory accesses within any range issued by a specific thread.
> 
> What I got instead: an error from LibVMI saying
> "xc_hvm_set_mem_access failed with code: -1".
> 
> Some investigation: by inspecting the source code of LibVMI, I find the direct
> cause is one of the libxc functions, 1) xc_set_mem_access or
> 2) xc_altp2m_set_mem_access, returned error code -1.
> 
> After some searching, I found someone else having a similar problem [1]. I 
> also
> noted LibVMI says:
> 
>> Currently only the Xen Hypervisor provides these features,
>> and some of these are specifically only available on Intel CPUs
> 
> However, I can't find the exact confirmation for the availability of memory
> event on AMD CPUs from https://wiki.xenproject.org.

Aiui underlying what you want is altp2m, which presently depends (in
the hypervisor) on EPT being available (and in use for the guest in
question).

Jan




 


Rackspace

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