qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Fedin <p.fedin@samsung.com>
To: 'Peter Maydell' <peter.maydell@linaro.org>
Cc: 'Igor Mammedov' <imammedo@redhat.com>,
	'Alexander Graf' <agraf@suse.de>,
	"'Michael S. Tsirkin'" <mst@redhat.com>,
	'QEMU Developers' <qemu-devel@nongnu.org>,
	'Paolo Bonzini' <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3] hw/arm/virt: Add high MMIO PCI region
Date: Wed, 29 Jul 2015 17:01:53 +0300	[thread overview]
Message-ID: <01b701d0ca07$208eb6b0$61ac2410$@samsung.com> (raw)
In-Reply-To: <CAFEAcA_US-giAma2Tu3oXSJ6zHzAB--=6iBsisYt6vVMM8HvOQ@mail.gmail.com>

 Hello! I have studied the problem. It is a kernel bug and it's still not fixed, at least in 4.1

> (1) We should confirm whether this really is a guest kernel
> bug (as opposed to the device tree QEMU emits not being
> in spec)

 The problem is in of_pci_range_to_resource(): http://lxr.free-electrons.com/source/drivers/of/address.c#L313
 Note the line 333: res->start = range->cpu_addr; here is the problem. The problem occurs if CONFIG_ARM_LPAE is disabled. Inside struct resource 'start' and 'end' are of  resource_size_t type, which is an alias of phys_addr_t:
--- cut ---
#ifdef CONFIG_PHYS_ADDR_T_64BIT
typedef u64 phys_addr_t;
#else
typedef u32 phys_addr_t;
#endif

typedef phys_addr_t resource_size_t;
--- cut ---
 Config option chain is as follows: CONFIG_ARM_LPAE => CONFIG_ARCH_PHYS_ADDR_T_64BIT => CONFIG_PHYS_ADDR_T_64BIT
 This function should check that range->cpu_addr fits into 32 bits if LPAE is disabled.

> (2) If it is a kernel bug, submit a patch to fix it

 Will do it.

> (3) Consider a workaround for older guests anyway. The
> scope of that workaround would depend on exactly which
> guests are affected, which is presumably something we
> figured out during step (1).

 Problem occurs if LPAE is disabled in the kernel. What is your verdict then? Do we need an option or just ignore those poor guys with such old configs?

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia

  reply	other threads:[~2015-07-29 14:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-27 11:09 [Qemu-devel] [PATCH v3] hw/arm/virt: Add high MMIO PCI region Pavel Fedin
2015-07-27 13:26 ` Igor Mammedov
2015-07-27 14:36   ` Pavel Fedin
2015-07-27 15:18     ` Michael S. Tsirkin
2015-07-27 15:51       ` Peter Maydell
2015-07-29  8:58   ` Pavel Fedin
2015-07-29  9:03     ` Peter Maydell
2015-07-29  9:45       ` Pavel Fedin
2015-07-29  9:56         ` Peter Maydell
2015-07-29 11:16           ` Pavel Fedin
2015-07-29 11:45             ` Peter Maydell
2015-07-29 14:01               ` Pavel Fedin [this message]
2015-08-03  7:03               ` Pavel Fedin
2015-08-03  7:56                 ` Peter Maydell
2015-08-03  8:09                   ` Pavel Fedin
2015-08-03  9:48                     ` Peter Maydell
2015-08-03 10:20                       ` Pavel Fedin
2015-08-03 20:17                         ` Alexander Graf
2015-07-29  9:32     ` Igor Mammedov
2015-07-29 10:03       ` Pavel Fedin
2015-07-29 10:21         ` Peter Maydell
2015-07-29 12:05         ` Igor Mammedov
2015-07-29 12:13           ` Pavel Fedin
2015-07-29 12:35           ` Peter Maydell
2015-07-29  9:10 ` Igor Mammedov
2015-07-29  9:48   ` Pavel Fedin
2015-07-29 11:59     ` Igor Mammedov
2015-07-29 12:02       ` Pavel Fedin
2015-07-29 13:24         ` 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='01b701d0ca07$208eb6b0$61ac2410$@samsung.com' \
    --to=p.fedin@samsung.com \
    --cc=agraf@suse.de \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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).