From nobody Mon Feb 9 15:28:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=siemens.com ARC-Seal: i=1; a=rsa-sha256; t=1563768035; cv=none; d=zoho.com; s=zohoarc; b=YqBmUKPSVyNuzsUWCMFNPWmZvU8Fvs3MVpRJK/Iglz04LjwDnQOHwPCGqnbDC3OtUQzguxLXxJa6lYjIK/hFezYAuW/0vzsli5b1bBMgRmOysQYTk3cWTZsgfYyek7Nry+RiOyIWOB/GXT45dUolBqp9WZGY3CsEQuQPpz0Djx4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563768035; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=duENSFid2dAvPnp7eTWP7Fav01pDqxh/GKDk/XknJbo=; b=OBI+GBKbRHb6t/R3D/nMa0Tnt6WKb3Cw23NHulxdcy4DuIvhF30Sw8SdY5P9yfAcP+cEVakSGVVk737AwoWGmb6Uii1Bqm4UM/6Z6Ak/Gln74XG2qftMZ9hFLYqiiAyY54PBeflGRpuSAcLRUA6FARA/V3oruBUm4cBVb1s/Hqo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1563768035404868.1639963885362; Sun, 21 Jul 2019 21:00:35 -0700 (PDT) Received: from localhost ([::1]:58620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpPUy-0004cD-3u for importer@patchew.org; Mon, 22 Jul 2019 00:00:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47263) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpPUm-0004Dy-3s for qemu-devel@nongnu.org; Mon, 22 Jul 2019 00:00:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpPUj-00019z-L9 for qemu-devel@nongnu.org; Mon, 22 Jul 2019 00:00:16 -0400 Received: from david.siemens.de ([192.35.17.14]:35058) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hpPUj-00016P-Am for qemu-devel@nongnu.org; Mon, 22 Jul 2019 00:00:13 -0400 Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id x6M408Yj028717 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Jul 2019 06:00:09 +0200 Received: from [167.87.0.229] ([167.87.0.229]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x6M408s3025988; Mon, 22 Jul 2019 06:00:08 +0200 To: qemu-devel , Paolo Bonzini From: Jan Kiszka Message-ID: Date: Mon, 22 Jul 2019 06:00:08 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 192.35.17.14 Subject: [Qemu-devel] [PATCH] i386/kvm: Do not sync nested state during runtime X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liran Alon Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Writing the nested state e.g. after a vmport access can invalidate important parts of the kernel-internal state, and it is not needed as well. So leave this out from KVM_PUT_RUNTIME_STATE. Suggested-by: Paolo Bonzini Signed-off-by: Jan Kiszka --- target/i386/kvm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index ec7870c6af..da98b2cbca 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -3577,12 +3577,12 @@ int kvm_arch_put_registers(CPUState *cpu, int level) =20 assert(cpu_is_stopped(cpu) || qemu_cpu_is_self(cpu)); =20 - ret =3D kvm_put_nested_state(x86_cpu); - if (ret < 0) { - return ret; - } - if (level >=3D KVM_PUT_RESET_STATE) { + ret =3D kvm_put_nested_state(x86_cpu); + if (ret < 0) { + return ret; + } + ret =3D kvm_put_msr_feature_control(x86_cpu); if (ret < 0) { return ret; --=20 2.16.4