[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] libxl, hvmloader: Don't relocate memory for MMIO hole




> -----Original Message-----
> From: George Dunlap [mailto:george.dunlap@xxxxxxxxxxxxx]
> Sent: 2013å6æ18æ 20:21
> To: Hanweidong
> Cc: xen-devel@xxxxxxxxxxxxx; Ian Campbell; Ian Jackson; Stefano
> Stabellini
> Subject: Re: [PATCH] libxl,hvmloader: Don't relocate memory for MMIO
> hole
> 
> On 06/18/2013 01:18 PM, Hanweidong wrote:
> >> -----Original Message-----
> >> From: George Dunlap [mailto:george.dunlap@xxxxxxxxxxxxx]
> >> Sent: 2013å6æ18æ 0:49
> >> To: George Dunlap
> >> Cc: xen-devel@xxxxxxxxxxxxx; Ian Campbell; Ian Jackson; Stefano
> >> Stabellini; Hanweidong
> >> Subject: Re: [PATCH] libxl,hvmloader: Don't relocate memory for MMIO
> >> hole
> >>
> >> On 17/06/13 17:43, George Dunlap wrote:
> >>> At the moment, qemu-xen can't handle memory being relocated by
> >>> hvmloader.  This may happen if a device with a large enough memory
> >>> region is passed through to the guest.  At the moment, if this
> >>> happens, then at some point in the future qemu will crash and the
> >>> domain will hang.  (qemu-traditional is fine.)
> >>>
> >>> It's too late in the release to do a proper fix, so we try to do
> >>> damage control.
> >>>
> >>> hvmloader already has mechanisms to relocate memory to 64-bit space
> >>> if it can't make a big enough MMIO hole.  By default this is 2GiB;
> if
> >>> we just refuse to make the hole bigger if it will overlap with
> guest
> >>> memory, then this codepath will be taken by default.
> >>>
> >>> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
> >>> CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
> >>> CC: Ian Jackson <ian.jackson@xxxxxxxxxx>
> >>> CC: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> >>> CC: Hanweidong <hanweidong@xxxxxxxxxx>
> >>
> >> Unfortunatley, I don't have an easy way to test this, as all of the
> >> devices on my system are far smaller than 256MiB.
> >>
> >> Weidong, could you give this patch a try and see if it works for you?
> >>
> >
> > Georgeï
> >
> > I don't have a system in hand to test it today. I try to have a test
> tomorrow. In my experience, when it's prevented to relocate memory for
> MMIO hole by your patch, windows guest will crash (blue screen) and
> linux guest will hang with a blank display.
> 
> You mean to say, you've tried this approach before (relocating to a
> 64-bit MMIO region) and it doesn't work?

I didn't try this approach. I missed you want to map mmio to 64-bit space 
instead of relocate memory. Currently only mmio size is larger than 512M 
(PCI_MIN_BIG_BAR_SIZE) will be map to 64-bit space. So you need to change the 
condition if you want to map smaller mmio to 64-bit space.

weidong



> 
> BTW, don't try this patch -- it probably won't compile.  I've got a v2
> coming up to use instead.
> 
>   -George
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.