xentrace/xenalyze support on ARM
v2 cover xentrace/xenalyze support on ARM
This patch set adds support for xentrace/xenalyze to the ARM platform.
The Xen heap memory mapping, timestamping, and P2M translation needed by xentrace is corrected for operation on the ARM platform using the x86 platform as reference. Trace buffer initialization is added to setup.c, XENMAPSPACE_gmfn_foreign page mapping and address translation for DOMID_XEN is corrected in mm.c and p2m.c, and timestamping for the trace buffers is corrected in time.c/.h.
Finally the xenaylze makefile is configured to build the tool for ARM.
---
Changed since v1:
* Removed Flask changes as deemed uncessesary and unclear in purpose
* Corrected all commit messages to be line limited to 72 chars
* Implimented v1 review comments as indicated in each file's commit log.
Benjamin Sanda (9):
xenalyze: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
tools/xentrace/Makefile | 3 +-- xen/arch/arm/mm.c | 3 ++- xen/arch/arm/p2m.c | 35 +++++++++++++++++++++++++++---- xen/arch/arm/setup.c | 3 +++ xen/arch/arm/time.c | 9 +++++++- xen/arch/x86/mm.c | 48 ------------------------------------------- xen/common/page_alloc.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++ xen/include/asm-arm/time.h | 11 +++++----- xen/include/xen/mm.h | 2 ++ 9 files changed, 103 insertions(+), 62 deletions(-)
Signature · 7 lines
2.5.0 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
v2 cover xentrace/xenalyze support on ARM
This patch set adds support for xentrace/xenalyze to the ARM platform.
The Xen heap memory mapping, timestamping, and P2M translation needed by xentrace is corrected for operation on the ARM platform using the x86 platform as reference. Trace buffer initialization is added to setup.c, XENMAPSPACE_gmfn_foreign page mapping and address translation for DOMID_XEN is corrected in mm.c and p2m.c, and timestamping for the trace buffers is corrected in time.c/.h.
Finally the xenaylze makefile is configured to build the tool for ARM.
Benjamin Sanda (9):
xenalyze: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
tools/xentrace/Makefile | 3 +-- xen/arch/arm/mm.c | 3 ++- xen/arch/arm/p2m.c | 35 +++++++++++++++++++++++++++---- xen/arch/arm/setup.c | 3 +++ xen/arch/arm/time.c | 9 +++++++- xen/arch/x86/mm.c | 48 ------------------------------------------- xen/common/page_alloc.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++ xen/include/asm-arm/time.h | 11 +++++----- xen/include/xen/mm.h | 2 ++ 9 files changed, 103 insertions(+), 62 deletions(-)
Signature · 7 lines
2.5.0 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH v2 1/9 xenalyze: Support for ARM platform
In reply to Benjamin SandaModified to provide building of the xenalyze binary for ARM platforms. This was done in conjunction with patches to xentrace allowing its use on ARM. The xenalyze binary is now built as part of the BIN list.
---
Changed since v1:
* changed xenalyze target from SBIN to BIN
* removed uneeded $(BIN-y) from BIN list
--- tools/xentrace/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
tools/xentrace/Makefile +1 -2
@@ -9,8 +9,7 @@ LDLIBS += $(LDLIBS_libxenevtchn) LDLIBS += $(LDLIBS_libxenctrl) LDLIBS += $(ARGP_LDFLAGS) -BIN-$(CONFIG_X86) = xenalyze -BIN = $(BIN-y) +BIN = xenalyze SBIN = xentrace xentrace_setsize LIBBIN = xenctx SCRIPTS = xentrace_format
Signature · 7 lines
2.5.0 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [PATCH V2 1/9] xenalyze: Support for ARM platform
I would retitle this patch:
xentrace: build for both x86 and ARM platform
to be more specific.
Quoted 6 lines · Benjamin Sanda
Modified to provide building of the xenalyze binary for ARM platforms. This was done in conjunction with patches to xentrace allowing its use on ARM. The xenalyze binary is now built as part of the BIN list.
Signed-off-by Benjamin Sanda <[email protected]>
And I think this patch is better to be moved to the end of your series because it depends on hypervisor support.
Wei.
Quoted 25 lines
---
Changed since v1:
* changed xenalyze target from SBIN to BIN
* removed uneeded $(BIN-y) from BIN list--- tools/xentrace/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)tools/xentrace/Makefile +1
-2@@ -9,8 +9,7 @@ LDLIBS += $(LDLIBS_libxenevtchn) LDLIBS += $(LDLIBS_libxenctrl) LDLIBS += $(ARGP_LDFLAGS) -BIN-$(CONFIG_X86) = xenalyze -BIN = $(BIN-y) +BIN = xenalyze SBIN = xentrace xentrace_setsize LIBBIN = xenctx SCRIPTS = xentrace_formatSignature · 1 line
2.5.0
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH V2 1/9] xenalyze: Support for ARM platform
Quoted 3 lines · Wei Liu
I would retitle this patch:
xentrace: build for both x86 and ARM platform
^
xenalyzeSorry for the typo.
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH v2 2/9 xentrace: Support for ARM platform
In reply to Benjamin SandaModified xenmem_add_to_physmap_one() to provide support for xentrace on the ARM platform. Checks for DOMID_XEN added via new function, get_pg_owner, ported and commonized from x86 code base. This provides correct calls to rcu_lock_domain() when DOMID_XEN is requested.
---
Changed since v1:
* Moved get_pg_owner() from the arch specific mm.c source files into the common page_alloc.c source. This was done as get_pg_owner() is now needed by both architectures and is essentially identical in both.
* Moved put_pg_owner from the arch specific mm.c source files into the common page_alloc.c source to make available to all platforms.
* Removed DOMID_XEN check from page_to_mfn(page) call in xenmem_add_to_physmap_one() per review comment (check considered to be in excess of need).
* Removed forward declare of get_pg_owner from mm.c (arm) as it is now in the mm.h common header.
--- xen/arch/arm/mm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
xen/arch/arm/mm.c +2 -1
@@ -1099,7 +1099,8 @@ int xenmem_add_to_physmap_one( {struct domain *od;p2m_type_t p2mt; - od =rcu_lock_domain_by_any_id (foreign_domid); + od =get_pg_owner (foreign_domid); +if ( od ==NULL )return -ESRCH ;
Signature · 7 lines
2.5.0 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH v2 3/9 xentrace: Support for ARM platform
In reply to Benjamin SandaMoved get_pg_owner() and put_pg_owner() from the arch specific mm.c source files into the common page_alloc.c source. This was done as theses functions are now needed by both architectures to support xentrace on the ARM platform. Forward declarations were added to mm.h.
--- xen/arch/x86/mm.c | 48 ------------------------------------------------ 1 file changed, 48 deletions(-)
xen/arch/x86/mm.c +0 -48
@@ -2998,54 +2998,6 @@ int new_guest_cr3(unsigned long mfn)return rc; } -static struct domain *get_pg_owner (domid_t domid) -{ -struct domain *pg_owner =NULL , *curr = current->domain; - -if (likely (domid ==DOMID_SELF ) ) - { - pg_owner =rcu_lock_current_domain (); - goto out; - } - -if (unlikely (domid == curr->domain_id) ) - { -MEM_LOG ("Cannot specify itself as foreign domain" ); - goto out; - } - -if ( !is_pvh_domain (curr) &&unlikely (paging_mode_translate (curr)) ) - { -MEM_LOG ("Cannot mix foreign mappings with translated domains" ); - goto out; - } - -switch ( domid ) - { -case DOMID_IO : - pg_owner =rcu_lock_domain (dom_io); -break ; -case DOMID_XEN : - pg_owner =rcu_lock_domain (dom_xen); -break ; -default : -if ( (pg_owner =rcu_lock_domain_by_id (domid)) ==NULL ) - { -MEM_LOG ("Unknown domain '%u'" , domid); -break ; - } -break ; - } - - out: -return pg_owner; -} - -static void put_pg_owner (struct domain *pg_owner) -{ -rcu_unlock_domain (pg_owner); -} -static inline int vcpumask_to_pcpumask (struct domain *d,XEN_GUEST_HANDLE_PARAM (const_void) bmap,cpumask_t *pmask) {
Signature · 7 lines
2.5.0 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH v2 4/9 xentrace: Support for ARM platform
In reply to Benjamin SandaMoved get_pg_owner() and put_pg_owner() from the arch specific mm.c source files into the common page_alloc.c source. This was done as theses functions are now needed by both architectures to support xentrace on the ARM platform. Forward declarations were added to mm.h.
One conditional compilation check was added in get_pg_owner() for the is_pvh_domain(curr) check which is only valid to perform on X86 platforms.
--- xen/common/page_alloc.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)
xen/common/page_alloc.c +51 -0
@@ -145,6 +145,7 @@#ifdef CONFIG_X86 #include <asm/p2m.h> #include <asm/setup.h> /* for highmem_start only */ +#include <asm/paging.h> #else #define p2m_pod_offline_or_broken_hit (pg) 0#define p2m_pod_offline_or_broken_replace (pg) BUG_ON(pg != NULL)
@@ -1996,6 +1997,56 @@ static __init int register_heap_trigger(void) }__initcall (register_heap_trigger); +struct domain *get_pg_owner (domid_t domid) +{ +struct domain *pg_owner =NULL , *curr = current->domain; + +if (likely (domid ==DOMID_SELF ) ) + { + pg_owner =rcu_lock_current_domain (); + goto out; + } + +if (unlikely (domid == curr->domain_id) ) + { +gdprintk (XENLOG_WARNING ,"Cannot specify itself as foreign domain" ); + goto out; + } + +#ifdef CONFIG_X86 +if ( !is_pvh_domain (curr) &&unlikely (paging_mode_translate (curr)) ) + { +gdprintk (XENLOG_WARNING ,"Cannot mix foreign mappings with translated domains" ); + goto out; + } +#endif + +switch ( domid ) + { +case DOMID_IO : + pg_owner =rcu_lock_domain (dom_io); +break ; +case DOMID_XEN : + pg_owner =rcu_lock_domain (dom_xen); +break ; +default : +if ( (pg_owner =rcu_lock_domain_by_id (domid)) ==NULL ) + { +gdprintk (XENLOG_WARNING ,"Unknown domain '%u'" , domid); +break ; + } +break ; + } + + out: +return pg_owner; +} + +void put_pg_owner (struct domain *pg_owner) +{ +rcu_unlock_domain (pg_owner); +} +/* * Local variables: * mode: C
Signature · 7 lines
2.5.0 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH v2 5/9 xentrace: Support for ARM platform
In reply to Benjamin SandaMoved get_pg_owner() and put_pg_owner() from the arch specific mm.c source files into the common page_alloc.c source. This was done as theses functions are now needed by both architectures to support xentrace on the ARM platform. Forward declarations were added to mm.h.
--- xen/include/xen/mm.h | 2 ++ 1 file changed, 2 insertions(+)
xen/include/xen/mm.h +2 -0
@@ -505,6 +505,8 @@ void scrub_one_page(struct page_info *);int xenmem_add_to_physmap_one (struct domain *d,unsigned int space,domid_t foreign_domid,unsigned long idx,xen_pfn_t gpfn); +struct domain *get_pg_owner (domid_t domid); +void put_pg_owner (struct domain *pg_owner);/* Returns 1 on success, 0 on error, negative if the ring * for event propagation is full in the presence of paging */
Signature · 7 lines
2.5.0 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH v2 6/9 xentrace: Support for ARM platform
In reply to Benjamin SandaModified to provide support for xentrace on the ARM platform. Moved get_cycles() to time.c and modified to return the core timestamp tick count for use by the trace buffer timestamping routines in xentrace. get_cycles() was moved to the C file to avoid including the register specific header file in time.h and to commonize it with the get_s_time() function.
get_s_time() was also modified to now use the updated get_cycles() to retrieve the tick count instead of directly reading it.
--- xen/arch/arm/time.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
xen/arch/arm/time.c +8 -1
@@ -192,10 +192,17 @@ int __init init_xen_time(void)/* Return number of nanoseconds since boot */ s_time_t get_s_time (void ) { -uint64_t ticks =READ_SYSREG64 (CNTPCT_EL0 ) - boot_count; +cycles_t ticks =get_cycles ();return ticks_to_ns (ticks); } +/* Return the number of ticks since boot */ +cycles_t get_cycles (void ) +{ +/* return raw tick count of main timer */ +return READ_SYSREG64 (CNTPCT_EL0 ) - boot_count; +} +/* Set the timer to wake us up at a particular time. * Timeout is a Xen system time (nanoseconds since boot); 0 disables the timer. * Returns 1 on success; 0 if the timeout is too soon or is in the past. */
Signature · 7 lines
2.5.0 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH v2 7/9 xentrace: Support for ARM platform
In reply to Benjamin SandaModified to provide support for xentrace on the ARM platform. Moved get_cycles() to time.c and added function prototype for inclusion. get_cycles() was moved to the C file to avoid including the register specific header file in the time.h file and to commonize it with the get_s_time() function. Also defined cycles_t as uint64_t to simplify casting.
---
Changed since v1:
* Moved get_cycles() to time.c
* Added function prototype for get_cycles()
--- xen/include/asm-arm/time.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
xen/include/asm-arm/time.h +5 -6
@@ -5,12 +5,8 @@DT_MATCH_COMPATIBLE ("arm,armv7-timer" ), \DT_MATCH_COMPATIBLE ("arm,armv8-timer" ) -typedef unsigned long cycles_t ; - -static inline cycles_t get_cycles (void ) -{ -return 0 ; -} +/* Tick count type */ +typedef uint64_t cycles_t ;/* List of timer's IRQ */ enum timer_ppi
@@ -37,6 +33,9 @@ extern void init_timer_interrupt(void);/* Counter value at boot time */ extern uint64_t boot_count; +/* Get raw system tick count */ +cycles_t get_cycles (void ); +extern s_time_t ticks_to_ns (uint64_t ticks);extern uint64_t ns_to_ticks (s_time_t ns);
Signature · 7 lines
2.5.0 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH v2 8/9 xentrace: Support for ARM platform
In reply to Benjamin SandaModified p2m_lookup() to provide support for xentrace on the ARM platform. Added check for DOMID_XEN which skips PFN to MFN translation. DOMID_XEN is considered a PV guest on x86 (i.e MFN == GFN), but on ARM there is no such concept. Thus requests to DOMID_XEN on ARM use a MFN address directly and do not need translation from PFN.
Check added to determine read/write or read only page type when requesting DOMID_XEN. This is done by checking the u.inuse.type_info parameter of the requested page. The page rw/ro paddr_t type is then set accordingly.
---
Changed since v1:
* Added check to determine page rw/ro type to correctly set the paddr_t to p2m_ram_rw or p2m_ram_ro instead of assuming p2m_ram_rw
* Corrected block comment format to conform to Xen coding standard
--- xen/arch/arm/p2m.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-)
xen/arch/arm/p2m.c +31 -4
@@ -227,11 +227,38 @@ paddr_t p2m_lookup(struct domain *d, paddr_t paddr, p2m_type_t *t) {paddr_t ret;struct p2m_domain *p2m = &d->arch.p2m; +struct page_info *page; +unsigned long mfn; -spin_lock (&p2m->lock); - ret =__p2m_lookup (d, paddr, t); -spin_unlock (&p2m->lock); - +/* +* DOMID_XEN is considered a PV guest on x86 (i.e MFN == GFN), but +* on ARM there is no such concept. Thus requests to DOMID_XEN +* on ARM use a MFN address directly and do not need translation +* from PFN. +*/ +if (DOMID_XEN != d->domain_id) + { +spin_lock (&p2m->lock); + ret =__p2m_lookup (d, paddr, t); +spin_unlock (&p2m->lock); + } +else + { +/* retrieve the page to determine read/write or read only mapping */ + mfn = paddr >>PAGE_SHIFT ; +if (mfn_valid (mfn)) + { + page =mfn_to_page (mfn); + *t = (page->u.inuse.type_info == PGT_writable_page ? + p2m_ram_rw : p2m_ram_ro); + } +else + { + *t = p2m_invalid; + } + ret = paddr; + } +return ret; }
Signature · 7 lines
2.5.0 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH v2 9/9 xentrace: Support for ARM platform
In reply to Benjamin SandaModified to provide support for xentrace on the ARM platform. Added call to init_trace_bufs() to initialize the trace buffers for use by xentrace.
---
Changed since v1:
* No changes
--- xen/arch/arm/setup.c | 3 +++ 1 file changed, 3 insertions(+)
xen/arch/arm/setup.c +3 -0
@@ -35,6 +35,7 @@#include <xen/cpu.h> #include <xen/pfn.h> #include <xen/vmap.h> +#include <xen/trace.h> #include <xen/libfdt/libfdt.h> #include <xen/acpi.h> #include <asm/page.h>
@@ -851,6 +852,8 @@ void __init start_xen(unsigned long boot_phys_offset,/* Scrub RAM that is still free and so may go to an unprivileged domain. */ scrub_heap_pages (); +init_trace_bufs (); +init_constructors ();console_endboot ();
Signature · 7 lines
2.5.0 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 19 lines · Benjamin Sanda
This patch set adds support for xentrace/xenalyze to the ARM platform.
The Xen heap memory mapping, timestamping, and P2M translation needed by xentrace is corrected for operation on the ARM platform using the x86 platform as reference. Trace buffer initialization is added to
setup.c,XENMAPSPACE_gmfn_foreignpage mapping and address translation forDOMID_XENis corrected inmm.candp2m.c, and timestamping for the trace buffers is corrected in time.c/.h.Finally the xenaylze makefile is configured to build the tool for ARM.
---
Changed since v1:
* Removed Flask changes as deemed uncessesary and unclear in purpose
* Corrected all commit messages to be line limited to 72 chars
* Implimented v1 review comments as indicated in each file's commit log.
Quoted 10 lines
Benjamin Sanda (9):
xenalyze: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
You patches all have the same subject line. Please make them more specific. See my reply to #1 for example.
Wei.
Quoted 15 lines
tools/xentrace/Makefile | 3 +-- xen/arch/arm/mm.c | 3 ++- xen/arch/arm/p2m.c | 35 +++++++++++++++++++++++++++---- xen/arch/arm/setup.c | 3 +++ xen/arch/arm/time.c | 9 +++++++- xen/arch/x86/mm.c | 48 ------------------------------------------- xen/common/page_alloc.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++ xen/include/asm-arm/time.h | 11 +++++----- xen/include/xen/mm.h | 2 ++ 9 files changed, 103 insertions(+), 62 deletions(-)Signature · 1 line
2.5.0
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Hello,
Quoted 20 lines · Wei Liu
Quoted 8 lines · Benjamin Sanda
---
Changed since v1:
* Removed Flask changes as deemed uncessesary and unclear in purpose
* Corrected all commit messages to be line limited to 72 chars
* Implimented v1 review comments as indicated in each file's commit log.Quoted 10 lines
Benjamin Sanda (9):
xenalyze: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
xentrace: Support for ARM platform
Quoted 2 lines
You patches all have the same subject line. Please make them more specific. See my reply to #1 for example.
+1
Also, you should at least check that Xen still builds after applying each patch. Ideally, you also need to be careful to not break any feature currently supported. It's useful when someone needs to bisect the tree.
For instance, you use the function get_pg_owner for ARM in patch #2 but introduce the function in patch #4. This will break ARM build. So the patch #2 should be moved after #4.
Furthermore, you remove the functions get_pg_owner and put_pg_owner for x86 in patch #3 and then re-introduced them in patch #4. Therefore, the x86 will be broken after #3. In this case, it's better to have a patch that move the 2 functions from x86 to common.
Finally, please CC all the x86 maintainers (Jan and Andrew) on x86 changes. You need to manually check the CCs as under certain conditions the script get_maintainers.pl may not return all the relevant maintainers.
I will wait the next iteration of this series to review the code.
Regards,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Julien and Wei,
Quoted 10 lines
Quoted 2 lines
You patches all have the same subject line. Please make them more specific. See my reply to #1 for example.
+1
Also, you should at least check that Xen still builds after applying each patch. Ideally, you also need to be careful to not break any feature currently supported. It's useful when someone needs to bisect the tree.
Quoted 8 lines
For instance, you use the function
get_pg_ownerfor ARM in patch #2 but introduce the function in patch #4. This will break ARM build. So the patch #2 should be moved after #4.Furthermore, you remove the functions
get_pg_ownerandput_pg_ownerfor x86 in patch #3 and then re-introduced them in patch #4. Therefore, the x86 will be broken after #3. In this case, it's better to have a patch that move the 2 functions from x86 to common.
Thank you for the comments. I apologize for the errors in the patch format. This is my first time submitting a patch to Xen and I was unaware that the patch set order mattered or that I had to account for a piecewise application of the patch set. I will attempt to resubmit with this corrected and the patch names updated.
So then it is permissible to have multiple file changes in one patch/commit? E.g. a patch that removes from one file and adds to another in the same commit. I initially thought each patch/ commit was only supposed to modify one file and that's why I did it that way
Thank you,
Ben Sanda
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 21 lines · Ben Sanda
Julien and Wei,
Quoted 10 lines
Quoted 2 lines
You patches all have the same subject line. Please make them more specific. See my reply to #1 for example.
+1
Also, you should at least check that Xen still builds after applying each patch. Ideally, you also need to be careful to not break any feature currently supported. It's useful when someone needs to bisect the tree.
Quoted 8 lines
For instance, you use the function
get_pg_ownerfor ARM in patch #2 but introduce the function in patch #4. This will break ARM build. So the patch #2 should be moved after #4.Furthermore, you remove the functions
get_pg_ownerandput_pg_ownerfor x86 in patch #3 and then re-introduced them in patch #4. Therefore, the x86 will be broken after #3. In this case, it's better to have a patch that move the 2 functions from x86 to common.
Quoted 8 lines
Thank you for the comments. I apologize for the errors in the patch format. This is my first time submitting a patch to Xen and I was unaware that the patch set order mattered or that I had to account for a piecewise application of the patch set. I will attempt to resubmit with this corrected and the patch names updated.
So then it is permissible to have multiple file changes in one patch/commit? E.g. a patch that removes from one file and adds to
That's definitely allowed. Just think of each commit as a logically complete unit. It should compile. It should not break existing functionality.
Wei.
Quoted 5 lines
another in the same commit. I initially thought each patch/ commit was only supposed to modify one file and that's why I did it that way
Thank you,
Ben Sanda
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 25 lines · Ben Sanda
Julien and Wei,
Quoted 9 lines
Quoted 2 lines
You patches all have the same subject line. Please make them more specific. See my reply to #1 for example.
+1
Also, you should at least check that Xen still builds after applying each patch. Ideally, you also need to be careful to not break any feature currently supported. It's useful when someone needs to bisect the tree.
Quoted 8 lines
For instance, you use the function
get_pg_ownerfor ARM in patch #2 but introduce the function in patch #4. This will break ARM build. So the patch #2 should be moved after #4.Furthermore, you remove the functions
get_pg_ownerandput_pg_ownerfor x86 in patch #3 and then re-introduced them in patch #4. Therefore, the x86 will be broken after #3. In this case, it's better to have a patch that move the 2 functions from x86 to common.Thank you for the comments. I apologize for the errors in the patch format. This is my first time submitting a patch to Xen and I was unaware that the patch set order mattered or that I had to account for a piecewise application of the patch set. I will attempt to resubmit with this corrected and the patch names updated.
Quoted 4 lines
So then it is permissible to have multiple file changes in one patch/commit? E.g. a patch that removes from one file and adds to another in the same commit. I initially thought each patch/ commit was only supposed to modify one file and that's why I did it that way
One logical change per patch (wherever possible). It is fine to change more than one file in a patch.
In particular, your patches 3 though 5 are one logical change, "move get_pg_owner() from being x86-specific to being common".
It is an absolute must that each invidiual patch compiles and doesn't regress functionality, so the resulting patches can be bisected in the case of an error being introduced.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel