[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220106150815.2upux2pelguazfue@box.shutemov.name>
Date: Thu, 6 Jan 2022 18:08:15 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...el.com, luto@...nel.org, peterz@...radead.org,
sathyanarayanan.kuppuswamy@...ux.intel.com, aarcange@...hat.com,
ak@...ux.intel.com, dan.j.williams@...el.com, david@...hat.com,
hpa@...or.com, jgross@...e.com, jmattson@...gle.com,
joro@...tes.org, knsathya@...nel.org, pbonzini@...hat.com,
sdeep@...are.com, seanjc@...gle.com, tony.luck@...el.com,
vkuznets@...hat.com, wanpengli@...cent.com, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 08/26] x86/tdx: Handle in-kernel MMIO
On Wed, Dec 15, 2021 at 03:31:16PM -0800, Josh Poimboeuf wrote:
> > +static int tdx_handle_mmio(struct pt_regs *regs, struct ve_info *ve)
>
> Similarly, tdx_handle_mmio() returns (int) 0 for success, while other
> tdx_handle_*() functions return (bool) true for success. Also
> confusing.
Looked at this again, you read it wrong. tdx_handle_mmio() return size of
instruction it handled so we can advance RIP and <= 0 on error. It is
consistent with other #VE handlers that positive (true) on success.
--
Kirill A. Shutemov
Powered by blists - more mailing lists