Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8F212750E3 for ; Fri, 18 Apr 2025 13:24:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744982656; cv=none; b=AQ19JC17iEFgsrxvm+7PWPGeO+wQ39XZZs3b+BpXjvzaPL/SAkdHU0wlOT2l7OSDmOZxpa9SR+YbC2h3/DVS9oepV9RRRK4IOADGOQM3kHVDYF0QjAJU5taOxHl8nfXMSC8t4Lvh35iI9SJoq01kp5hQmXqpARAL6TO7kDNUbZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744982656; c=relaxed/simple; bh=RlPhNx/nNmStltXGWAwNHiXuJoj2D8quI0BhAJ6OxJ0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=cP0sbiOBMIXrhHgN5Fx1hL1dABDAD42x4b1ReZFomsP/vDpekpo9k8tU3Z0MIQHCd0gYg4ioZ1JjmnEsIjKYsg+xLB3a8Xl0lkYOc2DJlUqTauUCGg5By2CqqRZNm+V22y15vitHZWJxe0P3kULKfBmZ6gl9ggUR3cfXpZ5dGCc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=DRbDZO5E; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DRbDZO5E" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1744982653; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=5UQ6/+3oQb1tjzN9cWkNoxYdcLnK3LxRUjzM5Oau87k=; b=DRbDZO5EZI8XHvz8Wwh/k5jEvu7zfNlre0/KdzfJJA8TaE0izTCCkE/P535lCVYu4GXI+6 9lAJsdJSAn33BJFkKqo22rRINArXjxlUxvw3tObUYyzIWavn7selfOaPzUJHaGGUc6a6Ew PenDoKDiQliP9BlPcBf7bcgCYyqEBvQ= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-594-cn3i7PB6PYqDz7cNFredJQ-1; Fri, 18 Apr 2025 09:24:12 -0400 X-MC-Unique: cn3i7PB6PYqDz7cNFredJQ-1 X-Mimecast-MFC-AGG-ID: cn3i7PB6PYqDz7cNFredJQ_1744982651 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-43cf5196c25so9972105e9.0 for ; Fri, 18 Apr 2025 06:24:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744982651; x=1745587451; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5UQ6/+3oQb1tjzN9cWkNoxYdcLnK3LxRUjzM5Oau87k=; b=aUnWNRO/KJW3bkEbtMafITIjGCQXqi5TgwexIBQeA+aKSGjKf6soCaXh572tRPMx8i uyA0AeSvth6HODyzCBS3MNtpeoOCKjdMZUx5TUGjgcMCM7RyolkBOUK4rkoOk7Inkka3 9UIHEO0oIfaHgx6XpFwXkhADeOHgi/qD5hQSwRfDTrLXKe+KRJuwyJAroKfZJ5BOJOQc RTnzQ9MD17m/JDgGo4to0kUq11D1BC0Kh5DzC96Q0sNdgPUj+HF4BKUL/QnzJk0tULV/ 1ZOdQZgY/7fy4TCdugJQED3xEfW4zxFdcaMdN8okY/ErYTmG3NO+Fg3Gy2Bsq4CtZf5M /xiQ== X-Forwarded-Encrypted: i=1; AJvYcCUXBsoo3tLDeaWX3e+1pi5ac76Ox2GE9lVc3Z+lC6M59ryzIZzsh5hSxL1lfIrOzNGeAqE=@vger.kernel.org X-Gm-Message-State: AOJu0YzHZ9fib3RdH0z0BuUAHfl9PB8YQxKEgxKllvdWoTjXpH5/jb9t 8TwoEdizatvn0R0H1EwxddO/Z7m++QCQtQ5n8CQXe6hBViYzkoo6VuAViKO71bJxedT53aHp0Of gzIFre8nXr4nlU/PHFbpdtIS/V55F5laFUbKHEBfI+7+XRZxo3A== X-Gm-Gg: ASbGncvNAB06L2w9N5eKiBmf3DceyLFzyEGsZxoXOSf+wc6ywqHqioNHb1JmFChVQ45 7YJFvhT1FTjqHXhMem0PT9+wJPdkje6fIoEZbIi1BogwWChfjDNFJ/TVICiDyBmYM6Sm+9KWhlZ 5SsT1oFBDkEcWFOI178HUq+uzUW96m/Jt0qENeWzTnK3atq7bpSJCTj82kxc4eVbLYQE5/S48oi oHWsCTrU/TqFonURtfVJH5Kgt77YLSylKjH+eCvM8302qeug+q3c8eLSVxugT5WZWcPVR/yT5Tz 83jzjt8jr4Rx6jLx X-Received: by 2002:a05:600c:b8c:b0:43c:fc04:6d48 with SMTP id 5b1f17b1804b1-4406aa8955bmr27911065e9.0.1744982651046; Fri, 18 Apr 2025 06:24:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfOv8iP8QHLv6XekfBLzXqa/9oYoz4nDuo1TpO+AGtOSinMyHlY+ittfoBromOe3HGl1XlEw== X-Received: by 2002:a05:600c:b8c:b0:43c:fc04:6d48 with SMTP id 5b1f17b1804b1-4406aa8955bmr27910855e9.0.1744982650667; Fri, 18 Apr 2025 06:24:10 -0700 (PDT) Received: from [192.168.10.81] ([176.206.109.83]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-4406d5bbc07sm22711245e9.17.2025.04.18.06.24.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Apr 2025 06:24:10 -0700 (PDT) Message-ID: <5e7e8cb7-27b2-416d-9262-e585034327be@redhat.com> Date: Fri, 18 Apr 2025 15:24:09 +0200 Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Drop "KVM: TDX: Handle TDG.VP.VMCALL hypercall" To: "Edgecombe, Rick P" , "seanjc@google.com" Cc: "Li, Xiaoyao" , "kvm@vger.kernel.org" , "Wu, Binbin" References: From: Paolo Bonzini Content-Language: en-US Autocrypt: addr=pbonzini@redhat.com; keydata= xsEhBFRCcBIBDqDGsz4K0zZun3jh+U6Z9wNGLKQ0kSFyjN38gMqU1SfP+TUNQepFHb/Gc0E2 CxXPkIBTvYY+ZPkoTh5xF9oS1jqI8iRLzouzF8yXs3QjQIZ2SfuCxSVwlV65jotcjD2FTN04 hVopm9llFijNZpVIOGUTqzM4U55sdsCcZUluWM6x4HSOdw5F5Utxfp1wOjD/v92Lrax0hjiX DResHSt48q+8FrZzY+AUbkUS+Jm34qjswdrgsC5uxeVcLkBgWLmov2kMaMROT0YmFY6A3m1S P/kXmHDXxhe23gKb3dgwxUTpENDBGcfEzrzilWueOeUWiOcWuFOed/C3SyijBx3Av/lbCsHU Vx6pMycNTdzU1BuAroB+Y3mNEuW56Yd44jlInzG2UOwt9XjjdKkJZ1g0P9dwptwLEgTEd3Fo UdhAQyRXGYO8oROiuh+RZ1lXp6AQ4ZjoyH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yof3B3shR+vMY3i3Ip0e41zKx0CvlAhMOo6otaHmcxr35sWq1Jk tLkbn3wG+fPQCVudJJECvVQ//UAthSSEklA50QtD2sBkmQ14ZryEyTHQ+E42K3j2IUmOLriF dNr9NvE1QGmGyIcbw2NIVEBOK/GWxkS5+dmxM2iD4Jdaf2nSn3jlHjEXoPwpMs0KZsgdU0pP JQzMUMwmB1wM8JxovFlPYrhNT9MAEQEAAcLBMwQYAQIACQUCVEJx7gIbDAAKCRB+FRAMzTZp sadRDqCctLmYICZu4GSnie4lKXl+HqlLanpVMOoFNnWs9oRP47MbE2wv8OaYh5pNR9VVgyhD OG0AU7oidG36OeUlrFDTfnPYYSF/mPCxHttosyt8O5kabxnIPv2URuAxDByz+iVbL+RjKaGM GDph56ZTswlx75nZVtIukqzLAQ5fa8OALSGum0cFi4ptZUOhDNz1onz61klD6z3MODi0sBZN Aj6guB2L/+2ZwElZEeRBERRd/uommlYuToAXfNRdUwrwl9gRMiA0WSyTb190zneRRDfpSK5d usXnM/O+kr3Dm+Ui+UioPf6wgbn3T0o6I5BhVhs4h4hWmIW7iNhPjX1iybXfmb1gAFfjtHfL xRUr64svXpyfJMScIQtBAm0ihWPltXkyITA92ngCmPdHa6M1hMh4RDX+Jf1fiWubzp1voAg0 JBrdmNZSQDz0iKmSrx8xkoXYfA3bgtFN8WJH2xgFL28XnqY4M6dLhJwV3z08tPSRqYFm4NMP dRsn0/7oymhneL8RthIvjDDQ5ktUjMe8LtHr70OZE/TT88qvEdhiIVUogHdo4qBrk41+gGQh b906Dudw5YhTJFU3nC6bbF2nrLlB4C/XSiH76ZvqzV0Z/cAMBo5NF/w= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/16/25 05:12, Edgecombe, Rick P wrote: > Hi, > > We should consider dropping/reverting "KVM: TDX: Handle > TDG.VP.VMCALL hypercall" from the base TDX merge. The reason is > because Xiaoyao noticed that the GHCI spec[0] implies that KVM should only > return success for that TDVMCALL if *all* TDVMCALLs are supported, but KVM does > that despite skipping implementing a few. On investigation there are also no > users except its selftest[1], and the spec is ambiguous on the right way to > handle the case in question. > > The spec talks about VMMs not supporting all TDVMCALLs, but doesn't say how to > enumerate this (i.e. it doesn't says what the GetTdVmCallInfo VMMs should do > instead of succeed). It actually doesn't cover how to handle if the guest calls > an unsupported TDVMCALL either. Historically, KVM patches have returned > TDVMCALL_STATUS_INVALID_OPERAND for any unknown TDVMCALL, as a reasonable > interpretation of the ambiguous spec. So the spec needs to get clarified in this > whole area. It does, but I think we should just implement the remaining TDVMCALLs before 6.16 is out, which is in a while. All that is left is really the userspace TDVMCALLs GetQuote, ReportFatalError and SetupEventNotifyInterrupt. For Instruction.PCONFIG and for VE.RequestMMIO a dummy implementation is valid and returning success is probably even better than invalid-operand. Paolo > Since there are no real callers let's just drop GetTdVmCallInfo for now. We can > add it back when the GHCI folks amend the spec to close the ambiguities. As a > bonus we can save some code for the merge. > > We dropped the patch internally and did some testing. Also, Binbin and I > searched the guest code for any rare callers. Everything seems fine to drop it. > > If we want to leave it in, it's probably not a disaster. We'll just slightly > diverge from the spec. It may not be a problem depending on how the ambiguity > resolves in future spec updates. > > Thanks, > > Rick > > [0] > https://www.intel.com/content/www/us/en/content-details/726790/guest-host-communication-interface-ghci-for-intel-trust-domain-extensions-intel-tdx.html > [1] > https://lore.kernel.org/kvm/20250414214801.2693294-14-sagis@google.com/