Re: [PATCH v3 00/23] Introduce Xen support on ARM

2012-09-13 Thread Stefano Stabellini
Russell,
sorry for not CC'ing you on the entire patch series in the past, I'll do
it in the next iteration of the series (that TBH is nearly identical to
this one apart from being 3.6-rc5 based).

Are you happy with it? Given that the changes are entirely contained
within arch/arm/xen and arch/arm/include/asm/xen (apart from patch #21
that is a generic ARM fix), should this patch series go through you or
Arnd?

Thanks,

Stefano




On Thu, 16 Aug 2012, Stefano Stabellini wrote:
> Hi all,
> this patch series implements Xen support for ARMv7 with virtualization
> extensions.  It allows a Linux guest to boot as dom0 and
> as domU on Xen on ARM. PV console, disk and network frontends and
> backends are all working correctly.
> 
> It has been tested on a Versatile Express Cortex A15 emulator, using the
> latest Xen ARM developement branch
> (git://xenbits.xen.org/people/ianc/xen-unstable.git arm-for-4.3) plus
> the "ARM hypercall ABI: 64 bit ready" patch series
> (http://marc.info/?l=xen-devel=134426267205408), and a simple ad-hoc
> tool to build guest domains (marc.info/?l=xen-devel=134089788016546).
> 
> The patch marked with [HACK] shouldn't be applied and is part of the
> series only because it is needed to create domUs.
> 
> I am also attaching to this email the dts'es that I am currently using
> for dom0 and domU: vexpress-v2p-ca15-tc1.dts (that includes
> vexpress-v2m-rs1-rtsm.dtsi) is the dts used for dom0 and it is passed to
> Linux by Xen, while vexpress-virt.dts is the dts used for other domUs
> and it is appended in binary form to the guest kernel image. I am not
> sure where they are supposed to live yet, so I am just attaching them
> here so that people can actually try out this series if they want to.
> 
> Comments are very welcome!
> 
> 
> Changes in v3:
> - move patches that have been picked up by Konrad at the end of the
>   series;
> - improve comments;
> - add a doc to describe the Xen Device Tree format;
> - do not use xen_ulong_t for multicalls and apic_physbase;
> - add a patch at the end of the series to use the new __HVC macro;
> - add missing pvclock-abi.h include to ia64 header files;
> - do not use an anonymous union in struct xen_add_to_physmap.
> 
> 
> Changes in v2:
> - fix up many comments and commit messages;
> - remove the early_printk patches: rely on the emulated serial for now;
> - remove the xen_guest_init patch: without any PV early_printk, we don't
>   need any early call to xen_guest_init, we can rely on core_initcall
>   alone;
> - define an HYPERCALL macro for 5 arguments hypercall wrappers, even if
>   at the moment is unused;
> - use ldm instead of pop in the hypercall wrappers;
> - return -ENOSYS rather than -1 from the unimplemented grant_table
>   functions;
> - remove the pvclock ifdef in the Xen headers;
> - remove include linux/types.h from xen/interface/xen.h;
> - replace pr_info with pr_debug in xen_guest_init;
> - add a new patch to introduce xen_ulong_t and use it top replace all
>   the occurences of unsigned long in the public Xen interface;
> - explicitely size all the pointers to 64 bit on ARM, so that the
>   hypercall ABI is "64 bit ready";
> - clean up xenbus_init;
> - make pci.o depend on CONFIG_PCI and acpi.o depend on CONFIG_ACPI;
> - mark Xen guest support on ARM as EXPERIMENTAL;
> - introduce GRANT_TABLE_PHYSADDR;
> - remove unneeded initialization of boot_max_nr_grant_frames;
> - add a new patch to clear IRQ_NOAUTOEN and IRQ_NOREQUEST in events.c;
> - return -EINVAL from xen_remap_domain_mfn_range if
>   auto_translated_physmap;
> - retain binary compatibility in xen_add_to_physmap: use a union to
>   introduce foreign_domid.
> 
> 
> Ian Campbell (1):
>   [HACK] xen/arm: implement xen_remap_domain_mfn_range
> 
> Stefano Stabellini (24):
>   arm: initial Xen support
>   xen/arm: hypercalls
>   xen/arm: page.h definitions
>   xen/arm: sync_bitops
>   xen/arm: empty implementation of grant_table arch specific functions
>   docs: Xen ARM DT bindings
>   xen/arm: Xen detection and shared_info page mapping
>   xen/arm: Introduce xen_pfn_t for pfn and mfn types
>   xen/arm: Introduce xen_ulong_t for unsigned long
>   xen/arm: compile and run xenbus
>   xen: do not compile manage, balloon, pci, acpi and cpu_hotplug on ARM
>   xen/arm: introduce CONFIG_XEN on ARM
>   xen/arm: get privilege status
>   xen/arm: initialize grant_table on ARM
>   xen/arm: receive Xen events on ARM
>   xen: clear IRQ_NOAUTOEN and IRQ_NOREQUEST
>   xen/arm: implement alloc/free_xenballooned_pages with alloc_pages/kfree
>   xen: allow privcmd for HVM guests
>   xen/arm: compile blkfront and blkback
>   xen/arm: compile netback
>   arm/v2m: initialize arch_timers even if v2m_timer is not present
>   xen/arm: use the __HVC macro
>   xen: missing includes
>   xen: update xen_add_to_physmap interface
> 
>  Documentation/devicetree/bindings/arm/xen.txt |   22 +++
>  arch/arm/Kconfig 

Re: [PATCH v3 00/23] Introduce Xen support on ARM

2012-09-13 Thread Stefano Stabellini
Russell,
sorry for not CC'ing you on the entire patch series in the past, I'll do
it in the next iteration of the series (that TBH is nearly identical to
this one apart from being 3.6-rc5 based).

Are you happy with it? Given that the changes are entirely contained
within arch/arm/xen and arch/arm/include/asm/xen (apart from patch #21
that is a generic ARM fix), should this patch series go through you or
Arnd?

Thanks,

Stefano




On Thu, 16 Aug 2012, Stefano Stabellini wrote:
 Hi all,
 this patch series implements Xen support for ARMv7 with virtualization
 extensions.  It allows a Linux guest to boot as dom0 and
 as domU on Xen on ARM. PV console, disk and network frontends and
 backends are all working correctly.
 
 It has been tested on a Versatile Express Cortex A15 emulator, using the
 latest Xen ARM developement branch
 (git://xenbits.xen.org/people/ianc/xen-unstable.git arm-for-4.3) plus
 the ARM hypercall ABI: 64 bit ready patch series
 (http://marc.info/?l=xen-develm=134426267205408), and a simple ad-hoc
 tool to build guest domains (marc.info/?l=xen-develm=134089788016546).
 
 The patch marked with [HACK] shouldn't be applied and is part of the
 series only because it is needed to create domUs.
 
 I am also attaching to this email the dts'es that I am currently using
 for dom0 and domU: vexpress-v2p-ca15-tc1.dts (that includes
 vexpress-v2m-rs1-rtsm.dtsi) is the dts used for dom0 and it is passed to
 Linux by Xen, while vexpress-virt.dts is the dts used for other domUs
 and it is appended in binary form to the guest kernel image. I am not
 sure where they are supposed to live yet, so I am just attaching them
 here so that people can actually try out this series if they want to.
 
 Comments are very welcome!
 
 
 Changes in v3:
 - move patches that have been picked up by Konrad at the end of the
   series;
 - improve comments;
 - add a doc to describe the Xen Device Tree format;
 - do not use xen_ulong_t for multicalls and apic_physbase;
 - add a patch at the end of the series to use the new __HVC macro;
 - add missing pvclock-abi.h include to ia64 header files;
 - do not use an anonymous union in struct xen_add_to_physmap.
 
 
 Changes in v2:
 - fix up many comments and commit messages;
 - remove the early_printk patches: rely on the emulated serial for now;
 - remove the xen_guest_init patch: without any PV early_printk, we don't
   need any early call to xen_guest_init, we can rely on core_initcall
   alone;
 - define an HYPERCALL macro for 5 arguments hypercall wrappers, even if
   at the moment is unused;
 - use ldm instead of pop in the hypercall wrappers;
 - return -ENOSYS rather than -1 from the unimplemented grant_table
   functions;
 - remove the pvclock ifdef in the Xen headers;
 - remove include linux/types.h from xen/interface/xen.h;
 - replace pr_info with pr_debug in xen_guest_init;
 - add a new patch to introduce xen_ulong_t and use it top replace all
   the occurences of unsigned long in the public Xen interface;
 - explicitely size all the pointers to 64 bit on ARM, so that the
   hypercall ABI is 64 bit ready;
 - clean up xenbus_init;
 - make pci.o depend on CONFIG_PCI and acpi.o depend on CONFIG_ACPI;
 - mark Xen guest support on ARM as EXPERIMENTAL;
 - introduce GRANT_TABLE_PHYSADDR;
 - remove unneeded initialization of boot_max_nr_grant_frames;
 - add a new patch to clear IRQ_NOAUTOEN and IRQ_NOREQUEST in events.c;
 - return -EINVAL from xen_remap_domain_mfn_range if
   auto_translated_physmap;
 - retain binary compatibility in xen_add_to_physmap: use a union to
   introduce foreign_domid.
 
 
 Ian Campbell (1):
   [HACK] xen/arm: implement xen_remap_domain_mfn_range
 
 Stefano Stabellini (24):
   arm: initial Xen support
   xen/arm: hypercalls
   xen/arm: page.h definitions
   xen/arm: sync_bitops
   xen/arm: empty implementation of grant_table arch specific functions
   docs: Xen ARM DT bindings
   xen/arm: Xen detection and shared_info page mapping
   xen/arm: Introduce xen_pfn_t for pfn and mfn types
   xen/arm: Introduce xen_ulong_t for unsigned long
   xen/arm: compile and run xenbus
   xen: do not compile manage, balloon, pci, acpi and cpu_hotplug on ARM
   xen/arm: introduce CONFIG_XEN on ARM
   xen/arm: get privilege status
   xen/arm: initialize grant_table on ARM
   xen/arm: receive Xen events on ARM
   xen: clear IRQ_NOAUTOEN and IRQ_NOREQUEST
   xen/arm: implement alloc/free_xenballooned_pages with alloc_pages/kfree
   xen: allow privcmd for HVM guests
   xen/arm: compile blkfront and blkback
   xen/arm: compile netback
   arm/v2m: initialize arch_timers even if v2m_timer is not present
   xen/arm: use the __HVC macro
   xen: missing includes
   xen: update xen_add_to_physmap interface
 
  Documentation/devicetree/bindings/arm/xen.txt |   22 +++
  arch/arm/Kconfig  |   10 +
  arch/arm/Makefile |1 +
  

[PATCH v3 00/23] Introduce Xen support on ARM

2012-08-16 Thread Stefano Stabellini
Hi all,
this patch series implements Xen support for ARMv7 with virtualization
extensions.  It allows a Linux guest to boot as dom0 and
as domU on Xen on ARM. PV console, disk and network frontends and
backends are all working correctly.

It has been tested on a Versatile Express Cortex A15 emulator, using the
latest Xen ARM developement branch
(git://xenbits.xen.org/people/ianc/xen-unstable.git arm-for-4.3) plus
the "ARM hypercall ABI: 64 bit ready" patch series
(http://marc.info/?l=xen-devel=134426267205408), and a simple ad-hoc
tool to build guest domains (marc.info/?l=xen-devel=134089788016546).

The patch marked with [HACK] shouldn't be applied and is part of the
series only because it is needed to create domUs.

I am also attaching to this email the dts'es that I am currently using
for dom0 and domU: vexpress-v2p-ca15-tc1.dts (that includes
vexpress-v2m-rs1-rtsm.dtsi) is the dts used for dom0 and it is passed to
Linux by Xen, while vexpress-virt.dts is the dts used for other domUs
and it is appended in binary form to the guest kernel image. I am not
sure where they are supposed to live yet, so I am just attaching them
here so that people can actually try out this series if they want to.

Comments are very welcome!


Changes in v3:
- move patches that have been picked up by Konrad at the end of the
  series;
- improve comments;
- add a doc to describe the Xen Device Tree format;
- do not use xen_ulong_t for multicalls and apic_physbase;
- add a patch at the end of the series to use the new __HVC macro;
- add missing pvclock-abi.h include to ia64 header files;
- do not use an anonymous union in struct xen_add_to_physmap.


Changes in v2:
- fix up many comments and commit messages;
- remove the early_printk patches: rely on the emulated serial for now;
- remove the xen_guest_init patch: without any PV early_printk, we don't
  need any early call to xen_guest_init, we can rely on core_initcall
  alone;
- define an HYPERCALL macro for 5 arguments hypercall wrappers, even if
  at the moment is unused;
- use ldm instead of pop in the hypercall wrappers;
- return -ENOSYS rather than -1 from the unimplemented grant_table
  functions;
- remove the pvclock ifdef in the Xen headers;
- remove include linux/types.h from xen/interface/xen.h;
- replace pr_info with pr_debug in xen_guest_init;
- add a new patch to introduce xen_ulong_t and use it top replace all
  the occurences of unsigned long in the public Xen interface;
- explicitely size all the pointers to 64 bit on ARM, so that the
  hypercall ABI is "64 bit ready";
- clean up xenbus_init;
- make pci.o depend on CONFIG_PCI and acpi.o depend on CONFIG_ACPI;
- mark Xen guest support on ARM as EXPERIMENTAL;
- introduce GRANT_TABLE_PHYSADDR;
- remove unneeded initialization of boot_max_nr_grant_frames;
- add a new patch to clear IRQ_NOAUTOEN and IRQ_NOREQUEST in events.c;
- return -EINVAL from xen_remap_domain_mfn_range if
  auto_translated_physmap;
- retain binary compatibility in xen_add_to_physmap: use a union to
  introduce foreign_domid.


Ian Campbell (1):
  [HACK] xen/arm: implement xen_remap_domain_mfn_range

Stefano Stabellini (24):
  arm: initial Xen support
  xen/arm: hypercalls
  xen/arm: page.h definitions
  xen/arm: sync_bitops
  xen/arm: empty implementation of grant_table arch specific functions
  docs: Xen ARM DT bindings
  xen/arm: Xen detection and shared_info page mapping
  xen/arm: Introduce xen_pfn_t for pfn and mfn types
  xen/arm: Introduce xen_ulong_t for unsigned long
  xen/arm: compile and run xenbus
  xen: do not compile manage, balloon, pci, acpi and cpu_hotplug on ARM
  xen/arm: introduce CONFIG_XEN on ARM
  xen/arm: get privilege status
  xen/arm: initialize grant_table on ARM
  xen/arm: receive Xen events on ARM
  xen: clear IRQ_NOAUTOEN and IRQ_NOREQUEST
  xen/arm: implement alloc/free_xenballooned_pages with alloc_pages/kfree
  xen: allow privcmd for HVM guests
  xen/arm: compile blkfront and blkback
  xen/arm: compile netback
  arm/v2m: initialize arch_timers even if v2m_timer is not present
  xen/arm: use the __HVC macro
  xen: missing includes
  xen: update xen_add_to_physmap interface

 Documentation/devicetree/bindings/arm/xen.txt |   22 +++
 arch/arm/Kconfig  |   10 +
 arch/arm/Makefile |1 +
 arch/arm/include/asm/hypervisor.h |6 +
 arch/arm/include/asm/sync_bitops.h|   27 +++
 arch/arm/include/asm/xen/events.h |   18 ++
 arch/arm/include/asm/xen/hypercall.h  |   69 +++
 arch/arm/include/asm/xen/hypervisor.h |   19 ++
 arch/arm/include/asm/xen/interface.h  |   73 
 arch/arm/include/asm/xen/page.h   |   82 
 arch/arm/mach-vexpress/v2m.c  |   11 +-
 arch/arm/xen/Makefile |1 +
 arch/arm/xen/enlighten.c  |  245 

[PATCH v3 00/23] Introduce Xen support on ARM

2012-08-16 Thread Stefano Stabellini
Hi all,
this patch series implements Xen support for ARMv7 with virtualization
extensions.  It allows a Linux guest to boot as dom0 and
as domU on Xen on ARM. PV console, disk and network frontends and
backends are all working correctly.

It has been tested on a Versatile Express Cortex A15 emulator, using the
latest Xen ARM developement branch
(git://xenbits.xen.org/people/ianc/xen-unstable.git arm-for-4.3) plus
the ARM hypercall ABI: 64 bit ready patch series
(http://marc.info/?l=xen-develm=134426267205408), and a simple ad-hoc
tool to build guest domains (marc.info/?l=xen-develm=134089788016546).

The patch marked with [HACK] shouldn't be applied and is part of the
series only because it is needed to create domUs.

I am also attaching to this email the dts'es that I am currently using
for dom0 and domU: vexpress-v2p-ca15-tc1.dts (that includes
vexpress-v2m-rs1-rtsm.dtsi) is the dts used for dom0 and it is passed to
Linux by Xen, while vexpress-virt.dts is the dts used for other domUs
and it is appended in binary form to the guest kernel image. I am not
sure where they are supposed to live yet, so I am just attaching them
here so that people can actually try out this series if they want to.

Comments are very welcome!


Changes in v3:
- move patches that have been picked up by Konrad at the end of the
  series;
- improve comments;
- add a doc to describe the Xen Device Tree format;
- do not use xen_ulong_t for multicalls and apic_physbase;
- add a patch at the end of the series to use the new __HVC macro;
- add missing pvclock-abi.h include to ia64 header files;
- do not use an anonymous union in struct xen_add_to_physmap.


Changes in v2:
- fix up many comments and commit messages;
- remove the early_printk patches: rely on the emulated serial for now;
- remove the xen_guest_init patch: without any PV early_printk, we don't
  need any early call to xen_guest_init, we can rely on core_initcall
  alone;
- define an HYPERCALL macro for 5 arguments hypercall wrappers, even if
  at the moment is unused;
- use ldm instead of pop in the hypercall wrappers;
- return -ENOSYS rather than -1 from the unimplemented grant_table
  functions;
- remove the pvclock ifdef in the Xen headers;
- remove include linux/types.h from xen/interface/xen.h;
- replace pr_info with pr_debug in xen_guest_init;
- add a new patch to introduce xen_ulong_t and use it top replace all
  the occurences of unsigned long in the public Xen interface;
- explicitely size all the pointers to 64 bit on ARM, so that the
  hypercall ABI is 64 bit ready;
- clean up xenbus_init;
- make pci.o depend on CONFIG_PCI and acpi.o depend on CONFIG_ACPI;
- mark Xen guest support on ARM as EXPERIMENTAL;
- introduce GRANT_TABLE_PHYSADDR;
- remove unneeded initialization of boot_max_nr_grant_frames;
- add a new patch to clear IRQ_NOAUTOEN and IRQ_NOREQUEST in events.c;
- return -EINVAL from xen_remap_domain_mfn_range if
  auto_translated_physmap;
- retain binary compatibility in xen_add_to_physmap: use a union to
  introduce foreign_domid.


Ian Campbell (1):
  [HACK] xen/arm: implement xen_remap_domain_mfn_range

Stefano Stabellini (24):
  arm: initial Xen support
  xen/arm: hypercalls
  xen/arm: page.h definitions
  xen/arm: sync_bitops
  xen/arm: empty implementation of grant_table arch specific functions
  docs: Xen ARM DT bindings
  xen/arm: Xen detection and shared_info page mapping
  xen/arm: Introduce xen_pfn_t for pfn and mfn types
  xen/arm: Introduce xen_ulong_t for unsigned long
  xen/arm: compile and run xenbus
  xen: do not compile manage, balloon, pci, acpi and cpu_hotplug on ARM
  xen/arm: introduce CONFIG_XEN on ARM
  xen/arm: get privilege status
  xen/arm: initialize grant_table on ARM
  xen/arm: receive Xen events on ARM
  xen: clear IRQ_NOAUTOEN and IRQ_NOREQUEST
  xen/arm: implement alloc/free_xenballooned_pages with alloc_pages/kfree
  xen: allow privcmd for HVM guests
  xen/arm: compile blkfront and blkback
  xen/arm: compile netback
  arm/v2m: initialize arch_timers even if v2m_timer is not present
  xen/arm: use the __HVC macro
  xen: missing includes
  xen: update xen_add_to_physmap interface

 Documentation/devicetree/bindings/arm/xen.txt |   22 +++
 arch/arm/Kconfig  |   10 +
 arch/arm/Makefile |1 +
 arch/arm/include/asm/hypervisor.h |6 +
 arch/arm/include/asm/sync_bitops.h|   27 +++
 arch/arm/include/asm/xen/events.h |   18 ++
 arch/arm/include/asm/xen/hypercall.h  |   69 +++
 arch/arm/include/asm/xen/hypervisor.h |   19 ++
 arch/arm/include/asm/xen/interface.h  |   73 
 arch/arm/include/asm/xen/page.h   |   82 
 arch/arm/mach-vexpress/v2m.c  |   11 +-
 arch/arm/xen/Makefile |1 +
 arch/arm/xen/enlighten.c  |  245