From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f202.google.com (mail-pf1-f202.google.com [209.85.210.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 AD0EA1F1932 for ; Tue, 6 Jan 2026 04:12:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767672777; cv=none; b=VtpMwgEMTzQz+QHtU53fcF9lHdFW1AdbcEufIt8pYA+/YUYCLoAA/aOPCFX/Rh8le0NucwRxfOKr5LZifCrRtJ8N0r1B+m/Iq9rSWXhEcQ7H9lFgQbsJ00bODRkdTtkYJ3yiL9PeRgBt8ZESwF963t2Xird948o3/1YLpq3K1/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767672777; c=relaxed/simple; bh=/gvhaYPwCpvXxA5BAYEaXPq10p9VEf+RX3p6hwx3rWw=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=tyobZT0WHQGzVOys0gSGPeI6xa5+HTfsKV/tRQbiBDG+rr3rdXXmJwoWuDl4tlf1UENYWXkYrrKncHLtDhtn0VglCtYMQWqQuXDBVH0x6GpK++iDrM1MmL1v70+48ytGlt9q3RIa+tI5f0g9Gvp/ZHDr3g+bmt0WXz5WXc1JutA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--chengkev.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=GU6Jdc4b; arc=none smtp.client-ip=209.85.210.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--chengkev.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="GU6Jdc4b" Received: by mail-pf1-f202.google.com with SMTP id d2e1a72fcca58-7b90740249dso1166960b3a.0 for ; Mon, 05 Jan 2026 20:12:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767672775; x=1768277575; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=8bO2RxH3D3Alpkfn/EAlJ4/QlkbXyQjaqL8DCAG5FfM=; b=GU6Jdc4bkallOeoDlSWSbJNlU5myjB9H20JYEIM4ewC0GCpIUxeoR03/tC8CqpWnD1 Ax4OgFXBQEIosvzjCXXCB0/amYftPp5opZIFy7y6Aj4SM4SsPfU/t8QaVOE/Lp3uEq09 JlfJFEEZP98fPnrttTbVTaSJ27T+uzgIIERznLK019/tpg9I/VdSR2xcWx/j5T6khxkj J/SZX6M3YLPXt7tdoWea4xkUe9PBbEHGTsVe4n96AKRUS16dfR4DZ/YxglBr7r2yiZm9 tKQapRnoyyd+ExOYFnpveax/B8PTJ0WCS0POATuPd2REeO2u/ohPlVPcPA9uLQ/bbbQf SlCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767672775; x=1768277575; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=8bO2RxH3D3Alpkfn/EAlJ4/QlkbXyQjaqL8DCAG5FfM=; b=cWU0bDYTtR1ND9MeYRiduMy4xWsWyjrIseCeHwL9KY5jM/TiKpyO1fL2h63m++Uu15 XyhWLpW76SF1luJ5Q2xk1i6g1eCtBlRAujm7ikJ31kE+gip3UP9f18ol/AcZYVmDdjLg bkFjh2W43VX177RzUDpzFNXGWa6UH6JKd3Ueh+YOs+0j5Kx0cFoe57zbTfvxuA8IL63G UUiVsC+i4935Fs3a20yyyL9oQ8dWZ9qppfyLDypXiRAYEb1HYtUtX0+Sah84eZpi0bGU Y7se+RxVunHTsRkbPZdEz5XQZcV/9Lq3WpuhIxZWTA9U7xBPkkRuUEa0G6coux9WxtnU jLVg== X-Forwarded-Encrypted: i=1; AJvYcCWl4pfbWbH2zzZR/U7pNAZmrBju1MFDZNd8m1a5qUYEQGe9jdAiJO1c1Xwp0ik9AeDVAHahnxNzpPkqNJc=@vger.kernel.org X-Gm-Message-State: AOJu0Yx4hicm5BGXKsvmfdIpT+3G5ujW4WgLxhL80yvQM3XJLnT8HHCy tPDQ3dGDEBqvhcoZwnqDOcJ7dJe0/QulPxHwCMNZkbvmfuwxdjlWBPFt7KkaPyknXHVIXCEwpxo cn1Na0ziev/j8Ww== X-Google-Smtp-Source: AGHT+IG1pp40YNhQAPBjufXd8JnGqBmu0CqG5BPG/UL4lB+QRuhuVzfr+72eXDweD9+4CrvY2q6pd26uBjnniQ== X-Received: from pjyt20.prod.google.com ([2002:a17:90a:e514:b0:34c:2156:9de7]) (user=chengkev job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a20:12d5:b0:366:14ac:e207 with SMTP id adf61e73a8af0-389823cbc9amr1214150637.69.1767672774767; Mon, 05 Jan 2026 20:12:54 -0800 (PST) Date: Tue, 6 Jan 2026 04:12:48 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.52.0.351.gbe84eed79e-goog Message-ID: <20260106041250.2125920-1-chengkev@google.com> Subject: [PATCH 0/2] KVM: SVM: Align SVM with APM defined behaviors From: Kevin Cheng To: seanjc@google.com, pbonzini@redhat.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, yosry.ahmed@linux.dev, Kevin Cheng Content-Type: text/plain; charset="UTF-8" The APM lists the following behaviors - The VMRUN, VMLOAD, VMSAVE, CLGI, VMMCALL, and INVLPGA instructions can be used when the EFER.SVME is set to 1; otherwise, these instructions generate a #UD exception. - If VMMCALL instruction is not intercepted, the instruction raises a #UD exception. The patches in this series fix current SVM bugs that do not adhere to the APM listed behaviors. Kevin Cheng (2): KVM: SVM: Generate #UD for certain instructions when SVME.EFER is disabled KVM: SVM: Raise #UD if VMMCALL instruction is not intercepted arch/x86/kvm/svm/svm.c | 43 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) -- 2.52.0.351.gbe84eed79e-goog