From: Chao Gao <chao.gao@intel.com>
To: Manali Shukla <manali.shukla@amd.com>
Cc: <kvm@vger.kernel.org>, <seanjc@google.com>,
<linux-doc@vger.kernel.org>, <linux-perf-users@vger.kernel.org>,
<x86@kernel.org>, <pbonzini@redhat.com>, <peterz@infradead.org>,
<bp@alien8.de>, <santosh.shukla@amd.com>, <ravi.bangoria@amd.com>,
<thomas.lendacky@amd.com>, <nikunj@amd.com>
Subject: Re: [PATCH 07/13] KVM: SVM: Extend VMCB area for virtualized IBS registers
Date: Tue, 12 Sep 2023 10:50:41 +0800 [thread overview]
Message-ID: <ZP/SAfoc97oS2Dqn@chao-email> (raw)
In-Reply-To: <20230904095347.14994-8-manali.shukla@amd.com>
On Mon, Sep 04, 2023 at 09:53:41AM +0000, Manali Shukla wrote:
>From: Santosh Shukla <santosh.shukla@amd.com>
>
>VMCB state save is extended to hold guest values of the fetch and op
>IBS registers.
>
>Signed-off-by: Santosh Shukla <santosh.shukla@amd.com>
>Signed-off-by: Manali Shukla <manali.shukla@amd.com>
>---
> arch/x86/include/asm/svm.h | 16 +++++++++++++++-
> 1 file changed, 15 insertions(+), 1 deletion(-)
>
>diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h
>index dee9fa91120b..4096d2f68770 100644
>--- a/arch/x86/include/asm/svm.h
>+++ b/arch/x86/include/asm/svm.h
>@@ -346,6 +346,19 @@ struct vmcb_save_area {
> u64 last_excp_to;
> u8 reserved_0x298[72];
> u64 spec_ctrl; /* Guest version of SPEC_CTRL at 0x2E0 */
>+ u8 reserved_0x2e8[904];
>+ u8 lbr_stack_from_to[256];
>+ u64 lbr_select;
Shouldn't these lbr fields be added by a separate patch/series?
>+ u64 ibs_fetch_ctl;
>+ u64 ibs_fetch_linear_addr;
>+ u64 ibs_op_ctl;
>+ u64 ibs_op_rip;
>+ u64 ibs_op_data;
>+ u64 ibs_op_data2;
>+ u64 ibs_op_data3;
>+ u64 ibs_dc_linear_addr;
>+ u64 ibs_br_target;
>+ u64 ibs_fetch_extd_ctl;
> } __packed;
>
> /* Save area definition for SEV-ES and SEV-SNP guests */
>@@ -512,7 +525,7 @@ struct ghcb {
> } __packed;
>
>
>-#define EXPECTED_VMCB_SAVE_AREA_SIZE 744
>+#define EXPECTED_VMCB_SAVE_AREA_SIZE 1992
> #define EXPECTED_GHCB_SAVE_AREA_SIZE 1032
> #define EXPECTED_SEV_ES_SAVE_AREA_SIZE 1648
> #define EXPECTED_VMCB_CONTROL_AREA_SIZE 1024
>@@ -537,6 +550,7 @@ static inline void __unused_size_checks(void)
> BUILD_BUG_RESERVED_OFFSET(vmcb_save_area, 0x180);
> BUILD_BUG_RESERVED_OFFSET(vmcb_save_area, 0x248);
> BUILD_BUG_RESERVED_OFFSET(vmcb_save_area, 0x298);
>+ BUILD_BUG_RESERVED_OFFSET(vmcb_save_area, 0x2e8);
>
> BUILD_BUG_RESERVED_OFFSET(sev_es_save_area, 0xc8);
> BUILD_BUG_RESERVED_OFFSET(sev_es_save_area, 0xcc);
>--
>2.34.1
>
next prev parent reply other threads:[~2023-09-12 3:52 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 9:53 [PATCH 00/13] Implement support for IBS virtualization Manali Shukla
2023-09-04 9:53 ` [PATCH 01/13] KVM: Add KVM_GET_LAPIC_W_EXTAPIC and KVM_SET_LAPIC_W_EXTAPIC for extapic Manali Shukla
2023-09-12 1:47 ` Chao Gao
2023-09-04 9:53 ` [PATCH 02/13] x86/cpufeatures: Add CPUID feature bit for Extended LVT Manali Shukla
2023-09-04 9:53 ` [PATCH 03/13] KVM: x86: Add emulation support for Extented LVT registers Manali Shukla
2023-09-12 2:36 ` Chao Gao
2023-09-04 9:53 ` [PATCH 04/13] x86/cpufeatures: Add CPUID feature bit for virtualized IBS Manali Shukla
2023-09-04 9:53 ` [PATCH 05/13] KVM: x86/cpuid: Add a KVM-only leaf for IBS capabilities Manali Shukla
2023-09-04 9:53 ` [PATCH 06/13] KVM: x86: Extend CPUID range to include new leaf Manali Shukla
2023-09-12 2:46 ` Chao Gao
2023-09-04 9:53 ` [PATCH 07/13] KVM: SVM: Extend VMCB area for virtualized IBS registers Manali Shukla
2023-09-12 2:50 ` Chao Gao [this message]
2023-09-04 9:53 ` [PATCH 08/13] perf/x86/amd: Add framework to save/restore host IBS state Manali Shukla
2023-09-05 14:54 ` Tom Lendacky
2023-09-04 9:53 ` [PATCH 09/13] KVM: SVM: add support for IBS virtualization for non SEV-ES guests Manali Shukla
2023-09-05 15:30 ` Tom Lendacky
2023-09-06 1:51 ` Alexey Kardashevskiy
2023-09-12 3:09 ` Chao Gao
2023-09-04 9:53 ` [PATCH 10/13] x86/cpufeatures: Add CPUID feature bit for VIBS in SEV-ES guest Manali Shukla
2023-09-04 9:53 ` [PATCH 11/13] KVM: SVM: Add support for IBS virtualization for SEV-ES guests Manali Shukla
2023-09-05 15:43 ` Tom Lendacky
2023-09-04 9:53 ` [PATCH 12/13] KVM: SVM: Enable IBS virtualization on non SEV-ES and " Manali Shukla
2023-09-05 16:00 ` Tom Lendacky
2023-09-12 3:30 ` Chao Gao
2023-09-04 9:53 ` [PATCH 13/13] KVM: x86: nSVM: Implement support for nested IBS virtualization Manali Shukla
2023-09-05 15:47 ` [PATCH 00/13] Implement support for " Peter Zijlstra
2023-09-06 15:38 ` Manali Shukla
2023-09-06 19:56 ` Peter Zijlstra
2023-09-07 15:49 ` Manali Shukla
2023-09-08 13:31 ` Peter Zijlstra
2023-09-11 12:32 ` Manali Shukla
2023-09-28 11:18 ` Manali Shukla
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=ZP/SAfoc97oS2Dqn@chao-email \
--to=chao.gao@intel.com \
--cc=bp@alien8.de \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=manali.shukla@amd.com \
--cc=nikunj@amd.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@amd.com \
--cc=santosh.shukla@amd.com \
--cc=seanjc@google.com \
--cc=thomas.lendacky@amd.com \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.