Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/2197704/?format=api
{ "id": 2197704, "url": "http://patchwork.ozlabs.org/api/1.0/patches/2197704/?format=api", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.0/projects/14/?format=api", "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": "" }, "msgid": "<20260218114233.266178-13-anisinha@redhat.com>", "date": "2026-02-18T11:42:05", "name": "[v5,12/34] hw/i386: export a new function x86_bios_rom_reload", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "bed6032a82af1076bb2ff61d78609944ef1747e6", "submitter": { "id": 86030, "url": "http://patchwork.ozlabs.org/api/1.0/people/86030/?format=api", "name": "Ani Sinha", "email": "anisinha@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260218114233.266178-13-anisinha@redhat.com/mbox/", "series": [ { "id": 492541, "url": "http://patchwork.ozlabs.org/api/1.0/series/492541/?format=api", "date": "2026-02-18T11:41:56", "name": "Introduce support for confidential guest reset (x86)", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/492541/mbox/" } ], "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2197704/checks/", "tags": {}, "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=H4nMefWI;\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=FegC1TRR;\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=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.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 4fGF694w5Kz1xpl\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 18 Feb 2026 22:44:17 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vsfxs-0003JY-Ml; Wed, 18 Feb 2026 06:43:32 -0500", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <anisinha@redhat.com>)\n id 1vsfxo-0003H0-KF\n for qemu-devel@nongnu.org; Wed, 18 Feb 2026 06:43:29 -0500", "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 <anisinha@redhat.com>)\n id 1vsfxm-0007sV-LJ\n for qemu-devel@nongnu.org; Wed, 18 Feb 2026 06:43:27 -0500", "from mail-pl1-f199.google.com (mail-pl1-f199.google.com\n [209.85.214.199]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-417-IJKgoeJcOEq1wt5YYhc7zA-1; Wed, 18 Feb 2026 06:43:24 -0500", "by mail-pl1-f199.google.com with SMTP id\n d9443c01a7336-2a946c0e441so53228685ad.1\n for <qemu-devel@nongnu.org>; Wed, 18 Feb 2026 03:43:24 -0800 (PST)", "from rhel9-box.lan ([117.99.83.54])\n by smtp.googlemail.com with ESMTPSA id\n d9443c01a7336-2ad1aaeab38sm127803425ad.82.2026.02.18.03.43.20\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 18 Feb 2026 03:43:23 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1771415006;\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=ESypFcrxb/PTVt2Aex0/LJ0mDUhQITS4Sl+F/ZJ54Aw=;\n b=H4nMefWIlsuV2kHxWUMM35i8Q++6x6y3alJsV6wCStpJH621LYaKUOgbuAb8RTi/VKFq6i\n anWOmiDOy0xC/a8/9vM3frymwagoJkupixL9PhcXj7afajTvLL2IqYrBJ7IcQvM8PokwkQ\n sdHUpg+3WNRAna7l6oF0+YM5KpfHneU=", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1771415004; x=1772019804; 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=ESypFcrxb/PTVt2Aex0/LJ0mDUhQITS4Sl+F/ZJ54Aw=;\n b=FegC1TRRgZwGYsLKs70w8DS3WbNkxIwr1K9exu2Hx0E67ge9PMuPRFdlhjYlG3couN\n 04ZkkwJFGpr1OH58+MdHkzsyZcvd5Kt/L32OJjgEvnkDlVJACqNFFoW5cN7WDgKYRsyc\n cgActER41JpyOJ0ue9g8ecAl+re+UiIEMsZ6lY7rZU+0xnC2YTVogQFxYd3d+KKmUZ+T\n T6zH+pNDABQOFYnKDk9qdMFKtz4W159sxPCx0VKanMx5gamm19eNspYiQQuSj1XVNb2T\n 0RJXTcKGFR+037/4a5kP7TU2qOojTasifBWKov7QEbxZ+z21j4hNUMb/37Mdegsa7AvA\n 3B9g==" ], "X-MC-Unique": "IJKgoeJcOEq1wt5YYhc7zA-1", "X-Mimecast-MFC-AGG-ID": "IJKgoeJcOEq1wt5YYhc7zA_1771415004", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771415004; x=1772019804;\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=ESypFcrxb/PTVt2Aex0/LJ0mDUhQITS4Sl+F/ZJ54Aw=;\n b=YMBNhsweDy6VemfkhNnXuU1nacp4yIcHd1F/FL0A9ViS63ffUMu6P7nbFSIhVyYnSl\n /Mnh273JnsCQMSRciKdugQrScd/+kjDcy7kYzqnnKn5gD/2gzsxhWmG+4s8EiWIAMZH2\n 4Ft3xoQV+l8euHDep7v3PImhGhNoZR4rOreMiFSeUH8nNP6Az69DE0BUm4fIm0CdLUJt\n BRoiAA3kzzrcryzb3b3Q7KB1WQsSpdpSVi6ZVR7QzV5HggFKWhT5JTRix7NcI6qKGzwP\n M0buZVh+TPiDTyzXxdrhA5ts0V+nuWsfdV0MZ19jw+Lpo87Rlv0b5KZ40RYKEFVl0uIy\n O7+g==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCXNPISosw8jLsJL+886q9yg79zPL68H0h7oyVRk5aAksnUzwIoBOxJ653g5eezPHdkk7CEHdIywoFuX@nongnu.org", "X-Gm-Message-State": "AOJu0YxLoRNwUWBAnyILgynVpE5/mW8R4+zFjf3c29GGSnT2xURBdRwX\n vAxE1veu4Amakerxzt9THoI+azqFQnvClEfrvKajJafHh/cxAgOhP3CbWnaWJyCsb3LVzY1CFVY\n mXx2rJlhkqqisxOKOYtJAF2f1BazIg/x4SKia5incAVouE/150V05BNPg", "X-Gm-Gg": "AZuq6aLW+c8sV9jBQdwPYqbFGWZykZ3phe2wwNE8g+5o/FfGam4FNwx0KSn1rmLbRw8\n czq0e6+/WPjF4TVD+wuTawuokAafTSKFvcxZauh5CRK5r5IvemY5LBXMloikfIQ3Ivc+6RPd4Zc\n /hmh7+Edxv//dMhCFqSNvQKLiouU2dvGBOaJMPTWUUyY1vu27JHw3RaxckTOLyYJsi9FYQRh1J4\n 5qGXZu+C7oLFOMKR7nte+VcJ/itoolRg+phpM6raT/Ze3gcd9VRkhWLsqkX5eUbfnlA88gE/p1K\n BIYtocKyaeWMx29a5sTPB+DSTEKhJbRfLzcvwU5ABy6aqA0PSfOByEup4ThgAHe1zweBftbiL2U\n O2xPFimlDXyYYbeKtyFVfviA/wLOAM3YVZprDmKqHp1HDVdvoO4xT", "X-Received": [ "by 2002:a17:903:2409:b0:2a8:ac0f:9ae9 with SMTP id\n d9443c01a7336-2ad50f95240mr15769645ad.41.1771415003656;\n Wed, 18 Feb 2026 03:43:23 -0800 (PST)", "by 2002:a17:903:2409:b0:2a8:ac0f:9ae9 with SMTP id\n d9443c01a7336-2ad50f95240mr15769395ad.41.1771415003303;\n Wed, 18 Feb 2026 03:43:23 -0800 (PST)" ], "From": "Ani Sinha <anisinha@redhat.com>", "To": "Paolo Bonzini <pbonzini@redhat.com>,\n Richard Henderson <richard.henderson@linaro.org>,\n Eduardo Habkost <eduardo@habkost.net>,\n \"Michael S. Tsirkin\" <mst@redhat.com>,\n Marcel Apfelbaum <marcel.apfelbaum@gmail.com>", "Cc": "Ani Sinha <anisinha@redhat.com>, kraxel@redhat.com,\n Bernhard Beschow <shentey@gmail.com>, qemu-devel@nongnu.org", "Subject": "[PATCH v5 12/34] hw/i386: export a new function x86_bios_rom_reload", "Date": "Wed, 18 Feb 2026 17:12:05 +0530", "Message-ID": "<20260218114233.266178-13-anisinha@redhat.com>", "X-Mailer": "git-send-email 2.42.0", "In-Reply-To": "<20260218114233.266178-1-anisinha@redhat.com>", "References": "<20260218114233.266178-1-anisinha@redhat.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=170.10.129.124;\n envelope-from=anisinha@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.043,\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 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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": "Confidential guest smust reload their bios rom upon reset. This is because\nbios memory is encrypted and upon reset, the contents of the old bios memory\nis lost and cannot be re-used. To this end, export a new x86 function\nx86_bios_rom_reload() to reload the bios again. This function will be used in\nthe subsequent patches.\n\nReviewed-by: Bernhard Beschow <shentey@gmail.com>\nSigned-off-by: Ani Sinha <anisinha@redhat.com>\n---\n hw/i386/x86-common.c | 21 +++++++++++++++++++++\n include/hw/i386/x86.h | 1 +\n 2 files changed, 22 insertions(+)", "diff": "diff --git a/hw/i386/x86-common.c b/hw/i386/x86-common.c\nindex c98abaf368..a420112666 100644\n--- a/hw/i386/x86-common.c\n+++ b/hw/i386/x86-common.c\n@@ -1085,6 +1085,27 @@ static void load_bios_from_file(X86MachineState *x86ms, const char *bios_name,\n exit(1);\n }\n \n+void x86_bios_rom_reload(X86MachineState *x86ms)\n+{\n+ int bios_size;\n+ const char *bios_name;\n+ char *filename;\n+\n+ if (memory_region_size(&x86ms->bios) == 0) {\n+ /* if -bios is not used */\n+ return;\n+ }\n+\n+ bios_name = MACHINE(x86ms)->firmware ?: \"bios.bin\";\n+ filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);\n+\n+ bios_size = get_bios_size(x86ms, bios_name, filename);\n+\n+ void *ptr = memory_region_get_ram_ptr(&x86ms->bios);\n+ load_image_size(filename, ptr, bios_size);\n+ x86_firmware_configure(0x100000000ULL - bios_size, ptr, bios_size);\n+}\n+\n void x86_bios_rom_init(X86MachineState *x86ms, const char *default_firmware,\n MemoryRegion *rom_memory, bool isapc_ram_fw)\n {\ndiff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h\nindex 23be627437..a85a5600ce 100644\n--- a/include/hw/i386/x86.h\n+++ b/include/hw/i386/x86.h\n@@ -125,6 +125,7 @@ void x86_isa_bios_init(MemoryRegion *isa_bios, MemoryRegion *isa_memory,\n MemoryRegion *bios, bool read_only);\n void x86_bios_rom_init(X86MachineState *x86ms, const char *default_firmware,\n MemoryRegion *rom_memory, bool isapc_ram_fw);\n+void x86_bios_rom_reload(X86MachineState *x86ms);\n \n void x86_load_linux(X86MachineState *x86ms,\n FWCfgState *fw_cfg,\n", "prefixes": [ "v5", "12/34" ] }