From: Greg KH <gregkh@linuxfoundation.org>
To: Yanfei Zhang <zhangyanfei@cn.fujitsu.com>
Cc: Avi Kivity <avi@redhat.com>,
mtosatti@redhat.com, ebiederm@xmission.com, luto@mit.edu,
Joerg Roedel <joerg.roedel@amd.com>,
dzickus@redhat.com, paul.gortmaker@windriver.com,
ludwig.nussel@suse.de, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org, kexec@lists.infradead.org
Subject: Re: [PATCH v3 4/5] Sysfs: Export VMCSINFO via sysfs
Date: Thu, 28 Jun 2012 04:37:38 -0700 [thread overview]
Message-ID: <20120628113738.GA5499@kroah.com> (raw)
In-Reply-To: <4FEC29D6.5020109@cn.fujitsu.com>
On Thu, Jun 28, 2012 at 05:54:30PM +0800, Yanfei Zhang wrote:
> 于 2012年06月28日 03:22, Greg KH 写道:
> > On Wed, Jun 27, 2012 at 04:54:54PM +0800, Yanfei Zhang wrote:
> >> This patch export offsets of fields via /sys/devices/cpu/vmcs/.
> >> Individual offsets are contained in subfiles named by the filed's
> >> encoding, e.g.: /sys/devices/cpu/vmcs/0800
> >>
> >> Signed-off-by: zhangyanfei <zhangyanfei@cn.fujitsu.com>
> >> ---
> >> drivers/base/core.c | 13 +++++++++++++
> >> 1 files changed, 13 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/base/core.c b/drivers/base/core.c
> >> index 346be8b..dd05ee7 100644
> >> --- a/drivers/base/core.c
> >> +++ b/drivers/base/core.c
> >> @@ -26,6 +26,7 @@
> >> #include <linux/async.h>
> >> #include <linux/pm_runtime.h>
> >> #include <linux/netdevice.h>
> >> +#include <asm/vmcsinfo.h>
> >
> > Did you just break the build on all other arches? Not nice.
> >
> >> @@ -1038,6 +1039,11 @@ int device_add(struct device *dev)
> >> error = dpm_sysfs_add(dev);
> >> if (error)
> >> goto DPMError;
> >> +#if defined(CONFIG_KVM_INTEL) || defined(CONFIG_KVM_INTEL_MODULE)
> >> + error = vmcs_sysfs_add(dev);
> >> + if (error)
> >> + goto VMCSError;
> >> +#endif
> >
> > Oh my no, that's no way to ever do this, you know better than that,
> > please fix.
> >
> > greg k-h
> >
>
> Sorry for my thoughtless, Here is the new patch.
>
> ---
> drivers/base/core.c | 13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 346be8b..7b5266a 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -30,6 +30,13 @@
> #include "base.h"
> #include "power/power.h"
>
> +#if defined(CONFIG_KVM_INTEL) || defined(CONFIG_KVM_INTEL_MODULE)
> +#include <asm/vmcsinfo.h>
> +#else
> +static inline int vmcs_sysfs_add(struct device *dev) { return 0; }
> +static inline void vmcs_sysfs_remove(struct device *dev) { }
> +#endif
{sigh} No, again, you know better, don't do this.
greg k-h
next prev parent reply other threads:[~2012-06-28 11:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-27 8:50 [PATCH v3 0/5] Export offsets of VMCS fields as note information for kdump Yanfei Zhang
2012-06-27 8:51 ` [PATCH v3 1/5] x86: Add helper variables and functions to hold VMCSINFO Yanfei Zhang
2012-06-29 1:54 ` HATAYAMA Daisuke
2012-06-27 8:53 ` [PATCH v3 2/5] KVM: Export symbols for module vmcsinfo-intel Yanfei Zhang
2012-06-27 8:54 ` [PATCH v3 3/5] KVM-INTEL: Add new module vmcsinfo-intel to fill VMCSINFO Yanfei Zhang
2012-06-27 8:54 ` [PATCH v3 4/5] Sysfs: Export VMCSINFO via sysfs Yanfei Zhang
2012-06-27 19:22 ` Greg KH
2012-06-28 9:54 ` Yanfei Zhang
2012-06-28 11:37 ` Greg KH [this message]
2012-06-29 2:58 ` Greg KH
2012-07-03 9:05 ` Yanfei Zhang
2012-06-27 8:56 ` [PATCH v3 5/5] Documentation: Add ABI entry for vmcs sysfs interface Yanfei Zhang
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=20120628113738.GA5499@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=avi@redhat.com \
--cc=dzickus@redhat.com \
--cc=ebiederm@xmission.com \
--cc=joerg.roedel@amd.com \
--cc=kexec@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludwig.nussel@suse.de \
--cc=luto@mit.edu \
--cc=mtosatti@redhat.com \
--cc=paul.gortmaker@windriver.com \
--cc=zhangyanfei@cn.fujitsu.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).