[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] intel_iommu: add "eim" property
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] intel_iommu: add "eim" property |
Date: |
Fri, 12 Aug 2016 10:34:44 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 11/08/2016 15:29, Peter Xu wrote:
> +
> +static void vtd_eim_prop_set(Object *o, bool value, Error **errp)
> +{
> + IntelIOMMUState *s = INTEL_IOMMU_DEVICE(o);
> + s->eim_supported = value;
> +}
> +
> +static void vtd_instance_init(Object *o)
> +{
> + IntelIOMMUState *s = INTEL_IOMMU_DEVICE(o);
> +
> + /*
> + * TODO: we can enable this by default after we have full x2apic
> + * support.
> + */
> + s->eim_supported = false;
> + object_property_add_bool(o, "eim", vtd_eim_prop_get,
> + vtd_eim_prop_set, NULL);
> +}
> +
> static const TypeInfo vtd_info = {
> .name = TYPE_INTEL_IOMMU_DEVICE,
> .parent = TYPE_X86_IOMMU_DEVICE,
> + .instance_init = vtd_instance_init,
This can use DEFINE_PROP_BOOL.
Paolo