From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f202.google.com (mail-pg1-f202.google.com [209.85.215.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFCA430FF1C for ; Fri, 5 Dec 2025 17:00:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764954033; cv=none; b=cBv7pGAitBu0F82IjPkk1cUQHcmIDoMPHhYHnp2ipxuG2qSBYcyAxMLw94qEn+ClOV+4bF/8mY5o+UN1VoNw9yCfWzrSBHmD6GvfBWalw7/3iQTfe3dQvL+vmpUWuGBwty8edFR9TOWIUB0OmPZrRMV12VcfWOLYrskXG+4YB5M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764954033; c=relaxed/simple; bh=pJ8yFcPnJVTemBH5LLrP0aRwqGd9ZLrLD2YAijIxors=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=LPEJrvYvqeA8QbhJfkGtDt9ZGxKyiobMRIykgDfL/3/Yw8B3BivlbOP2OmPyvDA+n6DetGmMq8rIL78QAOjlVenNsYa+dNCWr8T3ouO0ByIBJaOtEpZy9yckxNDlTRcWPGmCs1hhfOmqeEKoKowbdwEACfUki9Q4MDGtQb/eTUw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=rQF5bwLC; arc=none smtp.client-ip=209.85.215.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="rQF5bwLC" Received: by mail-pg1-f202.google.com with SMTP id 41be03b00d2f7-bf222e5b54dso1418544a12.1 for ; Fri, 05 Dec 2025 09:00:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764954020; x=1765558820; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=j/nv/S0AF1aww/PpL3h7iNG9Cj3Ek+VrZ+ocMBY/e3g=; b=rQF5bwLC+hNbcM/gV0+GFAmEblmsbbhI9e5obXCSbrcayizSH+4XDatnwFsikanSKS 7o2aQ6GfnZKuotKTwdHI86KuhEL4R7YKeRQ80+9jGTPNnQsjfSxvwZNOlOsAlOre6znK 5PZbF7btaVYHBODZ7jfXekAMZxuVadAogL4qZ/X3Ofz4sgL9X6Usf0eIGVdjtavaRciL xdJB3vVMc/XSD+xZTLAxB3wMrNq00vIePp75djSpNeYFnvDwpAguqGO6G1ImZ+A5qGua CUTzYBLMNJARtmPySWlt1o2041D/E2zWOOcqO/lY3NaT75r0CRXao712POtflh9pqpav PH6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764954020; x=1765558820; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=j/nv/S0AF1aww/PpL3h7iNG9Cj3Ek+VrZ+ocMBY/e3g=; b=TuGnoVJKUtCItPHQZqE/qsxqrHf0vcrC65xWQ9/Jg3XmVq3hg9sg9281fpXYscyV9o Tgrz6nQtNoE7dbc49igQrXrLFlDwjI1jaVnh1vYopX36/fVb2SjxYSG8AyXH9WTt++LD +0Uw0ucUiD/yzj0IQZYMK2prpyiYUukhpGV2j8E142dXUL+ga3VdaVPrJhaJhLPP70yJ UsR1jMxIrXh0KL9k6aL0bUkx73lKFDbl7g0FXGYu8zWxxE7vFczB8Oa5g5S17bHUovJo cLiEUI2z85gL9SkumebcOHzAV0ZQ0wsMXNsq5FCJ3y2kqwgrIsrmIBpgKN5ajBJrwYHl LM5A== X-Forwarded-Encrypted: i=1; AJvYcCWClBQi/s7qo6wTXhSvJh57E3vdzLaRloHSwwnh98T86MzxzGblo6bm1U+eIp/0kfKmoZZldx4Z7PSeYIU=@vger.kernel.org X-Gm-Message-State: AOJu0YxGcCN2Zg1Wma3G+6ru3RQ9AkOmm4gWpY4RPpVBKXOJHaNM6Cfc 3gOgU6l0eSICr7w0oqPaC19p/cj4w94u6K9ezNMQXT6vEwXbvi7Hm0hyEHB1uYoPywHNE3TUOh3 yPfdIkw== X-Google-Smtp-Source: AGHT+IFYjMQLTRpb/CMPNwPd79bJ1+pRxDeYiCcgaN7JU4cjSSguLVy9KKfRzmOTpZ9lCz6rJb8slQ9scnQ= X-Received: from pgcq11.prod.google.com ([2002:a63:750b:0:b0:bac:a20:5edf]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a20:72a5:b0:364:14f3:a5b with SMTP id adf61e73a8af0-36414f30ac0mr3768954637.2.1764954020258; Fri, 05 Dec 2025 09:00:20 -0800 (PST) Date: Fri, 5 Dec 2025 08:59:29 -0800 In-Reply-To: <20251202015049.1167490-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202015049.1167490-1-seanjc@google.com> X-Mailer: git-send-email 2.52.0.223.gf5cc29aaa4-goog Message-ID: <176494721851.296449.6639753862362613097.b4-ty@google.com> Subject: Re: [PATCH 0/2] KVM: x86: Do runtime updates during KVM_SET_CPUID2 From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Igor Mammedov Content-Type: text/plain; charset="utf-8" On Mon, 01 Dec 2025 17:50:47 -0800, Sean Christopherson wrote: > Do runtime updates (if necessary) when userspace sets CPUID to fix a bug > where KVM drops a pending update (KVM will clear the dirty flag when doing > updates on the new/incoming CPUID). The bug most visibly manifests as an > -EINVAL failure on KVM_SET_CPUID{,2} due to the old/current CPUID not > matching the new/incoming CPUID, but if userspace were to continue running > past the failure, the vCPU would run with stale CPUID/caps. > > [...] Applied to kvm-x86 fixes, thanks! [1/2] KVM: x86: Apply runtime updates to current CPUID during KVM_SET_CPUID{,2} https://github.com/kvm-x86/linux/commit/e2b43fb25243 [2/2] KVM: selftests: Add a CPUID testcase for KVM_SET_CPUID2 with runtime updates https://github.com/kvm-x86/linux/commit/824d227324dc -- https://github.com/kvm-x86/linux/tree/next