Remove tmem
v3 cover Remove tmem
Fold in acks and some changes, and rebase to staging.
Having got a chance to test build each commit because the tree is broken at the momemnt.
Wei Liu (3):
tools: remove tmem code and commands
xen: remove tmem from hypervisor
docs: remove tmem related text
MAINTAINERS | 8 - docs/man/xl.1.pod.in | 68 - docs/man/xl.conf.5.pod | 9 +- docs/misc/tmem-internals.html | 789 ------- docs/misc/xen-command-line.pandoc | 12 - docs/misc/xsm-flask.txt | 36 - tools/flask/policy/modules/dom0.te | 4 +- tools/flask/policy/modules/guest_features.te | 3 - tools/libxc/Makefile | 1 - tools/libxc/include/xenctrl.h | 17 - tools/libxc/xc_tmem.c | 507 ----- tools/libxl/libxl_tmem.c | 119 +- tools/misc/Makefile | 1 - tools/misc/xen-tmem-list-parse.c | 339 --- tools/python/xen/lowlevel/xc/xc.c | 87 - tools/xenstat/libxenstat/src/xenstat.c | 53 +- tools/xenstat/libxenstat/src/xenstat.h | 15 - tools/xenstat/libxenstat/src/xenstat_priv.h | 8 - tools/xenstat/xentop/xentop.c | 36 +- tools/xl/Makefile | 2 +- tools/xl/xl.h | 6 - tools/xl/xl_cmdtable.c | 40 - tools/xl/xl_tmem.c | 251 --- xen/arch/arm/configs/tiny64.conf | 1 - xen/arch/x86/configs/pvshim_defconfig | 1 - xen/arch/x86/guest/hypercall_page.S | 2 +- xen/arch/x86/hvm/hypercall.c | 3 - xen/arch/x86/hypercall.c | 1 - xen/arch/x86/pv/hypercall.c | 3 - xen/arch/x86/setup.c | 8 - xen/common/Kconfig | 15 - xen/common/Makefile | 4 - xen/common/compat/tmem_xen.c | 23 - xen/common/domain.c | 3 - xen/common/memory.c | 12 +- xen/common/page_alloc.c | 54 +- xen/common/sysctl.c | 5 - xen/common/tmem.c | 2095 ------------------ xen/common/tmem_control.c | 560 ----- xen/common/tmem_xen.c | 277 --- xen/include/Makefile | 1 - xen/include/public/sysctl.h | 108 +- xen/include/public/tmem.h | 14 +- xen/include/xen/hypercall.h | 7 - xen/include/xen/mm.h | 3 - xen/include/xen/sched.h | 3 - xen/include/xen/tmem.h | 45 - xen/include/xen/tmem_control.h | 39 - xen/include/xen/tmem_xen.h | 343 --- xen/include/xlat.lst | 2 - xen/include/xsm/dummy.h | 6 - xen/include/xsm/xsm.h | 6 - xen/xsm/dummy.c | 1 - xen/xsm/flask/hooks.c | 9 - xen/xsm/flask/policy/access_vectors | 4 - 55 files changed, 40 insertions(+), 6029 deletions(-) delete mode 100644 docs/misc/tmem-internals.html delete mode 100644 tools/libxc/xc_tmem.c delete mode 100644 tools/misc/xen-tmem-list-parse.c delete mode 100644 tools/xl/xl_tmem.c delete mode 100644 xen/common/compat/tmem_xen.c delete mode 100644 xen/common/tmem.c delete mode 100644 xen/common/tmem_control.c delete mode 100644 xen/common/tmem_xen.c delete mode 100644 xen/include/xen/tmem.h delete mode 100644 xen/include/xen/tmem_control.h delete mode 100644 xen/include/xen/tmem_xen.h
Signature · 7 lines
2.20.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v3 1/3 tools: remove tmem code and commands
Remove all tmem related code in libxc.
Leave some stubs in libxl in case anyone has linked to those functions before the removal.
Remove all tmem related commands in xl, all tmem related code in other utilities we ship.
---
Rebase and fix up conflicts
--- tools/libxc/Makefile | 1 - tools/libxc/include/xenctrl.h | 17 - tools/libxc/xc_tmem.c | 507 -------------------- tools/libxl/libxl_tmem.c | 119 +---- tools/misc/Makefile | 1 - tools/misc/xen-tmem-list-parse.c | 339 ------------- tools/python/xen/lowlevel/xc/xc.c | 87 ---- tools/xenstat/libxenstat/src/xenstat.c | 53 +- tools/xenstat/libxenstat/src/xenstat.h | 15 - tools/xenstat/libxenstat/src/xenstat_priv.h | 8 - tools/xenstat/xentop/xentop.c | 36 +- tools/xl/Makefile | 2 +- tools/xl/xl.h | 6 - tools/xl/xl_cmdtable.c | 40 -- tools/xl/xl_tmem.c | 251 ---------- 15 files changed, 18 insertions(+), 1464 deletions(-) delete mode 100644 tools/libxc/xc_tmem.c delete mode 100644 tools/misc/xen-tmem-list-parse.c delete mode 100644 tools/xl/xl_tmem.c
tools/libxc/Makefile +0 -1
@@ -30,7 +30,6 @@ CTRL_SRCS-y += xc_tbuf.c CTRL_SRCS-y += xc_pm.c CTRL_SRCS-y += xc_cpu_hotplug.c CTRL_SRCS-y += xc_resume.c -CTRL_SRCS-y += xc_tmem.c CTRL_SRCS-y += xc_vm_event.c CTRL_SRCS-y += xc_monitor.c CTRL_SRCS-y += xc_mem_paging.c
tools/libxc/include/xenctrl.h +0 -17
@@ -44,7 +44,6 @@#include <xen/hvm/dm_op.h> #include <xen/hvm/params.h> #include <xen/xsm/flask_op.h> -#include <xen/tmem.h> #include <xen/kexec.h> #include <xen/platform.h>
@@ -1907,22 +1906,6 @@ int xc_set_cpuidle_max_cstate(xc_interface *xch, uint32_t value);int xc_enable_turbo (xc_interface *xch,int cpuid);int xc_disable_turbo (xc_interface *xch,int cpuid); -/** -* tmem operations -*/ - -int xc_tmem_control_oid (xc_interface *xch,int32_t pool_id,uint32_t subop, -uint32_t cli_id,uint32_t len,uint32_t arg, -struct xen_tmem_oid oid,void *buf); -int xc_tmem_control (xc_interface *xch, -int32_t pool_id,uint32_t subop,uint32_t cli_id, -uint32_t len,uint32_t arg,void *buf); -int xc_tmem_auth (xc_interface *xch,int cli_id,char *uuid_str,int enable); -int xc_tmem_save (xc_interface *xch,uint32_t domid,int live,int fd,int field_marker); -int xc_tmem_save_extra (xc_interface *xch,uint32_t domid,int fd,int field_marker); -void xc_tmem_save_done (xc_interface *xch,uint32_t domid); -int xc_tmem_restore (xc_interface *xch,uint32_t domid,int fd); -int xc_tmem_restore_extra (xc_interface *xch,uint32_t domid,int fd);/** * altp2m operations
tools/libxc/xc_tmem.c deleted +0 -507
507 lines not on this page · raw message
tools/libxl/libxl_tmem.c +14 -105
160 lines not on this page · raw message
tools/misc/Makefile +0 -1
@@ -22,7 +22,6 @@ INSTALL_SBIN-$(CONFIG_X86) += xen-hvmcrash INSTALL_SBIN-$(CONFIG_X86) += xen-hvmctx INSTALL_SBIN-$(CONFIG_X86) += xen-lowmemd INSTALL_SBIN-$(CONFIG_X86) += xen-mfndump -INSTALL_SBIN += xen-tmem-list-parse INSTALL_SBIN += xencov INSTALL_SBIN += xenlockprof INSTALL_SBIN += xenperf
tools/misc/xen-tmem-list-parse.c deleted +0 -339
339 lines not on this page · raw message
tools/python/xen/lowlevel/xc/xc.c +0 -87
105 lines not on this page · raw message
tools/xenstat/libxenstat/src/xenstat.c +1 -52
83 lines not on this page · raw message
tools/xenstat/libxenstat/src/xenstat.h +0 -15
@@ -29,7 +29,6 @@ typedef struct xenstat_node xenstat_node;typedef struct xenstat_vcpu xenstat_vcpu ;typedef struct xenstat_network xenstat_network ;typedef struct xenstat_vbd xenstat_vbd ; -typedef struct xenstat_tmem xenstat_tmem ;/* Initialize the xenstat library. Returns a handle to be used with * subsequent calls to the xenstat library, or NULL if an error occurs. */
@@ -72,9 +71,6 @@ unsigned long long xenstat_node_tot_mem(xenstat_node * node);/* Get amount of free memory on a node */ unsigned long long xenstat_node_free_mem (xenstat_node * node); -/* Get amount of tmem freeable memory (in MiB) on a node */ -long xenstat_node_freeable_mb (xenstat_node * node); -/* Find the number of domains existing on a node */ unsigned int xenstat_node_num_domains (xenstat_node * node);
@@ -135,9 +131,6 @@ unsigned int xenstat_domain_num_vbds(xenstat_domain *);xenstat_vbd *xenstat_domain_vbd (xenstat_domain * domain,unsigned int vbd); -/* Get the tmem information for a given domain */ -xenstat_tmem *xenstat_domain_tmem (xenstat_domain * domain); -/* * VCPU functions - extract information from a xenstat_vcpu */
@@ -198,12 +191,4 @@ unsigned long long xenstat_vbd_wr_sects(xenstat_vbd * vbd);/* Returns error while getting stats (1 if error happened, 0 otherwise) */ bool xenstat_vbd_error (xenstat_vbd * vbd); -/* -* Tmem functions - extract tmem information -*/ -unsigned long long xenstat_tmem_curr_eph_pages (xenstat_tmem *tmem); -unsigned long long xenstat_tmem_succ_eph_gets (xenstat_tmem *tmem); -unsigned long long xenstat_tmem_succ_pers_puts (xenstat_tmem *tmem); -unsigned long long xenstat_tmem_succ_pers_gets (xenstat_tmem *tmem); -#endif /* XENSTAT_H */
tools/xenstat/libxenstat/src/xenstat_priv.h +0 -8
@@ -52,13 +52,6 @@ struct xenstat_node {long freeable_mb; }; -struct xenstat_tmem { -unsigned long long curr_eph_pages; -unsigned long long succ_eph_gets; -unsigned long long succ_pers_puts; -unsigned long long succ_pers_gets; -}; -struct xenstat_domain {unsigned int id;char *name;
@@ -73,7 +66,6 @@ struct xenstat_domain {xenstat_network *networks;/* Array of length num_networks */ unsigned int num_vbds;xenstat_vbd *vbds; -xenstat_tmem tmem_stats; };struct xenstat_vcpu {
tools/xenstat/xentop/xentop.c +2 -34
@@ -209,7 +209,6 @@ unsigned int iterations = 0;int show_vcpus =0 ;int show_networks =0 ;int show_vbds =0 ; -int show_tmem =0 ;int repeat_header =0 ;int show_full_name =0 ;#define PROMPT_VAL_LEN 80
@@ -362,9 +361,6 @@ static int handle_key(int ch)case 'b' :case 'B' : show_vbds ^=1 ;break ; -case 't' :case 'T' : - show_tmem ^=1 ; -break ;case 'r' :case 'R' : repeat_header ^=1 ;break ;
@@ -973,8 +969,8 @@ void do_summary(void)"%u crashed, %u dying, %u shutdown \n" , num_domains, run, block, pause, crash, dying, shutdown); - used =xenstat_node_tot_mem (cur_node)-xenstat_node_free_mem (cur_node); - freeable_mb =xenstat_node_freeable_mb (cur_node); + used =xenstat_node_tot_mem (cur_node); + freeable_mb =0 ;/* Dump node memory and cpu information */ if ( freeable_mb <=0 )
@@ -1032,12 +1028,6 @@ void do_bottom_line(void)attr_addstr (show_vbds ?COLOR_PAIR (1 ) :0 ,"ds" );addstr (" " ); -/* tmem */ -addch (A_REVERSE |'T' ); -attr_addstr (show_tmem ?COLOR_PAIR (1 ) :0 ,"mem" ); -addstr (" " ); - -/* vcpus */ addch (A_REVERSE |'V' );attr_addstr (show_vcpus ?COLOR_PAIR (1 ) :0 ,"CPUs" );
@@ -1175,23 +1165,6 @@ void do_vbd(xenstat_domain *domain) } } -/* Output all tmem information */ -void do_tmem (xenstat_domain *domain) -{ -xenstat_tmem *tmem =xenstat_domain_tmem (domain); -unsigned long long curr_eph_pages =xenstat_tmem_curr_eph_pages (tmem); -unsigned long long succ_eph_gets =xenstat_tmem_succ_eph_gets (tmem); -unsigned long long succ_pers_puts =xenstat_tmem_succ_pers_puts (tmem); -unsigned long long succ_pers_gets =xenstat_tmem_succ_pers_gets (tmem); - -if (curr_eph_pages | succ_eph_gets | succ_pers_puts | succ_pers_gets) -"Tmem: Curr eph pages: %8llu Succ eph gets: %8llu " -"Succ pers puts: %8llu Succ pers gets: %8llu\n" , - curr_eph_pages, succ_eph_gets, - succ_pers_puts, succ_pers_gets); - -} -static void top (void ) {xenstat_domain **domains;
@@ -1244,8 +1217,6 @@ static void top(void)do_network (domains[i]);if (show_vbds)do_vbd (domains[i]); -if (show_tmem) -do_tmem (domains[i]); }if (!batch)
@@ -1321,9 +1292,6 @@ int main(int argc, char **argv)case 'f' : show_full_name =1 ;break ; -case 't' : - show_tmem =1 ; -break ; } }
tools/xl/Makefile +1 -1
@@ -17,7 +17,7 @@ CFLAGS_XL += -Wshadow XL_OBJS-$(CONFIG_X86) = xl_psr.o XL_OBJS = xl.o xl_cmdtable.o xl_sxp.o xl_utils.o $(XL_OBJS-y) -XL_OBJS += xl_tmem.o xl_parse.o xl_cpupool.o xl_flask.o +XL_OBJS += xl_parse.o xl_cpupool.o xl_flask.o XL_OBJS += xl_vtpm.o xl_block.o xl_nic.o xl_usb.o XL_OBJS += xl_sched.o xl_pci.o xl_vcpu.o xl_cdrom.o xl_mem.o XL_OBJS += xl_info.o xl_console.o xl_misc.o
tools/xl/xl.h +0 -6
@@ -184,12 +184,6 @@ int main_usbdev_detach(int argc, char **argv);int main_usblist (int argc,char **argv);int main_uptime (int argc,char **argv);int main_claims (int argc,char **argv); -int main_tmem_list (int argc,char **argv); -int main_tmem_freeze (int argc,char **argv); -int main_tmem_thaw (int argc,char **argv); -int main_tmem_set (int argc,char **argv); -int main_tmem_shared_auth (int argc,char **argv); -int main_tmem_freeable (int argc,char **argv);int main_network2attach (int argc,char **argv);int main_network2list (int argc,char **argv);int main_network2detach (int argc,char **argv);
tools/xl/xl_cmdtable.c +0 -40
@@ -443,46 +443,6 @@ struct cmd_spec cmd_table[] = {"" ,"" , }, - { "tmem-list", - &main_tmem_list,0 ,0 , -"List tmem pools" , -"[-l] [<Domain>|-a]" , -" -l List tmem stats" , - }, - { "tmem-freeze", - &main_tmem_freeze,0 ,1 , -"Freeze tmem pools" , -"[<Domain>|-a]" , -" -a Freeze all tmem" , - }, - { "tmem-thaw", - &main_tmem_thaw,0 ,1 , -"Thaw tmem pools" , -"[<Domain>|-a]" , -" -a Thaw all tmem" , - }, - { "tmem-set", - &main_tmem_set,0 ,1 , -"Change tmem settings" , -"[<Domain>|-a] [-w[=WEIGHT]|-c[=CAP]|-p[=COMPRESS]]" , -" -a Operate on all tmem\n" -" -w WEIGHT Weight (int)\n" -" -p COMPRESS Compress (int)" , - }, - { "tmem-shared-auth", - &main_tmem_shared_auth,0 ,1 , -"De/authenticate shared tmem pool" , -"[<Domain>|-a] [-u[=UUID] [-A[=AUTH]" , -" -a Authenticate for all tmem pools\n" -" -u UUID Specify uuid\n" -" (abcdef01-2345-6789-1234-567890abcdef)\n" -" -A AUTH 0=deauth,1=auth" , - }, - { "tmem-freeable", - &main_tmem_freeable,0 ,0 , -"Get information about how much freeable memory (MB) is in-use by tmem" , -"" , - }, { "cpupool-create", &main_cpupoolcreate,1 ,1 , "Create a new CPU pool",
tools/xl/xl_tmem.c deleted +0 -251
251 lines not on this page · raw message
Signature · 7 lines
2.20.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v3 3/3 docs: remove tmem related text
In reply to Wei Liu---
v3: Rebase and fix up conflicts
--- docs/man/xl.1.pod.in | 68 --- docs/man/xl.conf.5.pod | 9 +- docs/misc/tmem-internals.html | 789 ------------------------------ docs/misc/xen-command-line.pandoc | 12 - docs/misc/xsm-flask.txt | 36 -- 5 files changed, 2 insertions(+), 912 deletions(-) delete mode 100644 docs/misc/tmem-internals.html
docs/man/xl.1.pod.in +0 -68
@@ -1677,74 +1677,6 @@ Obtain information of USB devices connected as such via the device model =back -=head1 TRANSCENDENT MEMORY (TMEM) - -=over 4 - -=item B<tmem-list> I<[OPTIONS]> I<domain-id> - -List tmem pools. - -B<OPTIONS> - -=over 4 - -=item B<-l> - -If this parameter is specified, also list tmem stats. - -=back - -=item B<tmem-freeze> I<domain-id> - -Freeze tmem pools. - -=item B<tmem-thaw> I<domain-id> - -Thaw tmem pools. - -=item B<tmem-set> I<domain-id> [I<OPTIONS>] - -Change tmem settings. - -B<OPTIONS> - -=over 4 - -=item B<-w> I<WEIGHT> - -Weight (int) - -=item B<-p> I<COMPRESS> - -Compress (int) - -=back - -=item B<tmem-shared-auth> I<domain-id> [I<OPTIONS>] - -De/authenticate shared tmem pool. - -B<OPTIONS> - -=over 4 - -=item B<-u> I<UUID> - -Specify uuid (abcdef01-2345-6789-1234-567890abcdef) - -=item B<-a> I<AUTH> - -0=auth,1=deauth - -=back - -=item B<tmem-freeable> - -Get information about how much freeable memory (MB) is in-use by tmem. - -=back - =head1 FLASK B<FLASK> is a security framework that defines a mandatory access control policy
docs/man/xl.conf.5.pod +2 -7
@@ -148,10 +148,8 @@ The default choice is "xvda". =item B<claim_mode=BOOLEAN> If this option is enabled then when a guest is created there will be an -guarantee that there is memory available for the guest. This is an -particularly acute problem on hosts with memory over-provisioned guests -that use tmem and have self-balloon enabled (which is the default -option). The self-balloon mechanism can deflate/inflate the balloon +guarantee that there is memory available for the guest. +The self-balloon mechanism can deflate/inflate the balloon quickly and the amount of free memory (which C<xl info> can show) is stale the moment it is printed. When claim is enabled a reservation for the amount of memory (see 'memory' in xl.conf(5)) is set, which is then
@@ -163,9 +161,6 @@ If the reservation cannot be meet the guest creation fails immediately instead of taking seconds/minutes (depending on the size of the guest) while the guest is populated. -Note that to enable tmem type guests, one needs to provide C<tmem> on the -Xen hypervisor argument and as well on the Linux kernel command line. - Default: C<1> =over 4
docs/misc/tmem-internals.html deleted +0 -789
789 lines not on this page · raw message
docs/misc/xen-command-line.pandoc +0 -12
@@ -2008,18 +2008,6 @@ pages) must also be specified via the tbuf_size parameter. ### timer_slop > `= <integer>` -### tmem -> `= <boolean>` - -This option (and its underlying code) is going to go away in a future -Xen version. - -### tmem_compress -> `= <boolean>` - -This option (and its underlying code) is going to go away in a future -Xen version. - ### tsc (x86) > `= unstable | skewed | stable:socket`
docs/misc/xsm-flask.txt +0 -36
@@ -81,42 +81,6 @@ __HYPERVISOR_memory_op (xen/include/public/memory.h) * XENMEM_get_pod_target * XENMEM_claim_pages -__HYPERVISOR_tmem_op (xen/include/public/tmem.h) - - The following tmem control ops, that is the sub-subops of - TMEM_CONTROL, are covered by this statement. - - Note that TMEM is also subject to a similar policy arising from - XSA-15 http://lists.xen.org/archives/html/xen-announce/2012-09/msg00006.html. - Due to this existing policy all TMEM Ops are already subject to - reduced security support. - - * TMEMC_THAW - * TMEMC_FREEZE - * TMEMC_FLUSH - * TMEMC_DESTROY - * TMEMC_LIST - * TMEMC_SET_WEIGHT - * TMEMC_SET_CAP - * TMEMC_SET_COMPRESS - * TMEMC_QUERY_FREEABLE_MB - * TMEMC_SAVE_BEGIN - * TMEMC_SAVE_GET_VERSION - * TMEMC_SAVE_GET_MAXPOOLS - * TMEMC_SAVE_GET_CLIENT_WEIGHT - * TMEMC_SAVE_GET_CLIENT_CAP - * TMEMC_SAVE_GET_CLIENT_FLAGS - * TMEMC_SAVE_GET_POOL_FLAGS - * TMEMC_SAVE_GET_POOL_NPAGES - * TMEMC_SAVE_GET_POOL_UUID - * TMEMC_SAVE_GET_NEXT_PAGE - * TMEMC_SAVE_GET_NEXT_INV - * TMEMC_SAVE_END - * TMEMC_RESTORE_BEGIN - * TMEMC_RESTORE_PUT_PAGE - * TMEMC_RESTORE_FLUSH_PAGE - - Setting up FLASK ----------------
Signature · 7 lines
2.20.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v3 2/3 xen: remove tmem from hypervisor
In reply to Wei LiuThis patch removes all tmem related code and CONFIG_TMEM from the hypervisor. Also remove tmem hypercalls from the default XSM policy.
It is written as if tmem is disabled and tmem freeable pages is 0.
We will need to keep public/tmem.h around forever to avoid breaking guests. Remove the hypervisor only part and put guest visible part under a xen version check. Take the chance to remove trailing whitespaces.
---
v3:
1. Fold in changes agreed in v2.
2. Add acks.
3. Rebase and fix up conflicts
v2:
1. remove some more residuals
2. fix errors discovered by Gitlab CI
3. keep public/tmem.h
--- MAINTAINERS | 8 - tools/flask/policy/modules/dom0.te | 4 +- tools/flask/policy/modules/guest_features.te | 3 - xen/arch/arm/configs/tiny64.conf | 1 - xen/arch/x86/configs/pvshim_defconfig | 1 - xen/arch/x86/guest/hypercall_page.S | 2 +- xen/arch/x86/hvm/hypercall.c | 3 - xen/arch/x86/hypercall.c | 1 - xen/arch/x86/pv/hypercall.c | 3 - xen/arch/x86/setup.c | 8 - xen/common/Kconfig | 15 - xen/common/Makefile | 4 - xen/common/compat/tmem_xen.c | 23 - xen/common/domain.c | 3 - xen/common/memory.c | 12 +- xen/common/page_alloc.c | 54 +- xen/common/sysctl.c | 5 - xen/common/tmem.c | 2095 ------------------ xen/common/tmem_control.c | 560 ----- xen/common/tmem_xen.c | 277 --- xen/include/Makefile | 1 - xen/include/public/sysctl.h | 108 +- xen/include/public/tmem.h | 14 +- xen/include/xen/hypercall.h | 7 - xen/include/xen/mm.h | 3 - xen/include/xen/sched.h | 3 - xen/include/xen/tmem.h | 45 - xen/include/xen/tmem_control.h | 39 - xen/include/xen/tmem_xen.h | 343 --- xen/include/xlat.lst | 2 - xen/include/xsm/dummy.h | 6 - xen/include/xsm/xsm.h | 6 - xen/xsm/dummy.c | 1 - xen/xsm/flask/hooks.c | 9 - xen/xsm/flask/policy/access_vectors | 4 - 35 files changed, 20 insertions(+), 3653 deletions(-) delete mode 100644 xen/common/compat/tmem_xen.c delete mode 100644 xen/common/tmem.c delete mode 100644 xen/common/tmem_control.c delete mode 100644 xen/common/tmem_xen.c delete mode 100644 xen/include/xen/tmem.h delete mode 100644 xen/include/xen/tmem_control.h delete mode 100644 xen/include/xen/tmem_xen.h
MAINTAINERS +0 -8
@@ -402,14 +402,6 @@ F: */configure F: */*.ac F: tools/ -TRANSCENDENT MEMORY (TMEM) -M: Konrad Rzeszutek Wilk <[email protected]> -W: https://oss.oracle.com/projects/tmem -S: Supported -F: xen/common/tmem* -F: xen/include/xen/tmem* -F: docs/misc/tmem* - UNMODIFIED LINUX PV DRIVERS M: Jan Beulich <[email protected]> S: Obsolete
tools/flask/policy/modules/dom0.te +2 -2
@@ -10,8 +10,8 @@ allow dom0_t xen_t:xen { settime tbufcontrol readconsole clearconsole perfcontrol mtrr_add mtrr_del mtrr_read microcode physinfo quirk writeconsole readapic writeapic privprofile nonprivprofile kexec firmware sleep frequency - getidle debug getcpuinfo heap pm_op mca_op lockprof cpupool_op tmem_op - tmem_control getscheduler setscheduler + getidle debug getcpuinfo heap pm_op mca_op lockprof cpupool_op + getscheduler setscheduler }; allow dom0_t xen_t:xen2 { resource_op psr_cmt_op psr_alloc pmu_ctrl get_symbol
tools/flask/policy/modules/guest_features.te +0 -3
@@ -1,6 +1,3 @@ -# Allow all domains to use (unprivileged parts of) the tmem hypercall -allow domain_type xen_t:xen tmem_op; - # Allow all domains to use PMU (but not to change its settings --- that's what # pmu_ctrl is for) allow domain_type xen_t:xen2 pmu_use;
xen/arch/arm/configs/tiny64.conf +0 -1
@@ -11,7 +11,6 @@ CONFIG_ARM=y # # Common Features # -# CONFIG_TMEM is not set CONFIG_SCHED_CREDIT=y # CONFIG_SCHED_CREDIT2 is not set # CONFIG_SCHED_RTDS is not set
xen/arch/x86/configs/pvshim_defconfig +0 -1
@@ -11,7 +11,6 @@ CONFIG_NR_CPUS=32 # CONFIG_HVM_FEP is not set # CONFIG_TBOOT is not set # CONFIG_KEXEC is not set -# CONFIG_TMEM is not set # CONFIG_XENOPROF is not set # CONFIG_XSM is not set # CONFIG_SCHED_CREDIT2 is not set
xen/arch/x86/guest/hypercall_page.S +1 -1
@@ -58,8 +58,8 @@ DECLARE_HYPERCALL(hvm_op) DECLARE_HYPERCALL(sysctl) DECLARE_HYPERCALL(domctl) DECLARE_HYPERCALL(kexec_op) -DECLARE_HYPERCALL(tmem_op) DECLARE_HYPERCALL(argo_op) +DECLARE_HYPERCALL(xc_reserved_op) DECLARE_HYPERCALL(xenpmu_op) DECLARE_HYPERCALL(arch_0)
xen/arch/x86/hvm/hypercall.c +0 -3
@@ -135,9 +135,6 @@ static const hypercall_table_t hvm_hypercall_table[] = {HYPERCALL (hvm_op),HYPERCALL (sysctl),HYPERCALL (domctl), -#ifdef CONFIG_TMEM -HYPERCALL (tmem_op), -#endif #ifdef CONFIG_ARGO COMPAT_CALL(argo_op), #endif
xen/arch/x86/hypercall.c +0 -1
@@ -65,7 +65,6 @@ const hypercall_args_t hypercall_args_table[NR_hypercalls] =ARGS (sysctl,1 ),ARGS (domctl,1 ),ARGS (kexec_op,2 ), -ARGS (tmem_op,1 ), #ifdef CONFIG_ARGO ARGS(argo_op, 5), #endif
xen/arch/x86/pv/hypercall.c +0 -3
@@ -76,9 +76,6 @@ const hypercall_table_t pv_hypercall_table[] = {#ifdef CONFIG_KEXEC COMPAT_CALL(kexec_op),#endif -#ifdef CONFIG_TMEM - HYPERCALL(tmem_op), -#endif #ifdef CONFIG_ARGO COMPAT_CALL(argo_op),#endif
xen/arch/x86/setup.c +0 -8
@@ -25,7 +25,6 @@#include <xen/dmi.h> #include <xen/pfn.h> #include <xen/nodemask.h> -#include <xen/tmem_xen.h> #include <xen/virtual_region.h> #include <xen/watchdog.h> #include <public/version.h>
@@ -1485,13 +1484,6 @@ void __init noreturn __start_xen(unsigned long mbi_p) s =pfn_to_paddr (limit +1 );init_domheap_pages (s, e); } - -if (tmem_enabled () ) - { -printk (XENLOG_WARNING -"TMEM physical RAM limit exceeded, disabling TMEM\n" ); -tmem_disable (); - } }else end_boot_allocator ();
xen/common/Kconfig +0 -15
@@ -88,21 +88,6 @@ config KEXEC If unsure, say Y. -config TMEM - bool "Transcendent Memory Support (deprecated)" if EXPERT = "y" - ---help--- - Transcendent memory allows PV-aware guests to collaborate on memory - usage. Guests can 'swap' their memory to the hypervisor or have an - collective pool of memory shared across guests. The end result is - less memory usage by guests allowing higher guest density. - - You also have to enable it on the Xen commandline by using tmem=1. - - WARNING: This option (and its underlying code) is going to go away - in a future Xen version. - - If unsure, say N. - config XENOPROF def_bool y prompt "Xen Oprofile Support" if EXPERT = "y"
xen/common/Makefile +0 -4
@@ -73,10 +73,6 @@ obj-bin-$(CONFIG_X86) += $(foreach n,decompress bunzip2 unxz unlzma $(lzo-y) unl obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o kernel.o memory.o multicall.o xlat.o) -tmem-y := tmem.o tmem_xen.o tmem_control.o -tmem-$(CONFIG_COMPAT) += compat/tmem_xen.o -obj-$(CONFIG_TMEM) += $(tmem-y) - extra-y := symbols-dummy.o subdir-$(CONFIG_COVERAGE) += coverage
xen/common/compat/tmem_xen.c deleted +0 -23
@@ -1,23 +0,0 @@ -/****************************************************************************** -* tmem_xen.c -* -*/ - -#include <xen/lib.h> -#include <xen/sched.h> -#include <xen/domain.h> -#include <xen/guest_access.h> -#include <xen/hypercall.h> -#include <compat/tmem.h> - -CHECK_tmem_oid; - -/* -* Local variables: -* mode: C -* c-file-style: "BSD" -* c-basic-offset: 4 -* tab-width: 4 -* indent-tabs-mode: nil -* End: -*/
xen/common/domain.c +0 -3
@@ -41,7 +41,6 @@#include <public/vcpu.h> #include <xsm/xsm.h> #include <xen/trace.h> -#include <xen/tmem.h> #include <asm/setup.h> #ifdef CONFIG_X86
@@ -725,10 +724,8 @@ int domain_kill(struct domain *d)argo_destroy (d);evtchn_destroy (d);gnttab_release_mappings (d); -tmem_destroy (d->tmem_client);vnuma_destroy (d->vnuma);domain_set_outstanding_pages (d,0 ); - d->tmem_client =NULL ;/* fallthrough */ case DOMDYING_dying: rc =domain_relinquish_resources (d);
xen/common/memory.c +5 -7
@@ -7,6 +7,7 @@* Copyright (c) 2003-2005, K A Fraser */ +#include <xen/domain_page.h> #include <xen/types.h> #include <xen/lib.h> #include <xen/mm.h>
@@ -18,8 +19,6 @@#include <xen/guest_access.h> #include <xen/hypercall.h> #include <xen/errno.h> -#include <xen/tmem.h> -#include <xen/tmem_xen.h> #include <xen/numa.h> #include <xen/mem_access.h> #include <xen/trace.h>
@@ -250,11 +249,10 @@ static void populate_physmap(struct memop_args *a)if (unlikely (!page) ) { -if ( !tmem_enabled () || a->extent_order ) -gdprintk (XENLOG_INFO , -"Could not allocate order=%u extent: id=%d memflags=%#x (%u of %u)\n" , - a->extent_order, d->domain_id, a->memflags, - i, a->nr_extents); +gdprintk (XENLOG_INFO , +"Could not allocate order=%u extent: id=%d memflags=%#x (%u of %u)\n" , + a->extent_order, d->domain_id, a->memflags, + i, a->nr_extents); goto out; }
xen/common/page_alloc.c +5 -49
108 lines not on this page · raw message
xen/common/sysctl.c +0 -5
@@ -13,7 +13,6 @@#include <xen/domain.h> #include <xen/event.h> #include <xen/domain_page.h> -#include <xen/tmem.h> #include <xen/trace.h> #include <xen/console.h> #include <xen/iocap.h>
@@ -456,10 +455,6 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) }#endif -case XEN_SYSCTL_tmem_op: - ret =tmem_control (&op->u.tmem_op); -break ; -case XEN_SYSCTL_livepatch_op: ret =livepatch_op (&op->u.livepatch);if ( ret != -ENOSYS && ret != -EOPNOTSUPP )
xen/common/tmem.c deleted +0 -2095
2,095 lines not on this page · raw message
xen/common/tmem_control.c deleted +0 -560
560 lines not on this page · raw message
xen/common/tmem_xen.c deleted +0 -277
21 lines not on this page · raw message
xen/include/public/sysctl.h +1 -107
108 lines not on this page · raw message
xen/include/xen/tmem.h deleted +0 -45
45 lines not on this page · raw message
xen/include/xen/tmem_control.h deleted +0 -39
Lines of this file are not shown. View the raw message.
xen/include/xen/tmem_xen.h deleted +0 -343
343 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 7 lines
2.20.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Part of the diff is not shown here. View the raw message.
Re: [PATCH v3 1/3] tools: remove tmem code and commands
In reply to Wei LiuWei Liu writes ("[PATCH v3 1/3] tools: remove tmem code and commands"):
Quoted 1 line
Remove all tmem related code in libxc.
For the whole series, provided no objections are heard within the next week. If there are objections we should evaluate them and maybe invite the objector to become the maintainer...
HTH,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH v3 2/3] xen: remove tmem from hypervisor
In reply to Wei Liuxen/arch/x86/guest/hypercall_page.S DECLARE_HYPERCALL(hvm_op) · line 62
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 09.04.19 at 18:52, <[email protected]> wrote:
xen/arch/x86/guest/hypercall_page.S +1
-1@@ -58,8 +58,8 @@ DECLARE_HYPERCALL(hvm_op) DECLARE_HYPERCALL(sysctl) DECLARE_HYPERCALL(domctl) DECLARE_HYPERCALL(kexec_op) -DECLARE_HYPERCALL(tmem_op) DECLARE_HYPERCALL(argo_op) +DECLARE_HYPERCALL(xc_reserved_op)
Is this added line a re-basing mistake over the Argo series?
xen/common/Makefile
Quoted 2 lines
xen/common/Makefile +0
-0
There's are hunks missing here to remove
obj-$(CONFIG_TMEM) += lzo.o
and to replace
lzo-y := lzo
lzo-$(CONFIG_TMEM) :=
(and its use).
Quoted 16 lines
xen/include/public/tmem.h +2
-2@@ -1,8 +1,8 @@/**************************************************************************** ** * tmem.h -* +* * Guest OS interface to Xen Transcendent Memory. -* +* * 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
xen/include/public/tmem.h line 32
Quoted 4 lines
xen/include/public/tmem.h +1
-0@@ -29,15 +29,11 @@#include "xen.h" +#if __XEN_INTERFACE_VERSION__ <0x00041200
I guess you mean 0x00041300 now.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH v3 2/3] xen: remove tmem from hypervisor
Quoted 19 lines · Jan Beulich
xen/arch/x86/guest/hypercall_page.S DECLARE_HYPERCALL(hvm_op) · line 62
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 09.04.19 at 18:52, <[email protected]> wrote:
xen/arch/x86/guest/hypercall_page.S +1
-1@@ -58,8 +58,8 @@ DECLARE_HYPERCALL(hvm_op) DECLARE_HYPERCALL(sysctl) DECLARE_HYPERCALL(domctl) DECLARE_HYPERCALL(kexec_op) -DECLARE_HYPERCALL(tmem_op) DECLARE_HYPERCALL(argo_op) +DECLARE_HYPERCALL(xc_reserved_op)Is this added line a re-basing mistake over the Argo series?
xen/common/Makefile
Quoted 2 lines
xen/common/Makefile +0
-0There's are hunks missing here to remove
Quoted 8 lines
obj-$(CONFIG_TMEM) += lzo.o
and to replace
lzo-y := lzo
lzo-$(CONFIG_TMEM) :=(and its use).
I guess we can drop lzo in its entirety now?
I fixed the other two. Thanks for spotting my mistakes.
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH v3 2/3] xen: remove tmem from hypervisor
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 10.04.19 at 13:57, <[email protected]> wrote:
Quoted 8 lines · Jan Beulich
xen/common/Makefile
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 09.04.19 at 18:52, <[email protected]> wrote:
xen/common/Makefile +0
-0There's are hunks missing here to remove
obj-$(CONFIG_TMEM) += lzo.o
Quoted 8 lines
Quoted 6 lines
and to replace
lzo-y := lzo
lzo-$(CONFIG_TMEM) :=(and its use).
I guess we can drop lzo in its entirety now?
You can drop lzo-y, but not the building of lzo.init.o, as it may be needed for decompressing the Dom0 kernel.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH v3 2/3] xen: remove tmem from hypervisor
In reply to Wei LiuQuoted 22 lines · Wei Liu
Quoted 21 lines · Jan Beulich
xen/arch/x86/guest/hypercall_page.S DECLARE_HYPERCALL(hvm_op) · line 62
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 09.04.19 at 18:52, <[email protected]> wrote:
xen/arch/x86/guest/hypercall_page.S +1
-1@@ -58,8 +58,8 @@ DECLARE_HYPERCALL(hvm_op) DECLARE_HYPERCALL(sysctl) DECLARE_HYPERCALL(domctl) DECLARE_HYPERCALL(kexec_op) -DECLARE_HYPERCALL(tmem_op) DECLARE_HYPERCALL(argo_op) +DECLARE_HYPERCALL(xc_reserved_op)Is this added line a re-basing mistake over the Argo series?
xen/common/Makefile
Quoted 2 lines
xen/common/Makefile +0
-0There's are hunks missing here to remove
obj-$(CONFIG_TMEM) += lzo.o
Quoted 8 lines
Quoted 6 lines
and to replace
lzo-y := lzo
lzo-$(CONFIG_TMEM) :=(and its use).
I guess we can drop lzo in its entirety now?
Hmm... I will just rewrite that part as if tmem is off.
I don't think lzo.c can be dropped. It is still needed at start of day.
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH v3 2/3] xen: remove tmem from hypervisor
In reply to Jan BeulichQuoted 15 lines · Jan Beulich
Quoted 15 lines
Quoted 1 line
Quoted 1 line · On 10.04.19 at 13:57, <[email protected]> wrote:
Quoted 13 lines · Jan Beulich
xen/common/Makefile
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 09.04.19 at 18:52, <[email protected]> wrote:
xen/common/Makefile +0
-0There's are hunks missing here to remove
obj-$(CONFIG_TMEM) += lzo.o
and to replace
lzo-y := lzo
lzo-$(CONFIG_TMEM) :=
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
(and its use).
I guess we can drop lzo in its entirety now?
You can drop lzo-y, but not the building of lzo.init.o, as it may be needed for decompressing the Dom0 kernel.
Please check this fixup patch
From f500cee04e69c8fc2ebdac5a3d1c3c9652578139 Mon Sep 17 00:00:00 2001
From: Wei Liu <[email protected]>
Date: Wed, 10 Apr 2019 12:52:43 +0100
Subject: [PATCH] fixup
--- xen/arch/x86/guest/hypercall_page.S | 1 - xen/common/Makefile | 5 +- xen/common/lzo.c | 264 +--------------------------- xen/include/public/tmem.h | 2 +- 4 files changed, 3 insertions(+), 269 deletions(-)
xen/arch/x86/guest/hypercall_page.S +0 -1
@@ -59,7 +59,6 @@ DECLARE_HYPERCALL(sysctl) DECLARE_HYPERCALL(domctl) DECLARE_HYPERCALL(kexec_op) DECLARE_HYPERCALL(argo_op) -DECLARE_HYPERCALL(xc_reserved_op) DECLARE_HYPERCALL(xenpmu_op) DECLARE_HYPERCALL(arch_0)
xen/common/Makefile +1 -4
@@ -22,7 +22,6 @@ obj-$(CONFIG_KEXEC) += kimage.o obj-y += lib.o obj-$(CONFIG_NEEDS_LIST_SORT) += list_sort.o obj-$(CONFIG_LIVEPATCH) += livepatch.o livepatch_elf.o -obj-$(CONFIG_TMEM) += lzo.o obj-$(CONFIG_MEM_ACCESS) += mem_access.o obj-y += memory.o obj-y += monitor.o
@@ -67,9 +66,7 @@ obj-bin-y += warning.init.o obj-$(CONFIG_XENOPROF) += xenoprof.o obj-y += xmalloc_tlsf.o -lzo-y := lzo -lzo-$(CONFIG_TMEM) := -obj-bin-$(CONFIG_X86) += $(foreach n,decompress bunzip2 unxz unlzma $(lzo-y) unlzo unlz4 earlycpio,$(n).init.o) +obj-bin-$(CONFIG_X86) += $(foreach n,decompress bunzip2 unxz unlzma lzo unlzo unlz4 earlycpio,$(n).init.o) obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o kernel.o memory.o multicall.o xlat.o)
xen/common/lzo.c +1 -263
270 lines not on this page · raw message
xen/include/public/tmem.h +1 -1
@@ -29,7 +29,7 @@#include "xen.h" -#if __XEN_INTERFACE_VERSION__ <0x00041200 +#if __XEN_INTERFACE_VERSION__ <0x00041300 /* version of ABI */ #define TMEM_SPEC_VERSION 1
Signature · 7 lines
2.20.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH v3 2/3] xen: remove tmem from hypervisor
In reply to Jan BeulichQuoted 21 lines · Jan Beulich
Quoted 21 lines
Quoted 1 line
Quoted 1 line · On 10.04.19 at 14:21, <[email protected]> wrote:
Quoted 19 lines · Jan Beulich
Quoted 18 lines
Quoted 1 line
Quoted 1 line · On 10.04.19 at 13:57, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich
xen/common/Makefile
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 09.04.19 at 18:52, <[email protected]> wrote:
xen/common/Makefile +0
-0There's are hunks missing here to remove
Quoted 8 lines
obj-$(CONFIG_TMEM) += lzo.o
and to replace
lzo-y := lzo
lzo-$(CONFIG_TMEM) :=(and its use).
I guess we can drop lzo in its entirety now?
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
You can drop lzo-y, but not the building of lzo.init.o, as it may be needed for decompressing the Dom0 kernel.
Please check this fixup patch
LGTM - I notice you're even cleaning up
lzo.cnow. My A-b for the whole patch stands.
Thank you.
Wei.
Quoted 4 lines
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH v3 2/3] xen: remove tmem from hypervisor
In reply to Wei LiuQuoted 17 lines
Quoted 1 line
Quoted 1 line · On 10.04.19 at 14:21, <[email protected]> wrote:
Quoted 15 lines · Jan Beulich
Quoted 15 lines
Quoted 1 line
Quoted 1 line · On 10.04.19 at 13:57, <[email protected]> wrote:
Quoted 13 lines · Jan Beulich
xen/common/Makefile
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 09.04.19 at 18:52, <[email protected]> wrote:
xen/common/Makefile +0
-0There's are hunks missing here to remove
obj-$(CONFIG_TMEM) += lzo.o
and to replace
lzo-y := lzo
lzo-$(CONFIG_TMEM) :=
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
(and its use).
I guess we can drop lzo in its entirety now?
You can drop lzo-y, but not the building of lzo.init.o, as it may be needed for decompressing the Dom0 kernel.
Please check this fixup patch
LGTM - I notice you're even cleaning up lzo.c now. My A-b for the whole patch stands.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel