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

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

  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 14 Jan 2021 13:33:07 +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-SenderADCheck; bh=QVSKPH8TnNPlKmdU1/6CQBgQzGKpe/o0zQe31caU5UQ=; b=m7j1DrCMD99E5Eem3G91NFhhh4baPwdltkM4jcylA84/QRe6B61+Q5QLxid3RA2HlHNza4v39BxpXd2dsgj8+4mJ+udIp7h3v1CEnt6Hs3nyCpliyAU6gX6WvgS4y23y3upEV5hWo0lgJlVBlG3Fk+DrFYjCUl3pVaN3HHnBY74aLfIMoavWC6pOU/LIT9D0DOCfN7+grO1rSPHcYFT8KhWPvJXxhE+6clfFYilwpjWZPHTRUIyFq/ikeMBKjjfjpfPd7gYICV2iL3ZvB1OakCz9kSeNYZ3dV9KdI+g5dy3VY+5AIllz4CegSs066uxUg/NZ0vYeduBZfOkkMnHsPA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LLrzogwEHjm/FACkEs7m+wcwjY3wezmYMYKazHBFTBP6451+5jrfrI143TmaTxXA6MLs2uZSbsBddnjL9CgkU3lGiJwCXcaoNYCUFdNwv+rKuKgcKprnowD/I+FswanUznAcH633SaUOtu1APQHOKtikRmkC81YfeSCpwafejM0T5j2dPZEIFdtDJMF13lT5njqmBw1dS8KRchPKSj4tmDWOXk0GPCiZPc3YJkKcJQER3ygXDS3nASevPbbegP5nQyugJABcvCqk9CxwKy5rsNrObjPa0DMnGwN5/mRzx5rZjFppURKNao7sV+QGir8pmeyDYhIkjTV0ccMASIt5rQ==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "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: Thu, 14 Jan 2021 12:33:24 +0000
  • Ironport-sdr: c0JsIoHgW1VcNuNQPvhOEY9Tpu0KfaOIcHCij6oO3vkdK1svE+noLz1igdcEat2gZ/qw7YgQ4c iG3h52iWHXKLvVzqGksOwLzCMJ5gTRPDA8NAY3vbYBmtix11uvGbfAnJT7ewzqHmJZuFI0Y5Sy 0IKmRA5NWiLIxJTEgMH9HjgH2gYozwY09WPsOXnq0uLCyFfADwvANtyQajIXDTwuBGvSt7tW58 VaR5UEHKBnjPEzThaI5T9AYggF6sSfO8ZzDS/IRb9Kgqf4e3w6WSZKoiYFsOCbAotnww9SxP+Y GSY=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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

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?

Thanks, Roger.



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