Avi Kivity wrote:
> On 10/05/2009 02:18 PM, Jan Kiszka wrote:
>>> True pointers are no go since we have to deal with compat code (31/32
>>> bit userspace calling into a 64 bit kernel).  Offsets into the state
>>> structure are easier.
>>>      
>> So current KVM_GET_DIRTY_LOG is broken in the compat case...
>>
>>    
> 
> Yes, for big-endian 32/64 and s390.  There are some patches floating around.

Well, that's for fixing up the endianess of the bitmap itself. But the
problem with void * in compat code are their different sizes. And
GET_DIRTY_LOG solves this via padding:

        union {
                void __user *dirty_bitmap;
                __u64 padding2;
        };

So this should not make pointers a no-go, should it?

> 
>> We'll probably have to deal with both. Therefore, I'm looking for a
>> unified solution.
>>
>>    
> 
> array of
> 
> struct {
>     __u16 type;
>     __u16 offset;
> } ?
> 

For sure possible, just the setup of such data structure in user space
gets a bit, well, unhandy.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to