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

[PATCH v2 0/6] gnttab: add per-domain controls


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Wed, 22 Sep 2021 10:21:17 +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; bh=oiIt5T8yXl8QFjL3/Lj8D33A5BGL+AQDPrB2Sf4vjAM=; b=B6RQjBW8EzWBi71GSmsHhMQL45/yQWIxAxU/65A8CtEG+AplAa6t+DcJgvn4aEThkxu9EUYlyR2opO9s1/T/clgaC+Bpb6ks+V/sYiV995tzQIyF7IjrSnnMgn3HdpewRuU89u7cW0Mu1nGYnJneaUqSIuwxo5rAZEHj0oIEdP3WoqAHqdDMMsd1ePf9C85bDYacGsDSiaRIY3w65UuXbgVguV0kIYBrWI6Wqr9e5VX/NYKkCiijIC60y6lc8Bx3FMgtmc3r7Q6L05qWZGQOd/zRV53A0JYJ8m6T6nJeAcsM4NM6Yqfz/6BcPwHPaLcWh4Pv8FDQs44YPxa56jxTRQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pv7qv3PcoEO7ALpeRCQLQsCrbfndwXqaLmUr13iJncHUfGXDZ94skB4HbmDgCSNNs7Ya2LeCCK3TxOzeTc6iQAdGXDGoucDgkVLwlf1KoeOoJTrPmvy2ai16It+xYycGtPUOpTWqH1UsdHWaWMPZFvOAOZf5BigYGwT50hMXZ18qWklWSjhax8Yr7j5e/OvIVj4CnmyVU0phwV/d6fMGqvATqZLsf0VxsSwuGRbMoPqeBVK7S45zYRSYdT0ZskUgTGDav1qJOL8Pa7bY8dmr9y2evXOdbHjZKndCLdZXup7yWSTKkRW94r63qHP/8jCDZDV2XTpRIdNzem3Wy3sMdQ==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 22 Sep 2021 08:22:03 +0000
  • Ironport-data: A9a23:FgLS0qhpfd7Yws9D3KnjeTlcX1618BcKZh0ujC45NGQN5FlHY01je htvWW+DbP2CZDH8cognOoux/UgA6pfVy9RrTgFo/io9Q3gb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oAMKRCQ7InQLlbGILes1htZGEk0FU/NtTo5w7Rg2t8y24Dja++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPg/W+5PwZG8O4whlkeydx /1LsMOVYy5xBJfAic0xCBtBCGZxI7xZreqvzXiX6aR/zmXDenrohf5vEFs3LcsT/eMf7WNmr KJCbmpXN1ba2rzwkOnTpupE36zPKOHxO4wSoDd4xCzxBvc6W5HTBa7N4Le02R9t3Z8XRqqEN qL1bxI+NSqbPUcMIW5NI6sgmeOxqF/hcxpx/Qf9Sa0fvDGIkV0ZPKLWGNjaYN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P34jL iKQmKef1a9XwVDPciZrGHXAtQaHaU/iZPyeIIc+Gmm0
  • Ironport-hdrordr: A9a23:b3zhJ6zQitekjyh6jdPKKrPxyeskLtp133Aq2lEZdPULSKOlfp GV8MjziyWYtN9wYhAdcdDpAtjlfZq6z+8O3WBxB8bYYOCCggWVxe5ZnO3fKlHbak/DH41mpN hdmspFeaTN5DFB5K6QimnIcKdf/DDuytHVuQ609QYLcegFUdAE0+8vYTzrb3GeCTM2TqYRJd 653I5qtjCgcXMYYoCSAWQEZfHKo5numIj9aRALKhY74E3W5AnYpYLSIly95FMzQjlPybAt/S zslBH43Lyqt7WexgXH32HewpxKkJ/Ky8dFBuaLls8JQw+cwDqAVcBEYfmvrTo1qOag5BIDl8 TNmQ4pO4BJ53bYbgiO0G3Q8jil9Axrx27pyFeej3emi9f+XigGB81Igp8cWgfF6mI71esMnp 5j7ia8jd56HBnAlCPy65zjTBdxjHe5pnIkjKo6k2Ffa40Dc7VcxLZvs3+9KK1wXB4S1bpXU9 WHVKrnlbRrmBKhHjzkV1BUsZ2Rti9ZJGbCfqAA0vblpAS+0koJi3fxaaQk7wU9HakGOul5Dt L/Q9BVfYF1P74rhJ1GdZQ8qLOMexTwqDL3QSuvyAfcZek600ykke+D3Fxy3pDsRKA1
  • Ironport-sdr: bR8K0e9YEc+iFEspSZ1Tta/JqIvGPQAjMQi172goDltYNV1zO85CKckGdejIjigVVNfSvrInrs iMX/rapohJe7lAyGvYQ0Cpug+K0rdWZUv9o6n4RZ7o2AcAZbZLPgglDQuMRY9z+pKe6sg0NM4f xLE+BEyib29BugnCU6g46WutWQrod9L9lBMxpbW9iSEBXNKzGvio0+PX4IypGGr613SAFI/3E3 kd6JK6LA7McDC7zlKwx2xNM2D8ps1W4ejumixwJopXfoe95leH1lcKOnl727wIKivnNFziTxyH 2rNOVpmtZDsFa447xSbwCwS+
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hello,

