From: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
To: zhangyanfei@cn.fujitsu.com
Cc: avi@redhat.com, mtosatti@redhat.com, dzickus@redhat.com,
luto@mit.edu, kvm@vger.kernel.org, joerg.roedel@amd.com,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
paul.gortmaker@windriver.com, ludwig.nussel@suse.de,
ebiederm@xmission.com, gregkh@linuxfoundation.org
Subject: Re: [PATCH v3 1/5] x86: Add helper variables and functions to hold VMCSINFO
Date: Fri, 29 Jun 2012 10:54:42 +0900 (JST) [thread overview]
Message-ID: <20120629.105442.297827463.d.hatayama@jp.fujitsu.com> (raw)
In-Reply-To: <4FEAC9AE.4090001@cn.fujitsu.com>
From: Yanfei Zhang <zhangyanfei@cn.fujitsu.com>
Subject: [PATCH v3 1/5] x86: Add helper variables and functions to hold VMCSINFO
Date: Wed, 27 Jun 2012 16:51:58 +0800
> This patch provides a set of variables to hold the VMCSINFO and also
> some helper functions to help fill the VMCSINFO.
>
> Signed-off-by: zhangyanfei <zhangyanfei@cn.fujitsu.com>
> ---
> arch/x86/include/asm/vmcsinfo.h | 219 ++++++++++++++++++++++
> arch/x86/include/asm/vmx.h | 158 +----------------
> arch/x86/kernel/Makefile | 1 +
> arch/x86/kernel/vmcsinfo.c | 381 +++++++++++++++++++++++++++++++++++++++
> 4 files changed, 603 insertions(+), 156 deletions(-)
> create mode 100644 arch/x86/include/asm/vmcsinfo.h
> create mode 100644 arch/x86/kernel/vmcsinfo.c
>
> diff --git a/arch/x86/include/asm/vmcsinfo.h b/arch/x86/include/asm/vmcsinfo.h
> new file mode 100644
> index 0000000..4b9f56b
> --- /dev/null
> +++ b/arch/x86/include/asm/vmcsinfo.h
> @@ -0,0 +1,219 @@
> +#ifndef _ASM_X86_VMCSINFO_H
> +#define _ASM_X86_VMCSINFO_H
> +
> +#ifndef __ASSEMBLY__
> +#include <linux/types.h>
> +#include <linux/elf.h>
> +#include <linux/device.h>
> +
> +/* VMCS Encodings */
> +enum vmcs_field {
> + VIRTUAL_PROCESSOR_ID = 0x00000000,
<cut>
> + HOST_RIP = 0x00006c16,
> +};
> +
> +/*
> + * vmcs field offsets.
> + */
> +struct vmcsinfo {
> + u32 vmcs_revision_id;
> + int filled;
> + u16 vmcs_field_to_offset_table[HOST_RIP + 1];
HOST_RIP is so large that this array becomes large. Also there are
unused elements in this array because field encoding is not indexed
constantly.
Instead, how about defining the numbr of vmcs fields, 152?, as a
specific constant, indexing each fields using integers and newly
preparing index_to_field_table[]?
Thanks.
HATAYAMA, Daisuke
next prev parent reply other threads:[~2012-06-29 1:55 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 [this message]
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
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=20120629.105442.297827463.d.hatayama@jp.fujitsu.com \
--to=d.hatayama@jp.fujitsu.com \
--cc=avi@redhat.com \
--cc=dzickus@redhat.com \
--cc=ebiederm@xmission.com \
--cc=gregkh@linuxfoundation.org \
--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
all inboxes | Powered by JetHome®