[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YQfnlBwyZUJyixQX@8bytes.org>
Date: Mon, 2 Aug 2021 14:39:48 +0200
From: Joerg Roedel <joro@...tes.org>
To: Tianyu Lan <ltykernel@...il.com>
Cc: kys@...rosoft.com, haiyangz@...rosoft.com, sthemmin@...rosoft.com,
wei.liu@...nel.org, decui@...rosoft.com, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, x86@...nel.org, hpa@...or.com,
dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
konrad.wilk@...cle.com, boris.ostrovsky@...cle.com,
jgross@...e.com, sstabellini@...nel.org, will@...nel.org,
davem@...emloft.net, kuba@...nel.org, jejb@...ux.ibm.com,
martin.petersen@...cle.com, arnd@...db.de, hch@....de,
m.szyprowski@...sung.com, robin.murphy@....com,
thomas.lendacky@....com, brijesh.singh@....com, ardb@...nel.org,
Tianyu.Lan@...rosoft.com, rientjes@...gle.com,
martin.b.radev@...il.com, akpm@...ux-foundation.org,
rppt@...nel.org, kirill.shutemov@...ux.intel.com,
aneesh.kumar@...ux.ibm.com, krish.sadhukhan@...cle.com,
saravanand@...com, xen-devel@...ts.xenproject.org,
pgonda@...gle.com, david@...hat.com, keescook@...omium.org,
hannes@...xchg.org, sfr@...b.auug.org.au,
michael.h.kelley@...rosoft.com, iommu@...ts.linux-foundation.org,
linux-arch@...r.kernel.org, linux-hyperv@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
netdev@...r.kernel.org, vkuznets@...hat.com, anparri@...rosoft.com
Subject: Re: [PATCH 06/13] HV: Add ghcb hvcall support for SNP VM
On Wed, Jul 28, 2021 at 10:52:21AM -0400, Tianyu Lan wrote:
> + hv_ghcb->ghcb.protocol_version = 1;
> + hv_ghcb->ghcb.ghcb_usage = 1;
The values set to ghcb_usage deserve some defines (here and below).
> +
> + hv_ghcb->hypercall.outputgpa = (u64)output;
> + hv_ghcb->hypercall.hypercallinput.asuint64 = 0;
> + hv_ghcb->hypercall.hypercallinput.callcode = control;
> +
> + if (input_size)
> + memcpy(hv_ghcb->hypercall.hypercalldata, input, input_size);
> +
> + VMGEXIT();
> +
> + hv_ghcb->ghcb.ghcb_usage = 0xffffffff;
...
> union hv_ghcb {
> struct ghcb ghcb;
> + struct {
> + u64 hypercalldata[509];
> + u64 outputgpa;
> + union {
> + union {
> + struct {
> + u32 callcode : 16;
> + u32 isfast : 1;
> + u32 reserved1 : 14;
> + u32 isnested : 1;
> + u32 countofelements : 12;
> + u32 reserved2 : 4;
> + u32 repstartindex : 12;
> + u32 reserved3 : 4;
> + };
> + u64 asuint64;
> + } hypercallinput;
> + union {
> + struct {
> + u16 callstatus;
> + u16 reserved1;
> + u32 elementsprocessed : 12;
> + u32 reserved2 : 20;
> + };
> + u64 asunit64;
> + } hypercalloutput;
> + };
> + u64 reserved2;
> + } hypercall;
Okay, this answers my previous question :)
Powered by blists - more mailing lists