arm: Rename virt machine class to use MACHINE_TYPE_NAME

Machine class names should use the "-machine" suffix to allow
class-name-based machine class lookup to work. Rename the arm virt
machine class using the MACHINE_TYPE_NAME macro.

Backports commit 64d3459c8586c8821970cbc99450340278507cfe from qemu
This commit is contained in:
Eduardo Habkost 2018-03-11 14:20:49 -04:00 committed by Lioncash
parent 655b780f48
commit 1b2aee0a86
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -50,7 +50,8 @@ typedef struct {
bool secure;
} VirtMachineState;
#define TYPE_VIRT_MACHINE "virt"
#define VIRT_MACHINE_NAME "virt"
#define TYPE_VIRT_MACHINE MACHINE_TYPE_NAME(VIRT_MACHINE_NAME)
#define VIRT_MACHINE(uc, obj) \
OBJECT_CHECK((uc), VirtMachineState, (obj), TYPE_VIRT_MACHINE)
#define VIRT_MACHINE_GET_CLASS(uc, obj) \
@ -120,7 +121,7 @@ static void virt_class_init(struct uc_struct *uc, ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(uc, oc);
mc->name = TYPE_VIRT_MACHINE;
mc->name = VIRT_MACHINE_NAME;
mc->init = machvirt_init;
mc->max_cpus = 8;
mc->is_default = 1;