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

RE: [PATCH 5/5] x86/vmx: fix indentation of LBR


  • To: Pau Monné, Roger <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Wed, 29 Jun 2022 06:40:45 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=063tlB7U9zlc1H1dfbr0xOAIGkeOokp1UkJxgtcJ8cY=; b=UbbdGs831aeBkgjxihO/K1UHBbx6G9wEp/YH12zWbv7nLx9fCbcw58AK/QHZS1c/pFdepJqmcVm3owaFL30se4Kx1CFvKPSKELIlo9Nxoe1YEtqEmq2eir5kJpZwSQncsXrWkyxZ5s1pXg/fV2ZHQV/oJvezK5hPfEBdtjT6ZVAXOFeBOQlGu9AcQb59MrAk/WIKX0VSXhZe4JdCu4mitCYoipy+XNuCfvyhdHlsV3GZJNyqOgVL6WfgzzL2j4QzwXWyDLh9dj9EJ6tDtOqj9bLZU5pTVnSPCDGflCiQwu3qYYPlomSYxxZ3Q/uH1ZHEg7XQkrWVhaamxEHvy4zU6w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZzVSEx1ceulXBHyoavM7SxOLz0JXpDG0oBQV42f1EdFCKY22zkoqM1/V08E3+IyfpgRnDsxyAVENmmUkW4ig/OyJb75DtIylrdIPl/wyOQFZAhJkxwiU1gt9ZPipr+pFVf3Jdf0UepfzzpwXrEQFFSvsGI7uxtVDgcmc1Uu4/wFgG9rDe/JuRoBGTcL5hk2JmuFB7tv68dMOyHa+J/MwkVTfpdMs5JaDEphuCyfNZz3PFxN4tOmWaS1UTfH/9vHIZMUBqD1JfjGZHA8TpjDkJ7x9Hy7HUZeq3KuoxfnRhS4Y173F1Pw+VDhAjJxEohV1X5nT/eYghFlNoqpEFUrXIg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com;
  • Cc: Pau Monné, Roger <roger.pau@xxxxxxxxxx>, "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>, "Beulich, Jan" <JBeulich@xxxxxxxx>, "Cooper, Andrew" <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 29 Jun 2022 06:41:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYbE70QXaX6+cUdUmsLrVvfVqSp61mLXgQ
  • Thread-topic: [PATCH 5/5] x86/vmx: fix indentation of LBR

> From: Roger Pau Monne
> Sent: Friday, May 20, 2022 9:38 PM
> 
> Properly indent the handling of LBR enable in MSR_IA32_DEBUGCTLMSR
> vmx_msr_write_intercept().
> 
> No functional change.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>

> ---
> Feel free to squash onto the previous patch, did separately to aid the
> readability of the previous change.
> ---
>  xen/arch/x86/hvm/vmx/vmx.c | 38 +++++++++++++++++++-------------------
>  1 file changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
> index 3f45ac05c6..ff10b293a4 100644
> --- a/xen/arch/x86/hvm/vmx/vmx.c
> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -3540,31 +3540,31 @@ static int cf_check vmx_msr_write_intercept(
> 
>              if ( lbr->count )
>              {
> -            for ( ; lbr->count; lbr++ )
> -            {
> -                unsigned int i;
> -
> -                for ( i = 0; i < lbr->count; i++ )
> +                for ( ; lbr->count; lbr++ )
>                  {
> -                    int rc = vmx_add_guest_msr(v, lbr->base + i, 0);
> +                    unsigned int i;
> 
> -                    if ( unlikely(rc) )
> +                    for ( i = 0; i < lbr->count; i++ )
>                      {
> -                        gprintk(XENLOG_ERR,
> -                                "Guest load/save list error %d\n", rc);
> -                        domain_crash(v->domain);
> -                        return X86EMUL_OKAY;
> -                    }
> +                        int rc = vmx_add_guest_msr(v, lbr->base + i, 0);
> 
> -                    vmx_clear_msr_intercept(v, lbr->base + i, VMX_MSR_RW);
> +                        if ( unlikely(rc) )
> +                        {
> +                            gprintk(XENLOG_ERR,
> +                                    "Guest load/save list error %d\n", rc);
> +                            domain_crash(v->domain);
> +                            return X86EMUL_OKAY;
> +                        }
> +
> +                        vmx_clear_msr_intercept(v, lbr->base + i, 
> VMX_MSR_RW);
> +                    }
>                  }
> -            }
> 
> -            v->arch.hvm.vmx.lbr_flags |= LBR_MSRS_INSERTED;
> -            if ( lbr_tsx_fixup_needed )
> -                v->arch.hvm.vmx.lbr_flags |= LBR_FIXUP_TSX;
> -            if ( ler_to_fixup_needed )
> -                v->arch.hvm.vmx.lbr_flags |= LBR_FIXUP_LER_TO;
> +                v->arch.hvm.vmx.lbr_flags |= LBR_MSRS_INSERTED;
> +                if ( lbr_tsx_fixup_needed )
> +                    v->arch.hvm.vmx.lbr_flags |= LBR_FIXUP_TSX;
> +                if ( ler_to_fixup_needed )
> +                    v->arch.hvm.vmx.lbr_flags |= LBR_FIXUP_LER_TO;
>              }
>              else
>                  /* No model specific LBRs, ignore DEBUGCTLMSR.LBR. */
> --
> 2.36.0
> 


 


Rackspace

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