All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Auger Eric <eric.auger@redhat.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Baptiste Reynal <b.reynal@virtualopensystems.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Kevin Hilman <khilman@kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	KVM list <kvm@vger.kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] vfio: platform: Fix using devices in PM Domains
Date: Fri, 13 Apr 2018 14:00:04 +0200	[thread overview]
Message-ID: <CAMuHMdVqX2efW=heQeRUG=iXWaROAtkNwy6VAOBikV+e+fcWLw@mail.gmail.com> (raw)
In-Reply-To: <4eedb2df-4bf8-814e-7e47-60faa646f4bf@redhat.com>

Hi Eric,

On Fri, Apr 13, 2018 at 11:44 AM, Auger Eric <eric.auger@redhat.com> wrote:
> On 13/04/18 11:19, Geert Uytterhoeven wrote:
>> On Fri, Apr 13, 2018 at 11:14 AM, Auger Eric <eric.auger@redhat.com> wrote:
>>> On 11/04/18 11:24, Geert Uytterhoeven wrote:
>>>> If a device is part of a PM Domain (e.g. power and/or clock domain), its
>>>> power state is managed using Runtime PM.  Without Runtime PM, the device
>>>> may not be powered up, causing subtle failures, crashes, or system
>>>> lock-ups when the device is accessed by the guest.
>>> the device may not be powered up/clcoked or power/clock may be switched
>>> off while the guest uses it.
>>>>
>>>> Fix this by adding Runtime PM support, powering the device when the VFIO
>>>> device is opened by the guest.
>>>>
>>>> Note that while more fine-grained power management could be implemented
>>>> on the guest side, if exported, this would be inherently unsafe, as
>>>> abusing it may kill the whole system.
>>>
>>> Please can you elaborate on this remark please?
>>
>> If power-management of the device would be delegated to the guest, and the
>> guest forgets to enable device power before accessing the device's registers,
>> this could lock up the system, and thus disturb both the host and other guests.
>
> Wouldn't you need to assign another device or use para-virt to allow the
> guest to perform this power management control? I think you can remove
> this paragraph from the commit message.

Yes, that needs additional exporting of power-management (cfr. the "if
exported").
I just wanted to mention the caveat, as eventually, someone is going to
suggest doing this ;-)

But if you think the comment should be removed, I can of course do so.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2018-04-13 12:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11  9:24 [PATCH] vfio: platform: Fix using devices in PM Domains Geert Uytterhoeven
2018-04-12  7:03 ` Simon Horman
2018-04-13  9:14 ` Auger Eric
2018-04-13  9:19   ` Geert Uytterhoeven
2018-04-13  9:44     ` Auger Eric
2018-04-13 12:00       ` Geert Uytterhoeven [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-04-11  9:15 Geert Uytterhoeven
2018-04-11  9:21 ` Geert Uytterhoeven

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='CAMuHMdVqX2efW=heQeRUG=iXWaROAtkNwy6VAOBikV+e+fcWLw@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=alex.williamson@redhat.com \
    --cc=b.reynal@virtualopensystems.com \
    --cc=eric.auger@redhat.com \
    --cc=geert+renesas@glider.be \
    --cc=khilman@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=ulf.hansson@linaro.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.