Skip to content

Commit

Permalink
q35: Check propery to determine if iommu is set
Browse files Browse the repository at this point in the history
The helper function machine_iommu() isn't necesary. We can
directly check for the property.

Signed-off-by: Bandan Das <bsd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Bandan Das <bsd@redhat.com>
  • Loading branch information
whitebrandy authored and mstsirkin committed Nov 17, 2015
1 parent dc3db6a commit 1f8431f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
5 changes: 0 additions & 5 deletions hw/core/machine.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion hw/pci-host/q35.c
Expand Up @@ -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);
}
}
Expand Down
1 change: 0 additions & 1 deletion include/hw/boards.h
Expand Up @@ -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);
Expand Down

0 comments on commit 1f8431f

Please sign in to comment.