All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxim Levitsky <mlevitsk@redhat.com>
To: Mike Lothian <mike@fireburn.co.uk>
Cc: dwmw@amazon.co.uk, iommu@lists.linux-foundation.org,
	joro@8bytes.org, linux-kernel@vger.kernel.org,
	suravee.suthikulpanit@amd.com, tglx@linutronix.de,
	will@kernel.org
Subject: Re: [PATCH 0/5] iommu/amd: fixes for suspend/resume
Date: Wed, 26 Jan 2022 12:12:44 +0200	[thread overview]
Message-ID: <6cf58a4cd925726ef10481d38f9f4e8090f5023d.camel@redhat.com> (raw)
In-Reply-To: <CAHbf0-F8Uemcu8FVcZvY0CPOf4kFXOcaCzWF1ZCwkpa3tyut3A@mail.gmail.com>

On Wed, 2022-01-26 at 09:54 +0000, Mike Lothian wrote:
> On Wed, 26 Jan 2022 at 07:34, Maxim Levitsky <mlevitsk@redhat.com> wrote:
> > Could you post the whole dmesg, or at least:
> > 
> > dmesg | grep AMD-Vi
> > 
> > 
> > What CPU does your system have?
> > 
> > I suspect that your system doesn't GA log feature enabled in the IOMMU, and the code never checks
> > for that, and here it fails enabling it, which  before my patches was just
> > ignoring it silently.
> > 
> > 
> > Best regards,
> >         Maxim Levitsky
> > > Hope that helps
> > > 
> > > Mike
> > > 
> 
> Hi
> 
> It's an AMD Ryzen 9 5900HX
> 
> [    0.186350] AMD-Vi: ivrs, add hid:AMDI0020, uid:\_SB.FUR0, rdevid:160
> [    0.186353] AMD-Vi: ivrs, add hid:AMDI0020, uid:\_SB.FUR1, rdevid:160
> [    0.186354] AMD-Vi: ivrs, add hid:AMDI0020, uid:\_SB.FUR2, rdevid:160
> [    0.186355] AMD-Vi: ivrs, add hid:AMDI0020, uid:\_SB.FUR3, rdevid:160
> [    0.355628] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
> [    0.356134] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
> [    0.356136] AMD-Vi: Extended features (0x206d73ef22254ade): PPR
> X2APIC NX GT IA GA PC GA_vAPIC
> [    0.356140] AMD-Vi: Interrupt remapping enabled
> [    0.356141] AMD-Vi: Virtual APIC enabled
> [    0.356142] AMD-Vi: X2APIC enabled
> [    0.431377] AMD-Vi: AMD IOMMUv2 loaded and initialized
> 
> I've attached the dmesg, I notice that some boots it doesn't happen
> 
> Cheers
> 
> Mike

Great, your system does seem to support GA log 
(but a patch to check if, other that assume blindly that it is supported is 
something that should be done).

So could you bump the LOOP_TIMEOUT like by 10x or so and see if the problem goes away?

(that code should be rewritten to time based wait and not just blindly loop like that,
I also can prepare a patch for that as well).

Best regards,
	Maxim Levitsky


WARNING: multiple messages have this Message-ID (diff)
From: Maxim Levitsky <mlevitsk@redhat.com>
To: Mike Lothian <mike@fireburn.co.uk>
Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
	tglx@linutronix.de, will@kernel.org, dwmw@amazon.co.uk
Subject: Re: [PATCH 0/5] iommu/amd: fixes for suspend/resume
Date: Wed, 26 Jan 2022 12:12:44 +0200	[thread overview]
Message-ID: <6cf58a4cd925726ef10481d38f9f4e8090f5023d.camel@redhat.com> (raw)
In-Reply-To: <CAHbf0-F8Uemcu8FVcZvY0CPOf4kFXOcaCzWF1ZCwkpa3tyut3A@mail.gmail.com>

