All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH] x86/pv: Fix construction of 32bit dom0's
Date: Thu, 14 Feb 2019 01:11:49 -0700	[thread overview]
Message-ID: <5C6522C5020000780021690C@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <20190213180758.hwh76y5iq6xsm2dd@zion.uk.xensource.com>

>>> On 13.02.19 at 19:07, <wei.liu2@citrix.com> wrote:
> On Thu, Feb 07, 2019 at 05:58:56AM -0700, Jan Beulich wrote:
>> >>> On 06.02.19 at 21:41, <andrew.cooper3@citrix.com> wrote:
>> > Slightly RFC:
>> > 
>> > 1) I've not worked out exactly what the
>> > 
>> >      v->vcpu_info = (void *)&d->shared_info->compat.vcpu_info[0];
>> > 
>> >    line is supposed to be doing and whether it is needed, but it doesn't
>> >    appear to matter.  It is perhaps another redundant opencoding.
>> 
>> Afaict this is just to be independent of the fact that the vcpu_info
>> array is first in struct shared_info. I'd be fine with it getting replaced
>> by a respective BUILD_BUG_ON(), but I'd like to ask that it not be
>> dropped without replacement.
> 
> What do you mean by "be independent of" here? Perhaps you meant "be sure
> of"? But I still fail to understand how would an assignment makes sure
> a member is first in a struct.

It's the other way around: We're fine without the assignment when
the field is first in the struct. The assignment would strictly be needed
if it wasn't, because then what's earlier in the struct could have
different sizes between the native and compat layouts.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-02-14  8:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 20:41 [PATCH] x86/pv: Fix construction of 32bit dom0's Andrew Cooper
2019-02-07 12:58 ` Jan Beulich
2019-02-07 13:29   ` Andrew Cooper
2019-02-07 13:38     ` Juergen Gross
2019-02-07 13:45     ` Jan Beulich
2019-02-07 13:56       ` Juergen Gross
2019-02-07 15:01         ` Andrew Cooper
2019-02-13 18:07   ` Wei Liu
2019-02-14  8:11     ` Jan Beulich [this message]
2019-02-14 10:30       ` Wei Liu
2019-02-14 10:47         ` Jan Beulich

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=5C6522C5020000780021690C@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.