Skip to content
Snippets Groups Projects
Commit 1f8431f4 authored by Bandan Das's avatar Bandan Das Committed by Michael S. Tsirkin
Browse files

q35: Check propery to determine if iommu is set


The helper function machine_iommu() isn't necesary. We can
directly check for the property.

Signed-off-by: default avatarBandan Das <bsd@redhat.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarBandan Das <bsd@redhat.com>
parent dc3db6ad
No related branches found
No related tags found
No related merge requests found
......@@ -462,11 +462,6 @@ bool machine_usb(MachineState *machine)
return machine->usb;
}
bool machine_iommu(MachineState *machine)
{
return machine->iommu;
}
bool machine_kernel_irqchip_allowed(MachineState *machine)
{
return machine->kernel_irqchip_allowed;
......
......@@ -506,7 +506,7 @@ static void mch_realize(PCIDevice *d, Error **errp)
PAM_EXPAN_BASE + i * PAM_EXPAN_SIZE, PAM_EXPAN_SIZE);
}
/* Intel IOMMU (VT-d) */
if (machine_iommu(current_machine)) {
if (object_property_get_bool(qdev_get_machine(), "iommu", NULL)) {
mch_init_dmar(mch);
}
}
......
......@@ -33,7 +33,6 @@ MachineClass *find_default_machine(void);
extern MachineState *current_machine;
bool machine_usb(MachineState *machine);
bool machine_iommu(MachineState *machine);
bool machine_kernel_irqchip_allowed(MachineState *machine);
bool machine_kernel_irqchip_required(MachineState *machine);
int machine_kvm_shadow_mem(MachineState *machine);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment