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

Re: [Xen-devel] [PATCH V6] x86/altp2m: Hypercall to set altp2m view visibility


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Alexandru Stefan ISAILA <aisaila@xxxxxxxxxxxxxxx>
  • Date: Wed, 4 Mar 2020 14:12:17 +0000
  • Accept-language: en-US
  • 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=sSN5MLo2ll4Dx/95pBXvS5+84VH6LYfx+9081iDiWuw=; b=c48RrlHreNY1ipFgFcgPrB8mOyLgtzufmHnFS6SmuG+sy4BIpDtqvvHG4iRGb0LXV2hrJg5Db0Sx/k7qlx6dzXi6qZ9FyLrwMG31W4slgb/6M/LQ0mb37Onqw+S2V2ThjffWkFOpH4oMOT2Tw2p4MftlrhjG7i+5ILEfkemW86+CRuFzWPyxt2qg71HeAPici10OvXgEQhlDWQykZj2WDTrLz24uimuuSi6vrYlAB603ROw3mXN4jIDbGrYZf/42hcEROwbVgnJglfx0zgOIfXt+m4/s9hgiq2eUWCwaJBJsN66rJeSiqe+GrvOqB4EEusxgN0N8KOpmdkjfai9W0Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mquqQUH7J7MYey/ZjIF6x5pkP/572v6Hm29AGymnMzyR+A9pwFlxFCabFubC419iq2IOzDEz/TR3IkdDCHxDaxl5U7rsvyB5/0Z522w8MgJehCc/hRVnr4vndJwK3LFSG6snO2E7f00gn8aBxCQyG0pecGrPAhzF7SnO5Pr9aSwTCH0OKW6FXnKp2jibyOoai1uRnFuby2Fr0xZsV8/FVmb4ROlPFvdNb2lz6D2IT3t8mEvDiz9UZd81VMuPdsfmxlcNs22681v697vmEp9FJkgoxkW7khvDuQFTDbgagJNi8tsjqzuAiiPa2Qd/Y+gZbtscqIO4CVDsOCKMbScxzw==
  • 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" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 04 Mar 2020 14:12:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHV8VaFWzT4PZYI70qii0UzQw6fbqg4mImA///hSYCAAAFRAA==
  • Thread-topic: [PATCH V6] x86/altp2m: Hypercall to set altp2m view visibility


On 04.03.2020 16:07, Jan Beulich wrote:
> On 04.03.2020 14:57, Alexandru Stefan ISAILA wrote:
>> Hi George,
>>
>> This is a kind reminder if you can take a look at this patch when you
>> have the time.
> 
> Are you perhaps not aware of the recent maintainer change on
> xen/arch/x86/mm/? What you need to go hunt is ...
> 
>> On 03.03.2020 14:23, Alexandru Stefan 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().
>>>
>>> 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>
>>> ---
>>> CC: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
>>> CC: Wei Liu <wl@xxxxxxx>
>>> CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>>> CC: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
>>> CC: Jan Beulich <jbeulich@xxxxxxxx>
>>> CC: Julien Grall <julien@xxxxxxx>
>>> CC: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
>>> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>>> CC: "Roger Pau Monné" <roger.pau@xxxxxxxxxx>
>>> CC: Jun Nakajima <jun.nakajima@xxxxxxxxx>
>>> CC: Kevin Tian <kevin.tian@xxxxxxxxx>
>>> ---
>>> Changes since V5:
>>>     - Change idx type from uint16_t to unsigned int
>>>     - Add rc var and dropped the err return from p2m_get_suppress_ve().
>>>
>>> Changes since V4:
>>>     - Move p2m specific things from hvm to p2m.c
>>>     - Add comment for altp2m_idx bounds check
>>>     - Add altp2m_list_lock/unlock().
>>>
>>> Changes since V3:
>>>     - Change var name form altp2m_idx to idx to shorten line length
>>>     - Add bounds check for idx
>>>     - Update commit message
>>>     - Add comment in xenctrl.h.
>>>
>>> Changes since V2:
>>>     - Drop hap_enabled() check
>>>     - Reduce the indentation depth in hvm.c
>>>     - Fix assignment indentation
>>>     - Drop pad2.
>>>
>>> Changes since V1:
>>>     - Drop double view from title.
>>> ---
>>>    tools/libxc/include/xenctrl.h   |  7 +++++++
>>>    tools/libxc/xc_altp2m.c         | 24 +++++++++++++++++++++++
> 
> ... a tool stack ack and ...
> 
>>>    xen/arch/x86/hvm/hvm.c          | 14 ++++++++++++++
>>>    xen/arch/x86/hvm/vmx/vmx.c      |  2 +-
> 
> ... and a VMX one, also for ...
> 
>>>    xen/arch/x86/mm/hap/hap.c       | 15 +++++++++++++++
>>>    xen/arch/x86/mm/p2m-ept.c       |  1 +
> 
> ... this.
> 

Ok, tanks for this, I just saw the changes on the maintainers.

Alex

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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