|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3] AMD IOMMU: Introduce support for IVHD block type 11h
>>> On 26.05.16 at 04:50, <suravee.suthikulpanit@xxxxxxx> wrote:
> --- a/xen/drivers/passthrough/amd/iommu_acpi.c
> +++ b/xen/drivers/passthrough/amd/iommu_acpi.c
> @@ -821,13 +821,29 @@ static u16 __init parse_ivhd_device_special(
> return dev_length;
> }
>
> +static inline size_t
I see Andrew has talked you into using size_t instead of unsigned int
here, yet I have to admit I don't really see why. Andrew?
> +get_ivhd_header_size(const struct acpi_ivrs_hardware *ivhd_block)
> +{
> + switch ( ivhd_block->header.type )
> + {
> + case ACPI_IVRS_TYPE_HARDWARE:
> + return offsetof(struct acpi_ivrs_hardware, efr_image);
> + case ACPI_IVRS_TYPE_HARDWARE_11H:
> + return sizeof(struct acpi_ivrs_hardware);
> + default:
> + break;
I would have thought I had complained about this pointless default
case, but it looks like I didn't look at v2 at all after Andrew did. But
anyway, you're the maintainer of the code, so if you like it this
way...
> @@ -978,6 +966,25 @@ static void __init dump_acpi_table_header(struct
> acpi_table_header *table)
>
> }
>
> +#define to_ivhd_block(hdr) \
> + container_of(hdr, const struct acpi_ivrs_hardware, header)
> +#define to_ivmd_block(hdr) \
> + container_of(hdr, const struct acpi_ivrs_memory, header)
> +
> +static inline bool_t is_ivhd_block(u8 type)
> +{
> + return ( type == ACPI_IVRS_TYPE_HARDWARE ||
> + type == ACPI_IVRS_TYPE_HARDWARE_11H );
Stray blanks.
> +static inline bool_t is_ivmd_block(u8 type) \
> +{
> + return ( type == ACPI_IVRS_TYPE_MEMORY_ALL ||
> + type == ACPI_IVRS_TYPE_MEMORY_ONE ||
> + type == ACPI_IVRS_TYPE_MEMORY_RANGE ||
> + type == ACPI_IVRS_TYPE_MEMORY_IOMMU );
Again.
With at least these last two issues taken care of
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
And just like Andrew said, these could be taken care of upon
commit.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |