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

Re: [PATCH V7] x86/altp2m: Hypercall to set altp2m view visibility


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Isaila Alexandru <aisaila@xxxxxxxxxxxxxxx>
  • Date: Tue, 31 Mar 2020 10:54:41 +0300
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bitdefender.com; dmarc=pass action=none header.from=bitdefender.com; dkim=pass header.d=bitdefender.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-SenderADCheck; bh=qExz6318edWaypeGJ2/8X9CWVznrcS+O68lfdBry1nw=; b=FMb8FHTxTarWUQAlMrQ1kD//wBHTcDSYFSn2Mm4IVt/t4XCYw+mWYpVMA1c5Ozbh4b8b8SxyaIT5q3NHQHGh5+tHvdAcfIddT74OfCc6D+fQQkCY7Xjfe0BlOvyp/O7xxTMsQOKXLm1c1ITrZ9OO2+LtQhLFHmd3lwNUbqvwQpe53GccKXAstkHHkZNaXo5USvDga0nKRrEywivxFenjHu06sILct2yrAr4kV8xQx7QSHuWe9xfJnJEmO1RMTfUm7+3NwVOZLclLncKHMGDaRYKfRZ16AQwQu8ckPKeqARYm5k3Qm7f023AUzz6BHJmtaHzkpBCmA8kidfYX+J442Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KtGvgICZAmB6ZkrAPPo7L2WUzDLKksrWJklDBc4DKqB4SeZ3Z5H8n1oE5ToxzNgX8sFKKxr6zbUvl/CqnpghyVXpr7nsIjdBbXQnI8eIzs775wHlQqVlxw6rIAN6M9dxxBsxArA2NkiIQViZl0XWT7t544feJRpN+22jvvSO15sbSKucyEEI9R5l1xfUJAOEuV2982Ojiz/Qi+kKiLiGyRR9H09ARuFAts+jM6+rxhfEJrCdBzdSQO3rpyDP2MiwRBGmiIi8xe7sz2VliGkBPmaA+GWEKzg/C2vYUI++oXAQs9siD0tjbZr173oewgfVs7VvLMA5kUF7bQk7qAtCfg==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisaila@xxxxxxxxxxxxxxx;
  • Cc: Kevin Tian <kevin.tian@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 31 Mar 2020 07:54:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>



On 31.03.2020 10:43, Jan Beulich wrote:
On 30.03.2020 08:54, Alexandru Isaila wrote:
At this moment a guest can call vmfunc to change the altp2m view. This
should be limited in order to avoid any unwanted view switch.

The new xc_altp2m_set_visibility() solves this by making views invisible
to vmfunc.
This is done by having a separate arch.altp2m_working_eptp that is
populated and made invalid in the same places as altp2m_eptp. This is
written to EPTP_LIST_ADDR.
The views are made in/visible by marking them with INVALID_MFN or
copying them back from altp2m_eptp.
To have consistency the visibility also applies to
p2m_switch_domain_altp2m_by_id().

The usage of this hypercall is aimed at dom0 having a logic with a number of 
views
created and at some time there is a need to be sure that only some of the views
can be switched, saving the rest and making them visible when the time
is right.

Note: If altp2m mode is set to mixed the guest is able to change the view
visibility and then call vmfunc.

Signed-off-by: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>

For v6 I did provide a hypervisor side R-b; I didn't think ...

No you didn't.


Changes since V6:
        - Update commit message.

... this alone would have warranted to drop it?

I don't think so and if you provide a r-b now I will add it if it will be a need for another version (if nothing big changes).

Thanks,
Alex



 


Rackspace

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