|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 6/9] xen/x86: parse Dom0 kernel for PVHv2
>>> On 27.01.17 at 18:28, <roger.pau@xxxxxxxxxx> wrote:
> On Fri, Jan 27, 2017 at 05:22:03PM +0000, Roger Pau Monne wrote:
>> On Thu, Jan 26, 2017 at 06:37:00AM -0700, Jan Beulich wrote:
>> > >>> On 19.01.17 at 18:29, <roger.pau@xxxxxxxxxx> wrote:
>> > > + if ( cmdline != NULL )
>> > > + {
>> > > + rc = hvm_copy_to_guest_phys_vcpu(last_addr, cmdline,
>> > > + strlen(cmdline) + 1, v);
>> > > + if ( rc )
>> > > + {
>> > > + printk("Unable to copy guest command line\n");
>> > > + return rc;
>> > > + }
>> > > + start_info.cmdline_paddr = last_addr;
>> > > + last_addr += ROUNDUP(strlen(cmdline) + 1, 8);
>> >
>> > Where is this 8 coming from?
>>
>> So that the next struct is aligned to the cache line size? It's also done in
>> xc_dom_x86.c.
>
> Sorry, not to the cache, this is just so it's aligned:
>
> https://lists.xen.org/archives/html/xen-devel/2015-08/msg01883.html
Well, that still doesn't explain the 8 to the reader of the code. The
more that it remains unclear why it needs to be 8 even for the 32-bit
case. Deriving from guest properties would likely make the code
self-explanatory; otherwise I'd rather like to ask for a brief comment.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |