[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] xen/mem_sharing: support forks with active vPMU state
- To: Tamas K Lengyel <tamas.lengyel@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Thu, 21 Jul 2022 15:15:54 +0000
- Accept-language: en-GB, en-US
- 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=ytzgrtUFFx3LKktpPwq4XSpiq6w8QlT5XznI9x0gHYM=; b=NJxo1LvxxM0RXvY3JCv+ZBEUZKfFJdypCqOrWioqNufLgTFg/udR94+UcWHHh1PmJCJoWu2ord8Q8RO3koszBAJInYqNzlv7Su87KPxxMzjD4d2wvYxwRFVxHFaZsqN4QpRdv8uNsHgcArzUaPMfBl1PHuwIbtJOkYP6T5Uie8NPF+VzRtCglHd8fElcWGoOs5w4J1JQcQz5Yz3du5Og/bK+ioBvzjvbGqz3fMZv7mnXqDh7BVkwuFSNNYlTs/w6GK92wx9ZfHqysI6L22EskwUXeRuak/jO2xdjh0ZD6rLnL8RTiwj50GsD1NCCPBMIpapVPBOrCl+eRDwMQHfQFw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X+OuQQH48OQA5KoX1S3L1+2p/E8GCAk6QTQ3SIzPSXTzESeoUkKwG086SFaKVzcAJS8rE2igxACv4qK8oQjGtphJWJ/3r6c/VyVQn9vA3zHpI4r97bfjeTsPJyp155VNumyWXJVJX4k/8KULy6i1K5iFHZv+ZonkmrmrellsR4pnGQb4SBMoAZ8/2/QTXBOsktiBX3j7cydhY0kAOx+afHg7emcUEgKhmPuSsxR+stXV3uuYOdvi3r0+u7CrLHgfwTeJTQuaLUGPOb3eHaJebY8+e+iL0EMioGaIaJmjhQJzxbDZCXeQHpnn9rzHmUgZ2jQTHxyIUY3aH739P1iTDA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>
- Delivery-date: Thu, 21 Jul 2022 15:16:18 +0000
- Ironport-data: A9a23:iIwHv6mmA4Nh/Y3PwQz05hLo5gxzJ0RdPkR7XQ2eYbSJt1+Wr1Gzt xIWCGiGOv6LN2SkKNAlYI3j/BwH65HVy9RhQFE/pCoyQyMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8mk/ngqoPUUIbsIjp2SRJvVBAvgBdin/9RqoNziJ2yDhjlV ena+qUzA3f4nW8vWo4ow/jb8kk3466r4GhwUmEWPpingnePzxH5M7pHTU2BByOQapVZGOe8W 9HCwNmRlo8O105wYj8Nuu+TnnwiGtY+DyDX4pZlc/HKbix5jj4zys4G2M80Mi+7vdkrc+dZk 72hvbToIesg0zaldO41C3G0GAkmVUFKFSOuzdFSfqV/wmWfG0YAzcmCA2kPY5QB8OErWVpX3 t8qGG1RUxOllrq5lefTpulE3qzPLeHNFaZH4DRK62icCvwrB5feX6/N+NlUmi8qgdxDFurfY MxfbidzaBPHYFtEPVJ/5JAWxb/0wCWgNWAB7g7MzUY0yzG7IAhZ+b7hKtfKPPeNQt1YhB2wr WPa5WXpRBodMbRzzBLaryz22b+Sx0sXXqo5ToG5z/1b3Wa633cCFEQQTgPigsWm3xvWt9V3b hZ8FjAVhbQ78UWwCN3wWRKprXqsvxgAVt4WGOo/gCmdx6yR7wuHC2wsSj9adMdgpMIwXSYt1 FKCg5XuHzMHmL+fRG+Z97yUhSivIiVTJmgHDQcbSSMV7t+lp5s85jrNU9AlFqe2h9/0HDjYw jaWoSx4jLIW5eYI2ru6+xbbgjuqjpnPUgMxoA7QWwqN8gp8bZWNe4+s5F7U/PtEao2eSzG8U GMsnsGf6KUEC8iLnSnVH+EVRun1vrCCLSHWhkNpE9857TOx9nW/fIdWpjZjOENuNcVCcjjsC KPOhT5sCFZoFCPCRcdKj0iZUqzGEYCI+QzZa83p
- Ironport-hdrordr: A9a23:Xc+6nK6i4rMv77nyXwPXwA7XdLJyesId70hD6qkQc3Fom62j5q STdZEgvyMc5wx/ZJhNo7690cq7MBbhHPxOkOos1N6ZNWGLhILPFuBfBOPZqAEIcBeOlNK1u5 0BT0B/YueAcGRSvILBzySTV/wb57C8gceVbeW19QYQcem9AZsQkDuQCWygYzNLrBEtP+teKH IFjPA33QZJfx4sH72G7ilsZZm6mzXT/qiWGiI7Ow==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYnRAaaj668bQ3XUia6H9jz2csv62I72oA
- Thread-topic: [PATCH v3] xen/mem_sharing: support forks with active vPMU state
On 21/07/2022 15:42, Tamas K Lengyel wrote:
> Currently the vPMU state from a parent isn't copied to VM forks. To enable the
> vPMU state to be copied to a fork VM we export certain vPMU functions. First,
> the vPMU context needs to be allocated for the fork if the parent has one. For
> this we introduce vpmu->allocate_context, which has previously only been
> called
> when the guest enables the PMU on itself. Furthermore, we export
> vpmu_save_force so that the PMU context can be saved on-demand even if no
> context switch took place on the parent's CPU yet. Additionally, we make sure
> all relevant configuration MSRs are saved in the vPMU context so the copy is
> complete and the fork starts with the same PMU config as the parent.
>
> Signed-off-by: Tamas K Lengyel <tamas.lengyel@xxxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
|