Hello,

Came across below code excerpt in x86/microvm code and wanted to know why 'has_hotpluggable_cpus' flag has been set to 'false' while various hot(un)plug APIs have been defined?

static void microvm_class_init(ObjectClass *oc, void *data)
{
    X86MachineClass *x86mc = X86_MACHINE_CLASS(oc);
    MachineClass *mc = MACHINE_CLASS(oc);
    HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);

    mc->init = microvm_machine_state_init;

    mc->family = "microvm_i386";
    [...]
    mc->max_cpus = 288;
    mc->has_hotpluggable_cpus = false;  --------> This one
    [...]

    /* hotplug (for cpu coldplug) */
    mc->get_hotplug_handler = microvm_get_hotplug_handler;
    hc->pre_plug = microvm_device_pre_plug_cb;
    hc->plug = microvm_device_plug_cb;
    hc->unplug_request = microvm_device_unplug_request_cb;
    hc->unplug = microvm_device_unplug_cb;
    [...]
}


Best regards
Salil

Reply via email to