First patch on the series is a trivial change to xenconsoled in order to
use xenforeignmemory stable library in order to map the shared console
ring instead of the unstable libxc interface. It's reviewed and ready to
go in.

Patches 2 and 3 allow setting the host wide command line `gnttab` option
on a per domain basis. That means selecting the max allowed grant table
version and whether transitive grants are allowed.

The last 3 patches attempt to implement support for creating guests
without a grant table. This requires some changes to xenstored in order
to partially support guests without a valid ring interface, as the lack
of grant table will prevent C xenstored from mapping the shared ring.
Note this is not an issue for Ocaml xenstored, as it still uses the
foreign memory interface to map the shared ring, and thus won't notice
the lack of grant table support on the domain.

Thanks, Roger.

Roger Pau Monne (6):
  tools/console: use xenforeigmemory to map console ring
  gnttab: allow setting max version per-domain
  gnttab: allow per-domain control over transitive grants
  tools/xenstored: use atexit to close interfaces
  tools/xenstored: partially handle domains without a shared ring
  gnttab: allow disabling grant table per-domain

 docs/man/xl.cfg.5.pod.in             |  12 +++
 docs/man/xl.conf.5.pod.in            |  14 +++
 tools/console/Makefile               |   4 +-
 tools/console/daemon/io.c            |  25 ++++--
 tools/helpers/init-xenstore-domain.c |   1 +
 tools/include/libxl.h                |  14 +++
 tools/libs/light/libxl_create.c      |   6 ++
 tools/libs/light/libxl_dm.c          |   2 +
 tools/libs/light/libxl_dom.c         |   2 +-
 tools/libs/light/libxl_types.idl     |   2 +
 tools/ocaml/libs/xc/xenctrl.ml       |   2 +
 tools/ocaml/libs/xc/xenctrl.mli      |   2 +
 tools/ocaml/libs/xc/xenctrl_stubs.c  |  12 ++-
 tools/xenstore/xenstored_core.h      |   2 +-
 tools/xenstore/xenstored_domain.c    |  91 ++++++++++----------
 tools/xenstore/xenstored_minios.c    |   4 +-
 tools/xl/xl.c                        |  15 ++++
 tools/xl/xl.h                        |   2 +
 tools/xl/xl_parse.c                  |  13 +++
 xen/arch/arm/domain_build.c          |   4 +
 xen/arch/x86/setup.c                 |   2 +
 xen/common/domain.c                  |   3 +-
 xen/common/grant_table.c             | 122 ++++++++++++++++++++++++++-
 xen/include/public/domctl.h          |  15 +++-
 xen/include/xen/grant_table.h        |   5 +-
 25 files changed, 310 insertions(+), 66 deletions(-)

-- 
2.33.0




 


Rackspace

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