Re: [RFC PATCH V3 09/16] x86/hyperv: SEV-SNP enlightened guest don't support legacy rtc

From: Wei Liu
Date: Tue Jan 31 2023 - 09:03:56 EST


On Sat, Jan 21, 2023 at 09:45:59PM -0500, Tianyu Lan wrote:
> From: Tianyu Lan <tiala@xxxxxxxxxxxxx>
>
> SEV-SNP enlightened guest doesn't support legacy rtc. Set
> legacy.rtc, x86_platform.set_wallclock and get_wallclock to
> 0 or noop(). Make get/set_rtc_noop() to be public and reuse
> them in the ms_hyperv_init_platform().
>
> Signed-off-by: Tianyu Lan <tiala@xxxxxxxxxxxxx>
> ---
> arch/x86/include/asm/mshyperv.h | 7 ++++++-
> arch/x86/include/asm/x86_init.h | 2 ++
> arch/x86/kernel/cpu/mshyperv.c | 3 +++
> arch/x86/kernel/x86_init.c | 4 ++--
> 4 files changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
> index 1a4af0a4f29a..7266d71d30d6 100644
> --- a/arch/x86/include/asm/mshyperv.h
> +++ b/arch/x86/include/asm/mshyperv.h
> @@ -33,6 +33,12 @@ extern bool hv_isolation_type_en_snp(void);
>
> extern union hv_ghcb * __percpu *hv_ghcb_pg;
>
> +/*
> + * Hyper-V puts processor and memory layout info
> + * to this address in SEV-SNP enlightened guest.
> + */
> +#define EN_SEV_SNP_PROCESSOR_INFO_ADDR 0x802000

This hunk should be moved to the previous patch. It is not needed in
this patch.

Thanks,
Wei.