qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 6/6] pc: limit 64 bit hole to 2G by default
Date: Sun, 28 Jul 2013 12:13:17 +0300	[thread overview]
Message-ID: <20130728091317.GB14505@redhat.com> (raw)
In-Reply-To: <20130728102156.12db54b9@thinkpad>

On Sun, Jul 28, 2013 at 10:21:56AM +0200, Igor Mammedov wrote:
> On Sun, 28 Jul 2013 10:57:12 +0300
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
> > On Sun, Jul 28, 2013 at 09:29:13AM +0200, Igor Mammedov wrote:
> > > It turns out that some 32 bit windows guests crash
> > > if 64 bit PCI hole size is >2G.
> > > Limit it to 2G for piix and q35 by default.
> > > User may override default boundaries by using
> > > "pci_hole64_end " property.
> > > 
> > > Examples:
> > > -global i440FX-pcihost.pci_hole64_end=0xffffffffffffffff
> > > 
> > > -global q35-pcihost.pci_hole64_end=0xffffffffffffffff
> > 
> > IMO that's pretty bad as user interfaces go.
> > In particular if you are not careful you can make
> > end < start.
> > Why not set the size, and include a patch that
> > let people write "1G" or "2G" for convenience?
> sure as convenience why not, on top of this patches.
>  
> > 
> > > Reported-by: Igor Mammedov <imammedo@redhat.com>,
> > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > > ---
> > >  hw/i386/pc.c              | 59 +++++++++++++++++++++++++++++------------------
> > >  hw/i386/pc_piix.c         | 14 +----------
> > >  hw/pci-host/piix.c        | 37 +++++++++++++++++++++++++----
> > >  hw/pci-host/q35.c         | 32 +++++++++++++++----------
> > >  include/hw/i386/pc.h      |  5 ++--
> > >  include/hw/pci-host/q35.h |  1 +
> > >  6 files changed, 94 insertions(+), 54 deletions(-)
> > > 
> > > diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> > > index b0b98a8..acaeb6c 100644
> > > --- a/hw/i386/pc.c
> > > +++ b/hw/i386/pc.c
> > > @@ -1003,15 +1003,28 @@ typedef struct PcRomPciInfo {
> > >  static void pc_fw_cfg_guest_info(PcGuestInfo *guest_info)
> > >  {
> > >      PcRomPciInfo *info;
> > > +    Object *pci_info;
> > > +
> > >      if (!guest_info->has_pci_info || !guest_info->fw_cfg) {
> > >          return;
> > >      }
> > > +    pci_info = object_resolve_path("/machine/i440fx", NULL);
> > > +    if (!pci_info) {
> > > +        pci_info = object_resolve_path("/machine/q35", NULL);
> > > +        if (!pci_info) {
> > > +            return;
> > > +        }
> > > +    }
> > 
> > 
> > So is the path /machine/i440fx? /machine/i440FX?
> > /machine/i440FX-pcihost?
> > There's no way to check this code is right without
> > actually running it.
> that drawback of dynamic lookup,
> QOM paths supposed to be stable.
> 
> > 
> > How about i44fx_get_pci_info so we can have this
> > knowledge of paths localized in specific chipset code?
> I've seen objections from afaerber about this approach, so dropped
> this idea.

Could we lookup TYPE_PCI_HOST? This will make pc code
independent of specific machine.

-- 
MST

  parent reply	other threads:[~2013-07-28  9:12 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-28  7:29 [Qemu-devel] [PATCH 0/6 v2 for-1.6] pc: limit 64 bit hole to 2G by default Igor Mammedov
2013-07-28  7:29 ` [Qemu-devel] [PATCH 1/6] pc: move IO_APIC_DEFAULT_ADDRESS to include/hw/i386/ioapic.h Igor Mammedov
2013-07-28  9:54   ` Andreas Färber
2013-07-28 17:19     ` Igor Mammedov
2013-07-28 17:37       ` Andreas Färber
2013-07-28  7:29 ` [Qemu-devel] [PATCH 2/6] pc: add I440FX QOM cast macro Igor Mammedov
2013-07-28  9:57   ` Andreas Färber
2013-07-28 17:21     ` Igor Mammedov
2013-07-28 17:24       ` Andreas Färber
2013-07-28 18:05         ` Igor Mammedov
2013-07-28  7:29 ` [Qemu-devel] [PATCH 3/6] utils: add range_size() wrapper Igor Mammedov
2013-07-28  7:29 ` [Qemu-devel] [PATCH 4/6] pc: replace i440fx_common_init() with i440fx_init() as it isn't used by anywhere else Igor Mammedov
2013-07-28 10:07   ` Andreas Färber
2013-07-28  7:29 ` [Qemu-devel] [PATCH 5/6] pc: add Q35 to QOM composition tree under /machine Igor Mammedov
2013-07-28 10:08   ` Andreas Färber
2013-07-28  7:29 ` [Qemu-devel] [PATCH 6/6] pc: limit 64 bit hole to 2G by default Igor Mammedov
2013-07-28  7:57   ` Michael S. Tsirkin
2013-07-28  8:21     ` Igor Mammedov
2013-07-28  9:11       ` Michael S. Tsirkin
2013-07-28 10:17         ` Andreas Färber
2013-07-28 17:40           ` Igor Mammedov
2013-07-28 19:48             ` Michael S. Tsirkin
2013-07-30 21:34           ` Michael Roth
2013-07-28 17:33         ` Igor Mammedov
2013-07-28 19:51           ` Michael S. Tsirkin
2013-07-29  7:55             ` Igor Mammedov
2013-07-29  8:16               ` Michael S. Tsirkin
2013-07-28  9:13       ` Michael S. Tsirkin [this message]
2013-07-28 17:34         ` 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=20130728091317.GB14505@redhat.com \
    --to=mst@redhat.com \
    --cc=imammedo@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).