qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Damjan Marion (damarion)" <damarion@cisco.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
Subject: Re: [Qemu-devel] vhost-user: broken mem regions
Date: Thu, 26 Jun 2014 10:13:40 +0300	[thread overview]
Message-ID: <20140626071340.GB21685@redhat.com> (raw)
In-Reply-To: <539537F4-A2DD-416A-9245-C31905138EFD@cisco.com>

On Wed, Jun 25, 2014 at 09:52:09PM +0000, Damjan Marion (damarion) wrote:
> 
> On 25 Jun 2014, at 18:44, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 
> >> nregions: 4
> >> region:
> >> 	gpa = 0x100000000
> >> 	size = 3221225472
> >> 	ua = 0x2aab6ac00000
> > 
> > High memory, above 3 gigabytes.
> > 
> >> region:
> >> 	gpa = 0xFFFC0000
> >> 	size = 262144
> >> 	ua = 0x7fc13d200000
> > 
> > This is the BIOS.  There shouldn't be any FD for this one, it
> > is not allocated in hugetlbfs.
> > 
> >> region:
> >> 	gpa = 0x0
> >> 	size = 655360
> >> 	ua = 0x2aaaaac00000
> >> region:
> >> 	gpa = 0xC0000
> >> 	size = 3220439040
> >> 	ua = 0x2aaaaacc0000
> > 
> > Together, it's the first 3 GB of memory.
> > 
> > I understand now what you mean.  Yeah, the format should be changed
> > to include the offset (why does vhost-user need the ua at all?
> > perhaps the offset can replace the ua).
> > 
> >> BTW Any idea what to do with region 2, it doesn’t look like the one belonging
> >> to the same place, but qemu_get_ram_fd() returns same FD for it.
> > 
> > This must be a bug.  I would have expected qemu_get_ram_fd to return -1
> > here, so no descriptor should be passed to vhost-user.
> 
> Problem is inside qemu_get_ram_block():
> 
> 
>     if (block && addr - block->offset < block->length) {
>         goto found;
>     }
> 
> this is true if we have > 4G of RAM allocated.

Hmm I don't get it. Why is it always true for >4G RAM?

> 
> Any advice how to fix this?
> 
> 

  reply	other threads:[~2014-06-26  7:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <A459CE38-2929-47A2-8683-8D7EAF0325C0@cisco.com>
     [not found] ` <20140625135207.GC14578@redhat.com>
2014-06-25 14:06   ` [Qemu-devel] vhost-user: broken mem regions Damjan Marion (damarion)
2014-06-25 14:13     ` Nikolay Nikolaev
2014-06-25 14:16       ` Michael S. Tsirkin
2014-06-25 14:20       ` Damjan Marion (damarion)
2014-06-25 14:27         ` Michael S. Tsirkin
2014-06-25 14:57           ` Damjan Marion (damarion)
2014-06-25 15:29             ` Michael S. Tsirkin
2014-06-25 15:46               ` Damjan Marion (damarion)
2014-06-25 15:50                 ` Michael S. Tsirkin
2014-06-25 16:30                   ` Damjan Marion (damarion)
2014-06-25 16:44                     ` Paolo Bonzini
2014-06-25 16:56                       ` Nikolay Nikolaev
2014-06-25 17:05                         ` Paolo Bonzini
2014-06-25 18:11                           ` Michael S. Tsirkin
2014-06-25 18:07                         ` Michael S. Tsirkin
2014-06-25 18:13                           ` Nikolay Nikolaev
2014-06-25 18:18                             ` Michael S. Tsirkin
2014-06-25 21:37                               ` Damjan Marion (damarion)
2014-06-26 10:03                                 ` Nikolay Nikolaev
2014-06-25 17:06                       ` Nikolay Nikolaev
2014-06-25 18:00                         ` Paolo Bonzini
2014-06-25 21:52                       ` Damjan Marion (damarion)
2014-06-26  7:13                         ` Michael S. Tsirkin [this message]
2014-06-26  7:44                           ` Damjan Marion (damarion)
2014-06-26  7:56                             ` Michael S. Tsirkin
2014-06-26  8:26                               ` Damjan Marion (damarion)
     [not found] ` <CADDJ2=M3=mxjHO3=gNq5xKseDyrJkaBVFLkb=SsFr0_d9UUBsQ@mail.gmail.com>
2014-06-25 14:16   ` Damjan Marion (damarion)

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=20140626071340.GB21685@redhat.com \
    --to=mst@redhat.com \
    --cc=damarion@cisco.com \
    --cc=n.nikolaev@virtualopensystems.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).