|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [PATCH] Add log to Xenfilt DriverAddDevice
> -----Original Message-----
> From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
> Owen Smith
> Sent: 13 July 2021 09:05
> To: paul@xxxxxxx; win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: RE: [EXTERNAL] [PATCH] Add log to Xenfilt DriverAddDevice
>
> CAUTION: This email originated from outside of the organization. Do not click
> links or open
> attachments unless you can confirm the sender and know the content is safe.
>
>
>
> -----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
>
A DriverQueryId failure may well be worth a message if it is not a routine
failure. Do you know how often it is seen in practice?
Paul
> 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;
> >
>
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |