linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Avi Kivity <avi@redhat.com>
Cc: kvm-ppc <kvm-ppc@vger.kernel.org>,
	kvm@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] PPC: Sync guest visible MMU state
Date: Thu, 26 Nov 2009 13:46:52 +0100	[thread overview]
Message-ID: <4B0E78BC.5050901@suse.de> (raw)
In-Reply-To: <4B0E7738.5030506@redhat.com>

Avi Kivity wrote:
> On 11/26/2009 01:16 PM, Alexander Graf wrote:
>> Currently userspace has no chance to find out which virtual address
>> space we're
>> in and resolve addresses. While that is a big problem for migration,
>> it's also
>> unpleasent when debugging, as gdb and the monitor don't work on virtual
>> addresses.
>>
>> This patch exports enough of the MMU segment state to userspace to make
>> debugging work and thus also includes the groundwork for migration.
>>
>>
>>   struct kvm_sregs {
>> -    __u32 pvr;
>> -    char pad[1020];
>> +    union {
>> +        struct {
>> +            __u32 pvr;
>> +            __u64 sdr1;
>> +            struct {
>> +                struct {
>> +                    __u64 slbe;
>> +                    __u64 slbv;
>> +                } slb[64];
>> +            } ppc64;
>> +            struct {
>> +                __u32 sr[16];
>> +                __u64 ibat[8];
>> +                __u64 dbat[8];
>> +            } ppc32;
>> +        };
>> +        __u8 pad[1024];
>> +    };
>>   };
>>    
>
> Please avoid unnamed unions in user-visible headers - they're a gcc
> extension.
>
> Yes, we have them elsewhere, but let's not add to the pile.

I'm open to scalable suggestions that don't break existing userspace code.
If I name the union now, existing qemu code will break. If I align the
pad array manually I'll definitely mess up something.

Alex

  reply	other threads:[~2009-11-26 12:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-26 11:16 [PATCH] PPC: Sync guest visible MMU state Alexander Graf
2009-11-26 12:40 ` Avi Kivity
2009-11-26 12:46   ` Alexander Graf [this message]
2009-11-26 12:50     ` Avi Kivity
2009-11-26 13:16       ` Alexander Graf
2009-11-26 13:20         ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2009-11-30 13:02 Alexander Graf
2009-11-30 13:15 ` Avi Kivity
2009-11-26 15:24 Alexander Graf
2009-11-26 21:56 ` Alexander Graf
2009-11-24  7:50 Alexander Graf
2009-11-24 15:02 ` Avi Kivity
2009-11-24 15:04   ` Alexander Graf
2009-11-24 16:05     ` 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=4B0E78BC.5050901@suse.de \
    --to=agraf@suse.de \
    --cc=avi@redhat.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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).