Re: [PATCH] xen/mem_sharing: support forks with active vPMU state

2022-07-20 Thread Jan Beulich
On 19.07.2022 19:18, Tamas K Lengyel wrote: > --- a/xen/arch/x86/include/asm/vpmu.h > +++ b/xen/arch/x86/include/asm/vpmu.h > @@ -40,6 +40,7 @@ > /* Arch specific operations shared by all vpmus */ > struct arch_vpmu_ops { > int (*initialise)(struct vcpu *v); > +int (*allocate_context)(st

Re: [PATCH] xen/mem_sharing: support forks with active vPMU state

2022-07-19 Thread Tamas K Lengyel
On Tue, Jul 19, 2022 at 2:23 PM Andrew Cooper wrote: > > On 19/07/2022 18:18, Tamas K Lengyel wrote: > > diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c > > index d2c03a1104..2b5d64a60d 100644 > > --- a/xen/arch/x86/cpu/vpmu.c > > +++ b/xen/arch/x86/cpu/vpmu.c > > @@ -529,6 +529,16

[PATCH] xen/mem_sharing: support forks with active vPMU state

2022-07-19 Thread Tamas K Lengyel
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