{"id":2231460,"url":"http://patchwork.ozlabs.org/api/patches/2231460/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260430172204.1006673-37-pbonzini@redhat.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260430172204.1006673-37-pbonzini@redhat.com>","list_archive_url":null,"date":"2026-04-30T17:21:42","name":"[PULL,36/58] hw/intc: apic: disallow APIC reads when disabled","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"4b530832baccd204d18491eb1e9bd1db2ee977a9","submitter":{"id":2701,"url":"http://patchwork.ozlabs.org/api/people/2701/?format=json","name":"Paolo Bonzini","email":"pbonzini@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260430172204.1006673-37-pbonzini@redhat.com/mbox/","series":[{"id":502347,"url":"http://patchwork.ozlabs.org/api/series/502347/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502347","date":"2026-04-30T17:21:16","name":"[PULL,01/58] pythondeps: bump to meson 1.11.1","version":1,"mbox":"http://patchwork.ozlabs.org/series/502347/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2231460/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2231460/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=RANhaLnF;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=XiehgeFG;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g61Rc0jnQz1yGq\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 03:31:08 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wIV7j-0007NV-WE; Thu, 30 Apr 2026 13:24:28 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>)\n id 1wIV7O-0005oB-Fq\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 13:24:09 -0400","from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>)\n id 1wIV7M-0004mp-V4\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 13:24:06 -0400","from mail-qk1-f198.google.com (mail-qk1-f198.google.com\n [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-97-DoihL3FdNAuKanjDErt3xw-1; Thu, 30 Apr 2026 13:24:02 -0400","by mail-qk1-f198.google.com with SMTP id\n af79cd13be357-8ead5ab474bso232399085a.1\n for <qemu-devel@nongnu.org>; Thu, 30 Apr 2026 10:24:02 -0700 (PDT)","from [192.168.10.48] ([151.49.85.67])\n by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8fbb09fc9e7sm26513885a.1.2026.04.30.10.23.57\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 30 Apr 2026 10:23:58 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777569844;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=tY4A6gtU1kLTb5kI23uPtWDAJSjcR+ARQMDmMJNviY8=;\n b=RANhaLnFDZZ6GHdHtiOm8++fJTkRRWbj9umRUhPSQqr6HHHX58Fbz+MKVifUOUVxS7uQmU\n ZU46onbsg1T1+3Zh3ZNWi/zVXRHOGlgSncWmyCXjQSokgp68Y+VykUTsRHW7pYYxO0wVA+\n 78gK5aKEXxtHfHI8l+OJ4K43HG0D7PE=","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1777569841; x=1778174641; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=tY4A6gtU1kLTb5kI23uPtWDAJSjcR+ARQMDmMJNviY8=;\n b=XiehgeFGlpwMXfOEuMQIgT13+QmN6Z4WlPq3iC6QkAHZ/BUEcYqJ4ckynNlXAtWDJc\n Q0uDuNhuY1UsHh+LLDztqVuXNS2nMRF9OhWFHmmuFX9XMkfbajLtOcpM1HsY+JRxQeqB\n SvKfRoCA6qhqOJgxPSxo1tG8uyy5NUu/4jeKPi5SA6Vx2NgYDKUi7zcR28d/wu3c9zvL\n G0/n1Q/IOLhsU/BhYORCBb3ZlEzG4k1kKjFrlsj77/3Ken9TiTB7vw073HWWBmpksN7d\n ygtH5Jg2AlXp7gF2UFNGz6d0C/2CYUhJoOcKt2hvTWQ8mLNMGivNRO2JjY6njS+P9D/M\n ykVg=="],"X-MC-Unique":"DoihL3FdNAuKanjDErt3xw-1","X-Mimecast-MFC-AGG-ID":"DoihL3FdNAuKanjDErt3xw_1777569842","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777569841; x=1778174641;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=tY4A6gtU1kLTb5kI23uPtWDAJSjcR+ARQMDmMJNviY8=;\n b=cmLVEmR6LoeTwiUZNqneB9/xlRVHFm5Ji4sv7O4HYjEkeBf3t7E2OrZeGIRpclNh59\n BgSzY6H8SjI+NQZlkpCfnA+/gVvoEvwUZbuvpE09DHIoAuoNnd2iGFaFej7vDQiAkTL5\n 5CT8sjvEDdoDJwKTX3cJRTz5WHDqjSU3X24V2Nah6Z4zG6Hh0dsvWqZa8Q9OAk2I/wVe\n sdcxORQOpC2cLRJ9URgLGNK9YiNsfyrQ06tM9V/y5OPibPXKykdy8iOObfZNKCKovhWV\n 4EqZY2kbdBvU5K8r5wmaRWvenSqKpYCznXjrztAxmLVKOBzGk2L3Wt3lO3iZIKrB6wKG\n KZVg==","X-Gm-Message-State":"AOJu0Yxq2kr0cqA+GhkpC0zGHLlT4FY4eB7s1Udurgrny7pM2Z2qiPKL\n OemaSxR6OGgMWGnD4QiUK8XSx4/SuuvbDJnX7S9k8J2EwzDMWljuXzh1hPEre0CB1tHvzXsADg8\n tsA0X4LtkaBaRXHoEQMdqsx2DBpMQESI+FcpIQ4bUFWDDuwa/mK2j705UEv3yHtVdMyQ5y2YnNC\n lkoHAm5oRfxKDs4kaRaX2QMLftB3YoHBCjNOc9q+yS","X-Gm-Gg":"AeBDietTOOB7qofJ+YEMmiP2qhOAgNcqE8iZiN/u8SrFL+qSYNveSNniEteTrZ74Gew\n dPtJT41nYMeX07s3zIWW9R4wXA5u8NAtjpa96L2tteyweIkjfi8mNFrdLqphdBLAVJsuSCwioYV\n yeRduKwM5zsJ83ioBAjVctWUuD4PzNIN6jldT5rthSvkBIfsKyFxW80lS5NlFsbYXUxiNWX6gOo\n Q4hZlNOkvdu01CcLHziIszFmxPinEcbfmVxnt4zFP4AbLO1VR0rM89xfq+Uq76oFkV7YLoOY8U0\n xvLJaVskBIk4d3ISlO2K2aVLcStwLDmVqH2YezUlGtXhHAKAZQRmS7shrKL5riLIpyuG8YUNVUj\n 4EjPSA6wkWf8iOxYhhzovBxAmZPEUoQYB7PgPwYtM1nW1s+3yl4wNFdckxEhNzcsRxPcEKzvoP1\n BbYG+9c69lV8cSb5PESZhF5oz16M7EJDK082I=","X-Received":["by 2002:a05:620a:2951:b0:8cf:e32e:8a0a with SMTP id\n af79cd13be357-8fa86fa6745mr611551085a.18.1777569841024;\n Thu, 30 Apr 2026 10:24:01 -0700 (PDT)","by 2002:a05:620a:2951:b0:8cf:e32e:8a0a with SMTP id\n af79cd13be357-8fa86fa6745mr611544685a.18.1777569840349;\n Thu, 30 Apr 2026 10:24:00 -0700 (PDT)"],"From":"Paolo Bonzini <pbonzini@redhat.com>","To":"qemu-devel@nongnu.org","Cc":"Mohamed Mediouni <mohamed@unpredictable.fr>","Subject":"[PULL 36/58] hw/intc: apic: disallow APIC reads when disabled","Date":"Thu, 30 Apr 2026 19:21:42 +0200","Message-ID":"<20260430172204.1006673-37-pbonzini@redhat.com>","X-Mailer":"git-send-email 2.54.0","In-Reply-To":"<20260430172204.1006673-1-pbonzini@redhat.com>","References":"<20260430172204.1006673-1-pbonzini@redhat.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Received-SPF":"pass client-ip=170.10.129.124;\n envelope-from=pbonzini@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com","X-Spam_score_int":"-20","X-Spam_score":"-2.1","X-Spam_bar":"--","X-Spam_report":"(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n SPF_HELO_PASS=-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":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"From: Mohamed Mediouni <mohamed@unpredictable.fr>\n\n!APICBASE_ENABLE + attempting to read xAPIC registers is not an allowed combination.\n\nAnd neither is x2APIC enabled + attempting to read xAPIC registers\n\nSigned-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>\nLink: https://lore.kernel.org/r/20260422214225.2242-15-mohamed@unpredictable.fr\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\n---\n hw/intc/apic.c | 9 +++++++++\n 1 file changed, 9 insertions(+)","diff":"diff --git a/hw/intc/apic.c b/hw/intc/apic.c\nindex 8766ed00b92..e5ea8312617 100644\n--- a/hw/intc/apic.c\n+++ b/hw/intc/apic.c\n@@ -875,6 +875,15 @@ static uint64_t apic_mem_read(void *opaque, hwaddr addr, unsigned size)\n         return -1;\n     }\n \n+    /* if the xAPIC is disabled, return early. */\n+    if (!(s->apicbase & MSR_IA32_APICBASE_ENABLE)) {\n+        return 0xffffffff;\n+    }\n+\n+    if (is_x2apic_mode(s)) {\n+        return 0xffffffff;\n+    }\n+\n     index = (addr >> 4) & 0xff;\n     apic_register_read(s, index, &val);\n \n","prefixes":["PULL","36/58"]}