xen: do some cleanups
Subsystems (3)
Juergen Gross
maintainercover xen: do some cleanups
Remove stuff no longer needed.
Juergen Gross (3):
xen: remove tests for pvh mode in pure pv paths
xen: remove unused function xen_set_domain_pte()
xen: remove not used trace functions
arch/x86/include/asm/xen/page.h | 5 ----- arch/x86/xen/mmu_pv.c | 20 -------------------- arch/x86/xen/p2m.c | 25 +------------------------ arch/x86/xen/setup.c | 5 +---- include/trace/events/xen.h | 38 -------------------------------------- 5 files changed, 2 insertions(+), 91 deletions(-)
Signature · 1 line
2.12.3
Juergen Gross
maintainerPATCH 1/3 xen: remove tests for pvh mode in pure pv paths
Remove the last tests for XENFEAT_auto_translated_physmap in pure PV-domain specific paths. PVH V1 is gone and the feature will always be "false" in PV guests.
--- arch/x86/include/asm/xen/page.h | 3 --- arch/x86/xen/p2m.c | 25 +------------------------ arch/x86/xen/setup.c | 5 +---- 3 files changed, 2 insertions(+), 31 deletions(-)
arch/x86/include/asm/xen/page.h +0 -3
@@ -158,9 +158,6 @@ static inline unsigned long mfn_to_pfn_no_overrides(unsigned long mfn)unsigned long pfn;int ret; -if (xen_feature (XENFEAT_auto_translated_physmap)) -return mfn; -if (unlikely (mfn >= machine_to_phys_nr))return ~0 ;
arch/x86/xen/p2m.c +1 -24
@@ -212,8 +212,7 @@ void __ref xen_build_mfn_list_list(void)unsigned int level, topidx, mididx;unsigned long *mid_mfn_p; -if (xen_feature (XENFEAT_auto_translated_physmap) || - xen_start_info->flags &SIF_VIRT_P2M_4TOOLS ) +if (xen_start_info->flags &SIF_VIRT_P2M_4TOOLS )return ;/* Pre-initialize p2m_top_mfn to be completely missing */
@@ -269,9 +268,6 @@ void __ref xen_build_mfn_list_list(void)void xen_setup_mfn_list_list (void ) { -if (xen_feature (XENFEAT_auto_translated_physmap)) -return ; -BUG_ON (HYPERVISOR_shared_info == &xen_dummy_shared_info);if (xen_start_info->flags &SIF_VIRT_P2M_4TOOLS )
@@ -291,9 +287,6 @@ void __init xen_build_dynamic_phys_to_machine(void) {unsigned long pfn; -if (xen_feature (XENFEAT_auto_translated_physmap)) -return ; - xen_p2m_addr = (unsigned long *)xen_start_info->mfn_list; xen_p2m_size =ALIGN (xen_start_info->nr_pages,P2M_PER_PAGE );
@@ -540,9 +533,6 @@ int xen_alloc_p2m_entry(unsigned long pfn)unsigned long addr = (unsigned long )(xen_p2m_addr + pfn);unsigned long p2m_pfn; -if (xen_feature (XENFEAT_auto_translated_physmap)) -return 0 ; - ptep =lookup_address (addr, &level);BUG_ON (!ptep || level !=PG_LEVEL_4K ); pte_pg = (pte_t *)((unsigned long )ptep & ~(PAGE_SIZE -1 ));
@@ -640,9 +630,6 @@ unsigned long __init set_phys_range_identity(unsigned long pfn_s,if (unlikely (pfn_s >= xen_p2m_size))return 0 ; -if (unlikely (xen_feature (XENFEAT_auto_translated_physmap))) -return pfn_e - pfn_s; -if (pfn_s > pfn_e)return 0 ;
@@ -660,10 +647,6 @@ bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn)pte_t *ptep;unsigned int level; -/* don't track P2M changes in autotranslate guests */ -if (unlikely (xen_feature (XENFEAT_auto_translated_physmap))) -return true; -if (unlikely (pfn >= xen_p2m_size)) {BUG_ON (mfn !=INVALID_P2M_ENTRY );return true;
@@ -711,9 +694,6 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,int i, ret =0 ;pte_t *pte; -if (xen_feature (XENFEAT_auto_translated_physmap)) -return 0 ; -if (kmap_ops) { ret =HYPERVISOR_grant_table_op (GNTTABOP_map_grant_ref, kmap_ops, count);
@@ -756,9 +736,6 @@ int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, {int i, ret =0 ; -if (xen_feature (XENFEAT_auto_translated_physmap)) -return 0 ; -for (i =0 ; i < count; i++) {unsigned long mfn =__pfn_to_mfn (page_to_pfn (pages[i]));unsigned long pfn =page_to_pfn (pages[i]);
arch/x86/xen/setup.c +1 -4
@@ -340,8 +340,6 @@ static void __init xen_do_set_identity_and_remap_chunk(WARN_ON (size ==0 ); -BUG_ON (xen_feature (XENFEAT_auto_translated_physmap)); - mfn_save =virt_to_mfn (buf); for (ident_pfn_iter = start_pfn, remap_pfn_iter = remap_pfn;
@@ -1024,8 +1022,7 @@ void __init xen_pvmmu_arch_setup(void)void __init xen_arch_setup (void ) {xen_panic_handler_init (); -if (!xen_feature (XENFEAT_auto_translated_physmap)) -xen_pvmmu_arch_setup (); +xen_pvmmu_arch_setup ();#ifdef CONFIG_ACPI if (!(xen_start_info->flags &SIF_INITDOMAIN )) {
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Juergen Gross
maintainerPATCH 1/3 xen: remove tests for pvh mode in pure pv paths
In reply to Juergen GrossRemove the last tests for XENFEAT_auto_translated_physmap in pure PV-domain specific paths. PVH V1 is gone and the feature will always be "false" in PV guests.
--- arch/x86/include/asm/xen/page.h | 3 --- arch/x86/xen/p2m.c | 25 +------------------------ arch/x86/xen/setup.c | 5 +---- 3 files changed, 2 insertions(+), 31 deletions(-)
arch/x86/include/asm/xen/page.h +0 -3
@@ -158,9 +158,6 @@ static inline unsigned long mfn_to_pfn_no_overrides(unsigned long mfn)unsigned long pfn;int ret; -if (xen_feature (XENFEAT_auto_translated_physmap)) -return mfn; -if (unlikely (mfn >= machine_to_phys_nr))return ~0 ;
arch/x86/xen/p2m.c +1 -24
@@ -212,8 +212,7 @@ void __ref xen_build_mfn_list_list(void)unsigned int level, topidx, mididx;unsigned long *mid_mfn_p; -if (xen_feature (XENFEAT_auto_translated_physmap) || - xen_start_info->flags &SIF_VIRT_P2M_4TOOLS ) +if (xen_start_info->flags &SIF_VIRT_P2M_4TOOLS )return ;/* Pre-initialize p2m_top_mfn to be completely missing */
@@ -269,9 +268,6 @@ void __ref xen_build_mfn_list_list(void)void xen_setup_mfn_list_list (void ) { -if (xen_feature (XENFEAT_auto_translated_physmap)) -return ; -BUG_ON (HYPERVISOR_shared_info == &xen_dummy_shared_info);if (xen_start_info->flags &SIF_VIRT_P2M_4TOOLS )
@@ -291,9 +287,6 @@ void __init xen_build_dynamic_phys_to_machine(void) {unsigned long pfn; -if (xen_feature (XENFEAT_auto_translated_physmap)) -return ; - xen_p2m_addr = (unsigned long *)xen_start_info->mfn_list; xen_p2m_size =ALIGN (xen_start_info->nr_pages,P2M_PER_PAGE );
@@ -540,9 +533,6 @@ int xen_alloc_p2m_entry(unsigned long pfn)unsigned long addr = (unsigned long )(xen_p2m_addr + pfn);unsigned long p2m_pfn; -if (xen_feature (XENFEAT_auto_translated_physmap)) -return 0 ; - ptep =lookup_address (addr, &level);BUG_ON (!ptep || level !=PG_LEVEL_4K ); pte_pg = (pte_t *)((unsigned long )ptep & ~(PAGE_SIZE -1 ));
@@ -640,9 +630,6 @@ unsigned long __init set_phys_range_identity(unsigned long pfn_s,if (unlikely (pfn_s >= xen_p2m_size))return 0 ; -if (unlikely (xen_feature (XENFEAT_auto_translated_physmap))) -return pfn_e - pfn_s; -if (pfn_s > pfn_e)return 0 ;
@@ -660,10 +647,6 @@ bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn)pte_t *ptep;unsigned int level; -/* don't track P2M changes in autotranslate guests */ -if (unlikely (xen_feature (XENFEAT_auto_translated_physmap))) -return true; -if (unlikely (pfn >= xen_p2m_size)) {BUG_ON (mfn !=INVALID_P2M_ENTRY );return true;
@@ -711,9 +694,6 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,int i, ret =0 ;pte_t *pte; -if (xen_feature (XENFEAT_auto_translated_physmap)) -return 0 ; -if (kmap_ops) { ret =HYPERVISOR_grant_table_op (GNTTABOP_map_grant_ref, kmap_ops, count);
@@ -756,9 +736,6 @@ int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, {int i, ret =0 ; -if (xen_feature (XENFEAT_auto_translated_physmap)) -return 0 ; -for (i =0 ; i < count; i++) {unsigned long mfn =__pfn_to_mfn (page_to_pfn (pages[i]));unsigned long pfn =page_to_pfn (pages[i]);
arch/x86/xen/setup.c +1 -4
@@ -340,8 +340,6 @@ static void __init xen_do_set_identity_and_remap_chunk(WARN_ON (size ==0 ); -BUG_ON (xen_feature (XENFEAT_auto_translated_physmap)); - mfn_save =virt_to_mfn (buf); for (ident_pfn_iter = start_pfn, remap_pfn_iter = remap_pfn;
@@ -1024,8 +1022,7 @@ void __init xen_pvmmu_arch_setup(void)void __init xen_arch_setup (void ) {xen_panic_handler_init (); -if (!xen_feature (XENFEAT_auto_translated_physmap)) -xen_pvmmu_arch_setup (); +xen_pvmmu_arch_setup ();#ifdef CONFIG_ACPI if (!(xen_start_info->flags &SIF_INITDOMAIN )) {
Signature · 1 line
2.12.3
Re: [PATCH 1/3] xen: remove tests for pvh mode in pure pv paths
Quoted 5 lines · Juergen Gross
Remove the last tests for
XENFEAT_auto_translated_physmapin pure PV-domain specific paths. PVH V1 is gone and the feature will always be "false" in PV guests.Signed-off-by Juergen Gross <[email protected]>
I wonder whether the remaining use of this flag can be replaced with appropriate xen_*_domain()?
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 1/3] xen: remove tests for pvh mode in pure pv paths
In reply to Juergen GrossQuoted 5 lines · Juergen Gross
Remove the last tests for
XENFEAT_auto_translated_physmapin pure PV-domain specific paths. PVH V1 is gone and the feature will always be "false" in PV guests.Signed-off-by Juergen Gross <[email protected]>
I wonder whether the remaining use of this flag can be replaced with appropriate xen_*_domain()?
-boris
Re: [PATCH 1/3] xen: remove tests for pvh mode in pure pv paths
In reply to Juergen GrossJuergen Gross:
Quoted 3 lines
Remove the last tests for
XENFEAT_auto_translated_physmapin pure PV-domain specific paths. PVH V1 is gone and the feature will always be "false" in PV guests.
[...]
Quoted 4 lines
arch/x86/xen/p2m.c +0
-0
[...]
Quoted 11 lines
arch/x86/xen/p2m.c +0
-3@@ -711,9 +694,6 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,int i, ret =0 ;pte_t *pte; -if (xen_feature (XENFEAT_auto_translated_physmap)) -return 0 ; -if (kmap_ops) { ret =HYPERVISOR_grant_table_op (GNTTABOP_map_grant_ref, kmap_ops, count);
arch/x86/xen/p2m.c int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, · line 741
Quoted 9 lines
arch/x86/xen/p2m.c +0
-3@@ -756,9 +736,6 @@ int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, {int i, ret =0 ; -if (xen_feature (XENFEAT_auto_translated_physmap)) -return 0 ; -for (i =0 ; i < count; i++) {unsigned long mfn =__pfn_to_mfn (page_to_pfn (pages[i]));unsigned long pfn =page_to_pfn (pages[i]);
This removes the check for autotranslation in {set,clear}_foreign_p2m_mapping. But those are called by the grant-table code also on PVH/HVM guest. So since 4.14 I see crashes similar to this one (ignore the kernel version, it's in the middle of a bisect):
[ 33.778854] page must be ballooned [ 33.778860] ------------[ cut here ]------------ [ 33.778887] WARNING: CPU: 1 PID: 1581 at arch/x86/xen/p2m.c:720 set_foreign_p2m_mapping+0x13b/0x370 [ 33.778903] Modules linked in: xen_gntdev xen_gntalloc xen_blkback xenfs xen_privcmd xen_evtchn dm_snapshot dm_bufio xen_blkfront [ 33.778931] CPU: 1 PID: 1581 Comm: qubesdb-daemon Not tainted 4.13.0-lt-37 #1 [ 33.778946] task: ffff8800f4251b80 task.stack: ffffc90000818000 [ 33.778960] RIP: 0010:set_foreign_p2m_mapping+0x13b/0x370 [ 33.778970] RSP: 0018:ffffc9000081bc90 EFLAGS: 00010286 [ 33.778981] RAX: 0000000000000016 RBX: 0000000000000001 RCX: ffffffff81e4a898 [ 33.778994] RDX: 0000000000000001 RSI: 0000000000000092 RDI: 0000000000000247 [ 33.779016] RBP: ffffc9000081bce0 R08: 0000000000000143 R09: ffffffff820d1660 [ 33.779026] R10: 000000000000002a R11: 0000000000000000 R12: ffff8800f0c2c320 [ 33.779037] R13: ffff8800f4b6a3c8 R14: 8000000000000000 R15: 0000000000000000 [ 33.779047] FS: 00007fbfd5739f80(0000) GS:ffff8800f9d00000(0000) knlGS:0000000000000000 [ 33.779056] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 33.779064] CR2: 00007ff25daca0c0 CR3: 00000000f2faa005 CR4: 00000000001606e0 [ 33.779074] Call Trace: [ 33.779082] ? x86_configure_nx+0x50/0x50 [ 33.779091] gnttab_map_refs+0xc2/0x160 [ 33.779097] ? decrease_reservation+0x256/0x2e0 [ 33.779105] gntdev_mmap+0x358/0x5c0 [xen_gntdev] [ 33.779113] mmap_region+0x392/0x5e0 [ 33.779119] do_mmap+0x2ae/0x480 [ 33.779125] vm_mmap_pgoff+0xa1/0xe0 [ 33.779132] SyS_mmap_pgoff+0x1ba/0x260 [ 33.787439] systemd-journald[1548]: Received request to flush runtime journal from PID 1 [ 33.931963] SyS_mmap+0x16/0x20 [ 33.931966] do_syscall_64+0x53/0xf0 [ 33.931980] entry_SYSCALL64_slow_path+0x25/0x25 [ 33.931981] RIP: 0033:0x7fbfd50ebdda [ 33.931982] RSP: 002b:00007fff2bae9238 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 [ 33.931984] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fbfd50ebdda [ 33.931984] RDX: 0000000000000003 RSI: 0000000000001000 RDI: 0000000000000000 [ 33.931985] RBP: 0000000000000007 R08: 0000000000000007 R09: 0000000000000000 [ 33.931986] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000 [ 33.931986] R13: 0000000000001000 R14: 0000000000000001 R15: 0000000000000000 [ 33.931987] Code: 83 b4 00 00 00 48 8b 05 9c 5c f2 00 48 83 3c d0 ff 0f 84 50 01 00 00 48 c7 c7 d7 20 bd 81 48 89 55 c8 48 89 75 d0 e8 f1 70 09 00 <0f> ff 48 8b 75 d0 48 8b 55 c8 4c 09 f6 48 89 d7 e8 70 fe ff ff [ 33.932007] ---[ end trace 858dec3c813fa284 ]--- [ 33.932011] ------------[ cut here ]------------ [ 33.932011] kernel BUG at arch/x86/xen/p2m.c:651! [ 33.932014] invalid opcode: 0000 [#1] SMP [ 33.932014] Modules linked in: xen_gntdev xen_gntalloc xen_blkback xenfs xen_privcmd xen_evtchn dm_snapshot dm_bufio xen_blkfront [ 33.932022] CPU: 1 PID: 1581 Comm: qubesdb-daemon Tainted: G W 4.13.0-lt-37 #1 [ 33.932601] task: ffff8800f4251b80 task.stack: ffffc90000818000 [ 33.932605] RIP: 0010:__set_phys_to_machine+0x36/0x130 [ 33.932606] RSP: 0018:ffffc9000081bc68 EFLAGS: 00010287 [ 33.932609] RAX: 0000000000000016 RBX: 00000000000f3cf3 RCX: ffffffff81e4a898 [ 33.932609] RDX: 00000000000f3cf3 RSI: 800000000012daef RDI: 00000000000f3cf3 [ 33.932610] RBP: ffffc9000081bc80 R08: 0000000000000143 R09: ffffffff820d1660 [ 33.932611] R10: 000000000000002a R11: 0000000000000000 R12: 800000000012daef [ 33.932611] R13: ffff8800f4b6a3c8 R14: 8000000000000000 R15: 0000000000000000 [ 33.932613] FS: 00007fbfd5739f80(0000) GS:ffff8800f9d00000(0000) knlGS:0000000000000000 [ 33.932613] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 33.932614] CR2: 00007ff25daca0c0 CR3: 00000000f2faa005 CR4: 00000000001606e0 [ 33.932617] Call Trace: [ 33.932619] ? set_phys_to_machine+0x12/0x40 [ 33.932621] set_foreign_p2m_mapping+0x150/0x370 [ 33.932624] ? x86_configure_nx+0x50/0x50 [ 33.932627] gnttab_map_refs+0xc2/0x160 [ 33.932628] ? decrease_reservation+0x256/0x2e0 [ 33.932631] gntdev_mmap+0x358/0x5c0 [xen_gntdev] [ 33.932634] mmap_region+0x392/0x5e0 [ 33.932635] do_mmap+0x2ae/0x480 [ 33.932637] vm_mmap_pgoff+0xa1/0xe0 [ 33.932640] SyS_mmap_pgoff+0x1ba/0x260 [ 33.932641] SyS_mmap+0x16/0x20 [ 33.932643] do_syscall_64+0x53/0xf0 [ 33.932645] entry_SYSCALL64_slow_path+0x25/0x25 [ 33.932647] RIP: 0033:0x7fbfd50ebdda [ 33.932647] RSP: 002b:00007fff2bae9238 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 [ 33.932648] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fbfd50ebdda [ 33.932649] RDX: 0000000000000003 RSI: 0000000000001000 RDI: 0000000000000000 [ 33.932650] RBP: 0000000000000007 R08: 0000000000000007 R09: 0000000000000000 [ 33.932650] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000 [ 33.932651] R13: 0000000000001000 R14: 0000000000000001 R15: 0000000000000000 [ 33.932652] Code: 0d 18 5f f2 00 48 8d 14 fd 00 00 00 00 48 01 d1 0f 1f 00 31 c0 48 89 31 0f 1f 00 85 c0 75 0e b8 01 00 00 00 c3 48 83 fe ff 74 f4 <0f> 0b 55 48 89 e5 41 54 53 49 89 f4 48 8d 75 ec 48 89 fb 48 83 [ 33.932673] RIP: __set_phys_to_machine+0x36/0x130 RSP: ffffc9000081bc68 [ 33.932688] ---[ end trace 858dec3c813fa285 ]---
Not sure if you prefer to change the grant-table code or to revert this part of the commit. The patch bellow works for me:
From: Simon Gaiser <[email protected]>
Date: Sat, 6 Jan 2018 06:40:32 +0100
Subject: [PATCH] xen: Fix {set,clear}_foreign_p2m_mapping on autotranslating
guests
Commit 82616f9599a7 ("xen: remove tests for pvh mode in pure pv paths") removed the check for autotranslation from {set,clear}_foreign_p2m_mapping but those are called by grant-table.c also on PVH/HVM guests.
--- arch/x86/xen/p2m.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/x86/xen/p2m.c +6 -0
@@ -694,6 +694,9 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,int i, ret =0 ;pte_t *pte; +if (xen_feature (XENFEAT_auto_translated_physmap)) +return 0 ; +if (kmap_ops) { ret =HYPERVISOR_grant_table_op (GNTTABOP_map_grant_ref, kmap_ops, count);
@@ -736,6 +739,9 @@ int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, {int i, ret =0 ; +if (xen_feature (XENFEAT_auto_translated_physmap)) +return 0 ; +for (i =0 ; i < count; i++) {unsigned long mfn =__pfn_to_mfn (page_to_pfn (pages[i]));unsigned long pfn =page_to_pfn (pages[i]);
Signature · 1 line
2.15.1
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 1/3] xen: remove tests for pvh mode in pure pv paths
Quoted 115 lines · On 06/01/18 06:55, HW42 wrote:
Juergen Gross:
Quoted 3 lines
Remove the last tests for
XENFEAT_auto_translated_physmapin pure PV-domain specific paths. PVH V1 is gone and the feature will always be "false" in PV guests.[...]
Quoted 4 lines
arch/x86/xen/p2m.c +0
-0[...]
Quoted 11 lines
arch/x86/xen/p2m.c +0
-3@@ -711,9 +694,6 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,int i, ret =0 ;pte_t *pte; -if (xen_feature (XENFEAT_auto_translated_physmap)) -return 0 ; -if (kmap_ops) { ret =HYPERVISOR_grant_table_op (GNTTABOP_map_grant_ref, kmap_ops, count);arch/x86/xen/p2m.c int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, · line 741
Quoted 9 lines
arch/x86/xen/p2m.c +0
-3@@ -756,9 +736,6 @@ int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, {int i, ret =0 ; -if (xen_feature (XENFEAT_auto_translated_physmap)) -return 0 ; -for (i =0 ; i < count; i++) {unsigned long mfn =__pfn_to_mfn (page_to_pfn (pages[i]));unsigned long pfn =page_to_pfn (pages[i]);This removes the check for autotranslation in {set,clear}_foreign_p2m_mapping. But those are called by the grant-table code also on PVH/HVM guest. So since 4.14 I see crashes similar to this one (ignore the kernel version, it's in the middle of a bisect):
[ 33.778854] page must be ballooned [ 33.778860] ------------[ cut here ]------------ [ 33.778887] WARNING: CPU: 1 PID: 1581 at arch/x86/xen/p2m.c:720 set_foreign_p2m_mapping+0x13b/0x370 [ 33.778903] Modules linked in: xen_gntdev xen_gntalloc xen_blkback xenfs xen_privcmd xen_evtchn dm_snapshot dm_bufio xen_blkfront [ 33.778931] CPU: 1 PID: 1581 Comm: qubesdb-daemon Not tainted 4.13.0-lt-37 #1 [ 33.778946] task: ffff8800f4251b80 task.stack: ffffc90000818000 [ 33.778960] RIP: 0010:set_foreign_p2m_mapping+0x13b/0x370 [ 33.778970] RSP: 0018:ffffc9000081bc90 EFLAGS: 00010286 [ 33.778981] RAX: 0000000000000016 RBX: 0000000000000001 RCX: ffffffff81e4a898 [ 33.778994] RDX: 0000000000000001 RSI: 0000000000000092 RDI: 0000000000000247 [ 33.779016] RBP: ffffc9000081bce0 R08: 0000000000000143 R09: ffffffff820d1660 [ 33.779026] R10: 000000000000002a R11: 0000000000000000 R12: ffff8800f0c2c320 [ 33.779037] R13: ffff8800f4b6a3c8 R14: 8000000000000000 R15: 0000000000000000 [ 33.779047] FS: 00007fbfd5739f80(0000) GS:ffff8800f9d00000(0000) knlGS:0000000000000000 [ 33.779056] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 33.779064] CR2: 00007ff25daca0c0 CR3: 00000000f2faa005 CR4: 00000000001606e0 [ 33.779074] Call Trace: [ 33.779082] ? x86_configure_nx+0x50/0x50 [ 33.779091] gnttab_map_refs+0xc2/0x160 [ 33.779097] ? decrease_reservation+0x256/0x2e0 [ 33.779105] gntdev_mmap+0x358/0x5c0 [xen_gntdev] [ 33.779113] mmap_region+0x392/0x5e0 [ 33.779119] do_mmap+0x2ae/0x480 [ 33.779125] vm_mmap_pgoff+0xa1/0xe0 [ 33.779132] SyS_mmap_pgoff+0x1ba/0x260 [ 33.787439] systemd-journald[1548]: Received request to flush runtime journal from PID 1 [ 33.931963] SyS_mmap+0x16/0x20 [ 33.931966] do_syscall_64+0x53/0xf0 [ 33.931980] entry_SYSCALL64_slow_path+0x25/0x25 [ 33.931981] RIP: 0033:0x7fbfd50ebdda [ 33.931982] RSP: 002b:00007fff2bae9238 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 [ 33.931984] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fbfd50ebdda [ 33.931984] RDX: 0000000000000003 RSI: 0000000000001000 RDI: 0000000000000000 [ 33.931985] RBP: 0000000000000007 R08: 0000000000000007 R09: 0000000000000000 [ 33.931986] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000 [ 33.931986] R13: 0000000000001000 R14: 0000000000000001 R15: 0000000000000000 [ 33.931987] Code: 83 b4 00 00 00 48 8b 05 9c 5c f2 00 48 83 3c d0 ff 0f 84 50 01 00 00 48 c7 c7 d7 20 bd 81 48 89 55 c8 48 89 75 d0 e8 f1 70 09 00 <0f> ff 48 8b 75 d0 48 8b 55 c8 4c 09 f6 48 89 d7 e8 70 fe ff ff [ 33.932007] ---[ end trace 858dec3c813fa284 ]--- [ 33.932011] ------------[ cut here ]------------ [ 33.932011] kernel BUG at arch/x86/xen/p2m.c:651! [ 33.932014] invalid opcode: 0000 [#1] SMP [ 33.932014] Modules linked in: xen_gntdev xen_gntalloc xen_blkback xenfs xen_privcmd xen_evtchn dm_snapshot dm_bufio xen_blkfront [ 33.932022] CPU: 1 PID: 1581 Comm: qubesdb-daemon Tainted: G W 4.13.0-lt-37 #1 [ 33.932601] task: ffff8800f4251b80 task.stack: ffffc90000818000 [ 33.932605] RIP: 0010:__set_phys_to_machine+0x36/0x130 [ 33.932606] RSP: 0018:ffffc9000081bc68 EFLAGS: 00010287 [ 33.932609] RAX: 0000000000000016 RBX: 00000000000f3cf3 RCX: ffffffff81e4a898 [ 33.932609] RDX: 00000000000f3cf3 RSI: 800000000012daef RDI: 00000000000f3cf3 [ 33.932610] RBP: ffffc9000081bc80 R08: 0000000000000143 R09: ffffffff820d1660 [ 33.932611] R10: 000000000000002a R11: 0000000000000000 R12: 800000000012daef [ 33.932611] R13: ffff8800f4b6a3c8 R14: 8000000000000000 R15: 0000000000000000 [ 33.932613] FS: 00007fbfd5739f80(0000) GS:ffff8800f9d00000(0000) knlGS:0000000000000000 [ 33.932613] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 33.932614] CR2: 00007ff25daca0c0 CR3: 00000000f2faa005 CR4: 00000000001606e0 [ 33.932617] Call Trace: [ 33.932619] ? set_phys_to_machine+0x12/0x40 [ 33.932621] set_foreign_p2m_mapping+0x150/0x370 [ 33.932624] ? x86_configure_nx+0x50/0x50 [ 33.932627] gnttab_map_refs+0xc2/0x160 [ 33.932628] ? decrease_reservation+0x256/0x2e0 [ 33.932631] gntdev_mmap+0x358/0x5c0 [xen_gntdev] [ 33.932634] mmap_region+0x392/0x5e0 [ 33.932635] do_mmap+0x2ae/0x480 [ 33.932637] vm_mmap_pgoff+0xa1/0xe0 [ 33.932640] SyS_mmap_pgoff+0x1ba/0x260 [ 33.932641] SyS_mmap+0x16/0x20 [ 33.932643] do_syscall_64+0x53/0xf0 [ 33.932645] entry_SYSCALL64_slow_path+0x25/0x25 [ 33.932647] RIP: 0033:0x7fbfd50ebdda [ 33.932647] RSP: 002b:00007fff2bae9238 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 [ 33.932648] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fbfd50ebdda [ 33.932649] RDX: 0000000000000003 RSI: 0000000000001000 RDI: 0000000000000000 [ 33.932650] RBP: 0000000000000007 R08: 0000000000000007 R09: 0000000000000000 [ 33.932650] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000 [ 33.932651] R13: 0000000000001000 R14: 0000000000000001 R15: 0000000000000000 [ 33.932652] Code: 0d 18 5f f2 00 48 8d 14 fd 00 00 00 00 48 01 d1 0f 1f 00 31 c0 48 89 31 0f 1f 00 85 c0 75 0e b8 01 00 00 00 c3 48 83 fe ff 74 f4 <0f> 0b 55 48 89 e5 41 54 53 49 89 f4 48 8d 75 ec 48 89 fb 48 83 [ 33.932673] RIP: __set_phys_to_machine+0x36/0x130 RSP: ffffc9000081bc68 [ 33.932688] ---[ end trace 858dec3c813fa285 ]---
Quoted 2 lines
Not sure if you prefer to change the grant-table code or to revert this part of the commit. The patch bellow works for me:
The patch looks fine.
Quoted 6 lines
From: Simon Gaiser <[email protected]>
Date: Sat, 6 Jan 2018 06:40:32 +0100
Subject: [PATCH] xen: Fix {set,clear}_foreign_p2m_mapping on autotranslating
guests
Quoted 7 lines
Commit
82616f9599a7("xen: remove tests for pvh mode in pure pv paths") removed the check for autotranslation from {set,clear}_foreign_p2m_mapping but those are called bygrant-table.calso on PVH/HVM guests.Cc <[email protected]> # 4.14Fixes 82616f9599a7 ("xen: remove tests for pvh mode in pure pv paths")Signed-off-by Simon Gaiser <[email protected]>
Thanks for catching this,
Juergen
Quoted 20 lines
--- arch/x86/xen/p2m.c | 6 ++++++ 1 file changed, 6 insertions(+)arch/x86/xen/p2m.c +3
-0@@ -694,6 +694,9 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,int i, ret =0 ;pte_t *pte; +if (xen_feature (XENFEAT_auto_translated_physmap)) +return 0 ; +if (kmap_ops) { ret =HYPERVISOR_grant_table_op (GNTTABOP_map_grant_ref, kmap_ops, count);
arch/x86/xen/p2m.c int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, · line 747
Quoted 9 lines
arch/x86/xen/p2m.c +3
-0@@ -736,6 +739,9 @@ int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, {int i, ret =0 ; +if (xen_feature (XENFEAT_auto_translated_physmap)) +return 0 ; +for (i =0 ; i < count; i++) {unsigned long mfn =__pfn_to_mfn (page_to_pfn (pages[i]));unsigned long pfn =page_to_pfn (pages[i]);
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Boris Ostrovsky
reviewerRe: [PATCH 1/3] xen: remove tests for pvh mode in pure pv paths
Quoted 11 lines · Juergen Gross
Quoted 3 lines · On 06/01/18 06:55, HW42 wrote:
Not sure if you prefer to change the grant-table code or to revert this part of the commit. The patch bellow works for me:
The patch looks fine.
Quoted 5 lines
From: Simon Gaiser <[email protected]>
Date: Sat, 6 Jan 2018 06:40:32 +0100
Subject: [PATCH] xen: Fix {set,clear}_foreign_p2m_mapping on autotranslating
guests
Quoted 8 lines
Quoted 7 lines
Commit
82616f9599a7("xen: remove tests for pvh mode in pure pv paths") removed the check for autotranslation from {set,clear}_foreign_p2m_mapping but those are called bygrant-table.calso on PVH/HVM guests.Cc <[email protected]> # 4.14Fixes 82616f9599a7 ("xen: remove tests for pvh mode in pure pv paths")Signed-off-by Simon Gaiser <[email protected]>Reviewed-by Juergen Gross <[email protected]>
Simon, can you please resend this as a proper patch? You original post seems to be whitespace damaged (among other things).
Thanks.
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerPATCH 2/3 xen: remove unused function xen_set_domain_pte()
In reply to Juergen GrossThe function xen_set_domain_pte() is used nowhere in the kernel. Remove it.
--- arch/x86/include/asm/xen/page.h | 2 -- arch/x86/xen/mmu_pv.c | 20 -------------------- include/trace/events/xen.h | 18 ------------------ 3 files changed, 40 deletions(-)
arch/x86/include/asm/xen/page.h +0 -2
@@ -314,8 +314,6 @@ static inline pte_t __pte_ma(pteval_t x)#define p4d_val_ma (x) ((x).p4d)#endif -void xen_set_domain_pte (pte_t *ptep,pte_t pteval,unsigned domid); -xmaddr_t arbitrary_virt_to_machine (void *address);unsigned long arbitrary_virt_to_mfn (void *vaddr);void make_lowmem_page_readonly (void *vaddr);
arch/x86/xen/mmu_pv.c +0 -20
@@ -162,26 +162,6 @@ static bool xen_page_pinned(void *ptr)return PagePinned (page); } -void xen_set_domain_pte (pte_t *ptep,pte_t pteval,unsigned domid) -{ -struct multicall_space mcs; -struct mmu_update *u; - -trace_xen_mmu_set_domain_pte (ptep, pteval, domid); - - mcs =xen_mc_entry (sizeof (*u)); - u = mcs.args; - -/* ptep might be kmapped when using 32-bit HIGHPTE */ - u->ptr =virt_to_machine (ptep).maddr; - u->val =pte_val_ma (pteval); - -MULTI_mmu_update (mcs.mc, mcs.args,1 ,NULL , domid); - -xen_mc_issue (PARAVIRT_LAZY_MMU ); -} -EXPORT_SYMBOL_GPL (xen_set_domain_pte); -static void xen_extend_mmu_update (const struct mmu_update *update) {struct multicall_space mcs;
include/trace/events/xen.h +0 -18
@@ -149,24 +149,6 @@ DECLARE_EVENT_CLASS(xen_mmu__set_pte,DEFINE_XEN_MMU_SET_PTE (xen_mmu_set_pte);DEFINE_XEN_MMU_SET_PTE (xen_mmu_set_pte_atomic); -TRACE_EVENT (xen_mmu_set_domain_pte, - TP_PROTO(pte_t *ptep, pte_t pteval, unsigned domid), -TP_ARGS (ptep, pteval, domid), -TP_STRUCT__entry ( - __field(pte_t *, ptep) - __field(pteval_t, pteval) -__field (unsigned, domid) - ), - TP_fast_assign(__entry->ptep = ptep; - __entry->pteval = pteval.pte; - __entry->domid = domid), -TP_printk ("ptep %p pteval %0*llx (raw %0*llx) domid %u" , - __entry->ptep, - (int )sizeof (pteval_t) *2 , (unsigned long long )pte_val (native_make_pte (__entry->pteval)), - (int )sizeof (pteval_t) *2 , (unsigned long long )__entry->pteval, - __entry->domid) - ); - TRACE_EVENT(xen_mmu_set_pte_at, TP_PROTO(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval),
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Juergen Gross
maintainerPATCH 2/3 xen: remove unused function xen_set_domain_pte()
In reply to Juergen GrossThe function xen_set_domain_pte() is used nowhere in the kernel. Remove it.
--- arch/x86/include/asm/xen/page.h | 2 -- arch/x86/xen/mmu_pv.c | 20 -------------------- include/trace/events/xen.h | 18 ------------------ 3 files changed, 40 deletions(-)
arch/x86/include/asm/xen/page.h +0 -2
@@ -314,8 +314,6 @@ static inline pte_t __pte_ma(pteval_t x)#define p4d_val_ma (x) ((x).p4d)#endif -void xen_set_domain_pte (pte_t *ptep,pte_t pteval,unsigned domid); -xmaddr_t arbitrary_virt_to_machine (void *address);unsigned long arbitrary_virt_to_mfn (void *vaddr);void make_lowmem_page_readonly (void *vaddr);
arch/x86/xen/mmu_pv.c +0 -20
@@ -162,26 +162,6 @@ static bool xen_page_pinned(void *ptr)return PagePinned (page); } -void xen_set_domain_pte (pte_t *ptep,pte_t pteval,unsigned domid) -{ -struct multicall_space mcs; -struct mmu_update *u; - -trace_xen_mmu_set_domain_pte (ptep, pteval, domid); - - mcs =xen_mc_entry (sizeof (*u)); - u = mcs.args; - -/* ptep might be kmapped when using 32-bit HIGHPTE */ - u->ptr =virt_to_machine (ptep).maddr; - u->val =pte_val_ma (pteval); - -MULTI_mmu_update (mcs.mc, mcs.args,1 ,NULL , domid); - -xen_mc_issue (PARAVIRT_LAZY_MMU ); -} -EXPORT_SYMBOL_GPL (xen_set_domain_pte); -static void xen_extend_mmu_update (const struct mmu_update *update) {struct multicall_space mcs;
include/trace/events/xen.h +0 -18
@@ -149,24 +149,6 @@ DECLARE_EVENT_CLASS(xen_mmu__set_pte,DEFINE_XEN_MMU_SET_PTE (xen_mmu_set_pte);DEFINE_XEN_MMU_SET_PTE (xen_mmu_set_pte_atomic); -TRACE_EVENT (xen_mmu_set_domain_pte, - TP_PROTO(pte_t *ptep, pte_t pteval, unsigned domid), -TP_ARGS (ptep, pteval, domid), -TP_STRUCT__entry ( - __field(pte_t *, ptep) - __field(pteval_t, pteval) -__field (unsigned, domid) - ), - TP_fast_assign(__entry->ptep = ptep; - __entry->pteval = pteval.pte; - __entry->domid = domid), -TP_printk ("ptep %p pteval %0*llx (raw %0*llx) domid %u" , - __entry->ptep, - (int )sizeof (pteval_t) *2 , (unsigned long long )pte_val (native_make_pte (__entry->pteval)), - (int )sizeof (pteval_t) *2 , (unsigned long long )__entry->pteval, - __entry->domid) - ); - TRACE_EVENT(xen_mmu_set_pte_at, TP_PROTO(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval),
Signature · 1 line
2.12.3
Re: [PATCH 2/3] xen: remove unused function xen_set_domain_pte()
Quoted 4 lines · Juergen Gross
The function
xen_set_domain_pte()is used nowhere in the kernel. Remove it.Signed-off-by Juergen Gross <[email protected]>
(+ Ingo and Steven who are maintainers of include/trace/events/xen.h)
Quoted 69 lines
--- arch/x86/include/asm/xen/page.h | 2 -- arch/x86/xen/mmu_pv.c | 20 -------------------- include/trace/events/xen.h | 18 ------------------ 3 files changed, 40 deletions(-)arch/x86/include/asm/xen/page.h +0
-2@@ -314,8 +314,6 @@ static inline pte_t __pte_ma(pteval_t x)#define p4d_val_ma (x) ((x).p4d)#endif -void xen_set_domain_pte (pte_t *ptep,pte_t pteval,unsigned domid); -xmaddr_t arbitrary_virt_to_machine (void *address);unsigned long arbitrary_virt_to_mfn (void *vaddr);void make_lowmem_page_readonly (void *vaddr);arch/x86/xen/mmu_pv.c +0
-20@@ -162,26 +162,6 @@ static bool xen_page_pinned(void *ptr)return PagePinned (page); } -void xen_set_domain_pte (pte_t *ptep,pte_t pteval,unsigned domid) -{ -struct multicall_space mcs; -struct mmu_update *u; - -trace_xen_mmu_set_domain_pte (ptep, pteval, domid); - - mcs =xen_mc_entry (sizeof (*u)); - u = mcs.args; - -/* ptep might be kmapped when using 32-bit HIGHPTE */ - u->ptr =virt_to_machine (ptep).maddr; - u->val =pte_val_ma (pteval); - -MULTI_mmu_update (mcs.mc, mcs.args,1 ,NULL , domid); - -xen_mc_issue (PARAVIRT_LAZY_MMU ); -} -EXPORT_SYMBOL_GPL (xen_set_domain_pte); -static void xen_extend_mmu_update (const struct mmu_update *update) {struct multicall_space mcs;include/trace/events/xen.h +0
-11@@ -149,24 +149,6 @@ DECLARE_EVENT_CLASS(xen_mmu__set_pte,DEFINE_XEN_MMU_SET_PTE (xen_mmu_set_pte);DEFINE_XEN_MMU_SET_PTE (xen_mmu_set_pte_atomic); -TRACE_EVENT(xen_mmu_set_domain_pte, - TP_PROTO(pte_t *ptep, pte_t pteval, unsigned domid), - TP_ARGS(ptep, pteval, domid), - TP_STRUCT__entry( - __field(pte_t *, ptep) - __field(pteval_t, pteval) - __field(unsigned, domid) - ), - TP_fast_assign(__entry->ptep = ptep; - __entry->pteval = pteval.pte; - __entry->domid = domid),
include/trace/events/xen.h DECLARE_EVENT_CLASS(xen_mmu__set_pte, · line 154
Quoted 10 lines
include/trace/events/xen.h +0
-7-TP_printk ("ptep %p pteval %0*llx (raw %0*llx) domid %u" , - __entry->ptep, - (int )sizeof (pteval_t) *2 , (unsigned long long )pte_val (native_make_pte (__entry->pteval)), - (int )sizeof (pteval_t) *2 , (unsigned long long )__entry->pteval, - __entry->domid) - ); - TRACE_EVENT(xen_mmu_set_pte_at, TP_PROTO(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval),
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 2/3] xen: remove unused function xen_set_domain_pte()
In reply to Juergen GrossQuoted 4 lines · Juergen Gross
The function
xen_set_domain_pte()is used nowhere in the kernel. Remove it.Signed-off-by Juergen Gross <[email protected]>
(+ Ingo and Steven who are maintainers of include/trace/events/xen.h)
Quoted 79 lines
--- arch/x86/include/asm/xen/page.h | 2 -- arch/x86/xen/mmu_pv.c | 20 -------------------- include/trace/events/xen.h | 18 ------------------ 3 files changed, 40 deletions(-)arch/x86/include/asm/xen/page.h +0
-2@@ -314,8 +314,6 @@ static inline pte_t __pte_ma(pteval_t x)#define p4d_val_ma (x) ((x).p4d)#endif -void xen_set_domain_pte (pte_t *ptep,pte_t pteval,unsigned domid); -xmaddr_t arbitrary_virt_to_machine (void *address);unsigned long arbitrary_virt_to_mfn (void *vaddr);void make_lowmem_page_readonly (void *vaddr);arch/x86/xen/mmu_pv.c +0
-20@@ -162,26 +162,6 @@ static bool xen_page_pinned(void *ptr)return PagePinned (page); } -void xen_set_domain_pte (pte_t *ptep,pte_t pteval,unsigned domid) -{ -struct multicall_space mcs; -struct mmu_update *u; - -trace_xen_mmu_set_domain_pte (ptep, pteval, domid); - - mcs =xen_mc_entry (sizeof (*u)); - u = mcs.args; - -/* ptep might be kmapped when using 32-bit HIGHPTE */ - u->ptr =virt_to_machine (ptep).maddr; - u->val =pte_val_ma (pteval); - -MULTI_mmu_update (mcs.mc, mcs.args,1 ,NULL , domid); - -xen_mc_issue (PARAVIRT_LAZY_MMU ); -} -EXPORT_SYMBOL_GPL (xen_set_domain_pte); -static void xen_extend_mmu_update (const struct mmu_update *update) {struct multicall_space mcs;include/trace/events/xen.h +0
-18@@ -149,24 +149,6 @@ DECLARE_EVENT_CLASS(xen_mmu__set_pte,DEFINE_XEN_MMU_SET_PTE (xen_mmu_set_pte);DEFINE_XEN_MMU_SET_PTE (xen_mmu_set_pte_atomic); -TRACE_EVENT (xen_mmu_set_domain_pte, - TP_PROTO(pte_t *ptep, pte_t pteval, unsigned domid), -TP_ARGS (ptep, pteval, domid), -TP_STRUCT__entry ( - __field(pte_t *, ptep) - __field(pteval_t, pteval) -__field (unsigned, domid) - ), - TP_fast_assign(__entry->ptep = ptep; - __entry->pteval = pteval.pte; - __entry->domid = domid), -TP_printk ("ptep %p pteval %0*llx (raw %0*llx) domid %u" , - __entry->ptep, - (int )sizeof (pteval_t) *2 , (unsigned long long )pte_val (native_make_pte (__entry->pteval)), - (int )sizeof (pteval_t) *2 , (unsigned long long )__entry->pteval, - __entry->domid) - ); - TRACE_EVENT(xen_mmu_set_pte_at, TP_PROTO(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval),
Steven Rostedt
maintainerRe: [PATCH 2/3] xen: remove unused function xen_set_domain_pte()
Quoted 9 lines · On Fri, 4 Aug 2017 15:20:30 -0400 Boris Ostrovsky <[email protected]>…
Quoted 4 lines · Juergen Gross
The function
xen_set_domain_pte()is used nowhere in the kernel. Remove it.Signed-off-by Juergen Gross <[email protected]>Reviewed-by Boris Ostrovsky <[email protected]>(+ Ingo and Steven who are maintainers of
include/trace/events/xen.h)
But the maintainers of where the tracepoints are located have final say (in this case, the Xen maintainers). I like to be Cc'd to make sure that the events are efficient and don't waste cpu unnecessary CPU cycles or memory.
-- Steve
Steven Rostedt
maintainerRe: [PATCH 2/3] xen: remove unused function xen_set_domain_pte()
In reply to Boris OstrovskyQuoted 9 lines · On Fri, 4 Aug 2017 15:20:30 -0400 Boris Ostrovsky <[email protected]>…
Quoted 4 lines · Juergen Gross
The function
xen_set_domain_pte()is used nowhere in the kernel. Remove it.Signed-off-by Juergen Gross <[email protected]>Reviewed-by Boris Ostrovsky <[email protected]>(+ Ingo and Steven who are maintainers of
include/trace/events/xen.h)
But the maintainers of where the tracepoints are located have final say (in this case, the Xen maintainers). I like to be Cc'd to make sure that the events are efficient and don't waste cpu unnecessary CPU cycles or memory.
-- Steve
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Juergen Gross
maintainerPATCH 3/3 xen: remove not used trace functions
In reply to Juergen GrossThere are some Xen specific trace functions defined in include/trace/events/xen.h. Remove them.
--- include/trace/events/xen.h | 20 -------------------- 1 file changed, 20 deletions(-)
include/trace/events/xen.h +0 -20
@@ -248,16 +248,6 @@ TRACE_EVENT(xen_mmu_set_p4d, (int )sizeof (p4dval_t) *2 , (unsigned long long )pgd_val (native_make_pgd (__entry->p4dval)), (int)sizeof(p4dval_t) * 2, (unsigned long long)__entry->p4dval) ); - -TRACE_EVENT (xen_mmu_pud_clear, -TP_PROTO (pud_t *pudp), -TP_ARGS (pudp), -TP_STRUCT__entry ( - __field(pud_t *, pudp) - ), -TP_fast_assign (__entry->pudp = pudp), -TP_printk ("pudp %p" , __entry->pudp) - );#else TRACE_EVENT(xen_mmu_set_pud,
@@ -277,16 +267,6 @@ TRACE_EVENT(xen_mmu_set_pud,#endif -TRACE_EVENT (xen_mmu_pgd_clear, -TP_PROTO (pgd_t *pgdp), -TP_ARGS (pgdp), -TP_STRUCT__entry ( - __field(pgd_t *, pgdp) - ), -TP_fast_assign (__entry->pgdp = pgdp), -TP_printk ("pgdp %p" , __entry->pgdp) - ); - DECLARE_EVENT_CLASS(xen_mmu_ptep_modify_prot, TP_PROTO(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval),
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH 3/3] xen: remove not used trace functions
Quoted 4 lines · Juergen Gross
There are some Xen specific trace functions defined in
include/trace/events/xen.h. Remove them.Signed-off-by Juergen Gross <[email protected]>
(Again, adding Ingo and Steven)
although I think "s/some Xen/some unused Xen/" in the commit message would make it clearer.
Quoted 32 lines
--- include/trace/events/xen.h | 20 -------------------- 1 file changed, 20 deletions(-)include/trace/events/xen.h +0
-13@@ -248,16 +248,6 @@ TRACE_EVENT(xen_mmu_set_p4d, (int )sizeof (p4dval_t) *2 , (unsigned long long )pgd_val (native_make_pgd (__entry->p4dval)), (int)sizeof(p4dval_t) * 2, (unsigned long long)__entry->p4dval) ); - -TRACE_EVENT (xen_mmu_pud_clear, -TP_PROTO (pud_t *pudp), -TP_ARGS (pudp), -TP_STRUCT__entry ( - __field(pud_t *, pudp) - ), -TP_fast_assign (__entry->pudp = pudp), -TP_printk ("pudp %p" , __entry->pudp) - );#else TRACE_EVENT(xen_mmu_set_pud,@@ -277,16 +267,6 @@ TRACE_EVENT(xen_mmu_set_pud,#endif -TRACE_EVENT(xen_mmu_pgd_clear, - TP_PROTO(pgd_t *pgdp), - TP_ARGS(pgdp),
include/trace/events/xen.h TRACE_EVENT(xen_mmu_set_pud, · line 272
Quoted 10 lines
include/trace/events/xen.h +0
-7-TP_STRUCT__entry ( -__field (pgd_t *,pgdp ) - ), - TP_fast_assign(__entry->pgdp = pgdp), - TP_printk("pgdp %p", __entry->pgdp) - ); - DECLARE_EVENT_CLASS(xen_mmu_ptep_modify_prot, TP_PROTO(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval),
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 3/3] xen: remove not used trace functions
In reply to Juergen GrossQuoted 4 lines · Juergen Gross
There are some Xen specific trace functions defined in
include/trace/events/xen.h. Remove them.Signed-off-by Juergen Gross <[email protected]>
(Again, adding Ingo and Steven)
although I think "s/some Xen/some unused Xen/" in the commit message would make it clearer.
Quoted 42 lines
--- include/trace/events/xen.h | 20 -------------------- 1 file changed, 20 deletions(-)include/trace/events/xen.h +0
-20@@ -248,16 +248,6 @@ TRACE_EVENT(xen_mmu_set_p4d, (int )sizeof (p4dval_t) *2 , (unsigned long long )pgd_val (native_make_pgd (__entry->p4dval)), (int)sizeof(p4dval_t) * 2, (unsigned long long)__entry->p4dval) ); - -TRACE_EVENT (xen_mmu_pud_clear, -TP_PROTO (pud_t *pudp), -TP_ARGS (pudp), -TP_STRUCT__entry ( - __field(pud_t *, pudp) - ), -TP_fast_assign (__entry->pudp = pudp), -TP_printk ("pudp %p" , __entry->pudp) - );#else TRACE_EVENT(xen_mmu_set_pud,@@ -277,16 +267,6 @@ TRACE_EVENT(xen_mmu_set_pud,#endif -TRACE_EVENT (xen_mmu_pgd_clear, -TP_PROTO (pgd_t *pgdp), -TP_ARGS (pgdp), -TP_STRUCT__entry ( - __field(pgd_t *, pgdp) - ), -TP_fast_assign (__entry->pgdp = pgdp), -TP_printk ("pgdp %p" , __entry->pgdp) - ); - DECLARE_EVENT_CLASS(xen_mmu_ptep_modify_prot, TP_PROTO(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval),
Re: [PATCH 3/3] xen: remove not used trace functions
Quoted 7 lines · On Fri, 4 Aug 2017 15:35:06 -0400 Boris Ostrovsky <[email protected]>…
Quoted 4 lines · Juergen Gross
There are some Xen specific trace functions defined in
include/trace/events/xen.h. Remove them.Signed-off-by Juergen Gross <[email protected]>(Again, adding Ingo and Steven)
Feel free to add:
to both.
-- Steve
Quoted 6 lines
Reviewed-by Boris Ostrovsky <[email protected]>although I think "s/some Xen/some unused Xen/" in the commit message would make it clearer.
Re: [PATCH 3/3] xen: remove not used trace functions
In reply to Boris OstrovskyQuoted 7 lines · On Fri, 4 Aug 2017 15:35:06 -0400 Boris Ostrovsky <[email protected]>…
Quoted 4 lines · Juergen Gross
There are some Xen specific trace functions defined in
include/trace/events/xen.h. Remove them.Signed-off-by Juergen Gross <[email protected]>(Again, adding Ingo and Steven)
Feel free to add:
to both.
-- Steve
Quoted 6 lines
Reviewed-by Boris Ostrovsky <[email protected]>although I think "s/some Xen/some unused Xen/" in the commit message would make it clearer.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 7 lines · Juergen Gross
Remove stuff no longer needed.
Juergen Gross (3):
xen: remove tests for pvh mode in pure pv paths
xen: remove unused functionxen_set_domain_pte()
xen: remove not used trace functions
Quoted 7 lines
arch/x86/include/asm/xen/page.h | 5 ----- arch/x86/xen/mmu_pv.c | 20 -------------------- arch/x86/xen/p2m.c | 25 +------------------------ arch/x86/xen/setup.c | 5 +---- include/trace/events/xen.h | 38 -------------------------------------- 5 files changed, 2 insertions(+), 91 deletions(-)
Applied to for-linus-4.14.
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 7 lines · Juergen Gross
Remove stuff no longer needed.
Juergen Gross (3):
xen: remove tests for pvh mode in pure pv paths
xen: remove unused functionxen_set_domain_pte()
xen: remove not used trace functions
Quoted 7 lines
arch/x86/include/asm/xen/page.h | 5 ----- arch/x86/xen/mmu_pv.c | 20 -------------------- arch/x86/xen/p2m.c | 25 +------------------------ arch/x86/xen/setup.c | 5 +---- include/trace/events/xen.h | 38 -------------------------------------- 5 files changed, 2 insertions(+), 91 deletions(-)
Applied to for-linus-4.14.
-boris