lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221103000530.GA954260@ls.amr.corp.intel.com>
Date:   Wed, 2 Nov 2022 17:05:30 -0700
From:   Isaku Yamahata <isaku.yamahata@...il.com>
To:     Binbin Wu <binbin.wu@...ux.intel.com>
Cc:     isaku.yamahata@...el.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, isaku.yamahata@...il.com,
        Paolo Bonzini <pbonzini@...hat.com>, erdemaktas@...gle.com,
        Sean Christopherson <seanjc@...gle.com>,
        Sagi Shahar <sagis@...gle.com>,
        David Matlack <dmatlack@...gle.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>
Subject: Re: [PATCH v10 010/108] KVM: TDX: Add TDX "architectural" error codes

On Mon, Oct 31, 2022 at 05:22:13PM +0800,
Binbin Wu <binbin.wu@...ux.intel.com> wrote:

> 
> On 2022/10/30 14:22, isaku.yamahata@...el.com wrote:
> > From: Sean Christopherson <sean.j.christopherson@...el.com>
> > 
> > Add error codes for the TDX SEAMCALLs both for TDX VMM side for TDH
> > SEAMCALL and TDX guest side for TDG.VP.VMCALL.  KVM issues the TDX
> > SEAMCALLs and checks its error code.  KVM handles hypercall from the TDX
> > guest and may return an error.  So error code for the TDX guest is also
> > needed.
> > 
> > TDX SEAMCALL uses bits 31:0 to return more information, so these error
> > codes will only exactly match RAX[63:32].  Error codes for TDG.VP.VMCALL is
> > defined by TDX Guest-Host-Communication interface spec.
> > 
> > Signed-off-by: Sean Christopherson <sean.j.christopherson@...el.com>
> > Signed-off-by: Isaku Yamahata <isaku.yamahata@...el.com>
> > Reviewed-by: Paolo Bonzini <pbonzini@...hat.com>
> > ---
> >   arch/x86/kvm/vmx/tdx_errno.h | 38 ++++++++++++++++++++++++++++++++++++
> >   1 file changed, 38 insertions(+)
> >   create mode 100644 arch/x86/kvm/vmx/tdx_errno.h
> > 
> > diff --git a/arch/x86/kvm/vmx/tdx_errno.h b/arch/x86/kvm/vmx/tdx_errno.h
> > new file mode 100644
> > index 000000000000..ce246ba62454
> > --- /dev/null
> > +++ b/arch/x86/kvm/vmx/tdx_errno.h
> > @@ -0,0 +1,38 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/* architectural status code for SEAMCALL */
> > +
> > +#ifndef __KVM_X86_TDX_ERRNO_H
> > +#define __KVM_X86_TDX_ERRNO_H
> > +
> > +#define TDX_SEAMCALL_STATUS_MASK		0xFFFFFFFF00000000ULL
> > +
> > +/*
> > + * TDX SEAMCALL Status Codes (returned in RAX)
> > + */
> > +#define TDX_SUCCESS				0x0000000000000000ULL
> > +#define TDX_NON_RECOVERABLE_VCPU		0x4000000100000000ULL
> > +#define TDX_INTERRUPTED_RESUMABLE		0x8000000300000000ULL
> > +#define TDX_OPERAND_BUSY                        0x8000020000000000ULL
> 
> one minor format issue, spaces are used  instread of tabs this line.

Thanks, fixed it locally. It will be include in the next respin.
-- 
Isaku Yamahata <isaku.yamahata@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