From nobody Mon Feb 9 08:58:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599580557; cv=none; d=zohomail.com; s=zohoarc; b=jgra1ef4LUF2hrAc73cgWFo2lGL7VI9E3psjBV04rRGxAjZI+0rW+VT1B58UaQmqBwBuE61JmMMObhg71AoZ0DK57MPFsE23uD+cBlZTbpKfxpb5blrC7yE+zOCAmZAAvnDlLUAM9tqA0J7ROs2atWhMgrvTaj0w0gVWLwEHuyU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599580557; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rd1yDVC2PLm/mbyb4s3J2rHQe4El+Eyr3YAhnhSaUkU=; b=UaK2Gb0HeKFGyMDJj08sZoIu8SAaM2rTlF0IOdEbeFwM3VoiyaY+9VKf6Zz86kchpYqA1cPjUPeBxtHL8V0XygJeZ8L2I6ncCp3/0ynlH6/diRgW0oOiwxa/sSeYJGUqVfloCkczjodvECxcZBaO1wuzqD7Bm5L6ng7IoZzJ+CM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1599580557831515.2648696114943; Tue, 8 Sep 2020 08:55:57 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFfyB-0005lD-EK; Tue, 08 Sep 2020 15:55:43 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFfy9-0005kl-Th for xen-devel@lists.xenproject.org; Tue, 08 Sep 2020 15:55:41 +0000 Received: from us-smtp-delivery-124.mimecast.com (unknown [63.128.21.124]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 03031e26-f964-4298-8c76-6bbb7745c7b7; Tue, 08 Sep 2020 15:55:41 +0000 (UTC) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-570-2apKmDi0PgCro21DOvmQ4A-1; Tue, 08 Sep 2020 11:55:39 -0400 Received: by mail-wm1-f71.google.com with SMTP id b73so3632786wmb.0 for ; Tue, 08 Sep 2020 08:55:39 -0700 (PDT) Received: from localhost.localdomain (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id b187sm33175270wmb.8.2020.09.08.08.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 08:55:37 -0700 (PDT) X-Inumbo-ID: 03031e26-f964-4298-8c76-6bbb7745c7b7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599580541; 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=jWbm+J8J5T8MvInyC3T8bziRccFbRUw+7afSpolm2v/A+4H90kgWfM1eayAKn7Ki7p6er2 LfmkavgvrfspgpcCPNP2zlWI4dIYkYbxV3k2y8nvY1bcRp/uEmC9/mODpJn1iZP22oXlWN 7RH9/wPMPOGghjiQ9Vae48zxXWijZQc= X-MC-Unique: 2apKmDi0PgCro21DOvmQ4A-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=pwni3Bv+5Zuc69ioAD8hQaM/9YrSQbEL+m7Y6OZcuDwBdsdL2RzWMseeNeMsGcTOFk tRyaAlx32YsFhpWFfLwzw+RDOtCtLVYifQ0U+d3b29iSqaf+flBgJYxJ5M8VqqEds7OR X65e2+n7srHvIS/on14nKum23luslmfPCoUpZWdl7weLXA9ahqw677e+eIn1Ul/khO2K Q746SjBg4UVKBTXt6ibutQEpdAGcsyOvBcJW5SrJf3eO0YGm0yd8eVd9W27jRQ8JTh23 9XAANGuzlnrU1IIMZmepOlsxEyufC6pmqh1D/4S4ZGAa0H8OsknS21fn2bJBxj7iNzzG 0QKg== X-Gm-Message-State: AOAM533apb1h8SGvchv+rqvme03FDxUwPGT/S/MnjrtnbA+JyZv3fk0U uK4Ny9sJ85QosgR7AFO3VDnmdb89cmspmfL0/Ppl5Du5IJpfedd66hXs9DDsHuo+sQ56W9ibvj/ 0ZzBYluQdoRxBRx/BohZREVM3TaI= X-Received: by 2002:a7b:ca56:: with SMTP id m22mr221220wml.12.1599580538030; Tue, 08 Sep 2020 08:55:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYnoWVgP/Ap99zKyQud1Rr5s6XZtll0OYfYZ+la+K5Rnwnnrg8qI1BhbSu4nN0ILR5SpT+xA== X-Received: by 2002:a7b:ca56:: with SMTP id m22mr221200wml.12.1599580537809; Tue, 08 Sep 2020 08:55:37 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Anthony Perard , Marcel Apfelbaum , xen-devel@lists.xenproject.org, "Michael S. Tsirkin" , Stefano Stabellini , Paolo Bonzini , Paul Durrant , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 1/6] hw/i386/q35: Remove unreachable Xen code on Q35 machine Date: Tue, 8 Sep 2020 17:55:25 +0200 Message-Id: <20200908155530.249806-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908155530.249806-1-philmd@redhat.com> References: <20200908155530.249806-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-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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