From nobody Thu Nov 6 06:14:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539866096257787.4521987381627; Thu, 18 Oct 2018 05:34:56 -0700 (PDT) Received: from localhost ([::1]:42118 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gD7Vi-0002nf-6O for importer@patchew.org; Thu, 18 Oct 2018 08:34:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gD7Uk-0002WP-Fe for qemu-devel@nongnu.org; Thu, 18 Oct 2018 08:33:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gD7Uf-0005SC-Gj for qemu-devel@nongnu.org; Thu, 18 Oct 2018 08:33:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51294) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gD7Ue-0005P8-JT for qemu-devel@nongnu.org; Thu, 18 Oct 2018 08:33:37 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 61E08653C7 for ; Thu, 18 Oct 2018 12:33:34 +0000 (UTC) Received: from donizetti.redhat.com (unknown [10.36.112.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9DD40537A7 for ; Thu, 18 Oct 2018 12:33:33 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 18 Oct 2018 14:33:32 +0200 Message-Id: <20181018123332.23518-1-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 18 Oct 2018 12:33:34 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] target-i386: kvm: do not initialize padding fields X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The exception.pad field is going to be renamed to pending in an upcoming he= ader file update. Remove the unnecessary initialization. Signed-off-by: Paolo Bonzini --- linux-headers/asm-x86/kvm.h | 5 +---- target/i386/kvm.c | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h index 7a7acf9e47..dabfcf7c39 100644 --- a/linux-headers/asm-x86/kvm.h +++ b/linux-headers/asm-x86/kvm.h @@ -300,10 +300,7 @@ struct kvm_vcpu_events { __u8 injected; __u8 nr; __u8 has_error_code; - union { - __u8 pad; - __u8 pending; - } + __u8 pending; __u32 error_code; } exception; struct { diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 6e5f951f4f..74193b1b9d 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -2696,7 +2696,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.exception.nr =3D env->exception_injected; events.exception.has_error_code =3D env->has_error_code; events.exception.error_code =3D env->error_code; - events.exception.pad =3D 0; =20 events.interrupt.injected =3D (env->interrupt_injected >=3D 0); events.interrupt.nr =3D env->interrupt_injected; @@ -2705,7 +2704,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.nmi.injected =3D env->nmi_injected; events.nmi.pending =3D env->nmi_pending; events.nmi.masked =3D !!(env->hflags2 & HF2_NMI_MASK); - events.nmi.pad =3D 0; =20 events.sipi_vector =3D env->sipi_vector; events.flags =3D 0; --=20 2.17.1