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

RE: [PATCH] x86/dpci: remove the dpci EOI timer


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Tue, 19 Jan 2021 02:59:54 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.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=5MKWmYyWjTO/TD90zjib+zUsjrpyCs+puS57gS1Eeh4=; b=AXvmBe8PMeul6nakQPJ0MUS7MOCrL3NtRH8JDq3CRS4WCrgxGcoaY4cqei3GMSw7mKsXc6U/aGVFaSXUFuTwyfFnTZ0ywrzwsN/Eaf42NzZSnOildt/5JHL/H/zk7MJoJ2GiGMg5oxcI8G3IYDkToe+mT55wWuJl2KXX0ZePo65VAI1q2p1CelKHYTzto00ZuZIN516YaqUWanm8DVU1CIOuyH28oO/lh2mTGMboRd3s7Fjl6M+Sj7EiW5JLH6tuLFGxM+0Ry/IyPfh0nd7ROUzp6PgoaDYa8YeaHJepepfqC3hb+zanZC9517VJOC7/5WhSSwrsGCDIcwzCIvEFJg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JoxZ2dPpAiBqGORESNghsq8qhAQRHaUS3eer0OZ1RXbugg4f5Aq/L5c4a/PyCwKdkeN/chq3UR10vRrm9QVDmekXpkJNe1UGaO44Sei/EHx7zCKqCeE6/NgyNcUtau07EMMGyv2n5sBj18I1Lu1kZMlQue2dz0pjrLwMiOEcD6KANo4TdIxCIWz3aNeYEJhsArH2y/Wg++anL9BxvnAInwlBV8OY10HolWsdqSDQ6qrwDzyh//WVowfsOk5pxeJWOXH4e2P21bhWtlJ0Ggf8H1R+VcLgHTaebNL17WTLiJIf9f0emJqgAseafQmKcNOWjkK8Oq3nRdh9/WVVa1EpsQ==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=intel.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Paul Durrant" <paul@xxxxxxx>, "Cooper, Andrew" <andrew.cooper3@xxxxxxxxxx>, "Wei Liu" <wl@xxxxxxx>, Jason Andryuk <jandryuk@xxxxxxxxx>
  • Delivery-date: Tue, 19 Jan 2021 03:00:09 +0000
  • Dlp-product: dlpe-windows
  • Dlp-reaction: no-action
  • Dlp-version: 11.5.1.3
  • Ironport-sdr: FuxMqKdtyBk5aa04K2IlmxW/m4FvCQ6XXzBC8Djz9k77XPK6goPTgXQnJEZj+/LH+ABuUzcOGh 3qJrf5BOXXVg==
  • Ironport-sdr: i+k1XS7wAC5qvQ25FWpkG5vMUDtSL8efPP6AusD0Cj+bE1XH/bxtpmoU7cPkeQf4UqGFwGB1QZ B2mldx+3b/oQ==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHW6QkXhgT9VRqaskCHlinJ58zINqolDOfQgAB8GQCAACwcAIAAJk4AgAAH5gCAADGLgIAA10iAgAAXS4CAAA1SgIAAExqAgAA9PQCABupLsA==
  • Thread-topic: [PATCH] x86/dpci: remove the dpci EOI timer

> From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> Sent: Friday, January 15, 2021 1:21 AM
> 
> On Thu, Jan 14, 2021 at 02:41:29PM +0100, Jan Beulich wrote:
> > On 14.01.2021 13:33, Roger Pau Monné wrote:
> > > On Thu, Jan 14, 2021 at 12:45:27PM +0100, Jan Beulich wrote:
> > >> On 14.01.2021 11:22, Roger Pau Monné wrote:
> > >>> On Wed, Jan 13, 2021 at 04:31:33PM -0500, Jason Andryuk wrote:
> > >>>> On Wed, Jan 13, 2021 at 1:34 PM Jason Andryuk
> <jandryuk@xxxxxxxxx> wrote:
> > >>>>> I guess I'd also need to disable MSI for the two devices to ensure
> > >>>>> they are both using the GSI?
> > >>>>
> > >>>> lspci in dom0 shows the USB xhci controller, iwlwifi, and e1000e
> > >>>> devices all with IRQ 16 and all with MSI disabled ("MSI: Enabled-").
> > >>>> The two linux HVMs run with (PV) linux stubdoms, and the HVM
> kernels
> > >>>> were started with pci=nosmi.  Networking through the iwlwifi device
> > >>>> works for that VM while a mouse attached to the xhci controller is
> > >>>> also working in the second VM.  Is there something else I should test?
> > >>>
> > >>> Not really, I think that test should be good enough, the issue is that
> > >>> we don't know which OS was seeing the issues noted by Kevin.
> > >>
> > >> Why a specific OS? Isn't this also guarding against malice?
> > >
> > > No, I don't think this protects against any kind of malice (at least
> > > that I can think of). It just deasserts the guest virtual line
> > > periodically if the guest itself hasn't done so. It will also attempt
> > > to EOI the physical interrupt, but that's already done by the
> > > eoi_timer in irq_guest_action_t (which would be the part that protects
> > > against malice IMO).
> >
> > Hmm, yes, there's certainly some overlap. And indeed the EOI
> > timer is set 1ms in the future, while the timer here allows
> > for 8ms to pass before taking action.
> >
> > What I'm uncertain about is the interaction between both: It
> > would seem to me that the pirq_guest_eoi() invocation from
> > here could undermine the purpose of the EOI timer. In which
> > case it would in fact be a win to get rid of this timer here.
> 
> It's not clear to me either. In any case having two timers for the
> same irq also seems like a waste of resources.
> 
> > > It's my understanding that according to what Kevin pointed out this
> > > was done because when sharing a pirq amongst different guests a guest
> > > can get interrupts delivered before it has properly setup the device,
> > > and not deasserting those by Xen would get the guest into some kind of
> > > stuck state, where it's not deasserting the line for itself.
> > >
> > > TBH I'm still trying to figure out how that scenario would look like,
> > > and why would just deasserting the line fix it. On the vIO-APIC case
> > > you would need to forcefully clean the IRR bit in order to receive
> > > further interrupts on that pin, so maybe the issue is that switching a
> > > vIO-APIC pin from level to trigger mode (which clears the IRR bit)
> > > should also deassert the line?
> >
> > I suppose this was directed at Kevin - I'm struggling as well.
> 
> Right, was a question for anyone who might know the answer really. I
> think I will prepare some more stuff to try to clean this up. Let's
> see if Kevin has some input.
> 

Honestly speaking I don't have a good memory of this old stuff and
also cannot figure out a reasonable scenario at this moment. I think
we could just go cleaning it up and see what might jump out later.

Thanks
Kevin

 


Rackspace

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