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

Re: [Xen-devel] [PATCH] x86: move vgc_flags to struct pv_vcpu



Hi Jan,

Thank you for the information.

On 03/01/2020 11:31, Jan Beulich wrote:
On 03.01.2020 12:19, Julien Grall wrote:
How do you manage secondary CPUs on HVM/PVH guest?

Secondary CPUs have architectural state they start with, and
there's very little control an OS has over initial register
state: There's just an 8-bit value specifying (part of) the
address the CPU should start executing from. All other
registers get set to hard coded values. And that 8-bit value
is part of the IPI message the primary CPU sends to the AP
to be brought up (i.e. there's no hypercall involved here).

Do you have any pointer to this code? Can a CPU be turned off afterwards and then boot again?


For PVH, a variant of the normal PV model of starting vCPU-s
gets used, i.e. via VCPUOP_initialise.

In the case of PSCI, I think it is between the two. We are using a generic hypercall, yet most of the state is fixed.

But as the guest OS may run a CPU for a while, turning off and then boot again, we need to be able to set the state again. Hence, the arch_set_guest_info() is quite convenient to use to reset the CPU state.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.