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

Re: [PATCH] x86/PoD: defer nested P2M flushes


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 19 Oct 2021 12:41:59 +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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OsSP6w4/vLwWBbNDsKZIpXxgQHZkdvA5hsZ6H5bVsxg=; b=BM2oS1pEgeUdhJ6hea5y/4XamGRZv2rLftY8PlLLvLVLH20ZijZBC+AjLsgNXRvbReBJszce4tEht4VmlwcjSnTq+iNolFckqR11RtfVaX7ZV9AQ4A6g/jEA5l1DqHoHRxmeSgZBsIhiDS2Z3kOOmK2NvhQt4f3plsnJuf2lvlaCiMKK0EzeytHQtHKuC0mZbNZyogeivW1RjHp+OssbpcSo77x7peh5fHOM1sayWsDvOgxnuzsajI5ltVLoml6r6lVFmK0Sig0SMsm8W7b/V1Ot6uY/3xaTKogBaNfeOdtVPyKf+pBQqf7LNQnbesc4xmzKJpPmCCQnOEVSSdZXcg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CGHVDf5XsFseNvF12fl0q00RvpsXojIRG4J0/YJMVzPA/SSPp0yJpjcd/+JrKYBtOxE4bQkrS68IV551cWCRXiUeJYWQIjbmK0/peNxHYvAGnb8cyF9JOwaxoiZfwo+eY+qVcMQ5ptmDgfKg2cEmdlyw2Gm4TZm2JOU2m1m7gA9ufwdIKuN2dyTkUy1OgNqp/V4gDtEcLjeqzaphnK8dxsLdstyXbC+Z+vQp0lho6OwywvDZOZCQO0PC66nmX3RuA0w69fPkiHso2TqlDFX8pYl8r4sqYhEufWdRjTokiHlZMJ3HklaSO9asDl2keJbRW+TckPFnnHaKuTRhqpNvoA==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>
  • Delivery-date: Tue, 19 Oct 2021 10:42:16 +0000
  • Ironport-data: A9a23:Kd0ekqolastKipLULt9xcZBZMoReBmLMYhIvgKrLsJaIsI4StFCzt garIBnQa6veZWChLdp+a9y19RsBsMTczN5jTFZqqC5gFCsapJuZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlZT4vE2xbuKU5NTsY0idfic5Dnd84f5fs7Rh2Ncx2YHoW1nlV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx/9 DlCnbCQb1xwDJTIpP0iTjtiFjx0G5xc25aSdBBTseTLp6HHW37lwvEoB0AqJ4wIvO1wBAmi9 9RBdmpLNErawbvrnvTrEYGAhex6RCXvFJkYtXx6iynQEN4tQIzZQrWM7thdtNs1rp0TRaaEP ZNGAdZpRAjmTDweNHANNI1kluGTtEPuWRd0r03A8MLb5ECMlVcsgdABKuH9atGMAMlYgEucj mbH5HjiRAEXMsSFzjiI+W7qgfXA9Qv5Uo8PELyz9tZxnUaegGcUDXUruUCT+KfjzBTkApQGd hJSqnFGQbUOGFKDYvnbBESKmXq4pyEBeeBVDucc2Ruu4/+Bi+qGPVQsQjlEYd0gkcY5Qz02y 1O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CKZsQlDuRYjzrY3GeLzM2fKbReq Dsgfau8FGbCAoqh4mAdzU4dtmGg+eOuIPtYBYACRJiwA6SjQmw4Lq/NxSDxB8RXx5G3L9nqA H+4kLEz5Tml8v+5g7X1mfV4ZgTsNz9yuFbDMjJrsQOMD3jhiuheYwkcbyfuzIepv2p9T8R4Z bxiiZlG/42x2Laf2mzrxeo8w780Aw243un8lOciWuLm72zeBsKT+56wa5JeBrQ7EQt+Ptm1r hQ4m6fv51LSTvdgSXU/bHzJlJXv3vxhUBnvf8YjnRZX4dbQqRWt5Yj8ERcF4pFND7m6bogDP JlAKjnlbZrmGuhHjXkV1RUsZiRtixZJGbAfqFCgL3V79FupgE686NCr/Zv2Evp9/oGOtF5Dq r/Q/1VfBwndL5gUUtHPpZ1fSKAMB2Fffv9ChPhHb3ZLtByB5vske+83Fxn3pDmRHQ3pKFC7q gpFmko7VIPRw==
  • Ironport-sdr: Mc2dfLteMG8BdqlyW3WA2KDOrHmOwrxl9v0Q1nXjIYIEyWJkHFMqA52lxxOVCVVJcsia8qA0GD +pDo8ozDOk/JYbAdZJyAVLajp7jplJrp70GdB9oBTt/KMYuA8KmM0f36AYQewq1GAucfGQLNbQ 9PyH4b5dvaMM3sWOi26sTPZlP5oLculR/mf1C9ALOvf5Y8XsaW8ZmuSDJrWcssXvoEmvBWHiOu jkG+ynHggfHzigJoZTkt6V8H1Hj5VLJCF5D6T1abrqJR0E49RSuuGvGwQiduHR6UkDqLF21/yU gG39LXSbprL/wvc6b+BvNjYD
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Oct 11, 2021 at 10:17:08AM +0200, Jan Beulich wrote:
> With NPT or shadow in use, the p2m_set_entry() -> p2m_pt_set_entry() ->
> write_p2m_entry() -> p2m_flush_nestedp2m() call sequence triggers a lock
> order violation when the PoD lock is held around it. Hence such flushing
> needs to be deferred. Steal the approach from p2m_change_type_range().
> 
> Similarly for EPT I think ept_set_entry() -> ept_sync_domain() ->
> ept_sync_domain_prepare() -> p2m_flush_nestedp2m() is affected.

I'm slightly worried by this path because it doesn't seem to
acknowledge defer_nested_flush. Maybe the flag should be checked by
p2m_flush_nestedp2m instead of leaving it to the callers?

Thanks, Roger.



 


Rackspace

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