From: Paolo Bonzini <pbonzini@redhat.com>
To: Lev Kujawski <lkujaw@member.fsf.org>, qemu-devel@nongnu.org
Cc: Eduardo Habkost <eduardo@habkost.net>,
"Michael S. Tsirkin" <mst@redhat.com>,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
Richard Henderson <richard.henderson@linaro.org>,
Thomas Huth <thuth@redhat.com>,
Laurent Vivier <lvivier@redhat.com>
Subject: Re: [PATCH v2 1/2] hw/i386/postcard.c: New ISA POST card device
Date: Thu, 3 Nov 2022 19:13:27 +0100 [thread overview]
Message-ID: <fc1415a3-d1f2-73f4-4bb3-c1857484f462@redhat.com> (raw)
In-Reply-To: <20220707003705.43894-1-lkujaw@member.fsf.org>
On 7/7/22 02:37, Lev Kujawski wrote:
> @@ -1139,12 +1120,10 @@ void pc_basic_device_init(struct PCMachineState *pcms,
> qemu_irq pit_alt_irq = NULL;
> qemu_irq rtc_irq = NULL;
> ISADevice *pit = NULL;
> - MemoryRegion *ioport80_io = g_new(MemoryRegion, 1);
> MemoryRegion *ioportF0_io = g_new(MemoryRegion, 1);
> X86MachineState *x86ms = X86_MACHINE(pcms);
>
> - memory_region_init_io(ioport80_io, NULL, &ioport80_io_ops, NULL, "ioport80", 1);
> - memory_region_add_subregion(isa_bus->address_space_io, 0x80, ioport80_io);
> + (void)post_card_init(isa_bus, POST_CARD_PORT_DEFAULT);
>
This unfortunately breaks live migration of old machine types (new QEMU
to old QEMU).
The simplest (though not very simple) way to do it is to add a new
property to the machine (e.g. "postcard-rw") and keep the old
ioport80_io_ops if the property is false. Default the property to true,
and in hw/i386/pc.c make the property false with an entry like
{ TYPE_PC_MACHINE "postcard-rw", "off" },
in pc_compat_7_1.
> + VMSTATE_UINT16(port, POSTCardState),
port doesn't have to be stored.
Paolo
prev parent reply other threads:[~2022-11-03 18:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-07 0:37 [PATCH v2 1/2] hw/i386/postcard.c: New ISA POST card device Lev Kujawski
2022-07-07 0:37 ` [PATCH v2 2/2] hw/i386/postcard: New test suite for the " Lev Kujawski
2022-11-03 18:13 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fc1415a3-d1f2-73f4-4bb3-c1857484f462@redhat.com \
--to=pbonzini@redhat.com \
--cc=eduardo@habkost.net \
--cc=lkujaw@member.fsf.org \
--cc=lvivier@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).