From patchwork Wed Nov 20 07:27:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 844510 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:8b:b0:382:43a8:7b94 with SMTP id m11csp1572412wrx; Tue, 19 Nov 2024 23:28:55 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXzqDmBEt5lMrsSijzTk59E4ierccErvKunzRsYQ/x58XGRLMjwGm7I8PMtZ6rPii6raKHbFw==@linaro.org X-Google-Smtp-Source: AGHT+IHN7n54/utpNSu0SBginaa//ij95J7rUPmw0esBTinGxdZ58QhAKROyncoL58zOjWFFPTVE X-Received: by 2002:a05:6214:1d0e:b0:6cb:f40c:b868 with SMTP id 6a1803df08f44-6d43786639amr26697056d6.46.1732087735433; Tue, 19 Nov 2024 23:28:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732087735; cv=none; d=google.com; s=arc-20240605; b=hXRXs0sU4rYDIzyckjBzHDcpCIySlwXgcihSh4EDo3zhoX36AfCwp4ZtL56v3AXrLK VMncsgOEXdaGV56vMTPSxaT2DBjQwkqAz/RiHLMYpoLvuhEpE/Tkz1/gg45H3vDit5bG 0cVmZTFz1GPbp/Xo+EGxob5F8DOgEyK79d4Y4kMPzpKuvzFdKGZsgrzBVIslVOl0wAh2 iiFTuj9SbkKvp6m86qtOir0MA+icYGLO7yen3wp1PO85dT3nWs4QPJjlFKCXVJKGdbWW aeG6Y9CCtb87ib7zmfYYhMR8ZYa9mDrIQsw+rXBTNhEOjOWdAXhksKS3MgGCMHfTXO6o 19OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4+dgNF2S08viF1uCuG5gYKqJhsXnzXUAgn0oEVa0luo=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=O1YyPWpyzc2z/j4xQNptTlOU5+30Uh6NHAhCEsZPEfePIaeuC4leaV+thL06HkrY0q vJlYHm+qoJPpR2AaBdIgxhD4x4JBqjRAty9ekiSPFZSCd1eZa4UMWFcUejacqXtj0QOG NKpSOBxvdwWJNMDgHuihFe7F3mSzD7CMbPn5rtA6xgA3Dxg2Juh1Z+kVGA5TMPWH6zgT 0J29Zi1QYRozHVUcNJ5KS0wpZ+Lhr4uGcqp9fBc4pehJ8l4r6jomRtgGXaTE37BOL9LM qRcxryR0tOiVxJUETxRAJQzloilPFutph+6c30rn/9HmwmYRYn137sLNUtrGFRueYriR u8mQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MpsRCFqd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d43815a8afsi11956406d6.494.2024.11.19.23.28.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Nov 2024 23:28:55 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MpsRCFqd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDf7k-0001yb-74; Wed, 20 Nov 2024 02:27:40 -0500 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 1tDf7i-0001yQ-PH for qemu-devel@nongnu.org; Wed, 20 Nov 2024 02:27:38 -0500 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 1tDf7h-00080d-44 for qemu-devel@nongnu.org; Wed, 20 Nov 2024 02:27:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732087656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4+dgNF2S08viF1uCuG5gYKqJhsXnzXUAgn0oEVa0luo=; b=MpsRCFqdzRjVMtV82Cj/yAO7ZtJEBX1CfuXI+X6MNxCbTpIx1fOlVndMqcusgGNFdVbczk D9xOxoqf55NggIKNUYIrem8XG4zxZj65fHjcm1D2M5CmLKeVwnbHSbfOBRT6KRqO5gj2L1 dyezDjIfGYfh2jGN4j166znFbjk9jBQ= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-604-DWQrROmfNvK2MW4h1xbUHA-1; Wed, 20 Nov 2024 02:27:32 -0500 X-MC-Unique: DWQrROmfNvK2MW4h1xbUHA-1 X-Mimecast-MFC-AGG-ID: DWQrROmfNvK2MW4h1xbUHA Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-382341057e6so2088870f8f.2 for ; Tue, 19 Nov 2024 23:27:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732087650; x=1732692450; 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=4+dgNF2S08viF1uCuG5gYKqJhsXnzXUAgn0oEVa0luo=; b=cpR2ztegtz/sXlcQbMExAX+Ktp0H+tx9g0VuSfRKfm93TpsdKGuzkU7BdZ68nhX6VH mOYbcABGKmPnO1jIJl0nGye6OtaeCQtlLC+A2p61elOBVRo30lsy5cimSfaUUAhK0n42 TT7a26C5Mbb6UaP3Yd28lz4dAriR4ivJmOwfOONMEkt5oxCPTDkE1ecMXNnrvFu+aWOZ jRPGNX7PMn56aO/Ob9KEKglYzIuda450GRYD5yepMAANToavqxmmSs5TL4G8H9friZ03 ajrMchfJCpai0IbUXHnWTUMUvpNCjhn4XCS9gaEM3M2c+t5pvUZC/vZs4ZHt6i++lRwT R6Jw== X-Gm-Message-State: AOJu0YzaDWHzDlHP/WPubTigj9L2hNjLtiSFpR5yoshiw9D3+VF6AZED hiBE+XXRGQFCum5gN35tNb7sagAXJQqcoNIAlOFQHNeL7m8x2gvKWl5z1/5/hrBSqadYB86Juul gh7POTdcFyjmk3GCOd0b5WxjeifoWnVnjHv4xowkTQ+XXuRO+SRI491cMKTv4JIJFwKBv0pagsH H/p0cIxhqlns7A+9/US4TDeAgXavt41emjS0fe X-Received: by 2002:a5d:47a9:0:b0:382:372a:5719 with SMTP id ffacd0b85a97d-38254b2744emr994227f8f.59.1732087650051; Tue, 19 Nov 2024 23:27:30 -0800 (PST) X-Received: by 2002:a5d:47a9:0:b0:382:372a:5719 with SMTP id ffacd0b85a97d-38254b2744emr994211f8f.59.1732087649641; Tue, 19 Nov 2024 23:27:29 -0800 (PST) Received: from [192.168.10.3] ([151.49.84.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825490ca19sm1253766f8f.39.2024.11.19.23.27.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Nov 2024 23:27:28 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 2/5] hvf: remove unused but set variable Date: Wed, 20 Nov 2024 08:27:20 +0100 Message-ID: <20241120072723.103477-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241120072723.103477-1-pbonzini@redhat.com> References: <20241120072723.103477-1-pbonzini@redhat.com> MIME-Version: 1.0 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.14, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier fixes associated warning when building on MacOS. Signed-off-by: Pierrick Bouvier Link: https://lore.kernel.org/r/20241023182922.1040964-1-pierrick.bouvier@linaro.org Signed-off-by: Paolo Bonzini --- target/i386/hvf/x86_task.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/i386/hvf/x86_task.c b/target/i386/hvf/x86_task.c index f09bfbdda5b..cdea2ea69d9 100644 --- a/target/i386/hvf/x86_task.c +++ b/target/i386/hvf/x86_task.c @@ -122,7 +122,6 @@ void vmx_handle_task_switch(CPUState *cpu, x68_segment_selector tss_sel, int rea load_regs(cpu); struct x86_segment_descriptor curr_tss_desc, next_tss_desc; - int ret; x68_segment_selector old_tss_sel = vmx_read_segment_selector(cpu, R_TR); uint64_t old_tss_base = vmx_read_segment_base(cpu, R_TR); uint32_t desc_limit; @@ -138,7 +137,7 @@ void vmx_handle_task_switch(CPUState *cpu, x68_segment_selector tss_sel, int rea if (reason == TSR_IDT_GATE && gate_valid) { int dpl; - ret = x86_read_call_gate(cpu, &task_gate_desc, gate); + x86_read_call_gate(cpu, &task_gate_desc, gate); dpl = task_gate_desc.dpl; x68_segment_selector cs = vmx_read_segment_selector(cpu, R_CS); @@ -167,11 +166,12 @@ void vmx_handle_task_switch(CPUState *cpu, x68_segment_selector tss_sel, int rea x86_write_segment_descriptor(cpu, &next_tss_desc, tss_sel); } - if (next_tss_desc.type & 8) - ret = task_switch_32(cpu, tss_sel, old_tss_sel, old_tss_base, &next_tss_desc); - else + if (next_tss_desc.type & 8) { + task_switch_32(cpu, tss_sel, old_tss_sel, old_tss_base, &next_tss_desc); + } else { //ret = task_switch_16(cpu, tss_sel, old_tss_sel, old_tss_base, &next_tss_desc); VM_PANIC("task_switch_16"); + } macvm_set_cr0(cpu->accel->fd, rvmcs(cpu->accel->fd, VMCS_GUEST_CR0) | CR0_TS_MASK);