[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH] Add log to Xenfilt DriverAddDevice
- To: "paul@xxxxxxx" <paul@xxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Owen Smith <owen.smith@xxxxxxxxxx>
- Date: Tue, 13 Jul 2021 08:05:12 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sFCjoQsrlM5s4MSM1hoiVUZtH//HSrPJpcDFrB43i1A=; b=BfUmfhhDtFQrAPmc+s2EhwOxLiu0aDnSC7b0XVlGvmfJv4zmqNziGFUCJWJOwYxg4JuBwrfNf+jSqm+nFYXzhsI0dJ1+v3IXmdmycFp+rL47dtCUqvLopyJDPK3FFAHgWzCdmO87HWcm4tiYlxByBh/VsubmpLB5+auXI7NoiS/nvQAGfBXSvQP47NOY4lus76IFnwMcKYS8kNExBeQA3oIo6TkEr/r020tCU+26XBOJC+HOuPidKyKYJJI60QenPS3tjW6dPO7kHJMk5j4Cqol0cW1HMV2/rVyH6aqrHaIQHuW+iCGTdhsna6dbmJUrtFz+zZJ/zeh9PUWIjNPw9w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lc3/iXHvMgaFqWYaFbC5nq4rdAtq9vQFVEXP9symQ4WeL9P8iFST+IXMwSq/S0yCzYKg2r/4e+NVY806wyHUHjSrkQJ1VlwTI+F2N7BGsNM6Z2gF+wlKJvVUEJb22pYrWa7vXWOb49maHJHRJqILrGlls5/G5NT3NCHlnufnxAyyqLTDXqqLy3STsMs6m28pHJmaldY2vyw37iGdZyGTebfzcjEkyJ0tbJfb/YhZ3uzJGR3MoDB4KRbSTd8SI7D6EFHWCrO/fV8TjVA6DdSnBmB5TM17FlNn3NwMMfjlJBltvivilEt/TTWv6X1YF6Clz54ID0jzeCoIg6i2WPCNqw==
- Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Delivery-date: Tue, 13 Jul 2021 08:05:28 +0000
- Ironport-hdrordr: A9a23:fAG6HKq2DfHPojLQh+TAlGcaV5uxL9V00zEX/kB9WHVpm5Oj+v xGzc5w6farsl0ssSkb6Ku90KnpewK+yXcH2/hqAV7CZnithILMFu1fBOTZslrd8kHFl9K1kJ 0QC5SWa+eAQGSS7/yKhjVQeuxIqLbozEnrv5am854Hd3AJV0gU1XYcNu/tKDwSeOApP/oEPa vZwvACiyureHwRYMj+LGICRfL/q9rCk4+jSQIaBjY8gTP+wg+A2frfKVy1zx0eWzRAzfMJ6m 7eiTH04a2lrrWS1gLc7WnO9J5b8eGRhOerRfb8y/T9GA+cyTpAV74RGYFqewpF5d1H3Wxa0O UkZS1Qe/ibpUmhOV1d6iGdpjUImAxel0MKj2XozUcL6PaJOw4SGo5Pg5lUfQDe7FdltNZg0L hT12bcrJZPCwjc9R6NkeQgeisa4nZcm0BS5tL7TkYvIrc2eftUt8gS7UlVGJAPEGbz750mCv BnCIXZ6OxNeV2XYnjFti03qebcFkgbD1ODWAwPq8aV2z9ZkDRwyFYZ3tUWmjMF+IgmQ5dJ6u zYOuBjla1ITMURcaVhbd1xCPdfyla9NC4kFVjiamgPOJt3Sk4lmqSHkondvtvaBqDg5KFC6K j8bA==
- Ironport-sdr: YvD8CUds+Zl6tflrVnXx0NADU23hUPG1AlU/bw4j3csTAp3Ym6/AZ5q/jjqH3HezPo3zVhYRZv tErWZBksncM85cAH/cIq6snsYtWPlDaG7Dcp+BsGgNnLZW0jm0otJBT645f+l9ThUeqpT7Ue72 FRQ2j8pwiHuuZB/vFXNtVSmXZwQnaZXxHA/7tvBIzW6WNtPxhUIS9Kd10IxHL9nv1rPY79HSfo 2jsCNjxSOhbtauEHh68g1AF5g5ekdDp3OVT1/Z3EcDcVoFmlXg+A0E5s3Py15oXR7y5aBOXEoX IFU=
- List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
- Thread-index: AQHXcw8lOLHUL2Af8Ue44xu2WMFJtqs/u8QAgADYwSA=
- Thread-topic: [PATCH] Add log to Xenfilt DriverAddDevice
-----Original Message-----
From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
Paul Durrant
Sent: Monday, July 12, 2021 8:06 PM
To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH] Add log to Xenfilt DriverAddDevice
[CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments
unless you have verified the sender and know the content is safe.
On 07/07/2021 09:54, Martin Harvey wrote:
> From: Owen Smith <owen.smith@xxxxxxxxxx>
>
> Log all calls to DriverAddDevice, and the type of the device if
> possible
Any particular reason existent logging is insufficient? I think we need more
justification here.
Paul
There have been cases where XenFilt loads on a device node that doesn’t match a
XENFILT_EMULATED_OBJECT_TYPE or DriverQueryId fails, and (on a release build)
nothing gets displayed. This is mostly debug output and may be excessive for
standard use
Owen
>
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
> ---
> src/xenfilt/driver.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/src/xenfilt/driver.c b/src/xenfilt/driver.c index
> 8f14ec8..2c9b54e 100644
> --- a/src/xenfilt/driver.c
> +++ b/src/xenfilt/driver.c
> @@ -724,6 +724,19 @@ fail1:
> return status;
> }
>
> +static FORCEINLINE PCHAR
> +__EmulatedTypeName(
> + IN XENFILT_EMULATED_OBJECT_TYPE Type
> + )
> +{
> + switch (Type) {
> + case XENFILT_EMULATED_OBJECT_TYPE_UNKNOWN: return "UNKNOWN";
> + case XENFILT_EMULATED_OBJECT_TYPE_PCI: return "PCI";
> + case XENFILT_EMULATED_OBJECT_TYPE_IDE: return "IDE";
> + default: return "InvalidType";
> + }
> +}
> +
> static XENFILT_EMULATED_OBJECT_TYPE
> DriverGetEmulatedType(
> IN PCHAR Id
> @@ -805,6 +818,10 @@ DriverAddDevice(
> }
> }
>
> + Info("%p %s\n",
> + PhysicalDeviceObject,
> + __EmulatedTypeName(Type));
> +
> status = STATUS_SUCCESS;
> if (Type == XENFILT_EMULATED_OBJECT_TYPE_UNKNOWN)
> goto done;
>
|