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

Re: [XEN PATCH v1 1/1] x86/domctl: add gva_to_gfn command


  • To: Ковалёв Сергей <valor@xxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 20 Mar 2023 19:33:52 +0000
  • 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=wMr/9WMDlsPA5t1KEY7ZQGsJwyaalNilTtd8N1Kuf3o=; b=ZGckpRpcyX+QMytjTt881EVUYLSEeBXzcrNivpTe76LrZOnhh4QE9K2fhA1/CwBPg4/PcRO/MCLFSCwq9PbJuZmaepcNFXLyVgFYBNXYrFTraQhBk6pDHuybo6wfDqhIDlXFNWTQaGBPoW4+ydFoa6vfqfGBdwGNdBujpB0/8LniKYXvNCDtDcYkWNpYIVFQ35SrBMCZJsZ1QR7bLfg6ARegyW8HE2IpX9Z2J8JPIdHSwBrBCSLFTY3AV9FdOk9vPyFLOTMA6wf+gidCEPpagjVWKLhH96Ltr3cGJEV9EXrSUMIlqNMF1o1TaBJAlmq5n7D1nQL+yj2nXcBEeB4btA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m8zZYe/DkHhkoKp/XHJJckWxIExGKPFtD9OT6BjG7qbVJeLK/Ee/ZerCMk9y/aNp6SPQRPYEYPxmfFPF4sUVwuFcSYkXltY9GJBSGpfjsFrEPP8NWXcnQFeLQ/TTMKXH8HUsipgKTl6rAWTT9C/05HbaGxW6LmmcXvADGiTkYAM+fUlEKSKPl3CCqxbcLEi68cOnhK2v0BaNvqGtPZ5uWFtQdy5vFVgtPxcx6gGyvjgNwdwvxxbc1q+RjMNG8mYTvFc2TF9O1Xex55LdZlUFJdlSfVBet8MqwxONl3AgeMH8tHMVezR6COYUi3mPHkY5AfOZK9X5kP4QNFZ+TaavKg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Dmitry Isaykin <isaikin-dmitry@xxxxxxxxx>
  • Delivery-date: Mon, 20 Mar 2023 19:34:24 +0000
  • Ironport-data: A9a23:TYTb1K6Nttda8YYcdfC5YAxRtLPGchMFZxGqfqrLsTDasY5as4F+v jEYDWzQb6rcZmfyf91xOY+28ElT6JaHxoJkQFA9ri0wHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraCYnsrLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+7JwehBtC5gZlPasR5AeH/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m5 /lAFCsQSja/rt2V7e/ndMkyoeUNFZy+VG8fkikIITDxK98DGcqGaYOToNhS0XE3m9xEGuvYa 4wBcz1zYR/cYhpJfFAKFJY5m+TujX76G9FagAvN+exrvC6OlUotiNABM/KMEjCObexTklyVu STt+G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VklDiGI0c0XyTeWTwZxw9AzXSmnVZ0Wt9ihn3ek6hlTAfsuvDcXaI2pe1/dI4s9vTPEzYs zDe66/WJTYXCzT8YUg5XyLZ3AdEwhZbCQvgKdJZ7u/mLO7FmTUjJ2qTB/yHsuaLd92YBK3Pl IzGB7OGe5n0meHHlfFvTm5YQKZRqW4x+M+LJTn
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 20/03/2023 7:22 pm, Ковалёв Сергей wrote:
>
> 21.03.2023 1:51, Tamas K Lengyel wrote:
>> On Mon, Mar 20, 2023 at 12:32 PM Ковалёв Сергей <valor@xxxxxxx
>> <mailto:valor@xxxxxxx>> wrote:
>>  >
>>  > gva_to_gfn command used for fast address translation in LibVMI
>> project.
>>  > With such a command it is possible to perform address translation in
>>  > single call instead of series of queries to get every page table.
>>
>> You have a couple assumptions here:
>>   - Xen will always have a direct map of the entire guest memory -
>> there are already plans to move away from that. Without that this
>> approach won't have any advantage over doing the same mapping by LibVMI
>
> Thanks! I didn't know about the plan.

To be clear, "not mapping the guest by default" is for speculative
safety/hardening reasons.

Xen will always need to be capable of mapping arbitrary parts of the
guest, even if only transiently, so there's no relevant interaction with
this new proposed hypercall.


The truth is that Xen will always be able to do a single pagewalk faster
than libvmi can do it (via mappings, or otherwise), but if libvmi does
properly maintain a cache of mappings then it will be faster that
repeated hypercalls into Xen.  Where the split lies depends heavily on
the libvmi workload.

I don't see a problem in principle with a hypercall like this - it is
"just" a performance optimisation over capabilities that libvmi already
has - but the version presented here is overly simplistic.

~Andrew



 


Rackspace

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