kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm-devel <kvm@vger.kernel.org>
Subject: Re: Heads up: More user-unaccessible x86 states?
Date: Mon, 05 Oct 2009 14:42:18 +0200	[thread overview]
Message-ID: <4AC9E9AA.7090603@siemens.com> (raw)
In-Reply-To: <4AC9E7BC.2060803@redhat.com>

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

  reply	other threads:[~2009-10-05 12:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4AC86404.3090209@web.de>
     [not found] ` <4AC87299.4040508@redhat.com>
     [not found]   ` <4AC87E08.5070908@web.de>
     [not found]     ` <4AC88BF2.7080200@redhat.com>
2009-10-04 19:07       ` Heads up: More user-unaccessible x86 states? Jan Kiszka
2009-10-05  6:18         ` Avi Kivity
2009-10-05  7:43           ` Jan Kiszka
2009-10-05  8:55             ` Avi Kivity
2009-10-05 11:18               ` Jan Kiszka
2009-10-05 12:05                 ` Avi Kivity
2009-10-05 12:18                   ` Jan Kiszka
2009-10-05 12:34                     ` Avi Kivity
2009-10-05 12:42                       ` Jan Kiszka [this message]
2009-10-05 12:55                         ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AC9E9AA.7090603@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).