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

Re: [Xen-devel] [PATCH v4 19/27] x86: move hypercall_page_initialise_ring3_kernel to pv/hypercall.c



On 23/06/17 15:49, Wei Liu wrote:
> On Fri, Jun 23, 2017 at 01:41:29PM +0100, Andrew Cooper wrote:
>> On 08/06/17 18:11, Wei Liu wrote:
>>> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
>>> ---
>>>  xen/arch/x86/pv/hypercall.c     | 36 ++++++++++++++++++++++++++++++++++++
>>>  xen/arch/x86/x86_64/traps.c     | 36 ------------------------------------
>>>  xen/include/asm-x86/hypercall.h |  1 +
>>>  3 files changed, 37 insertions(+), 36 deletions(-)
>>>
>>> diff --git a/xen/arch/x86/pv/hypercall.c b/xen/arch/x86/pv/hypercall.c
>>> index 7c5e5a629d..287340e774 100644
>>> --- a/xen/arch/x86/pv/hypercall.c
>>> +++ b/xen/arch/x86/pv/hypercall.c
>>> @@ -255,6 +255,42 @@ enum mc_disposition arch_do_multicall_call(struct 
>>> mc_state *state)
>>>               ? mc_continue : mc_preempt;
>>>  }
>>>  
>>> +void hypercall_page_initialise_ring3_kernel(void *hypercall_page)
>>> +{
>>> +    char *p;
>>> +    int i;
>> void *p = hypercall_page;
>> unsigned int i;
>>
>>> +
>>> +    /* Fill in all the transfer points with template machine code. */
>>> +    for ( i = 0; i < (PAGE_SIZE / 32); i++ )
>>> +    {
>> i++, p += 32
> Wait, I think pointer arithmetic is not allowed on void* ?

void pointer arithmetic is a GCCism, which we use in plenty of other
locations.

~Andrew

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

 


Rackspace

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