xen: add pvh guest support
Juergen Gross
maintainercover xen: add pvh guest support
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
Juergen Gross (8):
xen: add some xen headers
loader/linux: support passing rsdp address via boot params
xen: carve out grant tab initialization into dedicated function
xen: add xen pvh guest support to grub-core
xenpvh: add build runes for grub-core
xenpvh: support building a standalone image
xenpvh: support grub-install for xenpvh
xenpvh: add support to configure
configure.ac | 3 + gentpl.py | 4 +- grub-core/Makefile.am | 12 + grub-core/Makefile.core.def | 35 ++ grub-core/kern/i386/tsc.c | 2 +- grub-core/kern/i386/xen/pvh.c | 344 ++++++++++++++++++ grub-core/kern/i386/xen/startup_pvh.S | 80 ++++ grub-core/kern/xen/init.c | 101 ++++-- grub-core/loader/i386/linux.c | 6 + include/grub/i386/linux.h | 4 +- include/grub/i386/pc/int.h | 3 + include/grub/i386/tsc.h | 2 +- include/grub/i386/xen/hypercall.h | 5 +- include/grub/i386/xenpvh/boot.h | 1 + include/grub/i386/xenpvh/console.h | 1 + include/grub/i386/xenpvh/int.h | 1 + include/grub/i386/xenpvh/kernel.h | 30 ++ include/grub/i386/xenpvh/memory.h | 54 +++ include/grub/i386/xenpvh/time.h | 1 + include/grub/kernel.h | 4 +- include/grub/offsets.h | 3 + include/grub/util/install.h | 1 + include/grub/util/mkimage.h | 3 +- include/grub/xen.h | 6 + include/xen/hvm/hvm_op.h | 296 +++++++++++++++ include/xen/hvm/params.h | 284 +++++++++++++++ include/xen/hvm/start_info.h | 98 +++++ include/xen/memory.h | 665 ++++++++++++++++++++++++++++++++++ include/xen/physdev.h | 387 ++++++++++++++++++++ include/xen/trace.h | 339 +++++++++++++++++ include/xen/xen.h | 104 ++++-- util/grub-install-common.c | 1 + util/grub-install.c | 7 + util/grub-mkimage32.c | 1 + util/grub-mkimage64.c | 1 + util/grub-mkimagexx.c | 44 ++- util/mkimage.c | 23 +- 37 files changed, 2872 insertions(+), 84 deletions(-) create mode 100644 grub-core/kern/i386/xen/pvh.c create mode 100644 grub-core/kern/i386/xen/startup_pvh.S create mode 100644 include/grub/i386/xenpvh/boot.h create mode 100644 include/grub/i386/xenpvh/console.h create mode 100644 include/grub/i386/xenpvh/int.h create mode 100644 include/grub/i386/xenpvh/kernel.h create mode 100644 include/grub/i386/xenpvh/memory.h create mode 100644 include/grub/i386/xenpvh/time.h create mode 100644 include/xen/hvm/hvm_op.h create mode 100644 include/xen/hvm/params.h create mode 100644 include/xen/hvm/start_info.h create mode 100644 include/xen/memory.h create mode 100644 include/xen/physdev.h create mode 100644 include/xen/trace.h
Signature · 1 line
2.12.3
Juergen Gross
maintainerPATCH 1/8 xen: add some xen headers
In order to support grub2 in Xen PVH environment some additional Xen headers are needed. Add them.
--- include/xen/hvm/hvm_op.h | 296 +++++++++++++++++++ include/xen/hvm/params.h | 284 ++++++++++++++++++ include/xen/hvm/start_info.h | 98 +++++++ include/xen/memory.h | 665 +++++++++++++++++++++++++++++++++++++++++++ include/xen/physdev.h | 387 +++++++++++++++++++++++++ include/xen/trace.h | 339 ++++++++++++++++++++++ include/xen/xen.h | 104 +++++-- 7 files changed, 2142 insertions(+), 31 deletions(-) create mode 100644 include/xen/hvm/hvm_op.h create mode 100644 include/xen/hvm/params.h create mode 100644 include/xen/hvm/start_info.h create mode 100644 include/xen/memory.h create mode 100644 include/xen/physdev.h create mode 100644 include/xen/trace.h
include/xen/hvm/hvm_op.h new file +296 -0
@@ -0,0 +1,296 @@ +/* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to +* deal in the Software without restriction, including without limitation the +* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +* sell copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +* DEALINGS IN THE SOFTWARE. +* +* Copyright (c) 2007, Keir Fraser +*/ + +#ifndef __XEN_PUBLIC_HVM_HVM_OP_H__ +#define __XEN_PUBLIC_HVM_HVM_OP_H__ + +#include "../xen.h" +#include "../trace.h" +#include "../event_channel.h" + +/* Get/set subcommands: extra argument == pointer to xen_hvm_param struct. */ +#define HVMOP_set_param 0 +#define HVMOP_get_param 1 +struct xen_hvm_param { +domid_t domid;/* IN */ +uint32_t index;/* IN */ +uint64_t value;/* IN/OUT */ +}; +typedef struct xen_hvm_param xen_hvm_param_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_param_t); + +#if __XEN_INTERFACE_VERSION__ <0x00040900 + +/* Set the logical level of one of a domain's PCI INTx wires. */ +#define HVMOP_set_pci_intx_level 2 +struct xen_hvm_set_pci_intx_level { +/* Domain to be updated. */ +domid_t domid; +/* PCI INTx identification in PCI topology (domain:bus:device:intx). */ +uint8_t domain, bus, device, intx; +/* Assertion level (0 = unasserted, 1 = asserted). */ +uint8_t level; +}; +typedef struct xen_hvm_set_pci_intx_level xen_hvm_set_pci_intx_level_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_set_pci_intx_level_t); + +/* Set the logical level of one of a domain's ISA IRQ wires. */ +#define HVMOP_set_isa_irq_level 3 +struct xen_hvm_set_isa_irq_level { +/* Domain to be updated. */ +domid_t domid; +/* ISA device identification, by ISA IRQ (0-15). */ +uint8_t isa_irq; +/* Assertion level (0 = unasserted, 1 = asserted). */ +uint8_t level; +}; +typedef struct xen_hvm_set_isa_irq_level xen_hvm_set_isa_irq_level_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_set_isa_irq_level_t); + +#define HVMOP_set_pci_link_route 4 +struct xen_hvm_set_pci_link_route { +/* Domain to be updated. */ +domid_t domid; +/* PCI link identifier (0-3). */ +uint8_t link; +/* ISA IRQ (1-15), or 0 (disable link). */ +uint8_t isa_irq; +}; +typedef struct xen_hvm_set_pci_link_route xen_hvm_set_pci_link_route_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_set_pci_link_route_t); + +#endif /* __XEN_INTERFACE_VERSION__ < 0x00040900 */ + +/* Flushes all VCPU TLBs: @arg must be NULL. */ +#define HVMOP_flush_tlbs 5 + +typedef enum { + HVMMEM_ram_rw,/* Normal read/write guest RAM */ + HVMMEM_ram_ro,/* Read-only; writes are discarded */ + HVMMEM_mmio_dm,/* Reads and write go to the device model */ +#if __XEN_INTERFACE_VERSION__ <0x00040700 + HVMMEM_mmio_write_dm,/* Read-only; writes go to the device model */ +#else + HVMMEM_unused,/* Placeholder; setting memory to this type +will fail for code after 4.7.0 */ +#endif + HVMMEM_ioreq_server/* Memory type claimed by an ioreq server; type +changes to this value are only allowed after +an ioreq server has claimed its ownership. +Only pages with HVMMEM_ram_rw are allowed to +change to this type; conversely, pages with +this type are only allowed to be changed back +to HVMMEM_ram_rw. */ +}hvmmem_type_t ; + +/* Hint from PV drivers for pagetable destruction. */ +#define HVMOP_pagetable_dying 9 +struct xen_hvm_pagetable_dying { +/* Domain with a pagetable about to be destroyed. */ +domid_t domid; +uint16_t pad[3 ];/* align next field on 8-byte boundary */ +/* guest physical address of the toplevel pagetable dying */ +uint64_t gpa; +}; +typedef struct xen_hvm_pagetable_dying xen_hvm_pagetable_dying_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_pagetable_dying_t); + +/* Get the current Xen time, in nanoseconds since system boot. */ +#define HVMOP_get_time 10 +struct xen_hvm_get_time { +uint64_t now;/* OUT */ +}; +typedef struct xen_hvm_get_time xen_hvm_get_time_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_get_time_t); + +#define HVMOP_xentrace 11 +struct xen_hvm_xentrace { +uint16_t event, extra_bytes; +uint8_t extra[TRACE_EXTRA_MAX *sizeof (uint32_t )]; +}; +typedef struct xen_hvm_xentrace xen_hvm_xentrace_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_xentrace_t); + +/* Following tools-only interfaces may change in future. */ +#if defined(__XEN__) || defined(__XEN_TOOLS__) + +/* Deprecated by XENMEM_access_op_set_access */ +#define HVMOP_set_mem_access 12 + +/* Deprecated by XENMEM_access_op_get_access */ +#define HVMOP_get_mem_access 13 + +#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */ + +#define HVMOP_get_mem_type 15 +/* Return hvmmem_type_t for the specified pfn. */ +struct xen_hvm_get_mem_type { +/* Domain to be queried. */ +domid_t domid; +/* OUT variable. */ +uint16_t mem_type; +uint16_t pad[2 ];/* align next field on 8-byte boundary */ +/* IN variable. */ +uint64_t pfn; +}; +typedef struct xen_hvm_get_mem_type xen_hvm_get_mem_type_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_get_mem_type_t); + +/* Following tools-only interfaces may change in future. */ +#if defined(__XEN__) || defined(__XEN_TOOLS__) + +/* +* Definitions relating to DMOP_create_ioreq_server. (Defined here for +* backwards compatibility). +*/ + +#define HVM_IOREQSRV_BUFIOREQ_OFF 0 +#define HVM_IOREQSRV_BUFIOREQ_LEGACY 1 +/* +* Use this when read_pointer gets updated atomically and +* the pointer pair gets read atomically: +*/ +#define HVM_IOREQSRV_BUFIOREQ_ATOMIC 2 + +#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */ + +#if defined(__i386__) || defined(__x86_64__) + +/* +* HVMOP_set_evtchn_upcall_vector: Set a <vector> that should be used for event +* channel upcalls on the specified <vcpu>. If set, +* this vector will be used in preference to the +* domain global callback via (see +* HVM_PARAM_CALLBACK_IRQ). +*/ +#define HVMOP_set_evtchn_upcall_vector 23 +struct xen_hvm_evtchn_upcall_vector { +uint32_t vcpu; +uint8_t vector; +}; +typedef struct xen_hvm_evtchn_upcall_vector xen_hvm_evtchn_upcall_vector_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_evtchn_upcall_vector_t); + +#endif /* defined(__i386__) || defined(__x86_64__) */ + +#define HVMOP_guest_request_vm_event 24 + +/* HVMOP_altp2m: perform altp2m state operations */ +#define HVMOP_altp2m 25 + +#define HVMOP_ALTP2M_INTERFACE_VERSION 0x00000001 + +struct xen_hvm_altp2m_domain_state { +/* IN or OUT variable on/off */ +uint8_t state; +}; +typedef struct xen_hvm_altp2m_domain_state xen_hvm_altp2m_domain_state_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_altp2m_domain_state_t); + +struct xen_hvm_altp2m_vcpu_enable_notify { +uint32_t vcpu_id; +uint32_t pad; +/* #VE info area gfn */ +uint64_t gfn; +}; +typedef struct xen_hvm_altp2m_vcpu_enable_notify xen_hvm_altp2m_vcpu_enable_notify_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_altp2m_vcpu_enable_notify_t); + +struct xen_hvm_altp2m_view { +/* IN/OUT variable */ +uint16_t view; +/* Create view only: default access type +* NOTE: currently ignored */ +uint16_t hvmmem_default_access;/* xenmem_access_t */ +}; +typedef struct xen_hvm_altp2m_view xen_hvm_altp2m_view_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_altp2m_view_t); + +struct xen_hvm_altp2m_set_mem_access { +/* view */ +uint16_t view; +/* Memory type */ +uint16_t hvmmem_access;/* xenmem_access_t */ +uint32_t pad; +/* gfn */ +uint64_t gfn; +}; +typedef struct xen_hvm_altp2m_set_mem_access xen_hvm_altp2m_set_mem_access_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_altp2m_set_mem_access_t); + +struct xen_hvm_altp2m_change_gfn { +/* view */ +uint16_t view; +uint16_t pad1; +uint32_t pad2; +/* old gfn */ +uint64_t old_gfn; +/* new gfn, INVALID_GFN (~0UL) means revert */ +uint64_t new_gfn; +}; +typedef struct xen_hvm_altp2m_change_gfn xen_hvm_altp2m_change_gfn_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_altp2m_change_gfn_t); + +struct xen_hvm_altp2m_op { +uint32_t version;/* HVMOP_ALTP2M_INTERFACE_VERSION */ +uint32_t cmd; +/* Get/set the altp2m state for a domain */ +#define HVMOP_altp2m_get_domain_state 1 +#define HVMOP_altp2m_set_domain_state 2 +/* Set the current VCPU to receive altp2m event notifications */ +#define HVMOP_altp2m_vcpu_enable_notify 3 +/* Create a new view */ +#define HVMOP_altp2m_create_p2m 4 +/* Destroy a view */ +#define HVMOP_altp2m_destroy_p2m 5 +/* Switch view for an entire domain */ +#define HVMOP_altp2m_switch_p2m 6 +/* Notify that a page of memory is to have specific access types */ +#define HVMOP_altp2m_set_mem_access 7 +/* Change a p2m entry to have a different gfn->mfn mapping */ +#define HVMOP_altp2m_change_gfn 8 +domid_t domain; +uint16_t pad1; +uint32_t pad2; +union { +struct xen_hvm_altp2m_domain_state domain_state; +struct xen_hvm_altp2m_vcpu_enable_notify enable_notify; +struct xen_hvm_altp2m_view view; +struct xen_hvm_altp2m_set_mem_access set_mem_access; +struct xen_hvm_altp2m_change_gfn change_gfn; +uint8_t pad[64 ]; + } u; +}; +typedef struct xen_hvm_altp2m_op xen_hvm_altp2m_op_t ; +DEFINE_XEN_GUEST_HANDLE (xen_hvm_altp2m_op_t); + +#endif /* __XEN_PUBLIC_HVM_HVM_OP_H__ */ + +/* +* Local variables: +* mode: C +* c-file-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/
include/xen/hvm/params.h new file +284 -0
284 lines not on this page · raw message
include/xen/hvm/start_info.h new file +98 -0
98 lines not on this page · raw message
include/xen/memory.h new file +665 -0
665 lines not on this page · raw message
include/xen/physdev.h new file +387 -0
387 lines not on this page · raw message
include/xen/trace.h new file +339 -0
339 lines not on this page · raw message
include/xen/xen.h +73 -31
170 lines not on this page · raw message
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 1/8] xen: add some xen headers
Quoted 4 lines · Juergen Gross
In order to support grub2 in Xen PVH environment some additional Xen headers are needed. Add them.
Signed-off-by Juergen Gross <[email protected]>
Quoted 15 lines
--- include/xen/hvm/hvm_op.h | 296 +++++++++++++++++++ include/xen/hvm/params.h | 284 ++++++++++++++++++ include/xen/hvm/start_info.h | 98 +++++++ include/xen/memory.h | 665 +++++++++++++++++++++++++++++++++++++++++++ include/xen/physdev.h | 387 +++++++++++++++++++++++++ include/xen/trace.h | 339 ++++++++++++++++++++++ include/xen/xen.h | 104 +++++-- 7 files changed, 2142 insertions(+), 31 deletions(-) create mode 100644 include/xen/hvm/hvm_op.h create mode 100644 include/xen/hvm/params.h create mode 100644 include/xen/hvm/start_info.h create mode 100644 include/xen/memory.h create mode 100644 include/xen/physdev.h create mode 100644 include/xen/trace.h
Is it simple copy from Xen source? If yes and we need all that stuff (really?) I would not mind if you mention Xen version or commit id in the commit message from which you copied it.
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerPATCH 2/8 loader/linux: support passing rsdp address via boot params
In reply to Juergen GrossXen PVH guests will have the RSDP at an arbitrary address. Support that by passing the RSDP address via the boot parameters to Linux.
--- grub-core/loader/i386/linux.c | 6 ++++++ include/grub/i386/linux.h | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-)
grub-core/loader/i386/linux.c +6 -0
@@ -35,6 +35,7 @@#include <grub/i18n.h> #include <grub/lib/cmdline.h> #include <grub/linux.h> +#include <grub/machine/kernel.h> GRUB_MOD_LICENSE ("GPLv3+" );
@@ -793,6 +794,11 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), prot_init_space =page_align (prot_size) *3 ; } +#ifdef GRUB_KERNEL_USE_RSDP_ADDR +if (grub_le_to_cpu16 (lh.version) >=0x020e ) + lh.acpi_rsdp_addr =grub_le_to_cpu64 (grub_rsdp_addr); +#endif +if (allocate_pages (prot_size, &align, min_align, relocatable, preferred_address))
include/grub/i386/linux.h +3 -1
@@ -84,7 +84,7 @@ enumGRUB_VIDEO_LINUX_TYPE_SIMPLE =0x70 /* Linear framebuffer without any additional functions. */ }; -/* For the Linux/i386 boot protocol version 2.10. */ +/* For the Linux/i386 boot protocol version 2.14. */ struct linux_kernel_header {grub_uint8_t code1[0x0020 ];
@@ -139,6 +139,8 @@ struct linux_kernel_headergrub_uint64_t setup_data;grub_uint64_t pref_address;grub_uint32_t init_size; +grub_uint32_t handover_offset; +grub_uint64_t acpi_rsdp_addr; }GRUB_PACKED ;/* Boot parameters for Linux based on 2.6.12. This is used by the setup
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 2/8] loader/linux: support passing rsdp address via boot params
Quoted 4 lines · Juergen Gross
Xen PVH guests will have the RSDP at an arbitrary address. Support that by passing the RSDP address via the boot parameters to Linux.
Signed-off-by Juergen Gross <[email protected]>
You told me that this patch should be rewritten so I am skipping it and looking forward to new version of it.
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 2/8] loader/linux: support passing rsdp address via boot params
In reply to Juergen GrossQuoted 4 lines · Juergen Gross
Xen PVH guests will have the RSDP at an arbitrary address. Support that by passing the RSDP address via the boot parameters to Linux.
Signed-off-by Juergen Gross <[email protected]>
You told me that this patch should be rewritten so I am skipping it and looking forward to new version of it.
Daniel
Juergen Gross
maintainerPATCH 3/8 xen: carve out grant tab initialization into dedicated function
In reply to Juergen GrossInitialize the grant tab in a dedicated function. This will enable using it for PVH guests, too.
--- grub-core/kern/xen/init.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-)
grub-core/kern/xen/init.c +21 -14
@@ -318,6 +318,25 @@ grub_xenstore_dir (const char *dir,unsigned long gntframe =0 ; +static void +grub_xen_setup_gnttab (void ) +{ +struct gnttab_set_version gnttab_setver; +struct gnttab_setup_table gnttab_setup; + +grub_memset (&gnttab_setver,0 ,sizeof (gnttab_setver)); + + gnttab_setver.version =1 ; +grub_xen_grant_table_op (GNTTABOP_set_version, &gnttab_setver,1 ); + +grub_memset (&gnttab_setup,0 ,sizeof (gnttab_setup)); + gnttab_setup.dom =DOMID_SELF ; + gnttab_setup.nr_frames =1 ; + gnttab_setup.frame_list.p = &gntframe; + +grub_xen_grant_table_op (GNTTABOP_setup_table, &gnttab_setup,1 ); +} +#define MAX_N_UNUSABLE_PAGES 4 static int
@@ -357,26 +376,12 @@ map_all_pages (void) (grub_xen_mfn_t *) grub_xen_start_page_addr->mfn_list;grub_uint64_t *pg = (grub_uint64_t *) window;grub_uint64_t oldpgstart, oldpgend; -struct gnttab_setup_table gnttab_setup; -struct gnttab_set_version gnttab_setver;grub_size_t n_unusable_pages =0 ;struct mmu_update m2p_updates[2 *MAX_N_UNUSABLE_PAGES ];if (total_pages >MAX_TOTAL_PAGES -4 ) total_pages =MAX_TOTAL_PAGES -4 ; -grub_memset (&gnttab_setver,0 ,sizeof (gnttab_setver)); - - gnttab_setver.version =1 ; -grub_xen_grant_table_op (GNTTABOP_set_version, &gnttab_setver,1 ); - -grub_memset (&gnttab_setup,0 ,sizeof (gnttab_setup)); - gnttab_setup.dom =DOMID_SELF ; - gnttab_setup.nr_frames =1 ; - gnttab_setup.frame_list.p = &gntframe; - -grub_xen_grant_table_op (GNTTABOP_setup_table, &gnttab_setup,1 ); -for (j =0 ; j < total_pages - n_unusable_pages; j++)while (!grub_xen_is_page_usable (mfn_list[j])) {
@@ -537,6 +542,8 @@ grub_machine_init (void) +GRUB_KERNEL_MACHINE_MOD_GAP , GRUB_KERNEL_MACHINE_MOD_ALIGN); +grub_xen_setup_gnttab (); +map_all_pages ();grub_console_init ();
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerPATCH 3/8 xen: carve out grant tab initialization into dedicated function
In reply to Juergen GrossInitialize the grant tab in a dedicated function. This will enable using it for PVH guests, too.
--- grub-core/kern/xen/init.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-)
grub-core/kern/xen/init.c +21 -14
@@ -318,6 +318,25 @@ grub_xenstore_dir (const char *dir,unsigned long gntframe =0 ; +static void +grub_xen_setup_gnttab (void ) +{ +struct gnttab_set_version gnttab_setver; +struct gnttab_setup_table gnttab_setup; + +grub_memset (&gnttab_setver,0 ,sizeof (gnttab_setver)); + + gnttab_setver.version =1 ; +grub_xen_grant_table_op (GNTTABOP_set_version, &gnttab_setver,1 ); + +grub_memset (&gnttab_setup,0 ,sizeof (gnttab_setup)); + gnttab_setup.dom =DOMID_SELF ; + gnttab_setup.nr_frames =1 ; + gnttab_setup.frame_list.p = &gntframe; + +grub_xen_grant_table_op (GNTTABOP_setup_table, &gnttab_setup,1 ); +} +#define MAX_N_UNUSABLE_PAGES 4 static int
@@ -357,26 +376,12 @@ map_all_pages (void) (grub_xen_mfn_t *) grub_xen_start_page_addr->mfn_list;grub_uint64_t *pg = (grub_uint64_t *) window;grub_uint64_t oldpgstart, oldpgend; -struct gnttab_setup_table gnttab_setup; -struct gnttab_set_version gnttab_setver;grub_size_t n_unusable_pages =0 ;struct mmu_update m2p_updates[2 *MAX_N_UNUSABLE_PAGES ];if (total_pages >MAX_TOTAL_PAGES -4 ) total_pages =MAX_TOTAL_PAGES -4 ; -grub_memset (&gnttab_setver,0 ,sizeof (gnttab_setver)); - - gnttab_setver.version =1 ; -grub_xen_grant_table_op (GNTTABOP_set_version, &gnttab_setver,1 ); - -grub_memset (&gnttab_setup,0 ,sizeof (gnttab_setup)); - gnttab_setup.dom =DOMID_SELF ; - gnttab_setup.nr_frames =1 ; - gnttab_setup.frame_list.p = &gntframe; - -grub_xen_grant_table_op (GNTTABOP_setup_table, &gnttab_setup,1 ); -for (j =0 ; j < total_pages - n_unusable_pages; j++)while (!grub_xen_is_page_usable (mfn_list[j])) {
@@ -537,6 +542,8 @@ grub_machine_init (void) +GRUB_KERNEL_MACHINE_MOD_GAP , GRUB_KERNEL_MACHINE_MOD_ALIGN); +grub_xen_setup_gnttab (); +map_all_pages ();grub_console_init ();
Signature · 1 line
2.12.3
Re: [PATCH 3/8] xen: carve out grant tab initialization into dedicated function
Quoted 66 lines · Juergen Gross
Initialize the grant tab in a dedicated function. This will enable using it for PVH guests, too.
Signed-off-by Juergen Gross <[email protected]>--- grub-core/kern/xen/init.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-)grub-core/kern/xen/init.c +19
-14@@ -318,6 +318,25 @@ grub_xenstore_dir (const char *dir,unsigned long gntframe =0 ; +static void +grub_xen_setup_gnttab (void ) +{ +struct gnttab_set_version gnttab_setver; +struct gnttab_setup_table gnttab_setup; + +grub_memset (&gnttab_setver,0 ,sizeof (gnttab_setver)); + + gnttab_setver.version =1 ; +grub_xen_grant_table_op (GNTTABOP_set_version, &gnttab_setver,1 ); + +grub_memset (&gnttab_setup,0 ,sizeof (gnttab_setup)); + gnttab_setup.dom =DOMID_SELF ; + gnttab_setup.nr_frames =1 ; + gnttab_setup.frame_list.p = &gntframe; + +grub_xen_grant_table_op (GNTTABOP_setup_table, &gnttab_setup,1 ); +} +#define MAX_N_UNUSABLE_PAGES 4 static int@@ -357,26 +376,12 @@ map_all_pages (void) (grub_xen_mfn_t *) grub_xen_start_page_addr->mfn_list;grub_uint64_t *pg = (grub_uint64_t *) window;grub_uint64_t oldpgstart, oldpgend; -struct gnttab_setup_table gnttab_setup; -struct gnttab_set_version gnttab_setver;grub_size_t n_unusable_pages =0 ;struct mmu_update m2p_updates[2 *MAX_N_UNUSABLE_PAGES ];if (total_pages >MAX_TOTAL_PAGES -4 ) total_pages =MAX_TOTAL_PAGES -4 ; -grub_memset (&gnttab_setver,0 ,sizeof (gnttab_setver)); - - gnttab_setver.version =1 ; -grub_xen_grant_table_op (GNTTABOP_set_version, &gnttab_setver,1 ); - -grub_memset (&gnttab_setup,0 ,sizeof (gnttab_setup)); - gnttab_setup.dom =DOMID_SELF ; - gnttab_setup.nr_frames =1 ; - gnttab_setup.frame_list.p = &gntframe; - -grub_xen_grant_table_op (GNTTABOP_setup_table, &gnttab_setup,1 ); -for (j =0 ; j < total_pages - n_unusable_pages; j++)while (!grub_xen_is_page_usable (mfn_list[j])) {
grub-core/kern/xen/init.c grub_machine_init (void) · line 546
Quoted 5 lines
grub-core/kern/xen/init.c +2
-0@@ -537,6 +542,8 @@ grub_machine_init (void) +GRUB_KERNEL_MACHINE_MOD_GAP , GRUB_KERNEL_MACHINE_MOD_ALIGN); +grub_xen_setup_gnttab (); +
I am OK with this patch itself but I am not sure why you are moving grant setup from map_all_pages() to grub_machine_init(). Is it by mistake or by purpose? If by purpose please explain why in the commit message.
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 3/8] xen: carve out grant tab initialization into dedicated function
In reply to Juergen GrossQuoted 66 lines · Juergen Gross
Initialize the grant tab in a dedicated function. This will enable using it for PVH guests, too.
Signed-off-by Juergen Gross <[email protected]>--- grub-core/kern/xen/init.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-)grub-core/kern/xen/init.c +19
-14@@ -318,6 +318,25 @@ grub_xenstore_dir (const char *dir,unsigned long gntframe =0 ; +static void +grub_xen_setup_gnttab (void ) +{ +struct gnttab_set_version gnttab_setver; +struct gnttab_setup_table gnttab_setup; + +grub_memset (&gnttab_setver,0 ,sizeof (gnttab_setver)); + + gnttab_setver.version =1 ; +grub_xen_grant_table_op (GNTTABOP_set_version, &gnttab_setver,1 ); + +grub_memset (&gnttab_setup,0 ,sizeof (gnttab_setup)); + gnttab_setup.dom =DOMID_SELF ; + gnttab_setup.nr_frames =1 ; + gnttab_setup.frame_list.p = &gntframe; + +grub_xen_grant_table_op (GNTTABOP_setup_table, &gnttab_setup,1 ); +} +#define MAX_N_UNUSABLE_PAGES 4 static int@@ -357,26 +376,12 @@ map_all_pages (void) (grub_xen_mfn_t *) grub_xen_start_page_addr->mfn_list;grub_uint64_t *pg = (grub_uint64_t *) window;grub_uint64_t oldpgstart, oldpgend; -struct gnttab_setup_table gnttab_setup; -struct gnttab_set_version gnttab_setver;grub_size_t n_unusable_pages =0 ;struct mmu_update m2p_updates[2 *MAX_N_UNUSABLE_PAGES ];if (total_pages >MAX_TOTAL_PAGES -4 ) total_pages =MAX_TOTAL_PAGES -4 ; -grub_memset (&gnttab_setver,0 ,sizeof (gnttab_setver)); - - gnttab_setver.version =1 ; -grub_xen_grant_table_op (GNTTABOP_set_version, &gnttab_setver,1 ); - -grub_memset (&gnttab_setup,0 ,sizeof (gnttab_setup)); - gnttab_setup.dom =DOMID_SELF ; - gnttab_setup.nr_frames =1 ; - gnttab_setup.frame_list.p = &gntframe; - -grub_xen_grant_table_op (GNTTABOP_setup_table, &gnttab_setup,1 ); -for (j =0 ; j < total_pages - n_unusable_pages; j++)while (!grub_xen_is_page_usable (mfn_list[j])) {
grub-core/kern/xen/init.c grub_machine_init (void) · line 546
Quoted 5 lines
grub-core/kern/xen/init.c +2
-0@@ -537,6 +542,8 @@ grub_machine_init (void) +GRUB_KERNEL_MACHINE_MOD_GAP , GRUB_KERNEL_MACHINE_MOD_ALIGN); +grub_xen_setup_gnttab (); +
I am OK with this patch itself but I am not sure why you are moving grant setup from map_all_pages() to grub_machine_init(). Is it by mistake or by purpose? If by purpose please explain why in the commit message.
Daniel
Juergen Gross
maintainerPATCH 4/8 xen: add xen pvh guest support to grub-core
In reply to Juergen GrossAdd all the grub-core code needed for Xen PVH guest support. This includes:
- The new PVH entry point of grub
- PVH specific initialization code
- machine specific header files
- modifications in Xen specific code to work in PVH environment
- modifications in other core code to be reusable with PVH
Enabling all this code is done later.
--- grub-core/kern/i386/tsc.c | 2 +- grub-core/kern/i386/xen/pvh.c | 344 ++++++++++++++++++++++++++++++++++ grub-core/kern/i386/xen/startup_pvh.S | 80 ++++++++ grub-core/kern/xen/init.c | 66 ++++--- include/grub/i386/pc/int.h | 3 + include/grub/i386/tsc.h | 2 +- include/grub/i386/xen/hypercall.h | 5 +- include/grub/i386/xenpvh/boot.h | 1 + include/grub/i386/xenpvh/console.h | 1 + include/grub/i386/xenpvh/int.h | 1 + include/grub/i386/xenpvh/kernel.h | 30 +++ include/grub/i386/xenpvh/memory.h | 54 ++++++ include/grub/i386/xenpvh/time.h | 1 + include/grub/kernel.h | 4 +- include/grub/offsets.h | 3 + include/grub/xen.h | 6 + 16 files changed, 573 insertions(+), 30 deletions(-) create mode 100644 grub-core/kern/i386/xen/pvh.c create mode 100644 grub-core/kern/i386/xen/startup_pvh.S create mode 100644 include/grub/i386/xenpvh/boot.h create mode 100644 include/grub/i386/xenpvh/console.h create mode 100644 include/grub/i386/xenpvh/int.h create mode 100644 include/grub/i386/xenpvh/kernel.h create mode 100644 include/grub/i386/xenpvh/memory.h create mode 100644 include/grub/i386/xenpvh/time.h
grub-core/kern/i386/tsc.c +1 -1
@@ -65,7 +65,7 @@ grub_tsc_init (void) tsc_boot_time =grub_get_tsc (); -#ifdef GRUB_MACHINE_XEN +#if defined (GRUB_MACHINE_XEN ) || defined (GRUB_MACHINE_XENPVH ) (void ) (grub_tsc_calibrate_from_xen () ||calibrate_tsc_hardcode ());#elif defined (GRUB_MACHINE_EFI ) (void ) (grub_tsc_calibrate_from_pmtimer () ||grub_tsc_calibrate_from_pit () ||grub_tsc_calibrate_from_efi () ||calibrate_tsc_hardcode ());
grub-core/kern/i386/xen/pvh.c new file +344 -0
344 lines not on this page · raw message
grub-core/kern/i386/xen/startup_pvh.S new file +80 -0
80 lines not on this page · raw message
grub-core/kern/xen/init.c +40 -26
112 lines not on this page · raw message
include/grub/i386/pc/int.h +3 -0
@@ -51,9 +51,12 @@ struct grub_bios_int_registers#define GRUB_CPU_INT_FLAGS_DEFAULT 0#endif +#ifndef GRUB_MACHINE_XENPVH void EXPORT_FUNC (grub_bios_interrupt ) (grub_uint8_t intno,struct grub_bios_int_registers *regs) __attribute__ ((regparm (3 ))); +#endif +struct grub_i386_idt {grub_uint16_t limit;
include/grub/i386/tsc.h +1 -1
@@ -54,7 +54,7 @@ grub_get_tsc (void)static __inlineint grub_cpu_is_tsc_supported (void ) { -#ifndef GRUB_MACHINE_XEN +#if !defined(GRUB_MACHINE_XEN ) && !defined(GRUB_MACHINE_XENPVH )grub_uint32_t a,b,c,d;if (!grub_cpu_is_cpuid_supported ())return 0 ;
include/grub/i386/xen/hypercall.h +4 -1
@@ -26,7 +26,10 @@ EXPORT_FUNC (grub_xen_hypercall) (grub_uint32_t callno, grub_uint32_t a0, grub_uint32_t a1, grub_uint32_t a2, grub_uint32_t a3, grub_uint32_t a4, grub_uint32_t a5) -__attribute__ ((regparm (3), cdecl)); +#ifdef GRUB_MACHINE_XEN + __attribute__ ((regparm (3), cdecl)) +#endif + ;static inline int grub_xen_sched_op (int cmd,void *arg)
include/grub/i386/xenpvh/boot.h new file +1 -0
@@ -0,0 +1 @@ +#include <grub/i386/pc/boot.h>
include/grub/i386/xenpvh/console.h new file +1 -0
@@ -0,0 +1 @@ +#include <grub/i386/pc/console.h>
include/grub/i386/xenpvh/int.h new file +1 -0
@@ -0,0 +1 @@ +#include <grub/i386/pc/int.h>
include/grub/i386/xenpvh/kernel.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* GRUB -- GRand Unified Bootloader +* Copyright (C) 2002,2005,2006,2007,2008,2009 Free Software Foundation, Inc. +* +* GRUB is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* GRUB is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with GRUB. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef GRUB_KERNEL_MACHINE_HEADER +#define GRUB_KERNEL_MACHINE_HEADER 1 + +#ifndef ASM_FILE + +#define GRUB_KERNEL_USE_RSDP_ADDR 1 + +extern grub_uint64_t EXPORT_VAR (grub_rsdp_addr ); + +#endif /* ! ASM_FILE */ + +#endif /* GRUB_KERNEL_MACHINE_HEADER */
include/grub/i386/xenpvh/memory.h new file +54 -0
54 lines not on this page · raw message
include/grub/i386/xenpvh/time.h new file +1 -0
@@ -0,0 +1 @@ +#include <grub/i386/pc/time.h>
include/grub/kernel.h +3 -1
@@ -79,7 +79,9 @@ struct grub_module_info64#if defined (GRUB_MACHINE_PCBIOS ) || defined (GRUB_MACHINE_COREBOOT ) \ || defined (GRUB_MACHINE_MULTIBOOT ) || defined (GRUB_MACHINE_MIPS_QEMU_MIPS ) \ || defined (GRUB_MACHINE_MIPS_LOONGSON ) || defined (GRUB_MACHINE_ARC ) \ - || (defined (__sparc__) && defined (GRUB_MACHINE_IEEE1275 )) || defined (GRUB_MACHINE_UBOOT ) || defined (GRUB_MACHINE_XEN ) + || (defined (__sparc__) && defined (GRUB_MACHINE_IEEE1275 )) \ + || defined (GRUB_MACHINE_UBOOT ) || defined (GRUB_MACHINE_XEN ) \ + || defined(GRUB_MACHINE_XENPVH )/* FIXME: stack is between 2 heap regions. Move it. */ #define GRUB_KERNEL_PRELOAD_SPACE_REUSABLE 1#endif
include/grub/offsets.h +3 -0
@@ -39,6 +39,7 @@#define GRUB_BOOT_I386_PC_KERNEL_SEG 0x800#define GRUB_KERNEL_I386_PC_LINK_ADDR 0x9000 +#define GRUB_KERNEL_I386_XENPVH_LINK_ADDR 0x100000/* The upper memory area (starting at 640 kiB). */ #define GRUB_MEMORY_I386_PC_UPPER 0xa0000
@@ -102,10 +103,12 @@#define GRUB_KERNEL_X86_64_XEN_MOD_ALIGN 0x8#define GRUB_KERNEL_I386_XEN_MOD_ALIGN 0x8 +#define GRUB_KERNEL_I386_XENPVH_MOD_ALIGN 0x8/* Non-zero value is only needed for PowerMacs. */ #define GRUB_KERNEL_X86_64_XEN_MOD_GAP 0x0#define GRUB_KERNEL_I386_XEN_MOD_GAP 0x0 +#define GRUB_KERNEL_I386_XENPVH_MOD_GAP 0x0#define GRUB_KERNEL_I386_IEEE1275_MOD_GAP 0x0#define GRUB_KERNEL_I386_COREBOOT_MOD_GAP 0x0#define GRUB_KERNEL_SPARC64_IEEE1275_MOD_GAP 0x0
include/grub/xen.h +6 -0
@@ -43,6 +43,7 @@ typedef grub_uint64_t uint64_t;#include <xen/sched.h> #include <xen/grant_table.h> +#include <xen/hvm/start_info.h> #include <xen/io/console.h> #include <xen/io/xs_wire.h> #include <xen/io/xenbus.h>
@@ -95,6 +96,11 @@ typedef grub_uint64_t grub_xen_mfn_t;typedef grub_uint32_t grub_xen_mfn_t ;#endif typedef unsigned int grub_xen_evtchn_t ; + +#ifdef GRUB_MACHINE_XENPVH +extern struct hvm_start_info *pvh_start_info; +void grub_xen_setup_pvh (void ); +#endif #endif #endif
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerPATCH 4/8 xen: add xen pvh guest support to grub-core
In reply to Juergen GrossAdd all the grub-core code needed for Xen PVH guest support. This includes:
- The new PVH entry point of grub
- PVH specific initialization code
- machine specific header files
- modifications in Xen specific code to work in PVH environment
- modifications in other core code to be reusable with PVH
Enabling all this code is done later.
--- grub-core/kern/i386/tsc.c | 2 +- grub-core/kern/i386/xen/pvh.c | 344 ++++++++++++++++++++++++++++++++++ grub-core/kern/i386/xen/startup_pvh.S | 80 ++++++++ grub-core/kern/xen/init.c | 66 ++++--- include/grub/i386/pc/int.h | 3 + include/grub/i386/tsc.h | 2 +- include/grub/i386/xen/hypercall.h | 5 +- include/grub/i386/xenpvh/boot.h | 1 + include/grub/i386/xenpvh/console.h | 1 + include/grub/i386/xenpvh/int.h | 1 + include/grub/i386/xenpvh/kernel.h | 30 +++ include/grub/i386/xenpvh/memory.h | 54 ++++++ include/grub/i386/xenpvh/time.h | 1 + include/grub/kernel.h | 4 +- include/grub/offsets.h | 3 + include/grub/xen.h | 6 + 16 files changed, 573 insertions(+), 30 deletions(-) create mode 100644 grub-core/kern/i386/xen/pvh.c create mode 100644 grub-core/kern/i386/xen/startup_pvh.S create mode 100644 include/grub/i386/xenpvh/boot.h create mode 100644 include/grub/i386/xenpvh/console.h create mode 100644 include/grub/i386/xenpvh/int.h create mode 100644 include/grub/i386/xenpvh/kernel.h create mode 100644 include/grub/i386/xenpvh/memory.h create mode 100644 include/grub/i386/xenpvh/time.h
grub-core/kern/i386/tsc.c +1 -1
@@ -65,7 +65,7 @@ grub_tsc_init (void) tsc_boot_time =grub_get_tsc (); -#ifdef GRUB_MACHINE_XEN +#if defined (GRUB_MACHINE_XEN ) || defined (GRUB_MACHINE_XENPVH ) (void ) (grub_tsc_calibrate_from_xen () ||calibrate_tsc_hardcode ());#elif defined (GRUB_MACHINE_EFI ) (void ) (grub_tsc_calibrate_from_pmtimer () ||grub_tsc_calibrate_from_pit () ||grub_tsc_calibrate_from_efi () ||calibrate_tsc_hardcode ());
grub-core/kern/i386/xen/pvh.c new file +344 -0
344 lines not on this page · raw message
grub-core/kern/i386/xen/startup_pvh.S new file +80 -0
80 lines not on this page · raw message
grub-core/kern/xen/init.c +40 -26
112 lines not on this page · raw message
include/grub/i386/pc/int.h +3 -0
@@ -51,9 +51,12 @@ struct grub_bios_int_registers#define GRUB_CPU_INT_FLAGS_DEFAULT 0#endif +#ifndef GRUB_MACHINE_XENPVH void EXPORT_FUNC (grub_bios_interrupt ) (grub_uint8_t intno,struct grub_bios_int_registers *regs) __attribute__ ((regparm (3 ))); +#endif +struct grub_i386_idt {grub_uint16_t limit;
include/grub/i386/tsc.h +1 -1
@@ -54,7 +54,7 @@ grub_get_tsc (void)static __inlineint grub_cpu_is_tsc_supported (void ) { -#ifndef GRUB_MACHINE_XEN +#if !defined(GRUB_MACHINE_XEN ) && !defined(GRUB_MACHINE_XENPVH )grub_uint32_t a,b,c,d;if (!grub_cpu_is_cpuid_supported ())return 0 ;
include/grub/i386/xen/hypercall.h +4 -1
@@ -26,7 +26,10 @@ EXPORT_FUNC (grub_xen_hypercall) (grub_uint32_t callno, grub_uint32_t a0, grub_uint32_t a1, grub_uint32_t a2, grub_uint32_t a3, grub_uint32_t a4, grub_uint32_t a5) -__attribute__ ((regparm (3), cdecl)); +#ifdef GRUB_MACHINE_XEN + __attribute__ ((regparm (3), cdecl)) +#endif + ;static inline int grub_xen_sched_op (int cmd,void *arg)
include/grub/i386/xenpvh/boot.h new file +1 -0
@@ -0,0 +1 @@ +#include <grub/i386/pc/boot.h>
include/grub/i386/xenpvh/console.h new file +1 -0
@@ -0,0 +1 @@ +#include <grub/i386/pc/console.h>
include/grub/i386/xenpvh/int.h new file +1 -0
@@ -0,0 +1 @@ +#include <grub/i386/pc/int.h>
include/grub/i386/xenpvh/kernel.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* GRUB -- GRand Unified Bootloader +* Copyright (C) 2002,2005,2006,2007,2008,2009 Free Software Foundation, Inc. +* +* GRUB is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* GRUB is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with GRUB. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef GRUB_KERNEL_MACHINE_HEADER +#define GRUB_KERNEL_MACHINE_HEADER 1 + +#ifndef ASM_FILE + +#define GRUB_KERNEL_USE_RSDP_ADDR 1 + +extern grub_uint64_t EXPORT_VAR (grub_rsdp_addr ); + +#endif /* ! ASM_FILE */ + +#endif /* GRUB_KERNEL_MACHINE_HEADER */
include/grub/i386/xenpvh/memory.h new file +54 -0
54 lines not on this page · raw message
include/grub/i386/xenpvh/time.h new file +1 -0
@@ -0,0 +1 @@ +#include <grub/i386/pc/time.h>
include/grub/kernel.h +3 -1
@@ -79,7 +79,9 @@ struct grub_module_info64#if defined (GRUB_MACHINE_PCBIOS ) || defined (GRUB_MACHINE_COREBOOT ) \ || defined (GRUB_MACHINE_MULTIBOOT ) || defined (GRUB_MACHINE_MIPS_QEMU_MIPS ) \ || defined (GRUB_MACHINE_MIPS_LOONGSON ) || defined (GRUB_MACHINE_ARC ) \ - || (defined (__sparc__) && defined (GRUB_MACHINE_IEEE1275 )) || defined (GRUB_MACHINE_UBOOT ) || defined (GRUB_MACHINE_XEN ) + || (defined (__sparc__) && defined (GRUB_MACHINE_IEEE1275 )) \ + || defined (GRUB_MACHINE_UBOOT ) || defined (GRUB_MACHINE_XEN ) \ + || defined(GRUB_MACHINE_XENPVH )/* FIXME: stack is between 2 heap regions. Move it. */ #define GRUB_KERNEL_PRELOAD_SPACE_REUSABLE 1#endif
include/grub/offsets.h +3 -0
@@ -39,6 +39,7 @@#define GRUB_BOOT_I386_PC_KERNEL_SEG 0x800#define GRUB_KERNEL_I386_PC_LINK_ADDR 0x9000 +#define GRUB_KERNEL_I386_XENPVH_LINK_ADDR 0x100000/* The upper memory area (starting at 640 kiB). */ #define GRUB_MEMORY_I386_PC_UPPER 0xa0000
@@ -102,10 +103,12 @@#define GRUB_KERNEL_X86_64_XEN_MOD_ALIGN 0x8#define GRUB_KERNEL_I386_XEN_MOD_ALIGN 0x8 +#define GRUB_KERNEL_I386_XENPVH_MOD_ALIGN 0x8/* Non-zero value is only needed for PowerMacs. */ #define GRUB_KERNEL_X86_64_XEN_MOD_GAP 0x0#define GRUB_KERNEL_I386_XEN_MOD_GAP 0x0 +#define GRUB_KERNEL_I386_XENPVH_MOD_GAP 0x0#define GRUB_KERNEL_I386_IEEE1275_MOD_GAP 0x0#define GRUB_KERNEL_I386_COREBOOT_MOD_GAP 0x0#define GRUB_KERNEL_SPARC64_IEEE1275_MOD_GAP 0x0
include/grub/xen.h +6 -0
@@ -43,6 +43,7 @@ typedef grub_uint64_t uint64_t;#include <xen/sched.h> #include <xen/grant_table.h> +#include <xen/hvm/start_info.h> #include <xen/io/console.h> #include <xen/io/xs_wire.h> #include <xen/io/xenbus.h>
@@ -95,6 +96,11 @@ typedef grub_uint64_t grub_xen_mfn_t;typedef grub_uint32_t grub_xen_mfn_t ;#endif typedef unsigned int grub_xen_evtchn_t ; + +#ifdef GRUB_MACHINE_XENPVH +extern struct hvm_start_info *pvh_start_info; +void grub_xen_setup_pvh (void ); +#endif #endif #endif
Signature · 1 line
2.12.3
Re: [PATCH 4/8] xen: add xen pvh guest support to grub-core
Quoted 30 lines · Juergen Gross
Add all the grub-core code needed for Xen PVH guest support. This includes:
- The new PVH entry point of grub
- PVH specific initialization code
- machine specific header files
- modifications in Xen specific code to work in PVH environment
- modifications in other core code to be reusable with PVHEnabling all this code is done later.
Signed-off-by Juergen Gross <[email protected]>--- grub-core/kern/i386/tsc.c | 2 +- grub-core/kern/i386/xen/pvh.c | 344 ++++++++++++++++++++++++++++++++++ grub-core/kern/i386/xen/startup_pvh.S | 80 ++++++++ grub-core/kern/xen/init.c | 66 ++++--- include/grub/i386/pc/int.h | 3 + include/grub/i386/tsc.h | 2 +- include/grub/i386/xen/hypercall.h | 5 +- include/grub/i386/xenpvh/boot.h | 1 + include/grub/i386/xenpvh/console.h | 1 + include/grub/i386/xenpvh/int.h | 1 + include/grub/i386/xenpvh/kernel.h | 30 +++ include/grub/i386/xenpvh/memory.h | 54 ++++++ include/grub/i386/xenpvh/time.h | 1 + include/grub/kernel.h | 4 +- include/grub/offsets.h | 3 + include/grub/xen.h | 6 + 16 files changed, 573 insertions(+), 30 deletions(-)
Quoted 8 lines
create mode 100644 grub-core/kern/i386/xen/pvh.c create mode 100644 grub-core/kern/i386/xen/startup_pvh.S create mode 100644 include/grub/i386/xenpvh/boot.h create mode 100644 include/grub/i386/xenpvh/console.h create mode 100644 include/grub/i386/xenpvh/int.h create mode 100644 include/grub/i386/xenpvh/kernel.h create mode 100644 include/grub/i386/xenpvh/memory.h create mode 100644 include/grub/i386/xenpvh/time.h
May I ask you to split this patch into smaller logical entities?
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 4/8] xen: add xen pvh guest support to grub-core
In reply to Juergen GrossQuoted 30 lines · Juergen Gross
Add all the grub-core code needed for Xen PVH guest support. This includes:
- The new PVH entry point of grub
- PVH specific initialization code
- machine specific header files
- modifications in Xen specific code to work in PVH environment
- modifications in other core code to be reusable with PVHEnabling all this code is done later.
Signed-off-by Juergen Gross <[email protected]>--- grub-core/kern/i386/tsc.c | 2 +- grub-core/kern/i386/xen/pvh.c | 344 ++++++++++++++++++++++++++++++++++ grub-core/kern/i386/xen/startup_pvh.S | 80 ++++++++ grub-core/kern/xen/init.c | 66 ++++--- include/grub/i386/pc/int.h | 3 + include/grub/i386/tsc.h | 2 +- include/grub/i386/xen/hypercall.h | 5 +- include/grub/i386/xenpvh/boot.h | 1 + include/grub/i386/xenpvh/console.h | 1 + include/grub/i386/xenpvh/int.h | 1 + include/grub/i386/xenpvh/kernel.h | 30 +++ include/grub/i386/xenpvh/memory.h | 54 ++++++ include/grub/i386/xenpvh/time.h | 1 + include/grub/kernel.h | 4 +- include/grub/offsets.h | 3 + include/grub/xen.h | 6 + 16 files changed, 573 insertions(+), 30 deletions(-)
Quoted 8 lines
create mode 100644 grub-core/kern/i386/xen/pvh.c create mode 100644 grub-core/kern/i386/xen/startup_pvh.S create mode 100644 include/grub/i386/xenpvh/boot.h create mode 100644 include/grub/i386/xenpvh/console.h create mode 100644 include/grub/i386/xenpvh/int.h create mode 100644 include/grub/i386/xenpvh/kernel.h create mode 100644 include/grub/i386/xenpvh/memory.h create mode 100644 include/grub/i386/xenpvh/time.h
May I ask you to split this patch into smaller logical entities?
Daniel
Juergen Gross
maintainerPATCH 5/8 xenpvh: add build runes for grub-core
In reply to Juergen GrossAdd the modifications to the build system needed to build a xenpvh grub.
--- gentpl.py | 4 ++-- grub-core/Makefile.am | 12 ++++++++++++ grub-core/Makefile.core.def | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-)
gentpl.py +2 -2
@@ -28,7 +28,7 @@ import re GRUB_PLATFORMS = [ "emu", "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot", "i386_multiboot", "i386_ieee1275", "x86_64_efi", - "i386_xen", "x86_64_xen", + "i386_xen", "x86_64_xen", "i386_xenpvh", "mips_loongson", "sparc64_ieee1275", "powerpc_ieee1275", "mips_arc", "ia64_efi", "mips_qemu_mips", "arm_uboot", "arm_efi", "arm64_efi",
@@ -71,7 +71,7 @@ GROUPS["videomodules"] = GRUB_PLATFORMS[:]; for i in GROUPS["videoinkernel"]: GROUPS["videomodules"].remove(i) # Similar for terminfo -GROUPS["terminfoinkernel"] = [ "emu", "mips_loongson", "mips_arc", "mips_qemu_mips" ] + GROUPS["xen"] + GROUPS["ieee1275"] + GROUPS["uboot"]; +GROUPS["terminfoinkernel"] = [ "emu", "mips_loongson", "mips_arc", "mips_qemu_mips", "i386_xenpvh" ] + GROUPS["xen"] + GROUPS["ieee1275"] + GROUPS["uboot"]; GROUPS["terminfomodule"] = GRUB_PLATFORMS[:]; for i in GROUPS["terminfoinkernel"]: GROUPS["terminfomodule"].remove(i)
grub-core/Makefile.am +12 -0
@@ -101,6 +101,18 @@ KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/int.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h endif +if COND_i386_xenpvh +KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h +KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/int.h +KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h +KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h +KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h +KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h +KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h +KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/xen.h +KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/xen/hypercall.h +endif + if COND_i386_efi KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
grub-core/Makefile.core.def +35 -0
@@ -79,6 +79,8 @@ kernel = { i386_xen_ldflags = '$(TARGET_IMG_BASE_LDOPT),0'; x86_64_xen_ldflags = '$(TARGET_IMG_LDFLAGS)'; x86_64_xen_ldflags = '$(TARGET_IMG_BASE_LDOPT),0'; + i386_xenpvh_ldflags = '$(TARGET_IMG_LDFLAGS)'; + i386_xenpvh_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x100000'; mips_loongson_ldflags = '-Wl,-Ttext,0x80200000'; powerpc_ieee1275_ldflags = '-Wl,-Ttext,0x200000';
@@ -100,6 +102,7 @@ kernel = { x86_64_efi_startup = kern/x86_64/efi/startup.S; i386_xen_startup = kern/i386/xen/startup.S; x86_64_xen_startup = kern/x86_64/xen/startup.S; + i386_xenpvh_startup = kern/i386/xen/startup_pvh.S; i386_qemu_startup = kern/i386/qemu/startup.S; i386_ieee1275_startup = kern/i386/ieee1275/startup.S; i386_coreboot_startup = kern/i386/coreboot/startup.S;
@@ -177,6 +180,7 @@ kernel = { i386 = kern/i386/dl.c; i386_xen = kern/i386/dl.c; + i386_xenpvh = kern/i386/dl.c; i386_coreboot = kern/i386/coreboot/init.c; i386_multiboot = kern/i386/coreboot/init.c;
@@ -222,6 +226,14 @@ kernel = { xen = disk/xen/xendisk.c; xen = commands/boot.c; + i386_xenpvh = kern/i386/tsc.c; + i386_xenpvh = kern/i386/xen/tsc.c; + i386_xenpvh = commands/boot.c; + i386_xenpvh = kern/xen/init.c; + i386_xenpvh = kern/i386/xen/pvh.c; + i386_xenpvh = term/xen/console.c; + i386_xenpvh = disk/xen/xendisk.c; + ia64_efi = kern/ia64/efi/startup.S; ia64_efi = kern/ia64/efi/init.c; ia64_efi = kern/ia64/dl.c;
@@ -802,6 +814,7 @@ module = { name = cpuid; common = commands/i386/cpuid.c; enable = x86; + enable = i386_xenpvh; enable = i386_xen; enable = x86_64_xen; };
@@ -861,6 +874,7 @@ module = { i386_coreboot = lib/i386/halt.c; i386_qemu = lib/i386/halt.c; xen = lib/xen/halt.c; + i386_xenpvh = lib/xen/halt.c; efi = lib/efi/halt.c; ieee1275 = lib/ieee1275/halt.c; emu = lib/emu/halt.c;
@@ -878,6 +892,7 @@ module = { mips_loongson = lib/mips/loongson/reboot.c; mips_qemu_mips = lib/mips/qemu_mips/reboot.c; xen = lib/xen/reboot.c; + i386_xenpvh = lib/xen/reboot.c; uboot = lib/uboot/reboot.c; arm_coreboot = lib/dummy/reboot.c; common = commands/reboot.c;
@@ -1541,12 +1556,18 @@ module = { x86 = lib/i386/relocator16.S; x86 = lib/i386/relocator32.S; x86 = lib/i386/relocator64.S; + i386_xenpvh = lib/i386/relocator16.S; + i386_xenpvh = lib/i386/relocator32.S; + i386_xenpvh = lib/i386/relocator64.S; i386 = lib/i386/relocator_asm.S; + i386_xenpvh = lib/i386/relocator_asm.S; x86_64 = lib/x86_64/relocator_asm.S; i386_xen = lib/i386/relocator_asm.S; x86_64_xen = lib/x86_64/relocator_asm.S; x86 = lib/i386/relocator.c; x86 = lib/i386/relocator_common_c.c; + i386_xenpvh = lib/i386/relocator.c; + i386_xenpvh = lib/i386/relocator_common_c.c; ieee1275 = lib/ieee1275/relocator.c; efi = lib/efi/relocator.c; mips = lib/mips/relocator_asm.S;
@@ -1565,6 +1586,7 @@ module = { enable = mips; enable = powerpc; enable = x86; + enable = i386_xenpvh; enable = xen; };
@@ -1579,6 +1601,7 @@ module = { sparc64_ieee1275 = lib/ieee1275/cmos.c; powerpc_ieee1275 = lib/ieee1275/cmos.c; xen = lib/xen/datetime.c; + i386_xenpvh = lib/xen/datetime.c; mips_arc = lib/arc/datetime.c; enable = noemu;
@@ -1662,6 +1685,7 @@ module = { common = loader/multiboot.c; common = loader/multiboot_mbi2.c; enable = x86; + enable = i386_xenpvh; enable = mips; };
@@ -1669,8 +1693,10 @@ module = { name = multiboot; common = loader/multiboot.c; x86 = loader/i386/multiboot_mbi.c; + i386_xenpvh = loader/i386/multiboot_mbi.c; extra_dist = loader/multiboot_elfxx.c; enable = x86; + enable = i386_xenpvh; }; module = {
@@ -1682,8 +1708,10 @@ module = { module = { name = linux; x86 = loader/i386/linux.c; + i386_xenpvh = loader/i386/linux.c; xen = loader/i386/xen.c; i386_pc = lib/i386/pc/vesa_modes_table.c; + i386_xenpvh = lib/i386/pc/vesa_modes_table.c; mips = loader/mips/linux.c; powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c; sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;
@@ -1769,6 +1797,8 @@ module = { common = mmap/mmap.c; x86 = mmap/i386/uppermem.c; x86 = mmap/i386/mmap.c; + i386_xenpvh = mmap/i386/uppermem.c; + i386_xenpvh = mmap/i386/mmap.c; i386_pc = mmap/i386/pc/mmap.c; i386_pc = mmap/i386/pc/mmap_helper.S;
@@ -1778,6 +1808,7 @@ module = { mips = mmap/mips/uppermem.c; enable = x86; + enable = i386_xenpvh; enable = ia64_efi; enable = arm_efi; enable = arm64_efi;
@@ -2017,6 +2048,7 @@ module = { name = legacy_password_test; common = tests/legacy_password_test.c; enable = i386_pc; + enable = i386_xenpvh; enable = i386_efi; enable = x86_64_efi; enable = emu;
@@ -2215,6 +2247,7 @@ module = { xen = lib/i386/pc/vesa_modes_table.c; enable = i386_pc; + enable = i386_xenpvh; enable = i386_efi; enable = x86_64_efi; enable = emu;
@@ -2258,10 +2291,12 @@ module = { module = { name = backtrace; x86 = lib/i386/backtrace.c; + i386_xenpvh = lib/i386/backtrace.c; i386_xen = lib/i386/backtrace.c; x86_64_xen = lib/i386/backtrace.c; common = lib/backtrace.c; enable = x86; + enable = i386_xenpvh; enable = i386_xen; enable = x86_64_xen; };
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 5/8] xenpvh: add build runes for grub-core
Quoted 4 lines · Juergen Gross
Add the modifications to the build system needed to build a xenpvh grub.
Signed-off-by Juergen Gross <[email protected]>
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 5/8] xenpvh: add build runes for grub-core
In reply to Juergen GrossQuoted 4 lines · Juergen Gross
Add the modifications to the build system needed to build a xenpvh grub.
Signed-off-by Juergen Gross <[email protected]>
Daniel
Juergen Gross
maintainerPATCH 6/8 xenpvh: support building a standalone image
In reply to Juergen GrossSuppor mkimage for xenpvh.
--- include/grub/util/mkimage.h | 3 ++- util/grub-mkimage32.c | 1 + util/grub-mkimage64.c | 1 + util/grub-mkimagexx.c | 44 ++++++++++++++++++++++++++++++++++++++++---- util/mkimage.c | 23 ++++++++++++++++++++++- 5 files changed, 66 insertions(+), 6 deletions(-)
include/grub/util/mkimage.h +2 -1
@@ -71,7 +71,8 @@ struct grub_install_image_target_descIMAGE_I386_IEEE1275 ,IMAGE_LOONGSON_ELF ,IMAGE_QEMU ,IMAGE_PPC ,IMAGE_YEELOONG_FLASH ,IMAGE_FULOONG2F_FLASH ,IMAGE_I386_PC_PXE ,IMAGE_MIPS_ARC , -IMAGE_QEMU_MIPS_FLASH ,IMAGE_UBOOT ,IMAGE_XEN ,IMAGE_I386_PC_ELTORITO +IMAGE_QEMU_MIPS_FLASH ,IMAGE_UBOOT ,IMAGE_XEN ,IMAGE_I386_PC_ELTORITO , +IMAGE_XENPVH } id;enum {
util/grub-mkimage32.c +1 -0
@@ -18,5 +18,6 @@# define ELF_R_TYPE (val) ELF32_R_TYPE(val)# define ELF_ST_TYPE (val) ELF32_ST_TYPE(val)#define XEN_NOTE_SIZE 132 +#define XENPVH_NOTE_SIZE 20#include "grub-mkimagexx.c"
util/grub-mkimage64.c +1 -0
@@ -18,5 +18,6 @@# define ELF_R_TYPE (val) ELF64_R_TYPE(val)# define ELF_ST_TYPE (val) ELF64_ST_TYPE(val)#define XEN_NOTE_SIZE 120 +#define XENPVH_NOTE_SIZE 24#include "grub-mkimagexx.c"
util/grub-mkimagexx.c +40 -4
72 lines not on this page · raw message
util/mkimage.c +22 -1
@@ -133,6 +133,24 @@ static const struct grub_install_image_target_desc image_targets[] = .default_compression = GRUB_COMPRESSION_LZMA }, { + .dirname = "i386-xenpvh", + .names = { "i386-xenpvh", NULL }, + .voidp_sizeof = 4, + .bigendian = 0, + .id = IMAGE_XENPVH, + .flags = PLATFORM_FLAGS_NONE, + .total_module_size = TARGET_NO_FIELD, + .decompressor_compressed_size = TARGET_NO_FIELD, + .decompressor_uncompressed_size = TARGET_NO_FIELD, + .decompressor_uncompressed_addr = TARGET_NO_FIELD, + .elf_target = EM_386, + .section_align = 1, + .vaddr_offset = 0, + .link_addr = GRUB_KERNEL_I386_XENPVH_LINK_ADDR, + .mod_align = GRUB_KERNEL_I386_XENPVH_MOD_ALIGN, + .link_align = 4 + }, + { .dirname ="i386-pc" , .names = { "i386-pc-pxe", NULL }, .voidp_sizeof = 4,
@@ -860,7 +878,8 @@ grub_install_generate_image (const char *dir, const char *prefix,else kernel_img =grub_mkimage_load_image64 (kernel_path, total_module_size, &layout, image_target); -if (image_target->id ==IMAGE_XEN && layout.align <4096 ) +if ((image_target->id ==IMAGE_XEN || image_target->id ==IMAGE_XENPVH ) && + layout.align <4096 ) layout.align =4096 ; if ((image_target->flags & PLATFORM_FLAGS_DECOMPRESSORS)
@@ -1103,6 +1122,7 @@ grub_install_generate_image (const char *dir, const char *prefix,case IMAGE_MIPS_ARC :case IMAGE_QEMU_MIPS_FLASH :case IMAGE_XEN : +case IMAGE_XENPVH :break ;case IMAGE_SPARC64_AOUT :case IMAGE_SPARC64_RAW :
@@ -1679,6 +1699,7 @@ grub_install_generate_image (const char *dir, const char *prefix,case IMAGE_LOONGSON_ELF :case IMAGE_PPC :case IMAGE_XEN : +case IMAGE_XENPVH :case IMAGE_COREBOOT :case IMAGE_I386_IEEE1275 : {
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 6/8] xenpvh: support building a standalone image
Quoted 30 lines · Juergen Gross
Suppor mkimage for xenpvh.
Signed-off-by Juergen Gross <[email protected]>--- include/grub/util/mkimage.h | 3 ++- util/grub-mkimage32.c | 1 + util/grub-mkimage64.c | 1 + util/grub-mkimagexx.c | 44 ++++++++++++++++++++++++++++++++++++++++---- util/mkimage.c | 23 ++++++++++++++++++++++- 5 files changed, 66 insertions(+), 6 deletions(-)include/grub/util/mkimage.h +2
-1@@ -71,7 +71,8 @@ struct grub_install_image_target_descIMAGE_I386_IEEE1275 ,IMAGE_LOONGSON_ELF ,IMAGE_QEMU ,IMAGE_PPC ,IMAGE_YEELOONG_FLASH ,IMAGE_FULOONG2F_FLASH ,IMAGE_I386_PC_PXE ,IMAGE_MIPS_ARC , -IMAGE_QEMU_MIPS_FLASH ,IMAGE_UBOOT ,IMAGE_XEN ,IMAGE_I386_PC_ELTORITO +IMAGE_QEMU_MIPS_FLASH ,IMAGE_UBOOT ,IMAGE_XEN ,IMAGE_I386_PC_ELTORITO , +IMAGE_XENPVH } id;enum {util/grub-mkimage32.c +0
-0
util/grub-mkimage32.c line 19
Quoted 2 lines
util/grub-mkimage32.c +0
-0@@ -18,5 +18,6 @@# define ELF_R_TYPE (val) ELF32_R_TYPE(val)# define ELF_ST_TYPE (val) ELF32_ST_TYPE(val)
Please add empty line here...
util/grub-mkimage32.c line 21
Quoted 2 lines
util/grub-mkimage32.c +1
-0#define XEN_NOTE_SIZE 132 +#define XENPVH_NOTE_SIZE 20
...and align the numbers for XEN_NOTE_SIZE and XENPVH_NOTE_SIZE.
util/grub-mkimage64.c line 21
Quoted 11 lines
util/grub-mkimage32.c +0
-0#include "grub-mkimagexx.c" util/grub-mkimage64.c +1
-0@@ -18,5 +18,6 @@# define ELF_R_TYPE (val) ELF64_R_TYPE(val)# define ELF_ST_TYPE (val) ELF64_ST_TYPE(val)#define XEN_NOTE_SIZE 120 +#define XENPVH_NOTE_SIZE 24
Ditto.
Quoted 28 lines
util/grub-mkimage64.c +0
-0#include "grub-mkimagexx.c" util/grub-mkimagexx.c +5
-2@@ -207,12 +207,12 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc phnum++; footer_size +=sizeof (struct grub_ieee1275_note ); } -if (image_target->id ==IMAGE_XEN ) +if (image_target->id ==IMAGE_XEN || image_target->id ==IMAGE_XENPVH ) { phnum++; shnum++; string_size +=sizeof (".xen" ); - footer_size +=XEN_NOTE_SIZE ; + footer_size += (image_target->id ==IMAGE_XEN ) ?XEN_NOTE_SIZE :XENPVH_NOTE_SIZE ; } header_size =ALIGN_UP (sizeof (*ehdr) + phnum *sizeof (*phdr) + shnum *sizeof (*shdr) + string_size, layout->align);@@ -399,6 +399,39 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc phdr->p_offset =grub_host_to_target32 (header_size + program_size); } +if (image_target->id ==IMAGE_XENPVH ) + { +char *note_start = (elf_img + program_size + header_size);
util/grub-mkimagexx.c SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc · line 414
Quoted 10 lines
util/grub-mkimagexx.c +10
-0+Elf_Nhdr *note_ptr; +char *ptr = (char *) note_start; + +grub_util_info ("adding XEN NOTE segment" ); + +/* Phys32 Entry. */ + note_ptr = (Elf_Nhdr *) ptr; + note_ptr->n_namesz =grub_host_to_target32 (sizeof (GRUB_XEN_NOTE_NAME )); + note_ptr->n_descsz =grub_host_to_target32 (image_target->voidp_sizeof); + note_ptr->n_type =grub_host_to_target32 (18 );
What 18 means? Could you use an existing constant or if not define one?
Quoted 74 lines
util/grub-mkimagexx.c +25
-2+ ptr +=sizeof (Elf_Nhdr); +memcpy (ptr,GRUB_XEN_NOTE_NAME ,sizeof (GRUB_XEN_NOTE_NAME )); + ptr +=ALIGN_UP (sizeof (GRUB_XEN_NOTE_NAME ),4 ); +memset (ptr,0 , image_target->voidp_sizeof); + *(grub_uint32_t *) ptr =GRUB_KERNEL_I386_XENPVH_LINK_ADDR ; + ptr += image_target->voidp_sizeof; + +assert (XENPVH_NOTE_SIZE == (ptr - note_start)); + + phdr++; + phdr->p_type =grub_host_to_target32 (PT_NOTE ); + phdr->p_flags =grub_host_to_target32 (PF_R ); + phdr->p_align =grub_host_to_target32 (image_target->voidp_sizeof); + phdr->p_vaddr =0 ; + phdr->p_paddr =0 ; + phdr->p_filesz =grub_host_to_target32 (XENPVH_NOTE_SIZE ); + phdr->p_memsz =0 ; + phdr->p_offset =grub_host_to_target32 (header_size + program_size); + } +if (note) {int note_size =sizeof (struct grub_ieee1275_note );@@ -474,7 +507,7 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc shdr->sh_entsize =grub_host_to_target32 (0 ); shdr++; -if (image_target->id ==IMAGE_XEN ) +if (image_target->id ==IMAGE_XEN || image_target->id ==IMAGE_XENPVH ) {memcpy (ptr,".xen" ,sizeof (".xen" )); shdr->sh_name =grub_host_to_target32 (ptr - str_start);@@ -482,7 +515,10 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc shdr->sh_type =grub_host_to_target32 (SHT_PROGBITS ); shdr->sh_addr =grub_host_to_target_addr (target_addr + layout->kernel_size); shdr->sh_offset =grub_host_to_target_addr (program_size + header_size); - shdr->sh_size =grub_host_to_target32 (XEN_NOTE_SIZE ); +if (image_target->id ==IMAGE_XEN ) + shdr->sh_size =grub_host_to_target32 (XEN_NOTE_SIZE ); +else + shdr->sh_size =grub_host_to_target32 (XENPVH_NOTE_SIZE ); shdr->sh_link =grub_host_to_target32 (0 ); shdr->sh_info =grub_host_to_target32 (0 ); shdr->sh_addralign =grub_host_to_target32 (image_target->voidp_sizeof);util/mkimage.c +18
-0@@ -133,6 +133,24 @@ static const struct grub_install_image_target_desc image_targets[] = .default_compression = GRUB_COMPRESSION_LZMA }, { + .dirname = "i386-xenpvh", + .names = { "i386-xenpvh", NULL }, + .voidp_sizeof = 4, + .bigendian = 0, + .id = IMAGE_XENPVH, + .flags = PLATFORM_FLAGS_NONE, + .total_module_size = TARGET_NO_FIELD, + .decompressor_compressed_size = TARGET_NO_FIELD, + .decompressor_uncompressed_size = TARGET_NO_FIELD, + .decompressor_uncompressed_addr = TARGET_NO_FIELD, + .elf_target = EM_386, + .section_align = 1, + .vaddr_offset = 0, + .link_addr = GRUB_KERNEL_I386_XENPVH_LINK_ADDR, + .mod_align = GRUB_KERNEL_I386_XENPVH_MOD_ALIGN, + .link_align = 4 + }, + { .dirname ="i386-pc" , .names = { "i386-pc-pxe", NULL }, .voidp_sizeof = 4,
util/mkimage.c grub_install_generate_image (const char *dir, const char *prefix, · line 883
Quoted 7 lines
util/mkimage.c +2
-1@@ -860,7 +878,8 @@ grub_install_generate_image (const char *dir, const char *prefix,else kernel_img =grub_mkimage_load_image64 (kernel_path, total_module_size, &layout, image_target); -if (image_target->id ==IMAGE_XEN && layout.align <4096 ) +if ((image_target->id ==IMAGE_XEN || image_target->id ==IMAGE_XENPVH ) && + layout.align <4096 ) layout.align =4096 ;
Could you use some kind of PAGE_SIZE instead of 4096 here?
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 6/8] xenpvh: support building a standalone image
In reply to Juergen GrossQuoted 30 lines · Juergen Gross
Suppor mkimage for xenpvh.
Signed-off-by Juergen Gross <[email protected]>--- include/grub/util/mkimage.h | 3 ++- util/grub-mkimage32.c | 1 + util/grub-mkimage64.c | 1 + util/grub-mkimagexx.c | 44 ++++++++++++++++++++++++++++++++++++++++---- util/mkimage.c | 23 ++++++++++++++++++++++- 5 files changed, 66 insertions(+), 6 deletions(-)include/grub/util/mkimage.h +2
-1@@ -71,7 +71,8 @@ struct grub_install_image_target_descIMAGE_I386_IEEE1275 ,IMAGE_LOONGSON_ELF ,IMAGE_QEMU ,IMAGE_PPC ,IMAGE_YEELOONG_FLASH ,IMAGE_FULOONG2F_FLASH ,IMAGE_I386_PC_PXE ,IMAGE_MIPS_ARC , -IMAGE_QEMU_MIPS_FLASH ,IMAGE_UBOOT ,IMAGE_XEN ,IMAGE_I386_PC_ELTORITO +IMAGE_QEMU_MIPS_FLASH ,IMAGE_UBOOT ,IMAGE_XEN ,IMAGE_I386_PC_ELTORITO , +IMAGE_XENPVH } id;enum {util/grub-mkimage32.c +0
-0
util/grub-mkimage32.c line 19
Quoted 2 lines
util/grub-mkimage32.c +0
-0@@ -18,5 +18,6 @@# define ELF_R_TYPE (val) ELF32_R_TYPE(val)# define ELF_ST_TYPE (val) ELF32_ST_TYPE(val)
Please add empty line here...
util/grub-mkimage32.c line 21
Quoted 2 lines
util/grub-mkimage32.c +1
-0#define XEN_NOTE_SIZE 132 +#define XENPVH_NOTE_SIZE 20
...and align the numbers for XEN_NOTE_SIZE and XENPVH_NOTE_SIZE.
util/grub-mkimage64.c line 21
Quoted 11 lines
util/grub-mkimage32.c +0
-0#include "grub-mkimagexx.c" util/grub-mkimage64.c +1
-0@@ -18,5 +18,6 @@# define ELF_R_TYPE (val) ELF64_R_TYPE(val)# define ELF_ST_TYPE (val) ELF64_ST_TYPE(val)#define XEN_NOTE_SIZE 120 +#define XENPVH_NOTE_SIZE 24
Ditto.
Quoted 28 lines
util/grub-mkimage64.c +0
-0#include "grub-mkimagexx.c" util/grub-mkimagexx.c +5
-2@@ -207,12 +207,12 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc phnum++; footer_size +=sizeof (struct grub_ieee1275_note ); } -if (image_target->id ==IMAGE_XEN ) +if (image_target->id ==IMAGE_XEN || image_target->id ==IMAGE_XENPVH ) { phnum++; shnum++; string_size +=sizeof (".xen" ); - footer_size +=XEN_NOTE_SIZE ; + footer_size += (image_target->id ==IMAGE_XEN ) ?XEN_NOTE_SIZE :XENPVH_NOTE_SIZE ; } header_size =ALIGN_UP (sizeof (*ehdr) + phnum *sizeof (*phdr) + shnum *sizeof (*shdr) + string_size, layout->align);@@ -399,6 +399,39 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc phdr->p_offset =grub_host_to_target32 (header_size + program_size); } +if (image_target->id ==IMAGE_XENPVH ) + { +char *note_start = (elf_img + program_size + header_size);
util/grub-mkimagexx.c SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc · line 414
Quoted 10 lines
util/grub-mkimagexx.c +10
-0+Elf_Nhdr *note_ptr; +char *ptr = (char *) note_start; + +grub_util_info ("adding XEN NOTE segment" ); + +/* Phys32 Entry. */ + note_ptr = (Elf_Nhdr *) ptr; + note_ptr->n_namesz =grub_host_to_target32 (sizeof (GRUB_XEN_NOTE_NAME )); + note_ptr->n_descsz =grub_host_to_target32 (image_target->voidp_sizeof); + note_ptr->n_type =grub_host_to_target32 (18 );
What 18 means? Could you use an existing constant or if not define one?
Quoted 74 lines
util/grub-mkimagexx.c +25
-2+ ptr +=sizeof (Elf_Nhdr); +memcpy (ptr,GRUB_XEN_NOTE_NAME ,sizeof (GRUB_XEN_NOTE_NAME )); + ptr +=ALIGN_UP (sizeof (GRUB_XEN_NOTE_NAME ),4 ); +memset (ptr,0 , image_target->voidp_sizeof); + *(grub_uint32_t *) ptr =GRUB_KERNEL_I386_XENPVH_LINK_ADDR ; + ptr += image_target->voidp_sizeof; + +assert (XENPVH_NOTE_SIZE == (ptr - note_start)); + + phdr++; + phdr->p_type =grub_host_to_target32 (PT_NOTE ); + phdr->p_flags =grub_host_to_target32 (PF_R ); + phdr->p_align =grub_host_to_target32 (image_target->voidp_sizeof); + phdr->p_vaddr =0 ; + phdr->p_paddr =0 ; + phdr->p_filesz =grub_host_to_target32 (XENPVH_NOTE_SIZE ); + phdr->p_memsz =0 ; + phdr->p_offset =grub_host_to_target32 (header_size + program_size); + } +if (note) {int note_size =sizeof (struct grub_ieee1275_note );@@ -474,7 +507,7 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc shdr->sh_entsize =grub_host_to_target32 (0 ); shdr++; -if (image_target->id ==IMAGE_XEN ) +if (image_target->id ==IMAGE_XEN || image_target->id ==IMAGE_XENPVH ) {memcpy (ptr,".xen" ,sizeof (".xen" )); shdr->sh_name =grub_host_to_target32 (ptr - str_start);@@ -482,7 +515,10 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc shdr->sh_type =grub_host_to_target32 (SHT_PROGBITS ); shdr->sh_addr =grub_host_to_target_addr (target_addr + layout->kernel_size); shdr->sh_offset =grub_host_to_target_addr (program_size + header_size); - shdr->sh_size =grub_host_to_target32 (XEN_NOTE_SIZE ); +if (image_target->id ==IMAGE_XEN ) + shdr->sh_size =grub_host_to_target32 (XEN_NOTE_SIZE ); +else + shdr->sh_size =grub_host_to_target32 (XENPVH_NOTE_SIZE ); shdr->sh_link =grub_host_to_target32 (0 ); shdr->sh_info =grub_host_to_target32 (0 ); shdr->sh_addralign =grub_host_to_target32 (image_target->voidp_sizeof);util/mkimage.c +18
-0@@ -133,6 +133,24 @@ static const struct grub_install_image_target_desc image_targets[] = .default_compression = GRUB_COMPRESSION_LZMA }, { + .dirname = "i386-xenpvh", + .names = { "i386-xenpvh", NULL }, + .voidp_sizeof = 4, + .bigendian = 0, + .id = IMAGE_XENPVH, + .flags = PLATFORM_FLAGS_NONE, + .total_module_size = TARGET_NO_FIELD, + .decompressor_compressed_size = TARGET_NO_FIELD, + .decompressor_uncompressed_size = TARGET_NO_FIELD, + .decompressor_uncompressed_addr = TARGET_NO_FIELD, + .elf_target = EM_386, + .section_align = 1, + .vaddr_offset = 0, + .link_addr = GRUB_KERNEL_I386_XENPVH_LINK_ADDR, + .mod_align = GRUB_KERNEL_I386_XENPVH_MOD_ALIGN, + .link_align = 4 + }, + { .dirname ="i386-pc" , .names = { "i386-pc-pxe", NULL }, .voidp_sizeof = 4,
util/mkimage.c grub_install_generate_image (const char *dir, const char *prefix, · line 883
Quoted 7 lines
util/mkimage.c +2
-1@@ -860,7 +878,8 @@ grub_install_generate_image (const char *dir, const char *prefix,else kernel_img =grub_mkimage_load_image64 (kernel_path, total_module_size, &layout, image_target); -if (image_target->id ==IMAGE_XEN && layout.align <4096 ) +if ((image_target->id ==IMAGE_XEN || image_target->id ==IMAGE_XENPVH ) && + layout.align <4096 ) layout.align =4096 ;
Could you use some kind of PAGE_SIZE instead of 4096 here?
Daniel
Juergen Gross
maintainerPATCH 7/8 xenpvh: support grub-install for xenpvh
In reply to Juergen GrossAdd xenpvh support to grub-install.
--- include/grub/util/install.h | 1 + util/grub-install-common.c | 1 + util/grub-install.c | 7 +++++++ 3 files changed, 9 insertions(+)
include/grub/util/install.h +1 -0
@@ -100,6 +100,7 @@ enum grub_install_platGRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS ,GRUB_INSTALL_PLATFORM_I386_XEN ,GRUB_INSTALL_PLATFORM_X86_64_XEN , +GRUB_INSTALL_PLATFORM_I386_XENPVH ,GRUB_INSTALL_PLATFORM_ARM64_EFI ,GRUB_INSTALL_PLATFORM_ARM_COREBOOT ,GRUB_INSTALL_PLATFORM_MAX
util/grub-install-common.c +1 -0
@@ -662,6 +662,7 @@ static struct [GRUB_INSTALL_PLATFORM_X86_64_EFI] = { "x86_64", "efi" }, [GRUB_INSTALL_PLATFORM_I386_XEN] = { "i386", "xen" }, [GRUB_INSTALL_PLATFORM_X86_64_XEN] = { "x86_64", "xen" }, + [GRUB_INSTALL_PLATFORM_I386_XENPVH] = { "i386", "xenpvh" }, [GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON] = { "mipsel", "loongson" }, [GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS] = { "mipsel", "qemu_mips" }, [GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS] = { "mips", "qemu_mips" },
util/grub-install.c +7 -0
@@ -496,6 +496,7 @@ have_bootdev (enum grub_install_plat pl)case GRUB_INSTALL_PLATFORM_I386_XEN :case GRUB_INSTALL_PLATFORM_X86_64_XEN : +case GRUB_INSTALL_PLATFORM_I386_XENPVH :return 0 ;/* pacify warning. */
@@ -913,6 +914,7 @@ main (int argc, char *argv[])case GRUB_INSTALL_PLATFORM_ARM_UBOOT :case GRUB_INSTALL_PLATFORM_I386_XEN :case GRUB_INSTALL_PLATFORM_X86_64_XEN : +case GRUB_INSTALL_PLATFORM_I386_XENPVH :break ;case GRUB_INSTALL_PLATFORM_I386_QEMU :
@@ -960,6 +962,7 @@ main (int argc, char *argv[])case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS :case GRUB_INSTALL_PLATFORM_I386_XEN :case GRUB_INSTALL_PLATFORM_X86_64_XEN : +case GRUB_INSTALL_PLATFORM_I386_XENPVH :free (install_device); install_device =NULL ;break ;
@@ -1477,6 +1480,7 @@ main (int argc, char *argv[])case GRUB_INSTALL_PLATFORM_ARM_UBOOT :case GRUB_INSTALL_PLATFORM_I386_XEN :case GRUB_INSTALL_PLATFORM_X86_64_XEN : +case GRUB_INSTALL_PLATFORM_I386_XENPVH :grub_util_warn ("%s" ,_ ("no hints available for your platform. Expect reduced performance" ));break ;/* pacify warning. */
@@ -1568,6 +1572,7 @@ main (int argc, char *argv[])case GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275 :case GRUB_INSTALL_PLATFORM_I386_XEN :case GRUB_INSTALL_PLATFORM_X86_64_XEN : +case GRUB_INSTALL_PLATFORM_I386_XENPVH : core_name ="core.elf" ; snprintf (mkimage_target, sizeof (mkimage_target), "%s-%s",
@@ -1660,6 +1665,7 @@ main (int argc, char *argv[])case GRUB_INSTALL_PLATFORM_SPARC64_IEEE1275 :case GRUB_INSTALL_PLATFORM_I386_XEN :case GRUB_INSTALL_PLATFORM_X86_64_XEN : +case GRUB_INSTALL_PLATFORM_I386_XENPVH :break ;/* pacify warning. */ case GRUB_INSTALL_PLATFORM_MAX :
@@ -1918,6 +1924,7 @@ main (int argc, char *argv[])case GRUB_INSTALL_PLATFORM_I386_QEMU :case GRUB_INSTALL_PLATFORM_I386_XEN :case GRUB_INSTALL_PLATFORM_X86_64_XEN : +case GRUB_INSTALL_PLATFORM_I386_XENPVH :grub_util_warn ("%s" ,_ ("WARNING: no platform-specific install was performed" ));break ;
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 7/8] xenpvh: support grub-install for xenpvh
Quoted 3 lines · Juergen Gross
Add xenpvh support to grub-install.
Signed-off-by Juergen Gross <[email protected]>
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 7/8] xenpvh: support grub-install for xenpvh
In reply to Juergen GrossQuoted 3 lines · Juergen Gross
Add xenpvh support to grub-install.
Signed-off-by Juergen Gross <[email protected]>
Daniel
Juergen Gross
maintainerPATCH 8/8 xenpvh: add support to configure
In reply to Juergen GrossSupport platform i386/xenpvh in configure.
--- configure.ac | 3 +++ 1 file changed, 3 insertions(+)
configure.ac +3 -0
@@ -147,6 +147,7 @@ case "$target_cpu"-"$platform" in i386-efi) ;; x86_64-efi) ;; i386-xen) ;; + i386-xenpvh) ;; x86_64-xen) ;; i386-pc) ;; i386-multiboot) ;;
@@ -215,6 +216,7 @@ case "$platform" in multiboot) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MULTIBOOT=1" ;; efi) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_EFI=1" ;; xen) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_XEN=1" ;; + xenpvh) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_XENPVH=1" ;; ieee1275) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_IEEE1275=1" ;; uboot) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_UBOOT=1" ;; qemu) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_QEMU=1" ;;
@@ -1908,6 +1910,7 @@ AM_CONDITIONAL([COND_i386_coreboot], [test x$target_cpu = xi386 -a x$platform = AM_CONDITIONAL([COND_i386_multiboot], [test x$target_cpu = xi386 -a x$platform = xmultiboot]) AM_CONDITIONAL([COND_x86_64_efi], [test x$target_cpu = xx86_64 -a x$platform = xefi]) AM_CONDITIONAL([COND_i386_xen], [test x$target_cpu = xi386 -a x$platform = xxen]) +AM_CONDITIONAL([COND_i386_xenpvh], [test x$target_cpu = xi386 -a x$platform = xxenpvh]) AM_CONDITIONAL([COND_x86_64_xen], [test x$target_cpu = xx86_64 -a x$platform = xxen]) AM_CONDITIONAL([COND_mips_loongson], [test x$target_cpu = xmipsel -a x$platform = xloongson]) AM_CONDITIONAL([COND_mips_qemu_mips], [test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")" -a x$platform = xqemu_mips])
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 8/8] xenpvh: add support to configure
Quoted 3 lines · Juergen Gross
Support platform i386/xenpvh in configure.
Signed-off-by Juergen Gross <[email protected]>
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 8/8] xenpvh: add support to configure
In reply to Juergen GrossQuoted 3 lines · Juergen Gross
Support platform i386/xenpvh in configure.
Signed-off-by Juergen Gross <[email protected]>
Daniel
Quoted 5 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
Quoted 7 lines
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
So, may I review the patches or should I hold on? And could you provide a link to the "Linux kernel patches" mentioned above?
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerQuoted 11 lines · Daniel Kiper
Quoted 10 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
Quoted 5 lines
Quoted 2 lines
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
So, may I review the patches or should I hold on? And could you provide a link to the "Linux kernel patches" mentioned above?
Please review!
The Linux patches are available at:
https://lists.xen.org/archives/html/xen-devel/2017-11/msg01681.html
With the additional Xen patch
https://lists.xen.org/archives/html/xen-devel/2017-11/msg01807.html
the complete setup can be tested.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 12 lines · Juergen Gross
Quoted 11 lines · Daniel Kiper
Quoted 10 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
So, may I review the patches or should I hold on? And could you provide a link to the "Linux kernel patches" mentioned above?
Please review!
Will do in a week or so.
Quoted 9 lines
The Linux patches are available at:
https://lists.xen.org/archives/html/xen-devel/2017-11/msg01681.html
With the additional Xen patch
https://lists.xen.org/archives/html/xen-devel/2017-11/msg01807.html
the complete setup can be tested.
Thanks,
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 16 lines · Daniel Kiper
Quoted 15 lines · Juergen Gross
Quoted 14 lines · Daniel Kiper
Quoted 12 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
So, may I review the patches or should I hold on? And could you provide a link to the "Linux kernel patches" mentioned above?
Please review!
Will do in a week or so.
Swamped by some urgent internal work. I will try to review this before Xmas but if it do not happen then I will do it in the first halt of January. Sorry for delays.
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 16 lines · Daniel Kiper
Quoted 15 lines · Juergen Gross
Quoted 14 lines · Daniel Kiper
Quoted 12 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
So, may I review the patches or should I hold on? And could you provide a link to the "Linux kernel patches" mentioned above?
Please review!
Will do in a week or so.
Swamped by some urgent internal work. I will try to review this before Xmas but if it do not happen then I will do it in the first halt of January. Sorry for delays.
Daniel
Juergen Gross
maintainerQuoted 20 lines · Daniel Kiper
Quoted 19 lines · Daniel Kiper
Quoted 18 lines · Juergen Gross
Quoted 16 lines · Daniel Kiper
Quoted 5 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
Quoted 7 lines
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
So, may I review the patches or should I hold on? And could you provide a link to the "Linux kernel patches" mentioned above?
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Please review!
Will do in a week or so.
Swamped by some urgent internal work. I will try to review this before Xmas but if it do not happen then I will do it in the first halt of January. Sorry for delays.
Thanks.
BTW: the Linux kernel patches have been accepted by the x86 maintainers.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerQuoted 20 lines · Daniel Kiper
Quoted 19 lines · Daniel Kiper
Quoted 18 lines · Juergen Gross
Quoted 16 lines · Daniel Kiper
Quoted 5 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
Quoted 7 lines
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
So, may I review the patches or should I hold on? And could you provide a link to the "Linux kernel patches" mentioned above?
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Please review!
Will do in a week or so.
Swamped by some urgent internal work. I will try to review this before Xmas but if it do not happen then I will do it in the first halt of January. Sorry for delays.
Thanks.
BTW: the Linux kernel patches have been accepted by the x86 maintainers.
Juergen
Quoted 25 lines · Juergen Gross
Quoted 24 lines · Daniel Kiper
Quoted 22 lines · Daniel Kiper
Quoted 12 lines · Juergen Gross
Quoted 11 lines · Daniel Kiper
Quoted 10 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
So, may I review the patches or should I hold on? And could you provide a link to the "Linux kernel patches" mentioned above?
Please review!
Will do in a week or so.
Quoted 7 lines
Quoted 3 lines
Swamped by some urgent internal work. I will try to review this before Xmas but if it do not happen then I will do it in the first halt of January. Sorry for delays.
Thanks.
BTW: the Linux kernel patches have been accepted by the x86 maintainers.
Perfect! Could you send me their commit ids?
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 25 lines · Juergen Gross
Quoted 24 lines · Daniel Kiper
Quoted 22 lines · Daniel Kiper
Quoted 12 lines · Juergen Gross
Quoted 11 lines · Daniel Kiper
Quoted 10 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
So, may I review the patches or should I hold on? And could you provide a link to the "Linux kernel patches" mentioned above?
Please review!
Will do in a week or so.
Quoted 7 lines
Quoted 3 lines
Swamped by some urgent internal work. I will try to review this before Xmas but if it do not happen then I will do it in the first halt of January. Sorry for delays.
Thanks.
BTW: the Linux kernel patches have been accepted by the x86 maintainers.
Perfect! Could you send me their commit ids?
Daniel
Juergen Gross
maintainerQuoted 30 lines · Daniel Kiper
Quoted 29 lines · Juergen Gross
Quoted 27 lines · Daniel Kiper
Quoted 16 lines · Daniel Kiper
Quoted 15 lines · Juergen Gross
Quoted 14 lines · Daniel Kiper
Quoted 12 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
So, may I review the patches or should I hold on? And could you provide a link to the "Linux kernel patches" mentioned above?
Please review!
Will do in a week or so.
Swamped by some urgent internal work. I will try to review this before Xmas but if it do not happen then I will do it in the first halt of January. Sorry for delays.
Quoted 5 lines
Quoted 3 lines
Thanks.
BTW: the Linux kernel patches have been accepted by the x86 maintainers.
Perfect! Could you send me their commit ids?
Right now they are in the tip tree in the x86/boot branch:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/boot
Commit-Ids are:2f74cbf947f45fa082dda8eac1a1f1299a372f490c89cf36424f7c1177de8a5712514d7cc2eb369f88750a6c33f813b815516990f01fb5ee488c477e930ba49b2ce7b09a5eddc21385fd944ba6b4e829
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerQuoted 30 lines · Daniel Kiper
Quoted 29 lines · Juergen Gross
Quoted 27 lines · Daniel Kiper
Quoted 16 lines · Daniel Kiper
Quoted 15 lines · Juergen Gross
Quoted 14 lines · Daniel Kiper
Quoted 12 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
So, may I review the patches or should I hold on? And could you provide a link to the "Linux kernel patches" mentioned above?
Please review!
Will do in a week or so.
Swamped by some urgent internal work. I will try to review this before Xmas but if it do not happen then I will do it in the first halt of January. Sorry for delays.
Quoted 5 lines
Quoted 3 lines
Thanks.
BTW: the Linux kernel patches have been accepted by the x86 maintainers.
Perfect! Could you send me their commit ids?
Right now they are in the tip tree in the x86/boot branch:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/boot
Commit-Ids are:2f74cbf947f45fa082dda8eac1a1f1299a372f490c89cf36424f7c1177de8a5712514d7cc2eb369f88750a6c33f813b815516990f01fb5ee488c477e930ba49b2ce7b09a5eddc21385fd944ba6b4e829
Juergen
Quoted 39 lines · Juergen Gross
Quoted 30 lines · Daniel Kiper
Quoted 29 lines · Juergen Gross
Quoted 27 lines · Daniel Kiper
Quoted 16 lines · Daniel Kiper
Quoted 15 lines · Juergen Gross
Quoted 14 lines · Daniel Kiper
Quoted 12 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
So, may I review the patches or should I hold on? And could you provide a link to the "Linux kernel patches" mentioned above?
Please review!
Will do in a week or so.
Swamped by some urgent internal work. I will try to review this before Xmas but if it do not happen then I will do it in the first halt of January. Sorry for delays.
Quoted 5 lines
Quoted 3 lines
Thanks.
BTW: the Linux kernel patches have been accepted by the x86 maintainers.
Perfect! Could you send me their commit ids?
Right now they are in the tip tree in the x86/boot branch:
Quoted 7 lines
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitx86/bootCommit-Ids are:
2f74cbf947f45fa082dda8eac1a1f1299a372f490c89cf36424f7c1177de8a5712514d7cc2eb369f88750a6c33f813b815516990f01fb5ee488c477e930ba49b2ce7b09a5eddc21385fd944ba6b4e829
My schedule was completely destroyed by many unexpected work and family issues. It looks that I am recovering slowly. I am going to take a look at the patches in a week or two. Should I review these ones or are you going to post something new?
Sorry for delays.
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerQuoted 48 lines · Daniel Kiper
Quoted 39 lines · Juergen Gross
Quoted 30 lines · Daniel Kiper
Quoted 29 lines · Juergen Gross
Quoted 27 lines · Daniel Kiper
Quoted 16 lines · Daniel Kiper
Quoted 15 lines · Juergen Gross
Quoted 14 lines · Daniel Kiper
Quoted 12 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
So, may I review the patches or should I hold on? And could you provide a link to the "Linux kernel patches" mentioned above?
Please review!
Will do in a week or so.
Swamped by some urgent internal work. I will try to review this before Xmas but if it do not happen then I will do it in the first halt of January. Sorry for delays.
Quoted 5 lines
Quoted 3 lines
Thanks.
BTW: the Linux kernel patches have been accepted by the x86 maintainers.
Perfect! Could you send me their commit ids?
Right now they are in the tip tree in the x86/boot branch:
Quoted 7 lines
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitx86/bootCommit-Ids are:
2f74cbf947f45fa082dda8eac1a1f1299a372f490c89cf36424f7c1177de8a5712514d7cc2eb369f88750a6c33f813b815516990f01fb5ee488c477e930ba49b2ce7b09a5eddc21385fd944ba6b4e829
Quoted 4 lines
My schedule was completely destroyed by many unexpected work and family issues. It looks that I am recovering slowly. I am going to take a look at the patches in a week or two. Should I review these ones or are you going to post something new?
There is only one issue which has to be fixed: passing on the RSDP address to the kernel will require some more work, as extending struct linux_kernel_header won't be so easy (multiple distros seem to have shipped a grub2 with some patches clobbering the data directly after that struct in the kernel). So patch 2 will be a little bit more complicated due to the need to pass the interface version known by grub2 back to the kernel.
I'm not sure when I'll be able to do that work, as Meltdown has led to quite some work on my side. :-(
For all other patches I'm not aware of any modifications needed.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerQuoted 48 lines · Daniel Kiper
Quoted 39 lines · Juergen Gross
Quoted 30 lines · Daniel Kiper
Quoted 29 lines · Juergen Gross
Quoted 27 lines · Daniel Kiper
Quoted 16 lines · Daniel Kiper
Quoted 15 lines · Juergen Gross
Quoted 14 lines · Daniel Kiper
Quoted 12 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
As the related Linux kernel patches are not yet accepted please wait for this to happen before applying the series.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
So, may I review the patches or should I hold on? And could you provide a link to the "Linux kernel patches" mentioned above?
Please review!
Will do in a week or so.
Swamped by some urgent internal work. I will try to review this before Xmas but if it do not happen then I will do it in the first halt of January. Sorry for delays.
Quoted 5 lines
Quoted 3 lines
Thanks.
BTW: the Linux kernel patches have been accepted by the x86 maintainers.
Perfect! Could you send me their commit ids?
Right now they are in the tip tree in the x86/boot branch:
Quoted 7 lines
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitx86/bootCommit-Ids are:
2f74cbf947f45fa082dda8eac1a1f1299a372f490c89cf36424f7c1177de8a5712514d7cc2eb369f88750a6c33f813b815516990f01fb5ee488c477e930ba49b2ce7b09a5eddc21385fd944ba6b4e829
Quoted 4 lines
My schedule was completely destroyed by many unexpected work and family issues. It looks that I am recovering slowly. I am going to take a look at the patches in a week or two. Should I review these ones or are you going to post something new?
There is only one issue which has to be fixed: passing on the RSDP address to the kernel will require some more work, as extending struct linux_kernel_header won't be so easy (multiple distros seem to have shipped a grub2 with some patches clobbering the data directly after that struct in the kernel). So patch 2 will be a little bit more complicated due to the need to pass the interface version known by grub2 back to the kernel.
I'm not sure when I'll be able to do that work, as Meltdown has led to quite some work on my side. :-(
For all other patches I'm not aware of any modifications needed.
Juergen
Hi Juergen,
Sorry for huge delay. It looks that I am recovering slowly and probably I will have more time for reviews.
Quoted 9 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
AIUI PVH is quite generic idea and can be implemented by different virtualization platforms. IIRC Maran Wilson works on PVH for KVM. So, would not it make more sense to have platform independent GRUB2 PVH code and then on top of that build Xen and KVM support? Could you do that?
Thank you for your work.
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Hi Juergen,
Sorry for huge delay. It looks that I am recovering slowly and probably I will have more time for reviews.
Quoted 9 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
AIUI PVH is quite generic idea and can be implemented by different virtualization platforms. IIRC Maran Wilson works on PVH for KVM. So, would not it make more sense to have platform independent GRUB2 PVH code and then on top of that build Xen and KVM support? Could you do that?
Thank you for your work.
Daniel
Juergen Gross
maintainerQuoted 16 lines · Daniel Kiper
Hi Juergen,
Sorry for huge delay. It looks that I am recovering slowly and probably I will have more time for reviews.
Quoted 9 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
Quoted 5 lines
AIUI PVH is quite generic idea and can be implemented by different virtualization platforms. IIRC Maran Wilson works on PVH for KVM. So, would not it make more sense to have platform independent GRUB2 PVH code and then on top of that build Xen and KVM support? Could you do that?
Finally I have some time to work on this series again.
I don't think this makes sense now for the following reasons:
- Maran's series is stalled
- The main work is hypervisor specific and I have no idea right now what would be needed for KVM
- Maran's series was targeted for a quick boot of the kernel right from qemu without any other boot loader
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerQuoted 16 lines · Daniel Kiper
Hi Juergen,
Sorry for huge delay. It looks that I am recovering slowly and probably I will have more time for reviews.
Quoted 9 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
Quoted 5 lines
AIUI PVH is quite generic idea and can be implemented by different virtualization platforms. IIRC Maran Wilson works on PVH for KVM. So, would not it make more sense to have platform independent GRUB2 PVH code and then on top of that build Xen and KVM support? Could you do that?
Finally I have some time to work on this series again.
I don't think this makes sense now for the following reasons:
- Maran's series is stalled
- The main work is hypervisor specific and I have no idea right now what would be needed for KVM
- Maran's series was targeted for a quick boot of the kernel right from qemu without any other boot loader
Juergen
Quoted 17 lines · Juergen Gross
Quoted 16 lines · Daniel Kiper
Hi Juergen,
Sorry for huge delay. It looks that I am recovering slowly and probably I will have more time for reviews.
Quoted 9 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
Quoted 7 lines
Quoted 5 lines
AIUI PVH is quite generic idea and can be implemented by different virtualization platforms. IIRC Maran Wilson works on PVH for KVM. So, would not it make more sense to have platform independent GRUB2 PVH code and then on top of that build Xen and KVM support? Could you do that?
Finally I have some time to work on this series again.
Great! I was a bit afraid that it will never happen...
Quoted 7 lines
I don't think this makes sense now for the following reasons:
- Maran's series is stalled
- The main work is hypervisor specific and I have no idea right now what would be needed for KVM
- Maran's series was targeted for a quick boot of the kernel right from qemu without any other boot loader
OK, so, let's leave it aside.
I have seen new patchset. Thanks a lot! I will take a look at it this or next week.
Daniel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 17 lines · Juergen Gross
Quoted 16 lines · Daniel Kiper
Hi Juergen,
Sorry for huge delay. It looks that I am recovering slowly and probably I will have more time for reviews.
Quoted 9 lines · Juergen Gross
This patch series adds support for booting Linux as PVH guest.
Similar to i386/xen and x86_64/xen platforms the new i386/xenpvh platform grub is booted as a standalone image directly by Xen.
For booting Linux kernel it is using the standard linux kernel loader. The only modification of the linux loader is to pass the ACPI RSDP address via boot parameters to the kernel, as that table might not be located at the usual physical address just below 1MB.
Quoted 7 lines
Quoted 5 lines
AIUI PVH is quite generic idea and can be implemented by different virtualization platforms. IIRC Maran Wilson works on PVH for KVM. So, would not it make more sense to have platform independent GRUB2 PVH code and then on top of that build Xen and KVM support? Could you do that?
Finally I have some time to work on this series again.
Great! I was a bit afraid that it will never happen...
Quoted 7 lines
I don't think this makes sense now for the following reasons:
- Maran's series is stalled
- The main work is hypervisor specific and I have no idea right now what would be needed for KVM
- Maran's series was targeted for a quick boot of the kernel right from qemu without any other boot loader
OK, so, let's leave it aside.
I have seen new patchset. Thanks a lot! I will take a look at it this or next week.
Daniel