qapi/misc-target: Rename SGXEPCSection to SgxEpcSection

QAPI requires strict PascalCase naming style, i.e., only the first
letter of a single word is allowed to be uppercase, which could help
with readability.

Rename SGXEPCSection to SgxEpcSection.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250516091130.2374221-2-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Zhao Liu 2025-05-16 17:11:29 +08:00 committed by Paolo Bonzini
parent 560375cff3
commit a1b3e82773
2 changed files with 12 additions and 12 deletions

View file

@ -84,10 +84,10 @@ static uint64_t sgx_calc_section_metric(uint64_t low, uint64_t high)
((high & MAKE_64BIT_MASK(0, 20)) << 32); ((high & MAKE_64BIT_MASK(0, 20)) << 32);
} }
static SGXEPCSectionList *sgx_calc_host_epc_sections(void) static SgxEpcSectionList *sgx_calc_host_epc_sections(void)
{ {
SGXEPCSectionList *head = NULL, **tail = &head; SgxEpcSectionList *head = NULL, **tail = &head;
SGXEPCSection *section; SgxEpcSection *section;
uint32_t i, type; uint32_t i, type;
uint32_t eax, ebx, ecx, edx; uint32_t eax, ebx, ecx, edx;
uint32_t j = 0; uint32_t j = 0;
@ -104,7 +104,7 @@ static SGXEPCSectionList *sgx_calc_host_epc_sections(void)
break; break;
} }
section = g_new0(SGXEPCSection, 1); section = g_new0(SgxEpcSection, 1);
section->node = j++; section->node = j++;
section->size = sgx_calc_section_metric(ecx, edx); section->size = sgx_calc_section_metric(ecx, edx);
QAPI_LIST_APPEND(tail, section); QAPI_LIST_APPEND(tail, section);
@ -183,17 +183,17 @@ SGXInfo *qmp_query_sgx_capabilities(Error **errp)
return info; return info;
} }
static SGXEPCSectionList *sgx_get_epc_sections_list(void) static SgxEpcSectionList *sgx_get_epc_sections_list(void)
{ {
GSList *device_list = sgx_epc_get_device_list(); GSList *device_list = sgx_epc_get_device_list();
SGXEPCSectionList *head = NULL, **tail = &head; SgxEpcSectionList *head = NULL, **tail = &head;
SGXEPCSection *section; SgxEpcSection *section;
for (; device_list; device_list = device_list->next) { for (; device_list; device_list = device_list->next) {
DeviceState *dev = device_list->data; DeviceState *dev = device_list->data;
Object *obj = OBJECT(dev); Object *obj = OBJECT(dev);
section = g_new0(SGXEPCSection, 1); section = g_new0(SgxEpcSection, 1);
section->node = object_property_get_uint(obj, SGX_EPC_NUMA_NODE_PROP, section->node = object_property_get_uint(obj, SGX_EPC_NUMA_NODE_PROP,
&error_abort); &error_abort);
section->size = object_property_get_uint(obj, SGX_EPC_SIZE_PROP, section->size = object_property_get_uint(obj, SGX_EPC_SIZE_PROP,
@ -237,7 +237,7 @@ SGXInfo *qmp_query_sgx(Error **errp)
void hmp_info_sgx(Monitor *mon, const QDict *qdict) void hmp_info_sgx(Monitor *mon, const QDict *qdict)
{ {
Error *err = NULL; Error *err = NULL;
SGXEPCSectionList *section_list, *section; SgxEpcSectionList *section_list, *section;
g_autoptr(SGXInfo) info = qmp_query_sgx(&err); g_autoptr(SGXInfo) info = qmp_query_sgx(&err);
uint64_t size = 0; uint64_t size = 0;

View file

@ -319,7 +319,7 @@
'if': 'TARGET_ARM' } 'if': 'TARGET_ARM' }
## ##
# @SGXEPCSection: # @SgxEpcSection:
# #
# Information about intel SGX EPC section info # Information about intel SGX EPC section info
# #
@ -329,7 +329,7 @@
# #
# Since: 7.0 # Since: 7.0
## ##
{ 'struct': 'SGXEPCSection', { 'struct': 'SgxEpcSection',
'data': { 'node': 'int', 'data': { 'node': 'int',
'size': 'uint64'}} 'size': 'uint64'}}
@ -355,7 +355,7 @@
'sgx1': 'bool', 'sgx1': 'bool',
'sgx2': 'bool', 'sgx2': 'bool',
'flc': 'bool', 'flc': 'bool',
'sections': ['SGXEPCSection']}, 'sections': ['SgxEpcSection']},
'if': 'TARGET_I386' } 'if': 'TARGET_I386' }
## ##