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

Re: [Xen-devel] Is: PVH + ARM new hypercalls. Was: Re: [PATCH]: PVH: specify xen features strings cleany for PVH



On Mon, 28 Jan 2013 11:26:08 -0500
Konrad Rzeszutek Wilk <konrad@xxxxxxxxxx> wrote:

> On Fri, Jan 25, 2013 at 10:43:41AM +0000, Ian Campbell wrote:
> > On Fri, 2013-01-25 at 10:27 +0000, Jan Beulich wrote:
> 
> #define PHYSDEVOP_map_iomem        30
> struct physdev_map_iomem {
>     /* IN */
>     uint64_t first_gfn;
>     uint64_t first_mfn;
>     uint32_t nr_mfns;
>     uint32_t add_mapping; /* 1 == add mapping;  0 == unmap */
> 
> };

Since the new recommendation is to map transparently, we don't need
this anymore. I'll submit an incremental patch to you Konrad.

 
> and the modification to one:
> 
> commit 50c0b3df91be7a440b50ee7d74fd2042bca173fd
> Author: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
> Date:   Mon Oct 22 11:37:57 2012 -0400
> 
>     xen/pvh: Extend vcpu_guest_context, p2m, event, and XenBus.
>     
>     Make gdt_frames[]/gdt_ents into a union with {gdtaddr, gdtsz},
>     as PVH only needs to send down gdtaddr and gdtsz in the
>     vcpu_guest_context structure..
>     
>     For interrupts, PVH uses native_irq_ops so we can skip most of the
>     PV ones. In the future we can support the pirq_eoi_map..
>     Also VCPU hotplug is currently not available for PVH.
>     
>     For events (and IRQs) we follow what PVHVM does - so use callback
>     vector.  Lastly, for XenBus we use the same logic that is used in
>     the PVHVM case.
>     
>     Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
>     Signed-off-by: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
>     [v2: Rebased it]
>     [v3: Move 64-bit ifdef and based on Stefan add extra comments.]
>     [v4: Rebased it once more]
>     Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> 
> diff --git a/arch/x86/include/asm/xen/interface.h
> b/arch/x86/include/asm/xen/interface.h index fd9cb76..20e738a 100644
> --- a/arch/x86/include/asm/xen/interface.h
> +++ b/arch/x86/include/asm/xen/interface.h
> @@ -145,7 +145,16 @@ struct vcpu_guest_context {
>      struct cpu_user_regs user_regs;         /* User-level CPU
> registers     */ struct trap_info trap_ctxt[256];        /* Virtual
> IDT                  */ unsigned long ldt_base, ldt_ents;       /*
> LDT (linear address, # ents) */
> -    unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames,
> # ents) */
> +    union {
> +     struct {
> +             /* PV: GDT (machine frames, # ents).*/
> +             unsigned long gdt_frames[16], gdt_ents;
> +     } pv;
> +     struct {
> +             /* PVH: GDTR addr and size */
> +             unsigned long gdtaddr, gdtsz;
> +     } pvh;
> +    } u;
>      unsigned long kernel_ss, kernel_sp;     /* Virtual TSS (only


On xen side I added the ifdef:

#if __XEN_INTERFACE_VERSION__ < 0x00040300
    unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
#else
    union {
        struct {
            /* GDT (machine frames, # ents) */
            unsigned long gdt_frames[16], gdt_ents;
        } pv;
        struct {
            /* PVH: GDTR addr and size */
            unsigned long gdtaddr, gdtsz;
        } pvh;
    } u;
#endif

but it doesn't matter on linux side, so up to you.



_______________________________________________
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®.