[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH v3.1 1/2] xsplice: rfc.v3.1



>>> On 31.07.15 at 17:46, <konrad.wilk@xxxxxxxxxx> wrote:
> On Thu, Jul 30, 2015 at 09:47:40AM -0700, Johannes Erdfelt wrote:
>> On Mon, Jul 27, 2015, Konrad Rzeszutek Wilk <konrad@xxxxxxxxxx> wrote:
>> > +struct xsplice_reloc_howto {  
>> > +    uint32_t    howto; /* XSPLICE_HOWTO_* */  
>> > +    uint32_t    flag; /* XSPLICE_HOWTO_FLAG_* */  
>> > +    uint32_t    size; /* Size, in bytes, of the item to be relocated. */  
>> > +    uint32_t    r_shift; /* The value the final relocation is shifted 
>> > right by; used to drop unwanted data from the relocation. */  
>> > +    uint64_t    mask; /* Bitmask for which parts of the instruction or 
>> > data are replaced with the relocated value. */  
>> > +    uint8_t     pad[8]; /* Must be zero. */  
>> > +};  
>> 
>> I'm curious how r_shift and mask are used. I'm familiar with x86 and
>> x86_64 and I'm not sure how these fit in. Is this to support other
>> architectures?
> 
> It is to patch up data. We can specify the exact mask for an unsigned
> int - so we only patch specific bits. Ditto if we want to remove certain
> values.

Still I don't see a practical use: What relocated item would (on x86)
be stored starting at other than bit 0 of a byte/word? Also, wouldn't
a shift count be redundant with the mask value anyway?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.