From nobody Mon Feb 9 12:26:43 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599575173; cv=none; d=zohomail.com; s=zohoarc; b=WE+mYjvwqkmAeVX4vGsdW2M+8650Ph0KJHIv7GGPpy0GQcICT3XAb83RMa0xlmosjE/U1gmWhNvlPIp9sBFP2hLefNRyyG4REZjiNj5xSTH3NlHg79tISaeWxZmqd+Eqh3t/NGlaqGTAW8iSrJ+ouLv0fUa8oH81ynnAXOlp2ak= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599575173; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=rd1yDVC2PLm/mbyb4s3J2rHQe4El+Eyr3YAhnhSaUkU=; b=c+f3WSHlrYIITP5D9n3Tl8YZ3wQB7xGZ/kTp4xNtQKUv0Ypie/z/RY5r7FBxxmQc76/F/m4dWr7U6ijbsv84F/K0VFEdtdf1tFBpAVH2eSIBbhyopL8zxb5FfxxMd66s6Gs1Ghf7eC+db9q3DtGO7ATITL14MFgrHDX2GYRVfPk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1599575173709444.660054597623; Tue, 8 Sep 2020 07:26:13 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-67-ZomUyyg1PiWmWVN5GHcpOA-1; Tue, 08 Sep 2020 10:26:07 -0400 Received: by mail-wr1-f69.google.com with SMTP id j7so5416698wro.14 for ; Tue, 08 Sep 2020 07:26:07 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id b2sm32569506wmh.47.2020.09.08.07.26.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 07:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599575169; 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=rd1yDVC2PLm/mbyb4s3J2rHQe4El+Eyr3YAhnhSaUkU=; b=B3g9ZLNYnPlAPoVdmPuXhl9Ee6kBXsUEnGRW/Cl9V4w81LHDZhjM/5c2ST6D6fxgLjv8qs fVqQFeGdbtu+0YoICVwhyEeZhG+loRsslr//YQyRr/Alw7VjMoVhV45ECLC4QKFLer9VRS vJE4nYQqs3rJMdSe3kLSFXBgkxKxsSg= X-MC-Unique: ZomUyyg1PiWmWVN5GHcpOA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rd1yDVC2PLm/mbyb4s3J2rHQe4El+Eyr3YAhnhSaUkU=; b=hf4Dlgea3S2dNGQjPxe1vkV+w7DlZLzule980FctHQ6RRkjaBrqnRHKjJYvg0Vh3ja 2pVqvz8CqST5rKHTHoNnQN5ML/ZSSJVUrPg+e+9wssEtF6eicVCCiOu1VGpFEwPpVKYT rMIwc9OZHfC2gUdbvBSJ7ZeMsFRT/FUXFxe11a+ZP2jvGMRken08Fzs/GOC6EITNNemt Z7GoEnWtGz8u+7U+ItVIF9FRbvz0p4jVRkEj8c6vI0TZOsdYPlWBFeS5p7AyMd0KOm0f yuQk/Az5Z2mdA3yfdWKa9cxh+OKjfol0mSTAtT7CHRTIg7C8l3AKMeep9DVoP59mNnOQ CeyQ== X-Gm-Message-State: AOAM533Kx7iaXj5lro5+Hvjna6FAZX18hGpPlKLe/fBIZpipODGDCwIw 5p+14yTkJOC0Aem58TQ5WPHJNC8BvJBD2T7yGw6i5lld2QbDmh9dFLRS4BtOnAqbn9D7oY6Cd0X dTWYTAXjWYqUrfQ== X-Received: by 2002:adf:efc9:: with SMTP id i9mr28298430wrp.187.1599575166447; Tue, 08 Sep 2020 07:26:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy17scw5GBd0vKOfK7z1JRSIOHwjuajPWIItLLQxN9yoqVYIMsCoqxbS7A7Vn2FqxWJdDcxOw== X-Received: by 2002:adf:efc9:: with SMTP id i9mr28298412wrp.187.1599575166224; Tue, 08 Sep 2020 07:26:06 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Anthony Perard , "Michael S. Tsirkin" , Paul Durrant , Eduardo Habkost , Marcel Apfelbaum , Richard Henderson , Stefano Stabellini , Paolo Bonzini , xen-devel@lists.xenproject.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/5] hw/i386/q35: Remove unreachable Xen code on Q35 machine Date: Tue, 8 Sep 2020 16:25:55 +0200 Message-Id: <20200908142559.192945-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908142559.192945-1-philmd@redhat.com> References: <20200908142559.192945-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Xen accelerator requires specific changes to a machine to be able to use it. See for example the 'Xen PC' machine configure its PCI bus calling pc_xen_hvm_init_pci(). There is no 'Xen Q35' machine declared. This code was probably added while introducing the Q35 machine, based on the existing PC machine (see commit df2d8b3ed4 "Introduce q35 pc based chipset emulator"). Remove the unreachable code to simplify this file. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Anthony PERARD --- hw/i386/pc_q35.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 0cb9c18cd44..f3506269fe0 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -34,9 +34,7 @@ #include "sysemu/arch_init.h" #include "hw/i2c/smbus_eeprom.h" #include "hw/rtc/mc146818rtc.h" -#include "hw/xen/xen.h" #include "sysemu/kvm.h" -#include "sysemu/xen.h" #include "hw/kvm/clock.h" #include "hw/pci-host/q35.h" #include "hw/qdev-properties.h" @@ -179,10 +177,6 @@ static void pc_q35_init(MachineState *machine) x86ms->below_4g_mem_size =3D machine->ram_size; } =20 - if (xen_enabled()) { - xen_hvm_init(pcms, &ram_memory); - } - x86_cpus_init(x86ms, pcmc->default_cpu_version); =20 kvmclock_create(); @@ -208,10 +202,7 @@ static void pc_q35_init(MachineState *machine) } =20 /* allocate ram and load rom/bios */ - if (!xen_enabled()) { - pc_memory_init(pcms, get_system_memory(), - rom_memory, &ram_memory); - } + pc_memory_init(pcms, get_system_memory(), rom_memory, &ram_memory); =20 /* create pci host bus */ q35_host =3D Q35_HOST_DEVICE(qdev_new(TYPE_Q35_HOST_DEVICE)); @@ -271,7 +262,7 @@ static void pc_q35_init(MachineState *machine) =20 assert(pcms->vmport !=3D ON_OFF_AUTO__MAX); if (pcms->vmport =3D=3D ON_OFF_AUTO_AUTO) { - pcms->vmport =3D xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON; + pcms->vmport =3D ON_OFF_AUTO_ON; } =20 /* init basic PC hardware */ --=20 2.26.2