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

Re: [Xen-devel] [PATCH] x86: move vgc_flags to struct pv_vcpu

  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Fri, 27 Dec 2019 08:17:39 +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=E4AN2OwdziUsP1L9yzWKj6bLrkSia0X9SHzIV+kG8wE=; b=W67lfihlu102ouywxYwVdVx8AOPP9tTdsu20VjDCGd5sqnPfqKliIauP4hTrEVNtyyp4Eypngecc2eq2VE2DLIM8fhyr16nM2sp9BwOvZDXQLlpt53DyWrbW+TSlKKn0TWOhw34t6Pcn2CWdKHgNb23YX/r0YJNSO+7qO9LJiw0+pfuwQ7poeLEzIYE7yJgS1N9485D/vRt9y7ePhHCteH8rVcBg+g9YaTxd1Ku19HuCIe+obZbdayFHNN8ZHDyTs6jtqWFnA5sBiAggaIaJVRuIb3RBoTK2rU+z3tTvvKTqfMlR9KViqWdX/A3m6o+Sq6aNklW4EPJVw2JLdNaqzA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TifDag2Y/LWMZETg+R7/7PooPkl4iXoTAikMIkc78SGBisTCpQWO3MrqjEa76WaUBRgr7/wCVGBmB8lgK94gVNUQwzCFw0oiw6mV6IfUtPdGfvW5gDr6EoI5f3GdZXUxiyo2wF0dAnYstdFVOqz2ybdsFGgL6E0JkUUy23pTZn6l6ptYLjZC/am6DusM8eJpSmcJqTZyS4VEtlAphThBfFiHK3VAxj0t+RtAgc+dEyIvtC9LcIKjxHQCdUZZAdx3X8uOON3ZV1axRxV6v9aoRmqpF/hkYMVPZfg3Xqqcy1+h+4zUu0Op6YD75H1Fjp9jvJrHXqdXKpUvJrVwQg73Aw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 27 Dec 2019 08:20:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVtz0W7fLZmjjTFESLDQs6+XYow6fH/5KAgAWuTIA=
  • Thread-topic: [PATCH] x86: move vgc_flags to struct pv_vcpu

On 23.12.2019 18:33, Julien Grall wrote:
> Hi Jan,
> On 20/12/2019 14:55, Jan Beulich wrote:
>> There's been effectively no use of the field for HVM.
>> Also shrink the field to unsigned int, even if this doesn't immediately
>> yield any space benefit for the structure itself. The resulting 32-bit
>> padding slot can eventually be used for some other field. The change in
>> size makes accesses slightly more efficient though, as no REX.W prefix
>> is going to be needed anymore on the respective insns.
>> Mirror the HVM side change here (dropping of setting the field to
>> VGCF_online) also to Arm, on the assumption that it was cloned like
>> this originally. VGCF_online really should simply and consistently be
>> the guest view of the inverse of VPF_down, and hence needs representing
>> only in the get/set vCPU context interfaces.
> But vPSCI is just a wrapper to get/set vCPU context interfaces. Your 
> changes below will clearly break bring-up of secondary vCPUs on Arm.
> This is because arch_set_guest_info() will rely on this flag to 
> clear/set VPF_down in the pause flags.
> So I think the line in arm/vpsci.c should be left alone.

Oh, I see - I didn't notice this (ab)use despite ...

>> --- a/xen/arch/arm/vpsci.c
>> +++ b/xen/arch/arm/vpsci.c
>> @@ -78,7 +78,6 @@ static int do_common_cpu_on(register_t t
>>           ctxt->user_regs.x0 = context_id;
>>       }
>>   #endif
>> -    ctxt->flags = VGCF_online; >
>>       domain_lock(d);
>>       rc = arch_set_info_guest(v, ctxt);

... it actually being in context. Thanks for noticing.

Xen-devel mailing list



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