[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <877d8s22c6.ffs@tglx>
Date: Thu, 17 Mar 2022 13:25:13 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
mingo@...hat.com, bp@...en8.de, dave.hansen@...el.com,
luto@...nel.org, peterz@...radead.org
Cc: 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, jpoimboe@...hat.com, knsathya@...nel.org,
pbonzini@...hat.com, sdeep@...are.com, seanjc@...gle.com,
tony.luck@...el.com, vkuznets@...hat.com, wanpengli@...cent.com,
thomas.lendacky@....com, brijesh.singh@....com, x86@...nel.org,
linux-kernel@...r.kernel.org,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [PATCHv6 17/30] x86/tdx: Port I/O: add runtime hypercalls
On Wed, Mar 16 2022 at 05:08, Kirill A. Shutemov wrote:
> +static bool handle_in(struct pt_regs *regs, int size, int port)
> +{
> + struct tdx_hypercall_args args = {
> + .r10 = TDX_HYPERCALL_STANDARD,
> + .r11 = hcall_func(EXIT_REASON_IO_INSTRUCTION),
> + .r12 = size,
> + .r13 = PORT_READ,
> + .r14 = port,
> + };
> + bool success;
> + u64 mask = GENMASK(BITS_PER_BYTE * size, 0);
Reverse fir tree ordering please:
u64 mask = GENMASK(BITS_PER_BYTE * size, 0);
bool success;
> +/*
> + * Emulate I/O using hypercall.
> + *
> + * Assumes the IO instruction was using ax, which is enforced
> + * by the standard io.h macros.
> + *
> + * Return True on success or False on failure.
> + */
> +static bool handle_io(struct pt_regs *regs, u32 exit_qual)
> +{
> + bool in;
> + int size, port;
Ditto.
Other than that:
Reviewed-by: Thomas Gleixner <tglx@...utronix.de>
Powered by blists - more mailing lists