[PATCH v9 04/19] amd64: introduce hook for custom preload metadata parsers

2014-01-02 Thread Roger Pau Monne
--- sys/amd64/amd64/machdep.c | 41 -- sys/amd64/include/sysarch.h | 12 ++ sys/x86/xen/pv.c| 82 +++ 3 files changed, 124 insertions(+), 11 deletions(-) diff --git a/sys/amd64/amd64/machdep.c

[PATCH v9 00/19] FreeBSD PVH DomU support

2014-01-02 Thread Roger Pau Monne
This series is a split of the previous patch Xen x86 DomU PVH support, with the aim to make the review of the code easier. The series can also be found on my git repo: git://xenbits.xen.org/people/royger/freebsd.git pvh_v9 or

[PATCH v9 05/19] xen: rework xen timer so it can be used early in boot process

2014-01-02 Thread Roger Pau Monne
This should not introduce any functional change, and makes the functions suitable to be called before we have actually mapped the vcpu_info struct on a per-cpu basis. --- sys/dev/xen/timer/timer.c | 29 - 1 files changed, 20 insertions(+), 9 deletions(-) diff --git

[PATCH v9 02/19] xen: add macro to detect if running as Dom0

2014-01-02 Thread Roger Pau Monne
--- sys/xen/xen-os.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/sys/xen/xen-os.h b/sys/xen/xen-os.h index c7474d8..e8a5a99 100644 --- a/sys/xen/xen-os.h +++ b/sys/xen/xen-os.h @@ -82,6 +82,13 @@ xen_hvm_domain(void) return (xen_domain_type ==

[PATCH v9 06/19] xen: implement an early timer for Xen PVH

2014-01-02 Thread Roger Pau Monne
When running as a PVH guest, there's no emulated i8254, so we need to use the Xen PV timer as the early source for DELAY. This change allows for different implementations of the early DELAY function and implements a Xen variant for it. --- sys/amd64/amd64/machdep.c |6 ++-

[PATCH v9 07/19] xen: implement hook to fetch e820 memory map

2014-01-02 Thread Roger Pau Monne
--- sys/amd64/amd64/machdep.c | 50 ++ sys/amd64/include/pc/bios.h |2 + sys/amd64/include/sysarch.h |1 + sys/x86/xen/pv.c| 25 + 4 files changed, 59 insertions(+), 19 deletions(-) diff --git

[PATCH v9 03/19] xen: add and enable Xen console for PVH guests

2014-01-02 Thread Roger Pau Monne
This adds and enables the console used on XEN kernels. --- sys/conf/files |4 +- sys/dev/xen/console/console.c | 37 +-- sys/dev/xen/console/xencons_ring.c | 15 + sys/i386/include/xen/xen-os.h |1 -

[PATCH v9 10/19] xen: add hook for AP bootstrap memory reservation

2014-01-02 Thread Roger Pau Monne
This hook will only be implemented for bare metal, Xen doesn't require any bootstrap code since APs are started in long mode with paging enabled. --- sys/amd64/amd64/machdep.c |6 +- sys/amd64/include/sysarch.h |1 + 2 files changed, 6 insertions(+), 1 deletions(-) diff --git

[PATCH v9 17/19] xen: xenstore changes to support PVH

2014-01-02 Thread Roger Pau Monne
--- sys/xen/xenstore/xenstore.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/xen/xenstore/xenstore.c b/sys/xen/xenstore/xenstore.c index b5cf413..7fa08cc 100644 --- a/sys/xen/xenstore/xenstore.c +++ b/sys/xen/xenstore/xenstore.c @@ -229,13 +229,11

[PATCH v9 18/19] xen: changes to gnttab for PVH

2014-01-02 Thread Roger Pau Monne
--- sys/xen/gnttab.c | 26 +- 1 files changed, 21 insertions(+), 5 deletions(-) diff --git a/sys/xen/gnttab.c b/sys/xen/gnttab.c index 03c32b7..6949be5 100644 --- a/sys/xen/gnttab.c +++ b/sys/xen/gnttab.c @@ -25,6 +25,7 @@ __FBSDID($FreeBSD$); #include sys/lock.h

[PATCH v9 13/19] xen: introduce flag to disable the local apic

2014-01-02 Thread Roger Pau Monne
PVH guests don't have an emulated lapic. --- sys/amd64/amd64/mp_machdep.c | 10 ++ sys/amd64/include/apicvar.h |1 + sys/i386/include/apicvar.h |1 + sys/i386/xen/xen_machdep.c |2 ++ sys/x86/x86/local_apic.c |8 +--- sys/x86/xen/pv.c |3 +++

[PATCH v9 12/19] xen: add a hook to perform AP startup

2014-01-02 Thread Roger Pau Monne
AP startup on PVH follows the PV method, so we need to add a hook in order to diverge from bare metal. --- sys/amd64/amd64/mp_machdep.c | 14 +++--- sys/amd64/include/cpu.h |1 + sys/amd64/include/smp.h |1 + sys/x86/xen/hvm.c| 12 +- sys/x86/xen/pv.c

[PATCH v9 15/19] xen: create a Xen nexus to use in PV/PVH

2014-01-02 Thread Roger Pau Monne
Introduce a Xen specific nexus that is going to be in charge for attaching Xen specific devices. --- sys/conf/files.amd64 |1 + sys/conf/files.i386 |1 + sys/dev/xen/console/console.c |2 +- sys/dev/xen/timer/timer.c |4 +- sys/dev/xen/xenpci/xenpci.c |

[PATCH v9 14/19] xen: introduce xenpv bus and a dummy pvcpu device

2014-01-02 Thread Roger Pau Monne
Since Xen PVH guests doesn't have ACPI, we need to create a dummy bus so top level Xen devices can attach to it (instead of attaching directly to the nexus) and a pvcpu device that will be used to fill the pcpu-pc_device field. --- sys/conf/files.amd64 |1 + sys/conf/files.i386 |1 +

Re: [PATCH v9 19/19] isa: allow ISA bus to attach to xenpv device

2014-01-02 Thread Julian Elischer
On 1/2/14, 4:43 PM, Roger Pau Monne wrote: --- sys/x86/isa/isa.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/sys/x86/isa/isa.c b/sys/x86/isa/isa.c index 1a57137..9287ff2 100644 --- a/sys/x86/isa/isa.c +++ b/sys/x86/isa/isa.c @@ -241,3 +241,6 @@