All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Vitaly Cheptsov <cheptsov@ispras.ru>
Cc: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	qemu-devel@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [PATCH] i386/acpi: restore device paths for pre-5.1 vms
Date: Tue, 23 Mar 2021 10:48:43 -0400	[thread overview]
Message-ID: <20210323104542-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <B813DBC6-B989-4630-B2DE-8F5825484E78@ispras.ru>

The issue is with people who installed a VM using 5.1 qemu,
migrated to 5.2, booted there and set a config on a device
e.g. IP on a NIC.
They now have a 5.1 machine type but changing uid back
like we do will break these VMs.

Unlikley to be common but let's at least create a way for these people
to used these VMs.


On Mon, Mar 22, 2021 at 06:49:09PM +0300, Vitaly Cheptsov wrote:
> Hi Michael,
> 
> That makes little sense in my opinion, these people can simply upgrade the VM version, which apparently looks the right way to do it in my opinion.
> 
> Best regards,
> Vitaly
> 
> > 22 марта 2021 г., в 18:43, Michael S. Tsirkin <mst@redhat.com> написал(а):
> > 
> > On Mon, Mar 01, 2021 at 10:59:18PM +0300, Vitaly Cheptsov wrote:
> >> After fixing the _UID value for the primary PCI root bridge in
> >> af1b80ae it was discovered that this change updates Windows
> >> configuration in an incompatible way causing network configuration
> >> failure unless DHCP is used. More details provided on the list:
> >> 
> >> https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg08484.html
> >> 
> >> This change reverts the _UID update from 1 to 0 for q35 and i440fx
> >> VMs before version 5.2 to maintain the original behaviour when
> >> upgrading.
> >> 
> >> Cc: qemu-stable@nongnu.org
> >> Cc: qemu-devel@nongnu.org
> >> Reported-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
> >> Suggested-by: Michael S. Tsirkin <mst@redhat.com>
> >> Signed-off-by: Vitaly Cheptsov <cheptsov@ispras.ru>
> >> ---
> >> hw/i386/acpi-build.c | 4 ++--
> >> hw/i386/pc_piix.c    | 2 ++
> >> hw/i386/pc_q35.c     | 2 ++
> >> include/hw/i386/pc.h | 1 +
> >> 4 files changed, 7 insertions(+), 2 deletions(-)
> >> 
> >> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> >> index 31a5f6f4a5..442b4629a9 100644
> >> --- a/hw/i386/acpi-build.c
> >> +++ b/hw/i386/acpi-build.c
> >> @@ -1277,7 +1277,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
> >>         dev = aml_device("PCI0");
> >>         aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03")));
> >>         aml_append(dev, aml_name_decl("_ADR", aml_int(0)));
> >> -        aml_append(dev, aml_name_decl("_UID", aml_int(0)));
> >> +        aml_append(dev, aml_name_decl("_UID", aml_int(pcmc->pci_root_uid)));
> >>         aml_append(sb_scope, dev);
> >>         aml_append(dsdt, sb_scope);
> >> 
> >> @@ -1296,7 +1296,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
> >>         aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A08")));
> >>         aml_append(dev, aml_name_decl("_CID", aml_eisaid("PNP0A03")));
> >>         aml_append(dev, aml_name_decl("_ADR", aml_int(0)));
> >> -        aml_append(dev, aml_name_decl("_UID", aml_int(0)));
> >> +        aml_append(dev, aml_name_decl("_UID", aml_int(pcmc->pci_root_uid)));
> >>         aml_append(dev, build_q35_osc_method());
> >>         aml_append(sb_scope, dev);
> >>         if (mcfg_valid) {
> >> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> >> index 2904b40163..46cc951073 100644
> >> --- a/hw/i386/pc_piix.c
> >> +++ b/hw/i386/pc_piix.c
> >> @@ -405,6 +405,7 @@ static void pc_i440fx_machine_options(MachineClass *m)
> >> {
> >>     PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
> >>     pcmc->default_nic_model = "e1000";
> >> +    pcmc->pci_root_uid = 0;
> >> 
> >>     m->family = "pc_piix";
> >>     m->desc = "Standard PC (i440FX + PIIX, 1996)";
> >> @@ -448,6 +449,7 @@ static void pc_i440fx_5_1_machine_options(MachineClass *m)
> >>     compat_props_add(m->compat_props, hw_compat_5_1, hw_compat_5_1_len);
> >>     compat_props_add(m->compat_props, pc_compat_5_1, pc_compat_5_1_len);
> >>     pcmc->kvmclock_create_always = false;
> >> +    pcmc->pci_root_uid = 1;
> >> }
> >> 
> >> DEFINE_I440FX_MACHINE(v5_1, "pc-i440fx-5.1", NULL,
> >> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> >> index 0a212443aa..53450190f5 100644
> >> --- a/hw/i386/pc_q35.c
> >> +++ b/hw/i386/pc_q35.c
> >> @@ -329,6 +329,7 @@ static void pc_q35_machine_options(MachineClass *m)
> >> {
> >>     PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
> >>     pcmc->default_nic_model = "e1000e";
> >> +    pcmc->pci_root_uid = 0;
> >> 
> >>     m->family = "pc_q35";
> >>     m->desc = "Standard PC (Q35 + ICH9, 2009)";
> >> @@ -375,6 +376,7 @@ static void pc_q35_5_1_machine_options(MachineClass *m)
> >>     compat_props_add(m->compat_props, hw_compat_5_1, hw_compat_5_1_len);
> >>     compat_props_add(m->compat_props, pc_compat_5_1, pc_compat_5_1_len);
> >>     pcmc->kvmclock_create_always = false;
> >> +    pcmc->pci_root_uid = 1;
> >> }
> >> 
> >> DEFINE_Q35_MACHINE(v5_1, "pc-q35-5.1", NULL,
> >> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> >> index c9d194a5e7..d4c3d73c11 100644
> >> --- a/include/hw/i386/pc.h
> >> +++ b/include/hw/i386/pc.h
> >> @@ -105,6 +105,7 @@ struct PCMachineClass {
> >>     int legacy_acpi_table_size;
> >>     unsigned acpi_data_size;
> >>     bool do_not_add_smb_acpi;
> >> +    int pci_root_uid;
> >> 
> >>     /* SMBIOS compat: */
> >>     bool smbios_defaults;
> > 
> > So this upstream, but I think we should also have a property
> > that allows people to have VMs installed with the old
> > machine type booted with a new machine type.
> > 
> > E.g.  "compat-pci-root-uid".
> > 
> > Vitaly could you take a look?
> > 
> > 
> >> --
> >> 2.24.3 (Apple Git-128)
> > 
> 




  reply	other threads:[~2021-03-23 14:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 19:59 [PATCH] i386/acpi: restore device paths for pre-5.1 vms Vitaly Cheptsov
2021-03-01 19:59 ` [PATCH] target/ppc: fix icount support on Book-e vms accessing SPRs Vitaly Cheptsov
2021-03-02  7:05 ` [PATCH] i386/acpi: restore device paths for pre-5.1 vms Thomas Lamprecht
2021-03-02  8:48 ` Igor Mammedov
2021-03-02 10:14 ` Michael S. Tsirkin
2021-03-22 15:43 ` Michael S. Tsirkin
2021-03-22 15:49   ` Vitaly Cheptsov
2021-03-23 14:48     ` Michael S. Tsirkin [this message]
2021-03-23 14:55       ` Vitaly Cheptsov
2021-03-23 15:04         ` Thomas Lamprecht
2021-03-23 16:54           ` Ways to deal with broken machine types Igor Mammedov
2021-03-23 17:40             ` Daniel P. Berrangé
2021-03-23 19:40               ` Michael S. Tsirkin
2021-03-30 11:21                 ` David Edmondson
2021-03-30 11:53                   ` Michael S. Tsirkin
2021-03-26  0:48               ` Igor Mammedov
2021-03-29 14:46                 ` Dr. David Alan Gilbert
2021-03-29 20:32                   ` Igor Mammedov
2021-03-23 19:32           ` [PATCH] i386/acpi: restore device paths for pre-5.1 vms Michael S. Tsirkin
2021-03-26  0:12             ` Igor Mammedov

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=20210323104542-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=cheptsov@ispras.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=t.lamprecht@proxmox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.