Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2941830pxb; Tue, 24 Aug 2021 11:05:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzerpjVoR6vyzrU7HjZTsA41A9YntmsKPVFR744zNxQgZoYvZYbfQxYhLUFWIyCzwI+OWfN X-Received: by 2002:a17:906:b890:: with SMTP id hb16mr40837622ejb.383.1629828349014; Tue, 24 Aug 2021 11:05:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629828349; cv=none; d=google.com; s=arc-20160816; b=ZfcL/EWQgG2VKyKwcSMx3RrY+yb14Ef/uiTNt+zWR7FmgFSu08HSN7fp0AVEtOVoQf lW8sfHID4GR4jqEgVgZPYpldCIGbL/73KQny6CbG3517kjDpjylQazZSR/mOpUSKCAfA PcPFTXV0V0k1eYOwKyGZs7+cLrkED86MRTSdVlV8q+3KeKEyVyz2WJKM/TZ2Sb8GRnKy IYD/vMbF1AI+epj3XSfgowBx8V1zJDD7czys6xOFGaNBnpGFHEQdgwcB/Y034CDVFlq0 yg6w2UKOq1XpOrH+nNMOC1pWkIiM0DvZW2jCvVBI5ec0coQdp4BhJqCGqrku9uVNxmNe v1FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=x6kMnBnYAQ1onlDR/PwEEWYr/kh4xuIO8/rUqK4QT2s=; b=GH9zDOe4iReegQDPA7uBqrTnPtcg3sI3M+CNfYcq7P5mljuX6KbGqpNbdMsTgH4/xr kSAM+cCnUv+vampWZJ3kUY5CetwG/SJ3wZDU9kTjpgQJW8UG1BHUdQSl/pN2LiP+hUj+ OoIuWpBvMI6LT8T9VLpQHXMlUaziEeXBIBnl9JFvBBjxSD+PbklSZHHdkHwac8JZQfTZ v5ZdcmDsLIyTGtyi+sxsV/ofoZeeNVTtWjFbw+ddVtsUFjVz7IfnEI2SIVNWzOmVS7p5 cY+pjVJ2yskGCIj2mrhXi5VXkx2ee7/48EJIQENvr82TYiwLwXWscFPmPhFtnvxtNc0j pxbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=qQw1k51B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d5si2747750ejm.652.2021.08.24.11.05.24; Tue, 24 Aug 2021 11:05:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=qQw1k51B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239926AbhHXSCl (ORCPT + 99 others); Tue, 24 Aug 2021 14:02:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239739AbhHXSCf (ORCPT ); Tue, 24 Aug 2021 14:02:35 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27DA0C0363E3 for ; Tue, 24 Aug 2021 10:50:12 -0700 (PDT) Received: from zn.tnic (p200300ec2f114400ce3b938495d443bc.dip0.t-ipconnect.de [IPv6:2003:ec:2f11:4400:ce3b:9384:95d4:43bc]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id ADF891EC01FC; Tue, 24 Aug 2021 19:50:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1629827406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=x6kMnBnYAQ1onlDR/PwEEWYr/kh4xuIO8/rUqK4QT2s=; b=qQw1k51B047IfaEfHUijZr2KtnyVn6QYBpruoALaDFNfP02csF2n5jw4Eu4i/AxztMKu27 qkyhO/5agpRc4BU0AYsLQBDUg+/wM5sTIbMfc/mPt0aADTc7CtVaA0H3v/Bsj5GAirKSQO 6/wTIneDrd6M9EJghTzrrpkHvUwxexA= Date: Tue, 24 Aug 2021 19:50:49 +0200 From: Borislav Petkov To: Sean Christopherson Cc: Kuppuswamy Sathyanarayanan , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Andy Lutomirski , Peter H Anvin , Dave Hansen , Tony Luck , Dan Williams , Andi Kleen , Kirill Shutemov , Kuppuswamy Sathyanarayanan , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 08/12] x86/tdx: Add HLT support for TDX guest Message-ID: References: <20210804181329.2899708-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20210804181329.2899708-9-sathyanarayanan.kuppuswamy@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 24, 2021 at 05:47:25PM +0000, Sean Christopherson wrote: > It's passed to the (untrusted) VMM. The TDX Module has direct access to the guest's > entire FLAGS via the VMCS. > > The VMM uses the "IRQs enabled" param to understand whether or not it should > schedule the halted vCPU if an IRQ becomes pending. E.g. if IRQs are disabled > the VMM can keep the vCPU in virtual HLT, even if an IRQ is pending, without > hanging/breaking the guest. See, explanations like that need to be over those _tdx_hypercall() wrappers. Otherwise it is just random magic. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette