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

RE: [PATCH v7 09/10] xen/vmtrace: support for VM forks


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "Cooper, Andrew" <andrew.cooper3@xxxxxxxxxx>
  • From: "Lengyel, Tamas" <tamas.lengyel@xxxxxxxxx>
  • Date: Wed, 27 Jan 2021 15:50:14 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.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=V9HHAh6ojlVjED0Te85UW1lbI+VOlltjCHiVrr/iPPQ=; b=VETXsV2TFRNQN3GHJpGb2QP4B1gB1vcA9NvdXM6pg1yXoHyoFPnWgOWitytG6L16w4K43UBzwz+z2gNvJH36Dz4p8t9kkDfVT9KQ7PsE+Ux8GNIr3LbHIgY3Qm9qfPN1/JriegCiM2KMA4RP5ww12DRMZdC+AbyyhAfa7RjS+pT+u1ZKiVLsk9t9CPykRuDVNbsHg06Us+xxF8ZwsVsk/IbPM/BooKt0K/v8JPHVmV22u7uCiJxCm7/egymwv+RjmmP8+e26gy1rNfh3a/nXek5zq81TxnWcbcH5Zz+K3djjVaVFcu2YvuH4o9Tf6IEwZj63hJ/TEfj5wPXz2V/rLA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ah32GRtCgtRIZebG+VQZZlxe/9xJL2rE8pyKyZ9UtDLnfhg6/YfmZpcCLOCw1qd0XHPJQBoWvA8pvMoh5o4X30lOKjBTdcYIzFLdMzgDeLCOfXOteYCoybZ+PLqt689SAdaS9ZHBXT6Nn0vbAno/Z8JxtfiQnqtRECoVTYBTNlpUkrnqUkTv3sbBmsCcREFOwclA9VWOTgsija1r8ZDeX8A587ieq2IvqI/fGtWxB3Pk8rFxQmfzhXlaruE5vU02aHZD3g4SIW8gZDUPoNfxmp9yqTkE9XXJIRA1gx5op14BJ2rGzCkTCR9NcZ483EPGWa+QhKEpheS2XvpCJoynsw==
  • Authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=intel.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>, Michał Leszczyński <michal.leszczynski@xxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 27 Jan 2021 15:50:27 +0000
  • Dlp-product: dlpe-windows
  • Dlp-reaction: no-action
  • Dlp-version: 11.6.0.76
  • Ironport-sdr: ptSAkcvFdRoRjBZEqQPMhdmjQJa9h1dHl8z7b2ec9DDHWjdZeaXtE0Pa7TR5WhTfwSp9hRGTcQ qVc3ZMIrYAgw==
  • Ironport-sdr: EEMkQIVvn63AaPn2B2JijmjPZBYE3ShJ38MHfPiDWUWfl8lDMEfG3d/oP4Go4ntlV2+rkxX18a lHAzOPYqGnNA==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHW8DxTbgu1UB57dkaWODVmsXRmrKo5/L6AgAGp5JA=
  • Thread-topic: [PATCH v7 09/10] xen/vmtrace: support for VM forks


> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Tuesday, January 26, 2021 9:22 AM
> To: Cooper, Andrew <andrew.cooper3@xxxxxxxxxx>
> Cc: Lengyel, Tamas <tamas.lengyel@xxxxxxxxx>; Roger Pau Monné
> <roger.pau@xxxxxxxxxx>; Wei Liu <wl@xxxxxxx>; Nakajima, Jun
> <jun.nakajima@xxxxxxxxx>; Tian, Kevin <kevin.tian@xxxxxxxxx>; Michał
> Leszczyński <michal.leszczynski@xxxxxxx>; Tamas K Lengyel
> <tamas@xxxxxxxxxxxxx>; Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
> Subject: Re: [PATCH v7 09/10] xen/vmtrace: support for VM forks
> 
> On 21.01.2021 22:27, Andrew Cooper wrote:
> > From: Tamas K Lengyel <tamas.lengyel@xxxxxxxxx>
> >
> > Implement vmtrace_reset_pt function. Properly set IPT state for VM
> > forks.
> >
> > Signed-off-by: Tamas K Lengyel <tamas.lengyel@xxxxxxxxx>
> > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> 
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> albeit it strikes me as
> somewhat odd that ...
> 
> > --- a/xen/arch/x86/hvm/vmx/vmx.c
> > +++ b/xen/arch/x86/hvm/vmx/vmx.c
> > @@ -2408,6 +2408,16 @@ static int vmtrace_output_position(struct vcpu
> *v, uint64_t *pos)
> >      return v->arch.hvm.vmx.ipt_active;  }
> >
> > +static int vmtrace_reset(struct vcpu *v) {
> > +    if ( !v->arch.hvm.vmx.ipt_active )
> > +        return -EINVAL;
> > +
> > +    v->arch.msrs->rtit.output_offset = 0;
> > +    v->arch.msrs->rtit.status = 0;
> > +    return 0;
> > +}
> 
> ... the function/hook return non-void, yet ...
> 
> > --- a/xen/arch/x86/mm/mem_sharing.c
> > +++ b/xen/arch/x86/mm/mem_sharing.c
> > @@ -1632,6 +1632,8 @@ static int copy_vcpu_settings(struct domain *cd,
> const struct domain *d)
> >              copy_domain_page(new_vcpu_info_mfn, vcpu_info_mfn);
> >          }
> >
> > +        hvm_vmtrace_reset(cd_vcpu);
> 
> ... the only caller doesn't care.

Noted. For now the function could just return void since if IPT is not enabled 
we don't care from a fork reset perspective. But perhaps in the future we want 
to return that information to the toolstack. Haven't decided yet whether that's 
important or not, for now things are OK as-is.

Tamas

 


Rackspace

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