[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: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 30 Mar 2023 12:14:08 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=OhNx8PX4bDPRSPtkhZ7xPTv8UTfYv0sCeUnx9ZKsqIA=; b=gPagZIXehqemGRnkgT2z0joUEuKofZwKFRVnZv3iNCi5lil2uQ4lWx74hCnv3nL/pGg0KL2dgKtOfyVYSFJZri6eFaq9z2K8gAMx+TxibZhpl521+Jzs51fIEDnW1mrfIMan4EtxYkZ0me19njwF53ohOWfcC9JFdBCP9h7bFqH1yN2+OV9HqtD5qbooZCsRN1hYBieM+fJJLbZEFkH2SzFoGx7qD+hFduflXOQ2Yygl5Bq1K81w295JUjoTmp/wmA9JnIzc5oP+7BME06skWSL+lrYfFvoGieDDXvk0bD7s6VOhzjwVz4JBcDfqrKXaTTopZYxDShZo4jYTbPuNCg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gRymO97001nInZBy3t8oKnb6CHL/RPJtimFIyrNVXCih0jovLvd24bvf9cB/VhpCmyeFgysw9yxNobkmX9nOMTUl42B2FgdwujGGDEndK01sEazpbENL6lO+KMTR6ik8M5Mr2WQ/Q5tovMJr1QI5S5ul7P097jkXx9bgLUVgEQEsTkGUbUOy2PZEPHuSgvSVbhMlzVdDmKerVobbiZAByr1tJIzO9aS7tgU8CJdAGPuIRhEZ8LnMStsDNDbyy4Pc0cEefUTd+A8r6yuRjSlnQnfhbzkRVb1H4S887okx0fVU6j81pL9PuQlRWRMnVllrtytfmI/mRc5QKnjYbkjnsg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 30 Mar 2023 11:14:28 +0000
  • Ironport-data: A9a23:RCLwS6oFxG6gtakPwtnhekSE7bdeBmI1ZBIvgKrLsJaIsI4StFCzt garIBnUM6uIYjOked5+aYnl/E8D65WGm4drQQRr+XxhEyIR+JuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06WNwUmAWP6gR5weFzCFNVfrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXADEzZyGgjrqW+uiqDapjucgJEvXWBbpK7xmMzRmBZRonabbqZvyToPR/hXI3jM0IGuvCb c0EbzYpdA7HfxBEJlYQDtQ5gfusgX78NTZfrTp5p4JuuzSVkFM3jearaYWLEjCJbZw9ckKwj 2TK5WnmRDodM8SS02Gt+XOwnO7f2yj8Xer+EZXhrqU00QXPmT175Bs+cFfno8irimqHZfVAK 0xK2yMRk4cAzRn+JjX6d1jiyJKehTYeUddNF+wx6CmW17HZpQ2eAwAsUTppeNEg8sgsSlQCx lKP2t/kGzFrmLmUUm6GsKeZqyuoPioYJnNEYjULJTbp+PHmqYA3yxnIF9BqFffsisWvQG6uh TeXsCI5mrMfy9YR0Lm29kzGhDTqoYXVSgky5UPcWWfNAh5FWbNJrreAsTDzhcus5q7AJrVdl BDoQ/Sj0d0=
  • Ironport-hdrordr: A9a23:5knNNqoffGO02sZ+AMRjz6IaV5oNeYIsimQD101hICG9JPbo7f xGuM5rrCMc7wxhPk3I+OrwX5VoJEm3yXcb2/hzAV7PZmnbUQiTXeVfBOnZsl/d8nbFh5ZgPM 5bGsAUNDSaNykesS+V2miFOudl6MWb9rulnOLPpk0dNj2CqJsN0+66MGum+4FNKzWuzKBWKK ah
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 30/03/2023 11:00 am, Jan Beulich wrote:
> 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.

Ah, no.  And it answers one of my TODO notes that I hadn't got to yet
(of why MSRs was different to CPUID in this case).

It looks like it got caught in my `arch.msrs` rework.  I'll drop this hunk.

>
>> --- 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.

Yeah... it was the best I could come up with.

It does get removed in patch 8.

~Andrew



 


Rackspace

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