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

Re: [Xen-devel] [PATCH v5 1/1] Add mmio_hole_size



On Tue, Sep 30, 2014 at 4:36 PM, Boris Ostrovsky
<boris.ostrovsky@xxxxxxxxxx> wrote:
>
> On 09/30/2014 09:22 AM, George Dunlap wrote:
>>
>> On Tue, Sep 30, 2014 at 2:27 AM, Boris Ostrovsky
>> <boris.ostrovsky@xxxxxxxxxx> wrote:
>>>>
>>>> +    if ( mmio_hole_size )
>>>> +    {
>>>> +        uint64_t max_ram_below_4g = (1ULL << 32) - mmio_hole_size;
>>>> +
>>>> +        if ( max_ram_below_4g > HVM_BELOW_4G_MMIO_START )
>>>> +        {
>>>> +            printf("max_ram_below_4g=0x"PRIllx
>>>> +                   " too big for mmio_hole_size=0x"PRIllx
>>>> +                   " has been ignored.\n",
>>>> +                   PRIllx_arg(max_ram_below_4g),
>>>> +                   PRIllx_arg(mmio_hole_size));
>>>> +        }
>>>
>>>
>>> Do you need to check whether the hole is too large?
>>>
>>> Here and in the toolstack.
>>
>> How large is too large?  I've seen real machines with a 3GiB memory
>> hole...
>
>
>
> But if mmio_hole_size is set to, say, 4GB we can't expect anything good,
> right? I don't know what the reasonable upper limit on it should be but it
> seems to me we need one. Especially given that it's a uint64_t.

Well the worst it can do is cause the guest to crash, I think, isn't it? :-)

If mmio_hole_size > 4G, then in the check above, max_ram_below_4g will
wrap around and end up higher than HVM_BELOW_4G_MMIO_START, and
nothing will be done.

 -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®.