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

Re: [PATCH] x86/HVM: don't mark evtchn upcall vector as pending when vLAPIC is disabled


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 24 Nov 2022 10:11:05 +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=g0ov05lpmgHe2Wu0m2soH19Sh3osuAD12ntAahKDk4U=; b=lR2hJPozCI9kHr9IeZcdVDLn/zZI4cf3zAjUF/QjJSj0ImiktjWI9Akr71/7gCiQXhjZ9n3mNrew2O/UG0r152KA8CmPXWlK4S8tUIBk0YJj0i2IL2qYQMS1UTLjeI1KN84oQ2WDmMb9ypaCNZg9AV0UKwAYFCuKNPZO4XeqqUS3vTsfyUZZJ5RBnRx4szolyq9A4qG+WFNoTnvjXZhRNYngNvCaChcF9YUjVBz1404d4HW2UFZKqJbKqnu0dckTNAWvR9EVxyNTvR+M39qTp05CAbSsSZVMjInGLiAZYVuhMooYF605Y8MB2H/TVdrvVYsCDSzeUALlTjwloCuOeA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MWf+PNn9AIqM5kcmKoqs/+RCx3PWXoSQkMFT9zvXZbA40KqlArleyHLbeD32DRZJhZH63pROFRAPY59NAszJmHOk/hSd7WIFXRlQPkvil+592ZWYK//NTkyO9dmLbGJRFx+a56IipW1coovMMEfTSP0aG8QYHeZPNjiDbshrc2QrzSmcka9LwcwhnsX8WYc5qZjInLN4V4OVVqw74rE6nLQce4tx4fEXJh9Gntnt/vbgyJlmfafgWtMICJFrwUYw4Un0g5dXu17xFSsJHwjXRyATAU1eQKLwmRRSictjeQH1H+frHDWOt5HpFv83QIr1SKsg3tPXKmAcbvrjXMeHYw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 24 Nov 2022 09:11:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.11.2022 10:06, Roger Pau Monné wrote:
> On Thu, Nov 24, 2022 at 09:42:40AM +0100, Roger Pau Monné wrote:
>> On Thu, Nov 24, 2022 at 08:59:00AM +0100, Jan Beulich wrote:
>>> - problematic wrt evtchn_upcall_pending, once set, preventing event
>>>   injection later on.
>>> As you may have inferred already, I'm inclined to suggest to drop the
>>> the is_vcpu_online() check from hvm_set_callback_via().
>>>
>>> One related question here is whether vlapic_do_init() shouldn't have
>>> the non-architectural side effect of clearing evtchn_upcall_pending.
>>> While this again violates the principle of the hypervisor only ever
>>> setting that bit, it would deal with the risk of no further event
>>> injection once the flag is set, considering that vlapic_do_init()
>>> clears IRR (and ISR).
>>
>> That would seem sensible to me, and was kind of what I was suggesting
>> in:
>>
>> https://lore.kernel.org/xen-devel/Y3eO0bMKRPYJc2yQ@Air-de-Roger/
> 
> Another option would be for vcpu_mark_events_pending() to
> unconditionally call hvm_assert_evtchn_irq() regardless of the state
> of evtchn_upcall_pending.

I think you said so before, and ...

>  This will create some spurious events.

... I continue to be afraid of s/some/many/. This event delivery is meant
to be kind of edge triggered, and I think it is a reasonable model to treat
the flag going from 0 to 1 as the "edge".

Jan



 


Rackspace

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