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

Re: [PATCH 6/9] x86: Merge a domain's {cpuid,msr} policy objects


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 30 Mar 2023 12:00:06 +0200
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OGoAZHpBjVu5hoX0d+UdzOvKvmPCmdbVBv+QUuz5cZI=; b=gGQggwru9qF6Dr5DfmhYsgtGfD5jgmMwo2z5gM94xlIPM8RrLIOIIN/6uD2h5p3NZGYKzjWl+0Obu6Cz8bdgZz6JnU2JxwywU/UQNtFDogXBjspZdBMvWpA81RwH2ortibfqwaiR+VKHkN5RTE6vdfYSUjjFIF5+2TtTCjfapH2Mqg9gMkmRceFY+8XHLyKdCzZ4hljdJW3/4NBp177bhyyGJwTyTGSKUx+/j/NIqKIFkMfsx2emNpuH/NcFKDH9K1jBv7jXD9N7Bj72A1WkhIRe0b9c0IwMiaWR355ELn0djJ4hM9dJaoxJRTNQbSLvso8Uff8u6McjEf8ckmK5gQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XaUm4iNMsDoYdKHa5tSEbyjCg57jsCOXGxvXLmu+oy8Vfm+KdK0OL9iorJ1jXi5y17rWtTtm0HGrc5rUhLqmneMpNEaNDA/kGS372NQJTcMszuMLfsml/eBzqmHwb7FvZz6EOv1BSI16uzX0tCk/Tybetq5QtcZMjanJp70XdZrr+kJHcpOLiR7QMvEe8ZaDHVxIG8+B95wMvbq/A6gUQHNcsP3xUlK70Pla06meO6oUvrdAmiO7KkJCZN/vcXg6m8RtH43YJygDVoczstGwaKix07p4AtdqEI/lEMRU6ioCb8RbyH8ObTdkfTLndUn3bI682dS9O6Vp+sW+HiM+8g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 30 Mar 2023 10:00:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29.03.2023 22:51, Andrew Cooper wrote:
> @@ -573,7 +574,6 @@ int arch_vcpu_create(struct vcpu *v)
>          /* Idle domain */
>          v->arch.cr3 = __pa(idle_pg_table);
>          rc = 0;
> -        v->arch.msrs = ZERO_BLOCK_PTR; /* Catch stray misuses */
>      }

Is this intentional? It's a vCPU pointer here, not a domain one.

> --- a/xen/arch/x86/domctl.c
> +++ b/xen/arch/x86/domctl.c
> @@ -40,11 +40,11 @@
>  static int update_domain_cpu_policy(struct domain *d,
>                                      xen_domctl_cpu_policy_t *xdpc)
>  {
> -    struct old_cpu_policy new = {};
> +    struct cpu_policy *new;
>      struct cpu_policy *sys = is_pv_domain(d)
>          ? (IS_ENABLED(CONFIG_PV)  ?  &pv_max_cpu_policy : NULL)
>          : (IS_ENABLED(CONFIG_HVM) ? &hvm_max_cpu_policy : NULL);
> -    struct old_cpu_policy old_sys = { sys, sys };
> +    struct old_cpu_policy old_sys = { sys, sys }, old_new;

Interesting name, but as long as it's transitional only, that's of course
fine.

Jan



 


Rackspace

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