From: "Michał Leszczyński" <michal.leszczynski@cert.pl>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: "Kang, Luwei" <luwei.kang@intel.com>, Wei Liu <wl@xen.org>,
Tamas K Lengyel <tamas.k.lengyel@gmail.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
George Dunlap <george.dunlap@citrix.com>,
Anthony PERARD <anthony.perard@citrix.com>
Subject: [PATCH v2 6/7] tools/libxl: add vmtrace_pt_size parameter
Date: Fri, 19 Jun 2020 01:42:08 +0200 (CEST) [thread overview]
Message-ID: <2064075230.9820955.1592523728387.JavaMail.zimbra@cert.pl> (raw)
In-Reply-To: <122238637.9820857.1592523264685.JavaMail.zimbra@cert.pl>
Allow to specify the size of per-vCPU trace buffer upon
domain creation. This is zero by default (meaning: not enabled).
Signed-off-by: Michal Leszczynski <michal.leszczynski@cert.pl>
---
tools/golang/xenlight/helpers.gen.go | 2 ++
tools/golang/xenlight/types.gen.go | 1 +
tools/libxl/libxl_types.idl | 2 ++
tools/libxl/libxl_x86.c | 5 +++++
tools/xl/xl_parse.c | 4 ++++
5 files changed, 14 insertions(+)
diff --git a/tools/golang/xenlight/helpers.gen.go b/tools/golang/xenlight/helpers.gen.go
index 935d3bc50a..986ebbd681 100644
--- a/tools/golang/xenlight/helpers.gen.go
+++ b/tools/golang/xenlight/helpers.gen.go
@@ -1117,6 +1117,7 @@ return fmt.Errorf("invalid union key '%v'", x.Type)}
x.ArchArm.GicVersion = GicVersion(xc.arch_arm.gic_version)
x.ArchArm.Vuart = VuartType(xc.arch_arm.vuart)
x.Altp2M = Altp2MMode(xc.altp2m)
+x.VmtracePtSize = int(xc.vmtrace_pt_size)
return nil}
@@ -1592,6 +1593,7 @@ return fmt.Errorf("invalid union key '%v'", x.Type)}
xc.arch_arm.gic_version = C.libxl_gic_version(x.ArchArm.GicVersion)
xc.arch_arm.vuart = C.libxl_vuart_type(x.ArchArm.Vuart)
xc.altp2m = C.libxl_altp2m_mode(x.Altp2M)
+xc.vmtrace_pt_size = C.int(x.VmtracePtSize)
return nil
}
diff --git a/tools/golang/xenlight/types.gen.go b/tools/golang/xenlight/types.gen.go
index 663c1e86b4..41ec7cdd32 100644
--- a/tools/golang/xenlight/types.gen.go
+++ b/tools/golang/xenlight/types.gen.go
@@ -516,6 +516,7 @@ GicVersion GicVersion
Vuart VuartType
}
Altp2M Altp2MMode
+VmtracePtSize int
}
type domainBuildInfoTypeUnion interface {
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 9d3f05f399..04c1704b72 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -645,6 +645,8 @@ libxl_domain_build_info = Struct("domain_build_info",[
# supported by x86 HVM and ARM support is planned.
("altp2m", libxl_altp2m_mode),
+ ("vmtrace_pt_size", integer),
+
], dir=DIR_IN,
copy_deprecated_fn="libxl__domain_build_info_copy_deprecated",
)
diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c
index e57f63282e..14be2b395a 100644
--- a/tools/libxl/libxl_x86.c
+++ b/tools/libxl/libxl_x86.c
@@ -404,6 +404,11 @@ static int hvm_set_conf_params(libxl__gc *gc, uint32_t domid,
libxl_defbool_val(info->u.hvm.altp2m))
altp2m = libxl_defbool_val(info->u.hvm.altp2m);
+ if (xc_hvm_param_set(xch, domid, HVM_PARAM_VMTRACE_PT_SIZE,
+ info->vmtrace_pt_size)) {
+ LOG(ERROR, "Couldn't set HVM_PARAM_VMTRACE_PT_SIZE");
+ goto out;
+ }
if (xc_hvm_param_set(xch, domid, HVM_PARAM_HPET_ENABLED,
libxl_defbool_val(info->u.hvm.hpet))) {
LOG(ERROR, "Couldn't set HVM_PARAM_HPET_ENABLED");
diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
index 61b4ef7b7e..6ab98dda55 100644
--- a/tools/xl/xl_parse.c
+++ b/tools/xl/xl_parse.c
@@ -1861,6 +1861,10 @@ void parse_config_data(const char *config_source,
}
}
+ if (!xlu_cfg_get_long(config, "vmtrace_pt_size", &l, 1)) {
+ b_info->vmtrace_pt_size = l;
+ }
+
if (!xlu_cfg_get_list(config, "ioports", &ioports, &num_ioports, 0)) {
b_info->num_ioports = num_ioports;
b_info->ioports = calloc(num_ioports, sizeof(*b_info->ioports));
--
2.20.1
next prev parent reply other threads:[~2020-06-18 23:42 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-18 23:34 [PATCH v2 0/7] Implement support for external IPT monitoring Michał Leszczyński
2020-06-18 23:38 ` [PATCH v2 1/7] xen/mm: lift 32 item limit from mfn/gfn arrays Michał Leszczyński
2020-06-19 11:34 ` Roger Pau Monné
2020-06-19 11:36 ` Michał Leszczyński
2020-06-19 11:48 ` Jan Beulich
2020-06-19 11:51 ` Michał Leszczyński
2020-06-19 12:35 ` Michał Leszczyński
2020-06-19 12:39 ` Jan Beulich
2020-06-22 3:00 ` Michał Leszczyński
2020-06-18 23:39 ` [PATCH v2 2/7] x86/vmx: add Intel PT MSR definitions Michał Leszczyński
2020-06-22 12:35 ` Jan Beulich
2020-06-18 23:40 ` [PATCH v2 3/7] x86/vmx: add IPT cpu feature Michał Leszczyński
2020-06-19 13:44 ` Roger Pau Monné
2020-06-19 14:22 ` Michał Leszczyński
2020-06-19 15:31 ` Roger Pau Monné
2020-06-22 2:49 ` Michał Leszczyński
2020-06-22 8:31 ` Jan Beulich
2020-06-22 12:40 ` Jan Beulich
2020-06-18 23:41 ` [PATCH v2 4/7] x86/vmx: add do_vmtrace_op Michał Leszczyński
2020-06-19 0:46 ` Michał Leszczyński
2020-06-19 15:30 ` Roger Pau Monné
2020-06-19 15:50 ` Jan Beulich
2020-06-22 2:45 ` Michał Leszczyński
2020-06-22 2:56 ` Michał Leszczyński
2020-06-22 8:39 ` Jan Beulich
2020-06-22 13:25 ` Jan Beulich
2020-06-22 14:35 ` Michał Leszczyński
2020-06-22 15:22 ` Jan Beulich
2020-06-22 16:02 ` Michał Leszczyński
2020-06-22 16:16 ` Jan Beulich
2020-06-22 16:22 ` Michał Leszczyński
2020-06-22 16:25 ` Roger Pau Monné
2020-06-22 16:33 ` Michał Leszczyński
2020-06-23 1:04 ` Michał Leszczyński
2020-06-23 8:51 ` Jan Beulich
2020-06-23 17:24 ` Andrew Cooper
2020-06-24 10:03 ` Jan Beulich
2020-06-24 12:40 ` Andrew Cooper
2020-06-24 12:52 ` Tamas K Lengyel
2020-06-24 12:23 ` Michał Leszczyński
2020-06-22 17:05 ` Michał Leszczyński
2020-06-23 8:49 ` Jan Beulich
2020-06-18 23:41 ` [PATCH v2 5/7] tools/libxc: add xc_vmtrace_* functions Michał Leszczyński
2020-06-18 23:42 ` Michał Leszczyński [this message]
2020-06-18 23:42 ` [PATCH v2 7/7] tools/proctrace: add proctrace tool Michał Leszczyński
2020-06-18 23:51 ` [PATCH v2 0/7] Implement support for external IPT monitoring Michał Leszczyński
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2064075230.9820955.1592523728387.JavaMail.zimbra@cert.pl \
--to=michal.leszczynski@cert.pl \
--cc=anthony.perard@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=luwei.kang@intel.com \
--cc=tamas.k.lengyel@gmail.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.