qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com, mst@redhat.com,
	dgilbert@redhat.com, lersek@redhat.com
Subject: Re: [Qemu-devel] [PATCH] pc/fwcfg: unbreak migration from qemu-2.5 and qemu-2.6 during firmware boot
Date: Mon, 24 Apr 2017 21:32:33 +0200	[thread overview]
Message-ID: <20170424213233.2d19bdab@Igors-MacBook-Pro.local> (raw)
In-Reply-To: <20170424191317.GA3482@thinpad.lan.raisama.net>

On Mon, 24 Apr 2017 16:13:17 -0300
Eduardo Habkost <ehabkost@redhat.com> wrote:

> On Mon, Apr 24, 2017 at 08:58:17PM +0200, Igor Mammedov wrote:
> [...]
> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> > index f3b372a18f..3f2d96da64 100644
> > --- a/hw/i386/pc.c
> > +++ b/hw/i386/pc.c
> > @@ -1047,7 +1047,7 @@ static void load_linux(PCMachineState *pcms,
> >      fw_cfg_add_i32(fw_cfg, FW_CFG_SETUP_SIZE, setup_size);
> >      fw_cfg_add_bytes(fw_cfg, FW_CFG_SETUP_DATA, setup, setup_size);
> >  
> > -    if (fw_cfg_dma_enabled(fw_cfg)) {
> > +    if (!pcmc->linuxboot_dma_disabled && fw_cfg_dma_enabled(fw_cfg)) {
> 
> Why not name the flag just "linuxboot_dma", set it to true by
> default at pc_machine_class_init(), and avoid the double
> negative?
to avoid setting it to true somewhere else, so less thing could go wrong
but is you prefer *_enable variant I can switch to it.

> 
> [...]
> > diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> > index f278b3ae89..ff6f13b61b 100644
> > --- a/include/hw/i386/pc.h
> > +++ b/include/hw/i386/pc.h
> > @@ -151,6 +151,8 @@ struct PCMachineClass {
> >      bool save_tsc_khz;
> >      /* generate legacy CPU hotplug AML */
> >      bool legacy_cpu_hotplug;
> > +
> 
> A one-line description of the consequences of setting/clearing
> the flag would be nice.
will fix in v2

> 
> > +    bool linuxboot_dma_disabled;
> >  };
> >  
> >  #define TYPE_PC_MACHINE "generic-pc-machine"
> > @@ -432,10 +434,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
> >  #define PC_COMPAT_2_6 \
> >      HW_COMPAT_2_6 \
> >      {\
> > -        .driver   = "fw_cfg_io",\
> > -        .property = "dma_enabled",\
> > -        .value    = "off",\
> > -    },{\
> >          .driver   = TYPE_X86_CPU,\
> >          .property = "cpuid-0xb",\
> >          .value    = "off",\
> > -- 
> > 2.11.0 (Apple Git-81)
> > 
> 

  reply	other threads:[~2017-04-24 19:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24 18:58 [Qemu-devel] [PATCH] pc/fwcfg: unbreak migration from qemu-2.5 and qemu-2.6 during firmware boot Igor Mammedov
2017-04-24 19:13 ` Eduardo Habkost
2017-04-24 19:32   ` Igor Mammedov [this message]
2017-04-24 19:37     ` Eduardo Habkost
2017-04-24 19:56       ` Igor Mammedov
2017-04-24 20:05         ` Eduardo Habkost

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=20170424213233.2d19bdab@Igors-MacBook-Pro.local \
    --to=imammedo@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).