From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Greg Kurz <groug@kaod.org>
Cc: "Laurent Vivier" <lvivier@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"QEMU Developers" <qemu-devel@nongnu.org>,
qemu-ppc <qemu-ppc@nongnu.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Thiago Jung Bauermann" <bauerman@linux.ibm.com>,
"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [PATCH] cpu: Add starts_halted() method
Date: Thu, 9 Jul 2020 15:19:20 +0200 [thread overview]
Message-ID: <75d3fffa-1740-0868-cf8f-1dd9fd03b1c3@redhat.com> (raw)
In-Reply-To: <20200709151320.720fb0f0@bahia.lan>
On 7/9/20 3:13 PM, Greg Kurz wrote:
> On Thu, 9 Jul 2020 14:21:04 +0200
> Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
>> On 7/9/20 12:55 PM, Greg Kurz wrote:
>>> On Thu, 9 Jul 2020 12:18:06 +0200
>>> Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>>
>
> [...]
>
>>>>>
>>>>> FYI, PAPR requires all vCPUs to be "stopped" by default. It is up to the
>>>>> guest to start them explicitly through an RTAS call. The hypervisor is
>>>>> only responsible to start a single vCPU (see spapr_cpu_set_entry_state()
>>>>> called from spapr_machine_reset()) to be able to boot the guest.
>>>>>
>>>>> So I'm not sure to see how that would depend on the accelerator...
>>>>
>>>> $ qemu-system-ppc64 -M pseries-5.0,accel=tcg -d in_asm
>>>> qemu-system-ppc64: warning: TCG doesn't support requested feature,
>>>> cap-cfpc=workaround
>>>> qemu-system-ppc64: warning: TCG doesn't support requested feature,
>>>> cap-sbbc=workaround
>>>> qemu-system-ppc64: warning: TCG doesn't support requested feature,
>>>> cap-ibs=workaround
>>>> qemu-system-ppc64: warning: TCG doesn't support requested feature,
>>>> cap-ccf-assist=on
>>>> ----------------
>>>> IN:
>>>> 0x00000100: 48003f00 b 0x4000
>>>>
>>>> ----------------
>>>> IN:
>>>> 0x00004000: 7c7f1b78 mr r31, r3
>>>> 0x00004004: 7d6000a6 mfmsr r11
>>>> 0x00004008: 3980a000 li r12, 0xa000
>>>> 0x0000400c: 798c83c6 sldi r12, r12, 0x30
>>>> 0x00004010: 7d6b6378 or r11, r11, r12
>>>> 0x00004014: 7d600164 mtmsrd r11
>>>> ...
>>>>
>>>> The vCPU doesn't seem stopped to me...
>>>>
>>>> Am I missing something?
>>>>
>>>
>>> Yeah this is the boot vCPU which is required to be started
>>> by the platform as explained above, but if you had more
>>> vCPUs the other ones would be stopped until the guest OS
>>> asks us to start them.
>>
>> Ah OK, so we are good :)
>>
>> The machine simply has to set the 'start-powered-off' flag on
>> all vCPUS except the 1st one.
>>
>
> We only want the first vCPU to start when the platform is
> fully configured, so I'd rather put 'start-powered-off' on
> every body and explicitly power on the first one during
> machine reset as we do now.
I meant "we are good" in reference to the beginning of
this thread with Thiago and Eduardo:
- 'start-powered-off' is a CPU feature (not machine)
- machine set the 'start-powered-off' field
next prev parent reply other threads:[~2020-07-09 13:20 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-07 20:43 [PATCH] cpu: Add starts_halted() method Thiago Jung Bauermann
2020-07-07 21:49 ` Eduardo Habkost
2020-07-07 23:28 ` Thiago Jung Bauermann
2020-07-08 8:38 ` Philippe Mathieu-Daudé
2020-07-08 10:00 ` David Gibson
2020-07-08 13:14 ` Peter Maydell
2020-07-08 15:25 ` Eduardo Habkost
2020-07-08 15:32 ` Peter Maydell
2020-07-08 16:03 ` Eduardo Habkost
2020-07-08 17:09 ` Peter Maydell
2020-07-08 17:36 ` Eduardo Habkost
2020-07-08 20:11 ` Peter Maydell
2020-07-08 21:32 ` Eduardo Habkost
2020-07-09 3:05 ` Thiago Jung Bauermann
2020-07-09 3:26 ` Thiago Jung Bauermann
2020-07-09 10:24 ` Philippe Mathieu-Daudé
2020-07-10 20:02 ` Thiago Jung Bauermann
2020-07-10 20:17 ` Eduardo Habkost
[not found] ` <87k0zdm63s.fsf@linaro.org>
2020-07-10 20:16 ` Thiago Jung Bauermann
2020-07-11 17:55 ` Alex Bennée
2020-07-08 16:45 ` Philippe Mathieu-Daudé
2020-07-08 21:39 ` Eduardo Habkost
2020-07-09 5:11 ` Philippe Mathieu-Daudé
2020-07-09 9:54 ` Greg Kurz
2020-07-09 10:18 ` Philippe Mathieu-Daudé
2020-07-09 10:55 ` Greg Kurz
2020-07-09 12:21 ` Philippe Mathieu-Daudé
2020-07-09 13:13 ` Greg Kurz
2020-07-09 13:19 ` Philippe Mathieu-Daudé [this message]
2020-07-09 13:40 ` Peter Maydell
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=75d3fffa-1740-0868-cf8f-1dd9fd03b1c3@redhat.com \
--to=philmd@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=bauerman@linux.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=ehabkost@redhat.com \
--cc=groug@kaod.org \
--cc=lvivier@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).