--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/* Copyright(c) 2023 Intel Corporation. All rights rsvd. */
+#include <linux/kernel.h>
+#include "idxd.h"
+
+int idxd_load_iaa_device_defaults(struct idxd_device *idxd)
+{
+       struct idxd_engine *engine;
+       struct idxd_group *group;
+       struct idxd_wq *wq;
+
+       if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
+               return 0;
+
+       wq = idxd->wqs[0];
+
+       if (wq->state != IDXD_WQ_DISABLED)
+               return -EPERM;
+
+       /* set mode to "dedicated" */
+       set_bit(WQ_FLAG_DEDICATED, &wq->flags);
+       wq->threshold = 0;
+
+       /* only setting up 1 wq, so give it all the wq space */
+       wq->size = idxd->max_wq_size;
+
+       /* set priority to 10 */
+       wq->priority = 10;
+
+       /* set type to "kernel" */
+       wq->type = IDXD_WQT_KERNEL;
+
+       /* set wq group to 0 */
+       group = idxd->groups[0];
+       wq->group = group;
+       group->num_wqs++;
+
+       /* set name to "iaa_crypto" */
+       memset(wq->name, 0, WQ_NAME_SIZE + 1);
+       strscpy(wq->name, "iaa_crypto", WQ_NAME_SIZE + 1);
+
+       /* set driver_name to "crypto" */
+       memset(wq->driver_name, 0, DRIVER_NAME_SIZE + 1);
+       strscpy(wq->driver_name, "crypto", DRIVER_NAME_SIZE + 1);
+
+       engine = idxd->engines[0];
+
+       /* set engine group to 0 */
+       engine->group = idxd->groups[0];
+       engine->group->num_engines++;
+
+       return 0;
+}
 
        struct dma_device dma;
 };
 
+typedef int (*load_device_defaults_fn_t) (struct idxd_device *idxd);
+
 struct idxd_driver_data {
        const char *name_prefix;
        enum idxd_type type;
        int evl_cr_off;
        int cr_status_off;
        int cr_result_off;
+       load_device_defaults_fn_t load_device_defaults;
 };
 
 struct idxd_evl {
 void idxd_wqs_quiesce(struct idxd_device *idxd);
 bool idxd_queue_int_handle_resubmit(struct idxd_desc *desc);
 void multi_u64_to_bmap(unsigned long *bmap, u64 *val, int count);
+int idxd_load_iaa_device_defaults(struct idxd_device *idxd);
 
 /* device interrupt control */
 irqreturn_t idxd_misc_thread(int vec, void *data);
 
                .evl_cr_off = offsetof(struct iax_evl_entry, cr),
                .cr_status_off = offsetof(struct iax_completion_record, status),
                .cr_result_off = offsetof(struct iax_completion_record, error_code),
+               .load_device_defaults = idxd_load_iaa_device_defaults,
        },
 };
 
                goto err;
        }
 
+       if (data->load_device_defaults) {
+               rc = data->load_device_defaults(idxd);
+               if (rc)
+                       dev_warn(dev, "IDXD loading device defaults failed\n");
+       }
+
        rc = idxd_register_devices(idxd);
        if (rc) {
                dev_err(dev, "IDXD sysfs setup failed\n");