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

Re: [PATCH v4] x86/xen: Add support for HVMOP_set_evtchn_upcall_vector


  • To: Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 8 Nov 2022 17:26:48 +0100
  • 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=uAXhsaK+O3tLaR3xyXOR3ZgFF+JyPfWygz4BOPrUTyI=; b=GtbCdtdg7eLMF9Mh60OLg6yo1TF8YcOB6Kk0+jgEYGvSr/X9qknOMIKapmLrvdaUsFj6yra5TiRcKE3vLlWjrI3+nuGfbhIEz1RVcSgJBlvv6J27slASQ9wtGsToPYVlKornkLqFPJD+hfObmXpwGhJAp8JpsGIZRPDyQJMcGWgYPZEnsySeu//jD+fPvQABI984WUWr7E4W32bCNRI2UypFOHmEnmIIto8SXEHtU6d7o7rJzHv26J3d5nElPi4YbLNOC5J9H5KZ6G/jFnAYiDkzLvC3tuss5d8thaXW5VXP8KcWQWnw4XAPzDDIRXKcnv32+oesx3OcKbxTWC2/ZQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ItiLh/5psAZMOH05DdHITWuIMLdm+mKtg0NQAMzBq4p7HET/9cw9lzGdEKzW2EKxYUwlm+wUaPLTnPM+3OMO75K8KphTZW0i+AAH83SkDkLnZHbUbvTgzwvEzrK+FR6hKxB6FnwOjOnSc3N857Zp1FSTMgxT93XXu663gaPtsQQoFPLDsHHbHbwYnAqxDl94svP5tmy/1BuZ528cFV+2dTZW9NFgRU3g1c+sLSB7hR5pP3eNAufDAcfGQ4bdTfLw+4YpmwZGeOjnJmPzpfyyS3dDK1+TLPYRhj+ng9AYXx9zM4WEF/e6GnxbgaTqEDbZdhpMmlK5m9BR5c35FgIFhw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Maximilian Heyne <mheyne@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, LKML <linux-kernel@xxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 08 Nov 2022 16:26:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 03.11.2022 16:41, Jan Beulich wrote:
> On 03.11.2022 14:38, Jan Beulich wrote:
>> On 29.07.2022 09:04, Jane Malalane wrote:
>>> @@ -125,6 +130,9 @@ DEFINE_IDTENTRY_SYSVEC(sysvec_xen_hvm_callback)
>>>  {
>>>     struct pt_regs *old_regs = set_irq_regs(regs);
>>>  
>>> +   if (xen_percpu_upcall)
>>> +           ack_APIC_irq();
>>> +
>>>     inc_irq_stat(irq_hv_callback_count);
>>>  
>>>     xen_hvm_evtchn_do_upcall();
>>> @@ -168,6 +176,15 @@ static int xen_cpu_up_prepare_hvm(unsigned int cpu)
>>>     if (!xen_have_vector_callback)
>>>             return 0;
>>>  
>>> +   if (xen_percpu_upcall) {
>>> +           rc = xen_set_upcall_vector(cpu);
>>
>> From all I can tell at least for APs this happens before setup_local_apic().
>> With there being APIC interaction in this operation mode, as seen e.g. in
>> the earlier hunk above, I think this is logically wrong. And it leads to
>> apic_pending_intr_clear() issuing its warning: The vector registration, as
>> an intentional side effect, marks the vector as pending. Unless IRQs were
>> enabled at any point between the registration and the check, there's
>> simply no way for the corresponding IRR bit to be dealt with (by
>> propagating to ISR when the interrupt is delivered, and then being cleared
>> from ISR by EOI).
> 
> With Roger's help I now have a pointer to osstest also exposing the issue:
> 
> http://logs.test-lab.xenproject.org/osstest/logs/174592/test-amd64-amd64-xl-pvhv2-intel/huxelrebe0---var-log-xen-console-guest-debian.guest.osstest.log.gz

I've noticed only now that my mail to Jane bounced, and I'm now told
she's no longer in her role at Citrix. Since I don't expect to have time
to investigate an appropriate solution here, may I ask whether one of
the two of you could look into this, being the maintainers of this code?

Thanks, Jan



 


Rackspace

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