qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qdev-monitor.c: Add device id generation


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] qdev-monitor.c: Add device id generation
Date: Tue, 25 Aug 2015 20:30:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Programmingkid <address@hidden> writes:

> On Aug 25, 2015, at 11:33 AM, Peter Maydell wrote:
>
>> On 25 August 2015 at 16:25, Programmingkid <address@hidden> wrote:
>>> On Aug 25, 2015, at 8:42 AM, Markus Armbruster wrote:
>>>> Eric Blake <address@hidden> writes:
>>>> 
>>>>> On 08/24/2015 12:53 PM, Programmingkid wrote:
>>>>>> +/* USB's max number of devices is 127. This number is 3 digits long. */
>>>>>> +#define MAX_NUM_DIGITS_FOR_USB_ID 3
>>>> 
>>>> This limit makes no sense to me.
>>> 
>>> The limit is used to decide how many characters the device_id
>>> string is going to have.
>>> Three digits would be 0 to 999 device ID's would be supported. I
>>> can't imagine
>>> anyone spending the time to add that many devices.
>> 
>> Arbitrary limits are often a bad idea, especially when
>> they're easy to avoid, as here.
>
> Knowing QEMU's limits can save the user from crashes and other
> problems. There is
> only a finite amount of memory available to QEMU. 

Repeat N times:
    device_add FOO,id=hot
    device_del hot

Memory usage independent of N (unless we leak, but that would be a bug).

[...]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]