Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1283749
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86/rapl: Do not load in a guest |
| Date | 2015-12-04 13:00 +0100 |
| Message-ID | <qBXbT-2b5-65@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <qBTUC-dS-1@gated-at.bofh.it> <qBTUD-dS-5@gated-at.bofh.it> <qBVMK-1pj-13@gated-at.bofh.it> <qBW66-1w3-19@gated-at.bofh.it> <qBWfM-1AF-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
* Borislav Petkov <bp@alien8.de> wrote:
> On Fri, Dec 04, 2015 at 11:41:03AM +0100, Paolo Bonzini wrote:
> > No, please don't. Why do you need a wrmsr instead of a rdmsr? If
> > there's no RAPL domains, the device doesn't load. On hypervisors,
> > reading random MSRs is generally safe.
>
> Well, we could not do anything, sure, that's an option too. It would
> only be the annoying error message. Which is
>
> pr_err("no valid rapl domains found in package %d\n", rp->id);
>
> I guess we can tone that down as apparently it is not an error to
> not have valid rapl domains anymore. Maybe kill it altogether:
> rapl_detect_topology() will propagate the error and the driver won't
> load...
So given than nothing really tells us in a clear way whether RAPL is supported or
not on that kernel, it might be better to just centralize the 'detect RAPL'
function, and print "x86/rapl: Feature detected" on bootup. That function can also
install a synthetic CPUID bit, which all other code could use in a clean fashion.
Since it will be an __init function, there's not much of an overhead argument
against it.
This way it becomes part of the CPUID infrastructure - and eventually it might
even grow a real CPUID bit in future CPU models.
and we'll have a lot less RAPL detection muck all around. Win-win.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] x86/rapl: Do not load in a guest Borislav Petkov <bp@alien8.de> - 2015-12-03 19:30 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Jacob Pan <jacob.jun.pan@linux.intel.com> - 2015-12-03 19:40 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Borislav Petkov <bp@alien8.de> - 2015-12-03 19:50 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Jacob Pan <jacob.jun.pan@linux.intel.com> - 2015-12-03 20:10 +0100
Re: [PATCH] x86/rapl: Do not load in a guest "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-12-04 00:10 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Borislav Petkov <bp@alien8.de> - 2015-12-04 00:30 +0100
Re: [PATCH] x86/rapl: Do not load in a guest "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-12-04 01:40 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Ingo Molnar <mingo@kernel.org> - 2015-12-04 08:50 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Ingo Molnar <mingo@kernel.org> - 2015-12-04 09:30 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Borislav Petkov <bp@alien8.de> - 2015-12-04 11:30 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Paolo Bonzini <pbonzini@redhat.com> - 2015-12-04 11:50 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Borislav Petkov <bp@alien8.de> - 2015-12-04 12:00 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Ingo Molnar <mingo@kernel.org> - 2015-12-04 13:00 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Jacob Pan <jacob.jun.pan@linux.intel.com> - 2015-12-04 18:50 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Paolo Bonzini <pbonzini@redhat.com> - 2015-12-04 19:00 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Borislav Petkov <bp@alien8.de> - 2015-12-04 19:10 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Jacob Pan <jacob.jun.pan@linux.intel.com> - 2015-12-04 19:20 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Borislav Petkov <bp@alien8.de> - 2015-12-04 19:30 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Jacob Pan <jacob.jun.pan@linux.intel.com> - 2015-12-04 19:50 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Borislav Petkov <bp@alien8.de> - 2015-12-04 20:50 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Peter Zijlstra <peterz@infradead.org> - 2015-12-04 09:30 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Jacob Pan <jacob.jun.pan@linux.intel.com> - 2015-12-04 19:00 +0100
Re: [PATCH] x86/rapl: Do not load in a guest Peter Zijlstra <peterz@infradead.org> - 2015-12-04 23:20 +0100
Re: [PATCH] x86/rapl: Do not load in a guest "H. Peter Anvin" <hpa@zytor.com> - 2015-12-04 23:50 +0100
csiph-web