From nobody Tue Feb 10 08:03:21 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=amsat.org Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1644065166003201.4116160605298; Sat, 5 Feb 2022 04:46:06 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-608-623w3w-JM_WKyS_XQQdJQw-1; Sat, 05 Feb 2022 07:46:02 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 791BE363A4; Sat, 5 Feb 2022 12:45:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8FCA56D02A; Sat, 5 Feb 2022 12:45:53 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2E10A4BB7C; Sat, 5 Feb 2022 12:45:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 215CjiZo011120 for ; Sat, 5 Feb 2022 07:45:44 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7225740FF696; Sat, 5 Feb 2022 12:45:44 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6D52640FF690 for ; Sat, 5 Feb 2022 12:45:44 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 536AC801E8D for ; Sat, 5 Feb 2022 12:45:44 +0000 (UTC) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-581-aPkJR-klNCKLoLtGwhVLmA-1; Sat, 05 Feb 2022 07:45:40 -0500 Received: by mail-wr1-f52.google.com with SMTP id j16so16170102wrd.8; Sat, 05 Feb 2022 04:45:39 -0800 (PST) Received: from nuc.. (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id q2sm4433669wrw.14.2022.02.05.04.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Feb 2022 04:45:38 -0800 (PST) X-MC-Unique: 623w3w-JM_WKyS_XQQdJQw-1 X-MC-Unique: aPkJR-klNCKLoLtGwhVLmA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=kqczEjmmxYGSgKtA86NCLgWxtCH+cJ1jSQOS+NjVnJA=; b=1f8ESDWfCrmNMo5U8WVIZ5v6e2RmGIT9px4ZRxx5QvMsam4xJmkh0cZoFoXOr3Mhz4 gttgp+maKEr+AXdyFLFycvytLDnuQR+nCNiP8Hvz3HVJyuF4Fy97D+LLHcWdetatOnS5 02t1lj5SSMVdGOFA8OPkypPkMBlnzt7Ja7kbAPjF/0sV4AHkV7y+ROhKD4w2t0qllEDQ V8ja5TzuZ5CMf49qdqHbnuqvPG/UvuSkD9tdeOGFu4CxIximDr0cmiXdTgoEoIvARzKr ogmooamVfjG0jWr3iT8L6Ddhy6/wgOrj2G+kDImXejeibBHoN/FWT1zkZigsrILRJzH2 s76A== X-Gm-Message-State: AOAM530Ik/hEqenJuO8qkh/hP+EUdsgoZ7iwyt7kYaphT9O6rzcQHD4o GxRw/HrnKroR73IYqEIo+lg= X-Google-Smtp-Source: ABdhPJywP3MGiFxe1+SuCNMt1DripYChSsg20LEXJcKDgrabHsFkgZ5XGnyHCez4aM9M/GuLuevFFw== X-Received: by 2002:a05:6000:2aa:: with SMTP id l10mr2914067wry.191.1644065138835; Sat, 05 Feb 2022 04:45:38 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v4 2/4] hw/i386: Attach CPUs to machine Date: Sat, 5 Feb 2022 13:45:24 +0100 Message-Id: <20220205124526.500158-3-f4bug@amsat.org> In-Reply-To: <20220205124526.500158-1-f4bug@amsat.org> References: <20220205124526.500158-1-f4bug@amsat.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-loop: libvir-list@redhat.com Cc: Yang Zhong , Jean-Philippe Brucker , "Michael S. Tsirkin" , libvir-list@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Igor Mammedov , Ani Sinha , Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1644065168415100001 Previously CPUs were exposed in the QOM tree at a path /machine/unattached/device[nn] where the 'nn' of the first CPU is usually zero, but can vary depending on what devices were already created. With this change the CPUs are now at /machine/cpu[nn] where the 'nn' of the first CPU is always zero. Note: This (intentionally) breaks compatibility with current libvirt code that looks for "/machine/unattached/device[0]" in the assumption it is the first CPU. Cc: libvir-list@redhat.com Suggested-by: Daniel P. Berrang=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/x86.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/x86.c b/hw/i386/x86.c index b84840a1bb9..50bf249c700 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -108,6 +108,7 @@ void x86_cpu_new(X86MachineState *x86ms, int64_t apic_i= d, Error **errp) { Object *cpu =3D object_new(MACHINE(x86ms)->cpu_type); =20 + object_property_add_child(OBJECT(x86ms), "cpu[*]", OBJECT(cpu)); if (!object_property_set_uint(cpu, "apic-id", apic_id, errp)) { goto out; } --=20 2.34.1