Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=85.214.250.239 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796120607; b=Hp9jAWt+oiw4Xz8eeoqVM7b1Ful1P07swmvTYJTegPeCF/XrTDP+6FIYII88o8FgLb7h wn9tjoNc8HMHXfXSwzNWbBoBqlrC0ikbeEnxfMq6TLvw0oc5pCS5SOyJkkQcqaBVAWSW5 R8ON2rL0HLjsa4FYC7iLRwz/NkLqxjNBitg+ysZHmz4w+oSay8z8nwr+Y40xVc3QSzUCK 2n6adkxlfDSyF3/RhSkU6G58agIrWmhkDClstH/GhPVa8JCufudW5ULCl7R42CAE0Lcjf lM0Pz0gQqR6tkf6R9OhT3ju4uhzc0m26lC6KS11qAC1frLrZFn54XqsjBnc/OWCs0pQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796120607; h=DMARC-Filter:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=OawoDf/PmeQqD7eY6FHyAcjhR+a4c60gyt7IY5Vf1tg=; b=jMvRsNecDEHTssVy6UFUqtYgCOBqEjNnE4wxxjt8v9ymI3onrW3BjREcxlkkweBLNvqx sRFkU3WB4D8npV4b3L5zW2VCcimT1pbnP6c47TkDLC8uFtsg90SENdA84OTf+bev2VbnS Drn+3Em+uIOR7FxfQ85TWAGRiBIKFtAJjiR0+yagtW7DkdXUPxunt4X9wDkPwzS/zJpJm kGn8GVH3jDJD4C5oHIyngHNGdpCRDDcpySy8hU9gGMCGxLhqaLrYJ6Acrii2/ugheQP67 3VRxRrA2u6bjfj7ia1HlqOORPJpcQ5yMVuM5A//XhFLrPE5IVU+uQdNrKnNneoDCRcQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=8bytes.org; spf=pass smtp.mailfrom=8bytes.org; arc=none smtp.remote-ip=85.214.250.239 Received: from mail.8bytes.org (mail.8bytes.org [85.214.250.239]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B9E56606A320 for ; Tue, 1 Dec 2026 10:23:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B9E56606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=8bytes.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=8bytes.org Received: from 8bytes.org (p549216fa.dip0.t-ipconnect.de [84.146.22.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.8bytes.org (Postfix) with ESMTPSA id 351FE2457D1; Tue, 1 Dec 2026 11:23:25 +0100 (CET) Date: Tue, 1 Dec 2026 11:23:24 +0100 From: =?utf-8?B?SsO2cmcgUsO2ZGVs?= To: sashiko-reviews@lists.linux.dev Cc: kvm@vger.kernel.org Subject: Re: [PATCH v4 3/7] KVM: SVM: Implement GET_AP_APIC_IDS NAE event Message-ID: References: <20261201094525.1240736-1-joro@8bytes.org> <20261201094525.1240736-4-joro@8bytes.org> X-Mailing-List: kvm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Dec 01, 2026 at 10:00:56AM +0000, sashiko-bot@kernel.org wrote: > > + if (signal_pending(current)) > > + return -EINTR; > > + cond_resched(); > > [Severity: High] > Does returning -EINTR here leave the SVM_VMGEXIT_GET_APIC_IDS event > uncompleted while telling the guest it succeeded? > > Before dispatching to sev_snp_get_apic_ids(), sev_handle_vmgexit() clears > ghcb->save.valid_bitmap in sev_es_sync_from_ghcb() and presets the GHCB > return code to success via svm_vmgexit_success(svm, 0). Hardware has > already advanced the guest RIP past VMGEXIT, and no > vcpu->arch.complete_userspace_io callback is installed when returning > -EINTR. On the next KVM_RUN, svm_prepare_switch_to_guest() syncs the > preset success status back to the GHCB and resumes the guest past VMGEXIT > without ever writing the APIC ID descriptor to guest memory. Agreed, this hunk is over-cautious and can be trimmed down to the cond_resched(). -Joerg