Implement xen_vm_set_vcpus_number,

xen_vm_{add,remove}_vcpus_features_force{on,off}.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
Ewan Mellor committed 2006-12-09 17:16:52 +00:00
1 parent 37c5bee341
commit 75e4e9bd32
2 files changed
+119

No files matched your search

+39
View File
@@ -606,6 +606,13 @@ extern bool
xen_vm_set_vcpus_params(xen_session *session, xen_vm vm, char *params);
/**
* Set the VCPUs/number field of the given VM.
*/
extern bool
xen_vm_set_vcpus_number(xen_session *session, xen_vm vm, int64_t number);
/**
* Set the VCPUs/features/force_on field of the given VM.
*/
@@ -613,6 +620,22 @@ extern bool
xen_vm_set_vcpus_features_force_on(xen_session *session, xen_vm vm, struct xen_cpu_feature_set *force_on);
/**
* Add the given value to the VCPUs/features/force_on field of the
* given VM. If the value is already in that Set, then do nothing.
*/
extern bool
xen_vm_add_vcpus_features_force_on(xen_session *session, xen_vm vm, enum xen_cpu_feature value);
/**
* Remove the given value from the VCPUs/features/force_on field of the
* given VM. If the value is not in that Set, then do nothing.
*/
extern bool
xen_vm_remove_vcpus_features_force_on(xen_session *session, xen_vm vm, enum xen_cpu_feature value);
/**
* Set the VCPUs/features/force_off field of the given VM.
*/
@@ -620,6 +643,22 @@ extern bool
xen_vm_set_vcpus_features_force_off(xen_session *session, xen_vm vm, struct xen_cpu_feature_set *force_off);
/**
* Add the given value to the VCPUs/features/force_off field of the
* given VM. If the value is already in that Set, then do nothing.
*/
extern bool
xen_vm_add_vcpus_features_force_off(xen_session *session, xen_vm vm, enum xen_cpu_feature value);
/**
* Remove the given value from the VCPUs/features/force_off field of
* the given VM. If the value is not in that Set, then do nothing.
*/
extern bool
xen_vm_remove_vcpus_features_force_off(xen_session *session, xen_vm vm, enum xen_cpu_feature value);
/**
* Set the actions/after_shutdown field of the given VM.
*/
+80
View File
@@ -1180,6 +1180,22 @@ xen_vm_set_vcpus_params(xen_session *session, xen_vm vm, char *params)
}
bool
xen_vm_set_vcpus_number(xen_session *session, xen_vm vm, int64_t number)
{
abstract_value param_values[] =
{
{ .type = &abstract_type_string,
.u.string_val = vm },
{ .type = &abstract_type_int,
.u.int_val = number }
};
xen_call_(session, "VM.set_VCPUs_number", param_values, 2, NULL, NULL);
return session->ok;
}
bool
xen_vm_set_vcpus_features_force_on(xen_session *session, xen_vm vm, struct xen_cpu_feature_set *force_on)
{
@@ -1196,6 +1212,38 @@ xen_vm_set_vcpus_features_force_on(xen_session *session, xen_vm vm, struct xen_c
}
bool
xen_vm_add_vcpus_features_force_on(xen_session *session, xen_vm vm, enum xen_cpu_feature value)
{
abstract_value param_values[] =
{
{ .type = &abstract_type_string,
.u.string_val = vm },
{ .type = &xen_cpu_feature_abstract_type_,
.u.string_val = xen_cpu_feature_to_string(value) }
};
xen_call_(session, "VM.add_VCPUs_features_force_on", param_values, 2, NULL, NULL);
return session->ok;
}
bool
xen_vm_remove_vcpus_features_force_on(xen_session *session, xen_vm vm, enum xen_cpu_feature value)
{
abstract_value param_values[] =
{
{ .type = &abstract_type_string,
.u.string_val = vm },
{ .type = &xen_cpu_feature_abstract_type_,
.u.string_val = xen_cpu_feature_to_string(value) }
};
xen_call_(session, "VM.remove_VCPUs_features_force_on", param_values, 2, NULL, NULL);
return session->ok;
}
bool
xen_vm_set_vcpus_features_force_off(xen_session *session, xen_vm vm, struct xen_cpu_feature_set *force_off)
{
@@ -1212,6 +1260,38 @@ xen_vm_set_vcpus_features_force_off(xen_session *session, xen_vm vm, struct xen_
}
bool
xen_vm_add_vcpus_features_force_off(xen_session *session, xen_vm vm, enum xen_cpu_feature value)
{
abstract_value param_values[] =
{
{ .type = &abstract_type_string,
.u.string_val = vm },
{ .type = &xen_cpu_feature_abstract_type_,
.u.string_val = xen_cpu_feature_to_string(value) }
};
xen_call_(session, "VM.add_VCPUs_features_force_off", param_values, 2, NULL, NULL);
return session->ok;
}
bool
xen_vm_remove_vcpus_features_force_off(xen_session *session, xen_vm vm, enum xen_cpu_feature value)
{
abstract_value param_values[] =
{
{ .type = &abstract_type_string,
.u.string_val = vm },
{ .type = &xen_cpu_feature_abstract_type_,
.u.string_val = xen_cpu_feature_to_string(value) }
};
xen_call_(session, "VM.remove_VCPUs_features_force_off", param_values, 2, NULL, NULL);
return session->ok;
}
bool
xen_vm_set_actions_after_shutdown(xen_session *session, xen_vm vm, enum xen_on_normal_exit after_shutdown)
{
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.