From nobody Tue Oct 22 22:21:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1718116029; cv=none; d=zohomail.com; s=zohoarc; b=IcTFN9uca4FqQabtnNIEqW7qsLJ//a2TZ8+lhB+0486pdcI7GtpoN/7BncnQ/yoikNJrpD4ceYzWst3LveZ3+Ng8PN6h8U57JcsfbPas1bDdOLhhRecrXylJDaHV0vBzSOeBWOOB+Yez0Th72YLN/rSuixDG1eQIwu67XCP/2JA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718116029; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=GKBj3BIae3wLKWizif0rfYzzEINy6nl8RdXecFWJYa8=; b=foYvPIiN4WhPf0guLutzA9QDl0j/r0bpE3NuEpZtf8wLfFs/xgDcYP5TyifLZhB6WWTw4pegHxXfO/1xsYloSPSZFm8EyAZl7p/+Jp7oP++q3HLVAJEQddmfV6/rMlblvkebPWFISkEVn6AA8a+Z6Uc39upDgRTlVkXJq6KeA3o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1718116029630698.1870865010334; Tue, 11 Jun 2024 07:27:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sH2Rj-0007CV-T7; Tue, 11 Jun 2024 10:25:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sH2Ri-0007Bt-1b for qemu-devel@nongnu.org; Tue, 11 Jun 2024 10:25:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sH2Rg-00066u-EZ for qemu-devel@nongnu.org; Tue, 11 Jun 2024 10:25:57 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-634-kK6OmpU3NBGzS-KC2Pa4Yw-1; Tue, 11 Jun 2024 10:25:53 -0400 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-57c738349baso901502a12.1 for ; Tue, 11 Jun 2024 07:25:53 -0700 (PDT) Received: from avogadro.local ([151.62.196.71]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f127398c4sm371566066b.202.2024.06.11.07.25.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 07:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718115955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GKBj3BIae3wLKWizif0rfYzzEINy6nl8RdXecFWJYa8=; b=FXVp/BLMfUXUSycPTYoQEtWfCtZSKLSTwZE+hP8sCaW/YCzK6fN6WraS63Cu686f+MKpV5 0XTNU7LPFH6saoEq4ae3mtdIbQCqetsgTQI0VY4Yuv0gfxBm/KpezSDTUrH06eUngLo5fH KrzKjdhQyKXhOzXSxvpMwKjPAx5LqsY= X-MC-Unique: kK6OmpU3NBGzS-KC2Pa4Yw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718115952; x=1718720752; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GKBj3BIae3wLKWizif0rfYzzEINy6nl8RdXecFWJYa8=; b=oFnjC6rSlpfTuabcShdQgrBqKf56bMIVcsagUPzsOHKHwo7p/Thw2bPMlIAlWwa2hb 31ppFPNorn1FQaUwVpwm1l6JALFeULSGp4Ujftpl2GsreBKVYv7iLEmyaG08ExnGlLrz opfPN2ShtGmiqVkbW8jSFKj+30LX/S1azP0vzPEQ+Q2Ai85uESU5CvxckF3l8ZdOiI0L gUmYsw/LOCn5DJ+uwQhlGOtsyk5I9dMxe1vVlaQBuxtvd4D0ePRH+qZsGPxZXF/KNjFd 4LE6s4IFCzthAEjvL2sgfHYpAMBzdNmKBJRIrFH7FjjDjPjMwoW0CAApmSQ1Nmkz0Aw/ P4ZQ== X-Gm-Message-State: AOJu0Yxylm9oSMA/Hb1IbJJ00ox0vE+kRgk/JW5AMB2SjtDehlx7gp6B AwczK0WfXSQU1VB5Q4TE2S2Ld79Z0dSWGWe0DF2KhxlIUg6yFzllThp2YZLkqJ4YPX/5LfmIcj/ 6Jz7AU/Ehe65Fdzu85lTAvvskFFiHEWVqWzgKs1frj/9EVy3MgyPVtK8UZ1d7mVsKOZbcuiaycR nHAPyhrfHfJmRzqf5LdMDDrXPq38/HlXhNb3qD X-Received: by 2002:a17:906:d105:b0:a6f:132a:8212 with SMTP id a640c23a62f3a-a6f132a8616mr598655066b.35.1718115952072; Tue, 11 Jun 2024 07:25:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGWlXL4MeIoUowS48fBJRRQPzJNwP718kI2sH7I22WV2vEegTvvHmbrkbSrCwO1WDp5XCafdw== X-Received: by 2002:a17:906:d105:b0:a6f:132a:8212 with SMTP id a640c23a62f3a-a6f132a8616mr598653466b.35.1718115951604; Tue, 11 Jun 2024 07:25:51 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 12/25] target/i386: fix processing of intercept 0 (read CR0) Date: Tue, 11 Jun 2024 16:25:10 +0200 Message-ID: <20240611142524.83762-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240611142524.83762-1-pbonzini@redhat.com> References: <20240611142524.83762-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.141, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1718116030878100001 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.h | 1 + target/i386/tcg/decode-new.c.inc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target/i386/tcg/decode-new.h b/target/i386/tcg/decode-new.h index 46a96b220d0..8465717ea21 100644 --- a/target/i386/tcg/decode-new.h +++ b/target/i386/tcg/decode-new.h @@ -272,6 +272,7 @@ struct X86OpEntry { unsigned valid_prefix:16; unsigned check:16; unsigned intercept:8; + bool has_intercept:1; bool is_decode:1; }; =20 diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.= c.inc index 4f5fcdb88dd..cd925fe3589 100644 --- a/target/i386/tcg/decode-new.c.inc +++ b/target/i386/tcg/decode-new.c.inc @@ -221,7 +221,7 @@ #define vex13 .vex_class =3D 13, =20 #define chk(a) .check =3D X86_CHECK_##a, -#define svm(a) .intercept =3D SVM_EXIT_##a, +#define svm(a) .intercept =3D SVM_EXIT_##a, .has_intercept =3D true, =20 #define avx2_256 .vex_special =3D X86_VEX_AVX2_256, =20 @@ -2559,7 +2559,7 @@ static void disas_insn(DisasContext *s, CPUState *cpu) goto gp_fault; } } - if (decode.e.intercept && unlikely(GUEST(s))) { + if (decode.e.has_intercept && unlikely(GUEST(s))) { gen_helper_svm_check_intercept(tcg_env, tcg_constant_i32(decode.e.intercept= )); } --=20 2.45.1