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

Re: [PATCH 2/2] x86/P2M: allow 2M superpage use for shadowed guests


  • To: George Dunlap <George.Dunlap@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 27 Jun 2022 08:33:05 +0200
  • 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=IElnXK9yk4XopBOwXyX7Ws22fw+Sa0TUazo8zYsenRQ=; b=VYiTHeoq+GCIIIwGomjnH2fPf9J/DggYI5NlzpPgHD3vRf5vqdQsT/jC5w7vZe2VPwWPWdQ2FuDSvgJFJRan3/d6GFhbh+h8oyTDu9tUbTCEmF/ZlByuGfiksGKBsAqGkE4H6xDxqm3/z9L0LhWFApc0pX5Z5W8JFC06g97tnagjPEPk2SRatRLy3ZWqFz3goshAdpxDSHUdFet0kJS9w58rhE7yKwaVHHnTrVdWazH6cygYlAftfzY9Mn9KfUeYGmPJC/XPM7L2yYwu/j8d+031+zsao+vLqob20vyfGBNed9pqYUNBV1P3Sk/73Jfwug6yDnNOOHWU4/sDax1zsg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i3tgBz1inbnn/76dkjYMwZjwtmst7faan2l56WDfe2b3rxKaJ57K46tI6JpxkBT/lzLD3kgb06QHj+9SDA0QQyHy2lEKJ4HB4EPF47V4IkjHlmOdCvKlBebIRCgktgIUTuuVrXodYDpLsvBf4IIn4+y1R72szL80DW7DKSwIqTNosiKnwp82MMWxy1cq2WP5gz7+JxhGNIeTLLgO26XgfdBjwxfjhIzUejlmR+3PZB778ud0xPMqgJavYtRQakPbmiviTSF2ffL589MVcDULyIWEGUFYoRU30qP2+gDI5N4+xCd1pacTFm2cn3e0ZuQ+asgV8h5+7VI50wNv2/0VxA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, "Tim (Xen.org)" <tim@xxxxxxx>
  • Delivery-date: Mon, 27 Jun 2022 06:33:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.06.2022 21:27, George Dunlap wrote:
> 
> 
>> On 9 Dec 2021, at 11:27, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>
>> For guests in shadow mode the P2M table gets used only by software. The
>> only place where it matters whether superpages in the P2M can be dealt
>> with is sh_unshadow_for_p2m_change().
> 
> It’s easy to verify that this patch is doing what it claims to do; but 
> whether it’s correct or not depends on the veracity of this claim here.  
> Rather than me having to duplicate whatever work you did to come to this 
> conclusion, can you briefly explain why it’s true in a way that I can easily 
> verify?

Would

"The table is never made accessible by hardware for address translation,
 and the only checks of _PAGE_PSE in P2M entries in shadow code are in
 this function (all others are against guest page table entries)."

look sufficient to you?

> e.g., all other accesses to the p2m in the shadow code are via 
> get_gfn_[something](), which (because it’s in the p2m code) handles p2m 
> superpages correctly?

Well, yes - I don't think I need to reason about generic P2M code being
super-page aware?

Jan



 


Rackspace

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