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

Re: [Xen-devel] [PATCH v8 10/16] microcode/amd: call svm_host_osvw_init() in common code


  • To: Chao Gao <chao.gao@xxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Fri, 2 Aug 2019 15:21:55 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.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=u3KCcE1+AQQJqhN/aisBQYeOtP/SGZoKide+rhsQzHE=; b=hFeFovObkxcrd6yMBrUk7++kKU9wKqqLToJV1KyrviABNiULH/yrkAzCcHaDDztzt7eizSzo1gAlh3rZGVAElJMmjPqC4KqZz5kHny+8VFNq6q4uFQJ6ZaDuUT4QTW9sljKOqpiMpLxaAEGKvACmYY6ZuRxk5RYO+jbUcTRI3rB33QBz/t5jJ1sFbPjY/tZWwFnDTfikBUfqJcOBLYl9YErPXEBX8RTxkryLQEmPTElxVgM/73i9zdRfRGGAOnRIuWY/DnDPmZMM69lkAM3CttPci6exJtJO5qRFl4Gfyy9IfGyNBRjkELgk5+27W/AnC2fY1M1UkAwL4IzfXo88cg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MuPDBLAgHlX5aP/S8YI6br7MYxrDBh8eL5yra+1PUKyt6dg1YkBdu/MfbMhlletSTFbwly1M6xsgw2N1KHVb8l791Nx6wOqzKLEuLkkX8N8F74U7mKyp729AOt4zq81bUaAwV1u5BBz1CD/OMPK+5QS1C9g8V9wdZibSZpisN/A65LhsEQtRt3cxXPhLl44Wr4D8jN4MpxgvLvIpfijLWkUq1gLSbx2gaMCEBrgCeYg3XLew8WQRmednWMb/JHGgtaOdwNOyXutwCFmXVpXXaFlahhq8DXNYcPhyWjKFWhjFbKqP+nrtDk9kYHSJHRL3uuInviE3FEb7LtqaKQlOnw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Ashok Raj <ashok.raj@xxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Fri, 02 Aug 2019 15:24:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVSFKfdPX0MLYXWU6Kfh+0nyWtsKbn+2AA
  • Thread-topic: [PATCH v8 10/16] microcode/amd: call svm_host_osvw_init() in common code

On 01.08.2019 12:22, Chao Gao wrote:
> --- a/xen/arch/x86/microcode.c
> +++ b/xen/arch/x86/microcode.c
> @@ -277,6 +277,9 @@ static long do_microcode_update(void *_info)
>       if ( error )
>           info->error = error;
>   
> +    if ( microcode_ops->end_update )
> +        microcode_ops->end_update();
> +
>       info->cpu = cpumask_next(info->cpu, &cpu_online_map);
>       if ( info->cpu < nr_cpu_ids )
>           return continue_hypercall_on_cpu(info->cpu, do_microcode_update, 
> info);

This being the only change in this file - don't you also need to
alter the early ucode loading path?

> @@ -631,11 +622,19 @@ static int start_update(void)
>       return 0;
>   }
>   
> +static void end_update(void)
> +{
> +#if CONFIG_HVM
> +    svm_host_osvw_init();
> +#endif
> +}

Instead of leaving an empty function in the !HVM case, ...

>   static const struct microcode_ops microcode_amd_ops = {
>       .cpu_request_microcode            = cpu_request_microcode,
>       .collect_cpu_info                 = collect_cpu_info,
>       .apply_microcode                  = apply_microcode,
>       .start_update                     = start_update,
> +    .end_update                       = end_update,

... could you please leave this pointer uninitialized (i.e.
NULL) in that case?

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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