Skip to contentSkip to conversation

target/i386: sgx: mark device not user creatable

PATCH In review Paolo Bonzini 3 participants 3 messages Nov 9, 2021 – Nov 11, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/i386: sgx: mark device not user creatable

The device is created by the machine based on the sgx-epc property. It should not be created by users.

---
 hw/i386/sgx-epc.c | 1 +
 1 file changed, 1 insertion(+)
hw/i386/sgx-epc.c +1 -0
index 55e2217eae..e508827e78 100644
@@ -154,6 +154,7 @@ static void sgx_epc_class_init(ObjectClass *oc, void *data)
     dc->realize = sgx_epc_realize;
     dc->unrealize = sgx_epc_unrealize;
     dc->desc = "SGX EPC section";
+    dc->user_creatable = false;
     device_class_set_props(dc, sgx_epc_properties);
 
     mdc->get_addr = sgx_epc_md_get_addr;
Signature · 1 line
2.33.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Paolo Bonzini

The device is created by the machine based on the sgx-epc property. It should not be created by users.

---
  hw/i386/sgx-epc.c | 1 +
  1 file changed, 1 insertion(+)
hw/i386/sgx-epc.c +0 -0
index 55e2217eae..e508827e78 100644

hw/i386/sgx-epc.c static void sgx_epc_class_init(ObjectClass *oc, void *data) · line 160

Quoted 7 lines
hw/i386/sgx-epc.c +1 -0
@@ -154,6 +154,7 @@ static void sgx_epc_class_init(ObjectClass *oc, void *data)
      dc->realize = sgx_epc_realize;
      dc->unrealize = sgx_epc_unrealize;
      dc->desc = "SGX EPC section";
+    dc->user_creatable = false;
      device_class_set_props(dc, sgx_epc_properties);
 
      mdc->get_addr = sgx_epc_md_get_addr;