On Wed, 2022-01-26 at 09:54 +0000, Mike Lothian wrote:
> On Wed, 26 Jan 2022 at 07:34, Maxim Levitsky <mlevitsk@redhat.com> wrote:
> > Could you post the whole dmesg, or at least:
> > 
> > dmesg | grep AMD-Vi
> > 
> > 
> > What CPU does your system have?
> > 
> > I suspect that your system doesn't GA log feature enabled in the IOMMU, and the code never checks
> > for that, and here it fails enabling it, which  before my patches was just
> > ignoring it silently.
> > 
> > 
> > Best regards,
> >         Maxim Levitsky
> > > Hope that helps
> > > 
> > > Mike
> > > 
> 
> Hi
> 
> It's an AMD Ryzen 9 5900HX
> 
> [    0.186350] AMD-Vi: ivrs, add hid:AMDI0020, uid:\_SB.FUR0, rdevid:160
> [    0.186353] AMD-Vi: ivrs, add hid:AMDI0020, uid:\_SB.FUR1, rdevid:160
> [    0.186354] AMD-Vi: ivrs, add hid:AMDI0020, uid:\_SB.FUR2, rdevid:160
> [    0.186355] AMD-Vi: ivrs, add hid:AMDI0020, uid:\_SB.FUR3, rdevid:160
> [    0.355628] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
> [    0.356134] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
> [    0.356136] AMD-Vi: Extended features (0x206d73ef22254ade): PPR
> X2APIC NX GT IA GA PC GA_vAPIC
> [    0.356140] AMD-Vi: Interrupt remapping enabled
> [    0.356141] AMD-Vi: Virtual APIC enabled
> [    0.356142] AMD-Vi: X2APIC enabled
> [    0.431377] AMD-Vi: AMD IOMMUv2 loaded and initialized
> 
> I've attached the dmesg, I notice that some boots it doesn't happen
> 
> Cheers
> 
> Mike

Great, your system does seem to support GA log 
(but a patch to check if, other that assume blindly that it is supported is 
something that should be done).

So could you bump the LOOP_TIMEOUT like by 10x or so and see if the problem goes away?

(that code should be rewritten to time based wait and not just blindly loop like that,
I also can prepare a patch for that as well).

Best regards,
	Maxim Levitsky

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2022-01-26 10:12 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 16:10 [PATCH 0/5] iommu/amd: fixes for suspend/resume Maxim Levitsky
2021-11-23 16:10 ` Maxim Levitsky
2021-11-23 16:10 ` [PATCH 1/5] iommu/amd: restore GA log/tail pointer on host resume Maxim Levitsky
2021-11-23 16:10   ` Maxim Levitsky
2021-11-23 16:10 ` [PATCH 2/5] iommu/amd: x2apic mode: re-enable after resume Maxim Levitsky
2021-11-23 16:10   ` Maxim Levitsky
2021-11-23 16:10 ` [PATCH 3/5] iommu/amd: x2apic mode: setup the INTX registers on mask/unmask Maxim Levitsky
2021-11-23 16:10   ` Maxim Levitsky
2021-11-23 16:10 ` [PATCH 4/5] iommu/amd: x2apic mode: mask/unmask interrupts on suspend/resume Maxim Levitsky
2021-11-23 16:10   ` Maxim Levitsky
2021-11-23 16:10 ` [PATCH 5/5] iommu/amd: remove useless irq affinity notifier Maxim Levitsky
2021-11-23 16:10   ` Maxim Levitsky
2021-12-01 23:08 ` [PATCH 0/5] iommu/amd: fixes for suspend/resume Maxim Levitsky
2021-12-01 23:08   ` Maxim Levitsky
2021-12-10  8:00   ` Maxim Levitsky
2021-12-10  8:00     ` Maxim Levitsky
2021-12-06 14:01 ` Joerg Roedel
2021-12-06 14:01   ` Joerg Roedel
2021-12-17  8:31 ` Joerg Roedel
2021-12-17  8:31   ` Joerg Roedel
2022-01-25 15:08 ` Mike Lothian
2022-01-25 15:08   ` Mike Lothian
2022-01-25 19:26   ` Maxim Levitsky
2022-01-25 19:26     ` Maxim Levitsky
2022-01-25 23:25     ` Mike Lothian
2022-01-25 23:25       ` Mike Lothian
2022-01-26  7:34       ` Maxim Levitsky
2022-01-26  7:34         ` Maxim Levitsky
2022-01-26  9:54         ` Mike Lothian
2022-01-26  9:54           ` Mike Lothian
2022-01-26 10:12           ` Maxim Levitsky [this message]
2022-01-26 10:12             ` Maxim Levitsky
2022-01-27  0:39             ` Mike Lothian
2022-01-27  0:39               ` Mike Lothian
2022-01-27 10:22               ` Maxim Levitsky
2022-01-27 10:22                 ` Maxim Levitsky
2022-01-27 10:50                 ` Mike Lothian
2022-01-27 10:50                   ` Mike Lothian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6cf58a4cd925726ef10481d38f9f4e8090f5023d.camel@redhat.com \
    --to=mlevitsk@redhat.com \
    --cc=dwmw@amazon.co.uk \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike@fireburn.co.uk \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.