qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] cpu: Add starts_halted() method


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] cpu: Add starts_halted() method
Date: Thu, 9 Jul 2020 15:19:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]