mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: David Laight <David.Laight@ACULAB.COM>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"platform-driver-x86@vger.kernel.org" 
	<platform-driver-x86@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Dell.Client.Kernel@dell.com" <Dell.Client.Kernel@dell.com>
Cc: Stuart Hayes <stuart.w.hayes@gmail.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Mark Gross <markgross@kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] platform/x86/dell: add buffer allocation/free functions for SMI calls
Date: Fri, 18 Mar 2022 17:56:07 +0100	[thread overview]
Message-ID: <2a4573e0-4a8d-52c1-d29b-66b13bfe376f@suse.com> (raw)
In-Reply-To: <accf95548a8c4374b17c159b9b2d0098@AcuMS.aculab.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1150 bytes --]

On 18.03.22 16:22, David Laight wrote:
> From: Juergen Gross
>> Sent: 18 March 2022 15:10
>>
>> The dcdbas driver is used to call SMI handlers for both, dcdbas and
>> dell-smbios-smm. Both drivers allocate a buffer for communicating
>> with the SMI handler. The physical buffer address is then passed to
>> the called SMI handler via %ebx.
>>
>> Unfortunately this doesn't work when running in Xen dom0, as the
>> physical address obtained via virt_to_phys() is only a guest physical
>> address, and not a machine physical address as needed by SMI.
> 
> The physical address from virt_to_phy() is always wrong.
> That is the physical address the cpu has for the memory.
> What you want is the address the dma master interface needs to use.
> That can be different for a physical system - no need for virtualisation.
> 
> On x86 they do usually match, but anything with a full iommu
> will need completely different addresses.

Yes, thanks for reminding me of that.

The SMI handler is running on the cpu, right? So using the DMA
address is wrong in case of an IOMMU. I really need the machine
physical address.


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2022-03-18 16:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18 15:09 Juergen Gross
2022-03-18 15:22 ` David Laight
2022-03-18 16:56   ` Juergen Gross [this message]
2022-03-18 22:28     ` David Laight
2022-04-04 10:21       ` Hans de Goede
2022-04-27 19:46 ` Hans de Goede

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=2a4573e0-4a8d-52c1-d29b-66b13bfe376f@suse.com \
    --to=jgross@suse.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=Dell.Client.Kernel@dell.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=stuart.w.hayes@gmail.com \
    --cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®