From: Greg KH <gregkh@suse.de>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: devel@driverdev.osuosl.org, Virtualization@lists.osdl.org,
Ky Srinivasan <ksrinivasan@novell.com>,
Haiyang Zhang <haiyangz@microsoft.com>
Subject: Re: A clocksource driver for HyperV
Date: Mon, 5 Apr 2010 15:03:52 -0700 [thread overview]
Message-ID: <20100405220352.GA2306@suse.de> (raw)
In-Reply-To: <4BBA57FB.2000406@goop.org>
On Mon, Apr 05, 2010 at 02:36:59PM -0700, Jeremy Fitzhardinge wrote:
> >+static struct dmi_system_id __initconst
> >+hv_timesource_dmi_table[] __maybe_unused = {
> >+ {
> >+ .ident = "Hyper-V",
> >+ .matches = {
> >+ DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
> >+ DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
> >+ DMI_MATCH(DMI_BOARD_NAME, "Virtual Machine"),
> >+ },
> >+ },
> >+ { },
> >+};
> >+MODULE_DEVICE_TABLE(dmi, hv_timesource_dmi_table);
>
> So you use the DMI signatures to determine whether the module is
> needed, but cpuid to work out if the feature is present?
The DMI and PCI stuff is to handle module autoloading. Ideally we would
just use the DMI matching, but some distro installers can't handle that,
so we also add the PCI stuff. The hyperv core already has this in it.
> >+
> >+static struct pci_device_id __initconst
> >+hv_timesource_pci_table[] __maybe_unused = {
> >+ { PCI_DEVICE(0x1414, 0x5353) }, /* VGA compatible controller */
> >+ { 0 }
> >+};
> >+MODULE_DEVICE_TABLE(pci, hv_timesource_pci_table);
>
> And/or PCI?
>
> Seems a bit... ad-hoc? Is this the official way to determine the
> presence of Hyper-V?
Yeah, it is :(
thanks,
greg k-h
next prev parent reply other threads:[~2010-04-05 22:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-05 20:30 A clocksource driver for HyperV Ky Srinivasan
2010-04-05 21:36 ` Jeremy Fitzhardinge
2010-04-05 22:03 ` Greg KH [this message]
[not found] <4BBC67980200003000082A15@sinclair.provo.novell.com>
2010-04-07 18:20 ` Ky Srinivasan
2010-04-07 18:20 ` Ky Srinivasan
2010-04-07 19:40 ` Jeremy Fitzhardinge
2010-04-15 20:04 ` Ky Srinivasan
2010-04-27 21:49 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2010-04-05 20:30 Ky Srinivasan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100405220352.GA2306@suse.de \
--to=gregkh@suse.de \
--cc=Virtualization@lists.osdl.org \
--cc=devel@driverdev.osuosl.org \
--cc=haiyangz@microsoft.com \
--cc=jeremy@goop.org \
--cc=ksrinivasan@novell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).