* [PATCH] VT-d: should not disable VT-d when find unknown DMAR structure type
@ 2010-03-25 9:40 Han, Weidong
2010-03-25 14:35 ` Nadolski, Ed
0 siblings, 1 reply; 3+ messages in thread
From: Han, Weidong @ 2010-03-25 9:40 UTC (permalink / raw)
To: xen-devel@lists.xensource.com; +Cc: Kay, Allen M, Keir Fraser
[-- Attachment #1: Type: text/plain, Size: 988 bytes --]
Now 4 DMAR structure types are supported (type value 0 ~ 3). Type values > 3 are reserved for future use. Current implementation disables VT-d when find unknown DMAR structure type, this may lead to VT-d disabling on future platforms before supporting new types on Xen. For forward compatibility, just skip unknown structures by skipping the appropriate number of bytes indicated by the Length field, and then VT-d still can be used.
Signed-off-by: Weidong Han <weidong.han@intel.com>
diff -r 298794763a75 xen/drivers/passthrough/vtd/dmar.c
--- a/xen/drivers/passthrough/vtd/dmar.c Fri Mar 26 02:04:06 2010 +0800
+++ b/xen/drivers/passthrough/vtd/dmar.c Fri Mar 26 02:08:45 2010 +0800
@@ -730,7 +730,6 @@ static int __init acpi_parse_dmar(struct
dprintk(XENLOG_WARNING VTDPREFIX,
"Unknown DMAR structure type %x\n",
entry_header->type);
- ret = -EINVAL;
break;
}
if ( ret )
[-- Attachment #2: forward-compatibility.patch --]
[-- Type: application/octet-stream, Size: 486 bytes --]
diff -r 298794763a75 xen/drivers/passthrough/vtd/dmar.c
--- a/xen/drivers/passthrough/vtd/dmar.c Fri Mar 26 02:04:06 2010 +0800
+++ b/xen/drivers/passthrough/vtd/dmar.c Fri Mar 26 02:08:45 2010 +0800
@@ -730,7 +730,6 @@ static int __init acpi_parse_dmar(struct
dprintk(XENLOG_WARNING VTDPREFIX,
"Unknown DMAR structure type %x\n",
entry_header->type);
- ret = -EINVAL;
break;
}
if ( ret )
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] VT-d: should not disable VT-d when find unknown DMAR structure type
2010-03-25 9:40 [PATCH] VT-d: should not disable VT-d when find unknown DMAR structure type Han, Weidong
@ 2010-03-25 14:35 ` Nadolski, Ed
2010-03-26 2:16 ` Weidong Han
0 siblings, 1 reply; 3+ messages in thread
From: Nadolski, Ed @ 2010-03-25 14:35 UTC (permalink / raw)
To: Han, Weidong, xen-devel@lists.xensource.com; +Cc: Kay, Allen M, Keir Fraser
> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-
> bounces@lists.xensource.com] On Behalf Of Han, Weidong
> Sent: Thursday, March 25, 2010 3:41 AM
> To: xen-devel@lists.xensource.com
> Cc: Kay, Allen M; Keir Fraser
> Subject: [Xen-devel] [PATCH] VT-d: should not disable VT-d when find
> unknown DMAR structure type
>
> Now 4 DMAR structure types are supported (type value 0 ~ 3). Type
> values > 3 are reserved for future use. Current implementation disables
> VT-d when find unknown DMAR structure type, this may lead to VT-d
> disabling on future platforms before supporting new types on Xen. For
> forward compatibility, just skip unknown structures by skipping the
> appropriate number of bytes indicated by the Length field, and then VT-
> d still can be used.
>
> Signed-off-by: Weidong Han <weidong.han@intel.com>
>
> diff -r 298794763a75 xen/drivers/passthrough/vtd/dmar.c
> --- a/xen/drivers/passthrough/vtd/dmar.c Fri Mar 26 02:04:06 2010
> +0800
> +++ b/xen/drivers/passthrough/vtd/dmar.c Fri Mar 26 02:08:45 2010
> +0800
> @@ -730,7 +730,6 @@ static int __init acpi_parse_dmar(struct
> dprintk(XENLOG_WARNING VTDPREFIX,
> "Unknown DMAR structure type %x\n",
> entry_header->type);
> - ret = -EINVAL;
> break;
> }
> if ( ret )
Just a suggestion: Since this completely changes the meaning of the dprintk message, the message should state that the unknown DMAR is being ignored. Otherwise an end user might think that it means some kind of serious problem.
Ed
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] VT-d: should not disable VT-d when find unknown DMAR structure type
2010-03-25 14:35 ` Nadolski, Ed
@ 2010-03-26 2:16 ` Weidong Han
0 siblings, 0 replies; 3+ messages in thread
From: Weidong Han @ 2010-03-26 2:16 UTC (permalink / raw)
To: Nadolski, Ed; +Cc: xen-devel@lists.xensource.com, Kay, Allen M, Keir Fraser
Nadolski, Ed wrote:
>> -----Original Message-----
>> From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-
>> bounces@lists.xensource.com] On Behalf Of Han, Weidong
>> Sent: Thursday, March 25, 2010 3:41 AM
>> To: xen-devel@lists.xensource.com
>> Cc: Kay, Allen M; Keir Fraser
>> Subject: [Xen-devel] [PATCH] VT-d: should not disable VT-d when find
>> unknown DMAR structure type
>>
>> Now 4 DMAR structure types are supported (type value 0 ~ 3). Type
>> values > 3 are reserved for future use. Current implementation disables
>> VT-d when find unknown DMAR structure type, this may lead to VT-d
>> disabling on future platforms before supporting new types on Xen. For
>> forward compatibility, just skip unknown structures by skipping the
>> appropriate number of bytes indicated by the Length field, and then VT-
>> d still can be used.
>>
>> Signed-off-by: Weidong Han <weidong.han@intel.com>
>>
>> diff -r 298794763a75 xen/drivers/passthrough/vtd/dmar.c
>> --- a/xen/drivers/passthrough/vtd/dmar.c Fri Mar 26 02:04:06 2010
>> +0800
>> +++ b/xen/drivers/passthrough/vtd/dmar.c Fri Mar 26 02:08:45 2010
>> +0800
>> @@ -730,7 +730,6 @@ static int __init acpi_parse_dmar(struct
>> dprintk(XENLOG_WARNING VTDPREFIX,
>> "Unknown DMAR structure type %x\n",
>> entry_header->type);
>> - ret = -EINVAL;
>> break;
>> }
>> if ( ret )
>>
>
> Just a suggestion: Since this completely changes the meaning of the dprintk message, the message should state that the unknown DMAR is being ignored. Otherwise an end user might think that it means some kind of serious problem.
>
> Ed
>
Good suggestion. Changed the warning message as below.
Signed-off-by: Weidong Han <weidong.han@intel.com>
diff -r 18f4db5f72d7 xen/drivers/passthrough/vtd/dmar.c
--- a/xen/drivers/passthrough/vtd/dmar.c Thu Mar 25 10:01:05 2010 +0000
+++ b/xen/drivers/passthrough/vtd/dmar.c Fri Mar 26 10:12:32 2010 +0800
@@ -711,7 +711,7 @@ static int __init acpi_parse_dmar(struct
break;
default:
dprintk(XENLOG_WARNING VTDPREFIX,
- "Unknown DMAR structure type %x\n",
+ "Ignore unknown DMAR structure type (0x%x)\n",
entry_header->type);
break;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-26 2:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-25 9:40 [PATCH] VT-d: should not disable VT-d when find unknown DMAR structure type Han, Weidong
2010-03-25 14:35 ` Nadolski, Ed
2010-03-26 2:16 ` Weidong Han
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).