[Top][All Lists]

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDev

From: David Hildenbrand
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice
Date: Sun, 22 Apr 2018 10:20:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 22.04.2018 06:58, Pankaj Gupta wrote:
> Hello,
> This is good re-factoring and needed for 'virtio-pmem' as well to
> reserve memory region in system address space.
> I have tested this code with virtio-pmem and its working fine. Thank you
> for the work.
> I just have a small suggestion : when functions like(get_addr(), 
> get_plugged_size etc) 
> in the interface are not provided by derived class, Qemu crashes.
> I think having a contract for must override functions with NULL check and 
> error
> at the calling sites would be better?

I expect that all of these functions are implemented. It's a contract
for devices that are mapped into address space. We might later have
additional functions that might not be required to be provided and will
be checked for NULL.

So for the current set of functions, I don't think it makes sense to
make them optional.


> Thanks,
> Pankaj  



David / dhildenb

reply via email to

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