Re: [PATCH v13 07/10] xen/common: fix build issue for common/trace.c

2024-06-27 Thread George Dunlap
__read_mostly; > >>> > >>> Signed-off-by: Oleksii Kurochko > >> > >> Acked-by: Jan Beulich > >> > >> If you give a release-ack, this can go in right away, I think. > > Release-Acked-by: Oleksii Kurochko > > Thanks, but actually I was misled by the subject prefix. From a formal > perspective this really wants an ack from George (and mine doesn't > count anything at all). Acked-by: George Dunlap

[PATCH] MAINTAINERS: Step down as maintainer and committer

2024-06-26 Thread George Dunlap
tools and The Rest seems the most reasonable option. Signed-off-by: George Dunlap --- CC: Andrew Cooper CC: Jan Beulich CC: Julien Grall CC: Stefano Stabellini CC: Dario Faggioli CC: Juergen Gross CC: Nick Rosbrook --- MAINTAINERS | 13 ++--- 1 file changed, 2 insertions(+), 11 dele

Re: [PATCH WIP 00/14] AMD Nested Virt Preparation

2024-06-26 Thread George Dunlap
On Wed, Jun 26, 2024 at 2:57 PM George Dunlap wrote: > > This is my work-in-progress series for getting nested virt working > again on AMD. Forgot to add, this can be found at this branch: https://gitlab.com/xen-project/people/gdunlap/xen/-/commits/working/amd-nested-virt -George

[PATCH WIP 11/14] x86/trace: Add trace to xsetbv svm/vmx handler path

2024-06-26 Thread George Dunlap
r directly, bypassing the trace, resulting in no "HVM handler" trace record for that VMEXIT. For maximal DRY-ness, we would want hvm_handle_xsetbv to call hvmemul_write_xcr; but since the intent seems to be for hvmemul_* to be only accesible via hvm_emulate(), just duplicate the trace. S

[PATCH WIP 08/14] svm: Do NPF trace before calling hvm_hap_nested_page_fault

2024-06-26 Thread George Dunlap
Unfortunately I've forgotten exactly why I made this change. I suspect that there were other traces (like MMIO traces) which were being put before the NPF trace; but to understand the trace record you'd want to have the NPF information first. Signed-off-by: George Dunlap --- xen/ar

[PATCH WIP 14/14] x86/nestedsvm: Note some places for improvement

2024-06-26 Thread George Dunlap
Signed-off-by: George Dunlap --- xen/arch/x86/hvm/svm/nestedsvm.c | 13 + 1 file changed, 13 insertions(+) diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c index 35a2cbfd7d..dca06f2a6c 100644 --- a/xen/arch/x86/hvm/svm/nestedsvm.c +++ b/xen/arch/x86

[PATCH WIP 12/14] xenalyze: Basic processing for XSETBV exits and handlers

2024-06-26 Thread George Dunlap
Basically this means adding VMEXIT strings for XSETBV exit, and adding the handlers and strings for them. Signed-off-by: George Dunlap --- tools/xentrace/xenalyze.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace

[PATCH WIP 06/14] xen/svm: Remove redundant HVM_HANDLER trace for EXCEPTION_AC

2024-06-26 Thread George Dunlap
Adding an HVM_TRAP trace record is redundant for EXCEPTION_AC: it adds trace volume without adding any information, and xenalyze already knows not to expect it. Remove it. Signed-off-by: George Dunlap --- xen/arch/x86/hvm/svm/svm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/arch

[PATCH WIP 00/14] AMD Nested Virt Preparation

2024-06-26 Thread George Dunlap
e, or what could be improved in the upstream tracing. The last patch is a placeholder for future work, commenting a place where behavior is wrong and another where more work needs to be done to assure safety. George Dunlap (14): x86/cpuid-policy: Add AMD SVM CPUID leaf to featureset x86/cpu-po

[PATCH WIP 13/14] x86/svm: Add a trace for VMEXIT_VMRUN

2024-06-26 Thread George Dunlap
g the target VMCB address should allow future analysis of which L2 vcpu within an L1 is running. Signed-off-by: George Dunlap --- tools/xentrace/xenalyze.c | 20 +++- xen/arch/x86/hvm/svm/svm.c | 2 ++ xen/include/public/trace.h | 1 + 3 files changed, 22 insertions(+), 1 del

[PATCH WIP 05/14] xenalyze: Ignore vmexits where an HVM_HANDLER traces would be redundant

2024-06-26 Thread George Dunlap
exception vector, so HVM_TRAP would be redundant. NB that VMEXIT_EXCEPTION_DB doesn't have an HVM_HANDLER for SVM yet; but for VMX, there's a specific HVM_HANDLER trace record which includes more information; so SVM really should record information as well. Signed-off-by: Geo

[PATCH WIP 10/14] xenalyze: Quiet warnings about VMEXIT_IOIO

2024-06-26 Thread George Dunlap
There's a general issue with both PIO and MMIO reads (as detailed in the comment); do a work-around for now. Signed-off-by: George Dunlap --- tools/xentrace/xenalyze.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenal

[PATCH WIP 02/14] x86/cpu-policy: HACK Disable PCID when nested virt is enabled

2024-06-26 Thread George Dunlap
nable this feature, but for now, just hide it from guests when nested HVM is enabled. Signed-off-by: George Dunlap --- xen/arch/x86/cpu-policy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/cpu-policy.c b/xen/arch/x86/cpu-policy.c index d3ba177dac..91281b44b0 100644 --- a/xen/arc

[PATCH WIP 09/14] x86/emulate: Don't trace cr reads during emulation

2024-06-26 Thread George Dunlap
n write_cr, as any hypothetical writes to CRs *will* be necessary to understand traces. Signed-off-by: George Dunlap --- xen/arch/x86/hvm/emulate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c index 02e378365b..e78f06cf3f 100644 ---

[PATCH WIP 07/14] xen/hvm: Don't skip MSR_READ trace record

2024-06-26 Thread George Dunlap
like this: hvm_generic_postprocess: d2v0 Strange, exit 7c(VMEXIT_MSR) missing a handler Replace the `return` with `goto out`. Fixes: 37f074a3383 ("x86/msr: introduce guest_rdmsr()") Signed-off-by: George Dunlap --- xen/arch/x86/hvm/hvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH WIP 03/14] xenalyze: Basic nested virt processing

2024-06-26 Thread George Dunlap
nd of a line - Add a missing newline to a warning statement Signed-off-by: George Dunlap --- tools/xentrace/xenalyze.c | 66 ++- 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index d95e

[PATCH WIP 04/14] xenalyze: Track generic event information when not in summary mode

2024-06-26 Thread George Dunlap
ear to be used by anyone; so to save some time, don't bother copying it. Signed-off-by: George Dunlap --- tools/xentrace/xenalyze.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 52ee7a5f9f..46248

[PATCH WIP 01/14] x86/cpuid-policy: Add AMD SVM CPUID leaf to featureset

2024-06-26 Thread George Dunlap
(), enable max_fs when nested_hvm() is true. Signed-off-by: George Dunlap --- CC: Andrew Cooper CC: Jan Beulich CC: Roger Pau Monne --- tools/libs/light/libxl_cpuid.c | 1 + tools/misc/xen-cpuid.c | 1 + xen/arch/x86/cpu-policy.c | 23 +

[PATCH for-4.19] tools/xenalyze: Remove argp_program_bug_address

2024-06-24 Thread George Dunlap
index d95e52695f..adc96dd7e4 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -10920,9 +10920,6 @@ const struct argp parser_def = { .doc = "", }; -const char *argp_program_bug_address = "George Dunlap "; - - int main(int argc, char *argv[]) { /*

[PATCH for-4.19 1/2] CHANGELOG.md: Fix indentation of "Removed" section

2024-06-24 Thread George Dunlap
Signed-off-by: George Dunlap --- CC: Oleksii Kurochko CC: Community Manager --- CHANGELOG.md | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1778419cae..f3c6c7954f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,12 +31,12

[PATCH for-4.19 2/2] CHANGELOG: Add entries related to tracing

2024-06-24 Thread George Dunlap
Signed-off-by: George Dunlap --- CC: Oleksii Kurochko CC: Community Manager CC: Andrew Cooper --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3c6c7954f..35c3488f4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,8 @@ The

Re: [XEN PATCH] common/sched: address a violation of MISRA C Rule 8.8

2024-06-21 Thread George Dunlap
o functional changes. > > Reported-by: Stewart Hildebrand > Signed-off-by: Victor Lira With the changes noted already: Acked-by: George Dunlap

Design Session: Matrix Channel

2024-06-12 Thread George Dunlap
Nobody volunteered *up front* to take notes for the Matrix design session [1], but I did end up taking a few notes, so agreed to do some follow-up. The general issue seemed to be how difficult it was to pull out "signal" from "noise" (where "noise" is individual; i.e., something completely ARM-spe

Re: [PATCH for-4.19 v2] x86/pvh: declare PVH dom0 supported with caveats

2024-06-10 Thread George Dunlap
On Mon, Jun 10, 2024 at 9:50 AM Roger Pau Monne wrote: > > PVH dom0 is functionally very similar to PVH domU except for the domain > builder and the added set of hypercalls available to it. > > The main concern with declaring it "Supported" is the lack of some features > when compared to classic P

Re: [PATCH] MAINTAINERS: add me as scheduer maintainer

2024-06-10 Thread George Dunlap
a/MAINTAINERS b/MAINTAINERS > index 6ba7d2765f..cc40c0be9d 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -490,6 +490,7 @@ F: xen/common/sched/rt.c > SCHEDULING > M: George Dunlap > M: Dario Faggioli > +M: Juergen Gross Reviewed-by: George Dunlap Welcome aboard, Juergen!

[PATCH v2 1/2] x86/hvm/trace: Use a different trace type for AMD processors

2024-05-23 Thread George Dunlap
at other SVM-specific functionality is triggered. Remove the `--svm-mode` command-line option, since it's now redundant. Signed-off-by: George Dunlap --- v2: - Rebase to tip of staging - Rebase over xentrace_format removal - Fix typo in commit message - Remove --svm-mode command-line fla

[PATCH v2 2/2] tools/xenalyze: Ignore HVM_EMUL events harder

2024-05-23 Thread George Dunlap
vcpu data_type in hvm_process for TRC_HVM_EMUL records. Signed-off-by: George Dunlap Acked-by: Andrew Cooper --- CC: Andrew Cooper CC: Anthony Perard CC: Olaf Hering --- tools/xentrace/xenalyze.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/xen

Re: [PATCH] tools/golang: Add missing golang bindings for vlan

2024-05-20 Thread George Dunlap
this patch. > > Fixes: 3bc14e4fa4b9 ("tools/libs/light: Add vlan field to libxl_device_nic") > Signed-off-by: Henry Wang Acked-by: George Dunlap

Re: [PATCH] Revert "evtchn: refuse EVTCHNOP_status for Xen-bound event channels"

2024-05-15 Thread George Dunlap
On Tue, May 14, 2024 at 10:51 AM Andrew Cooper wrote: > > On 14/05/2024 10:25 am, Jan Beulich wrote: > > On 03.04.2024 08:16, Jan Beulich wrote: > >> On 02.04.2024 19:06, Andrew Cooper wrote: > >>> The commit makes a claim without any kind of justification. > >> Well, what does "have no business"

Re: [PATCH 2/5] x86/cpu-policy: Add SVM features already used by Xen

2024-05-01 Thread George Dunlap
On Wed, May 1, 2024 at 11:39 AM Andrew Cooper wrote: > > On 01/05/2024 11:00 am, George Dunlap wrote: > > On Mon, Apr 29, 2024 at 4:16 PM Andrew Cooper > > wrote: > >> These will replace svm_feature_flags and the SVM_FEATURE_* constants over > >>

Re: [PATCH 2/5] x86/cpu-policy: Add SVM features already used by Xen

2024-05-01 Thread George Dunlap
per > --- > CC: Jan Beulich > CC: Roger Pau Monné > CC: Stefano Stabellini > CC: Xenia Ragiadakou > CC: Sergiy Kibrik > CC: George Dunlap > CC: Andrei Semenov > CC: Vaishali Thakkar > --- > tools/misc/xen-cpuid.c | 11 +++ &

Re: [PATCH 1/5] x86/cpu-policy: Infrastructure for the AMD SVM and SEV leaves

2024-05-01 Thread George Dunlap
On Tue, Apr 30, 2024 at 2:25 PM Andrew Cooper wrote: > > On 30/04/2024 1:45 pm, Jan Beulich wrote: > > On 29.04.2024 17:16, Andrew Cooper wrote: > >> Allocate two new feature leaves, and extend cpu_policy with the non-feature > >> fields too. > >> > >> The CPUID dependency between the SVM bit on t

Re: [PATCH 1/3] x86/hvm/trace: Use a different trace type for AMD processors

2024-04-26 Thread George Dunlap
On Fri, Apr 26, 2024 at 4:18 PM Andrew Cooper wrote: > > On 26/04/2024 3:32 pm, George Dunlap wrote: > > A long-standing usability sub-optimality with xenalyze is the > > necessity to specify `--svm-mode` when analyzing AMD processors. This > > fundamentally comes abou

Re: [PATCH 2/3] tools/xenalyze: Ignore HVM_EMUL events harder

2024-04-26 Thread George Dunlap
On Fri, Apr 26, 2024 at 4:06 PM Andrew Cooper wrote: > > On 26/04/2024 3:32 pm, George Dunlap wrote: > > To unify certain common sanity checks, checks are done very early in > > processing based only on the top-level type. > > > > Unfortunately, when TRC_HVM_EMUL wa

[PATCH 3/3] tools/xentrace: Remove xentrace_format

2024-04-26 Thread George Dunlap
generally means it doesn't get picked up by distros either); yet nobody has seemed to complain. Simple remove xentrace_format, and point people to xenalyze instead. NB that there is no man page for xenalyze, so the "see also" on the xentrace man page is simply removed for now. Signed

[PATCH 1/3] x86/hvm/trace: Use a different trace type for AMD processors

2024-04-26 Thread George Dunlap
at other SVM-specific functionality is triggered. Also add lines in `formats` for xentrace_format. Signed-off-by: George Dunlap --- NB that this patch goes on top of Andrew's trace cleanup series: https://lore.kernel.org/xen-devel/20240318163552.3808695-1-andrew.coop...@citrix.com/ CC: Andr

[PATCH 2/3] tools/xenalyze: Ignore HVM_EMUL events harder

2024-04-26 Thread George Dunlap
vcpu data_type in hvm_process for TRC_HVM_EMUL records. Signed-off-by: George Dunlap --- CC: Andrew Cooper CC: Anthony Perard CC: Olaf Hering --- tools/xentrace/xenalyze.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/xentrace/xenalyze.c b/tools/xen

[PATCH 0/3] Further trace improvements

2024-04-26 Thread George Dunlap
Andy's series "xen/trace: Treewide API cleanup": https://lore.kernel.org/xen-devel/20240318163552.3808695-1-andrew.coop...@citrix.com/ George Dunlap (3): x86/hvm/trace: Use a different trace type for AMD processors tools/xenalyze: Ignore HVM_EMUL events harder tools/x

Re: [PATCH] svm: Fix MISRA 8.2 violation

2024-04-26 Thread George Dunlap
On Thu, Apr 25, 2024 at 5:00 PM Andrew Cooper wrote: > > On 25/04/2024 10:12 am, George Dunlap wrote: > > Misra 8.2 requires named parameters in prototypes. Use the name from > > the implementaiton. > > > > Fixes 0d19d3aab0 ("svm/nestedsvm: Introduce nested cap

Re: [PATCH net] xen-netfront: Add missing skb_mark_for_recycle

2024-04-25 Thread George Dunlap
Greg, We're issuing an XSA for this; can you issue a CVE? Thanks, -George Dunlap On Tue, Apr 2, 2024 at 9:25 PM Arthur Borsboom wrote: > After having a better look, I have found the patch in linux-next > > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-ne

[PATCH] svm: Fix MISRA 8.2 violation

2024-04-25 Thread George Dunlap
Misra 8.2 requires named parameters in prototypes. Use the name from the implementaiton. Fixes 0d19d3aab0 ("svm/nestedsvm: Introduce nested capabilities bit"). Signed-off-by: George Dunlap --- CC: Andrew Cooper CC: Jan Beulich CC: Roger Pau Monne CC: Nicola Vetrini --- xe

Re: [PATCH v2 1/3] tools/golang: When returning pointers, actually allocate structrues

2024-04-19 Thread George Dunlap
On Fri, Apr 19, 2024 at 4:27 PM Nick Rosbrook wrote: > > On Fri, Apr 19, 2024 at 10:00 AM George Dunlap > wrote: > > > > In a handful of cases, it was decided to return a pointer to a > > structure rather than the plain structure itself, due to the size. >

Re: Detecting whether dom0 is in a VM

2024-04-19 Thread George Dunlap
On Fri, Apr 19, 2024 at 4:29 PM George Dunlap wrote: > > On Fri, Jul 7, 2023 at 3:56 PM George Dunlap wrote: > >> >>> Xen's public interface offers access to the featuresets known / found / > >> >>> used by the hypervisor. See XEN_SYS

Re: Detecting whether dom0 is in a VM

2024-04-19 Thread George Dunlap
On Fri, Jul 7, 2023 at 3:56 PM George Dunlap wrote: >> >>> Xen's public interface offers access to the featuresets known / found / >> >>> used by the hypervisor. See XEN_SYSCTL_get_cpu_featureset, accessible >> >>> via xc_get_cpu_featureset(). &

[PATCH v2 3/3] tools/golang: Run `go vet` as part of the build process

2024-04-19 Thread George Dunlap
Signed-off-by: George Dunlap --- CC: Nick Rosbrook CC: Anthony PERARD --- tools/golang/xenlight/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/golang/xenlight/Makefile b/tools/golang/xenlight/Makefile index c5bb6b94a8..645e7b3a82 100644 --- a/tools/golang/xenlight/Makefile

[PATCH v2 1/3] tools/golang: When returning pointers, actually allocate structrues

2024-04-19 Thread George Dunlap
attempting to fill them in. Fixes: 453713b1750 ("golang/xenlight: Add host-related functionality") Reported-by: Tobias Fitschen Signed-off-by: George Dunlap Tested-by: Tobias Fitschen --- v2: - Added Fixes: tag - Added Tested-by tag NB this is a candidate for backport. CC: Nick Ro

[PATCH v2 2/3] golang/xenlight: Ensure comments aren't interpreted as docstrings

2024-04-19 Thread George Dunlap
, leading to strange changes, particularly if `go fmt` is run on save. Go through and put a space between non-docstring comments and methods, so that `go fmt` leaves the comments alone. No functional change. Signed-off-by: George Dunlap --- v2: - New (replaced previous `go fmt` patch) CC: Nick

Re: [PATCH 2/3] golang/xenlight: Run `go fmt` on non-generated golang files

2024-04-19 Thread George Dunlap
On Fri, Apr 19, 2024 at 11:59 AM George Dunlap wrote: > > No functional change. > > Signed-off-by: George Dunlap > --- > CC: Nick Rosbrook > CC: Anthony PERARD > --- > tools/golang/xenlight/xenlight.go | 55 +-- > 1 file changed,

[PATCH 2/3] golang/xenlight: Run `go fmt` on non-generated golang files

2024-04-19 Thread George Dunlap
No functional change. Signed-off-by: George Dunlap --- CC: Nick Rosbrook CC: Anthony PERARD --- tools/golang/xenlight/xenlight.go | 55 +-- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/tools/golang/xenlight/xenlight.go b/tools/golang/xenlight

[PATCH 1/3] tools/golang: When returning pointers, actually allocate structrues

2024-04-19 Thread George Dunlap
attempting to fill them in. Reported-by: Tobias Fitschen Signed-off-by: George Dunlap --- This has been compile-tested only; Tobias, I'd appreciate a test if you get a chance. CC: Nick Rosbrook CC: Anthony PERARD --- tools/golang/xenlight/xenlight.go | 3 +++ 1 file changed, 3 inser

[PATCH 3/3] tools/golang: Run `go vet` as part of the build process

2024-04-19 Thread George Dunlap
Signed-off-by: George Dunlap --- CC: Nick Rosbrook CC: Anthony PERARD --- tools/golang/xenlight/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/golang/xenlight/Makefile b/tools/golang/xenlight/Makefile index c5bb6b94a8..645e7b3a82 100644 --- a/tools/golang/xenlight/Makefile

[PATCH] x86/cpuid-policy: Add AMD SVM CPUID leaf to featureset

2024-04-17 Thread George Dunlap
o nothing with the "normal" CPUID bits, and use the feature bit to unconditionally enable VMCBCLEAN. FIXME Move this to a follow-up patch. In recalculate_cpuid_policy(), enable max_fs when nested_hvm() is true. Signed-off-by: George Dunlap --- CC: Andrew Cooper CC: Jan Beulich CC: Roger Pau

Rewritten XSA status page, xsa.json

2024-04-15 Thread George Dunlap
Hey all, Some of you may have noticed that xenbis.xenproject.org/xsa/ doesn't currently list XSA-456. This has prompted me to rewrite the perl code which generates that area of the webpage into golang, which is much easier for the current security team to understand and modify. The draft replace

Re: [XEN PATCH v2 1/2] xen/sched: address violations of MISRA C:2012 Rule 16.3

2024-04-04 Thread George Dunlap
-keyword > fallthrough to meet the requirements to deviate the rule. > > No functional change. > > Signed-off-by: Federico Serafini Acked-by: George Dunlap

Re: [PATCH] do_multicall and MISRA Rule 8.3

2024-04-03 Thread George Dunlap
On Tue, Mar 19, 2024 at 3:39 AM Stefano Stabellini wrote: > > The main use of fixed width types, to me, is in interface structure > > definitions - between Xen and hardware / firmware, or in hypercall > > structures. I'm afraid I have a hard time seeing good uses outside of > > that. Even in inlin

Re: [PATCH v2 3/3] svm/nestedsvm: Introduce nested capabilities bit

2024-03-28 Thread George Dunlap
On Thu, Mar 28, 2024 at 6:44 AM Jan Beulich wrote: > > As to why to have each vendor independent code check for HAP -- there > > are in fact two implementations of the code; it's nice to be able to > > look in one place for each implementation to determine the > > requirements. Additionally, it w

Re: [PATCH v2 3/3] svm/nestedsvm: Introduce nested capabilities bit

2024-03-27 Thread George Dunlap
On Mon, Mar 18, 2024 at 2:17 PM Jan Beulich wrote: > > On 13.03.2024 13:24, George Dunlap wrote: > > In order to make implementation and testing tractable, we will require > > specific host functionality. Add a nested_virt bit to hvm_funcs.caps, > > and return an erro

Re: [PATCH 7/7] xen/trace: Drop old trace API

2024-03-20 Thread George Dunlap
On Mon, Mar 18, 2024 at 4:36 PM Andrew Cooper wrote: > > With all users updated to the new API, drop the old API. This includes all of > asm/hvm/trace.h, which allows us to drop some includes. > > Signed-off-by: Andrew Cooper Reviewed-by: George Dunlap

Re: [PATCH 5/7] xen: Switch to new TRACE() API

2024-03-20 Thread George Dunlap
On Mon, Mar 18, 2024 at 4:36 PM Andrew Cooper wrote: > > (Almost) no functional change. > > irq_move_cleanup_interrupt() changes two smp_processor_id() calls to the 'me' > local variable which manifests as a minor code improvement. All other > differences in the compiled binary are to do with lin

Re: [PATCH 6/7] xen/trace: Update final {__,}trace_var() users to the new API

2024-03-20 Thread George Dunlap
parameter into the appropriate function: 0 -> trace(), 1 -> trace_time(). > No functional change. > > Signed-off-by: Andrew Cooper Reviewed-by: George Dunlap

Re: [PATCH 5/7] xen: Switch to new TRACE() API

2024-03-20 Thread George Dunlap
vlapic->pt.irq); create_periodic_time(current, &vlapic->pt, delta, - is_periodic ? period : 0, vlapic->pt.irq, + timer_period, vlapic->pt.irq, is_periodic ? vlapic_pt_cb : NULL, &vlapic->timer_last_update, false); As with Jan, I'd be OK with checking it in the way it is if you prefer, so: Reviewed-by: George Dunlap

Re: [PATCH 4/7] xen/sched: Clean up trace handling

2024-03-20 Thread George Dunlap
t; > No functional change. > > Signed-off-by: Andrew Cooper > Reviewed-by: Dario Faggioli Reviewed-by: George Dunlap

Re: [PATCH 3/7] xen/rt: Clean up trace handling

2024-03-20 Thread George Dunlap
al change. > > Signed-off-by: Andrew Cooper > Reviewed-by: Dario Faggioli Reviewed-by: George Dunlap

Re: [PATCH 2/7] xen/credit2: Clean up trace handling

2024-03-20 Thread George Dunlap
On Wed, Mar 20, 2024 at 12:16 PM George Dunlap wrote: > > On Mon, Mar 18, 2024 at 4:36 PM Andrew Cooper > wrote: > > > > There is no need for bitfields anywhere - use more sensible types. There is > > also no need to cast 'd' to (unsigned char *) before pas

Re: [PATCH 2/7] xen/credit2: Clean up trace handling

2024-03-20 Thread George Dunlap
On Wed, Mar 20, 2024 at 1:13 PM Jan Beulich wrote: > > On 20.03.2024 13:19, Andrew Cooper wrote: > > On 20/03/2024 12:16 pm, George Dunlap wrote: > >> On Mon, Mar 18, 2024 at 4:36 PM Andrew Cooper > >> wrote: > >>> There is no need for bitfields

Re: [PATCH 2/7] xen/credit2: Clean up trace handling

2024-03-20 Thread George Dunlap
On Wed, Mar 20, 2024 at 12:19 PM Andrew Cooper wrote: > > On 20/03/2024 12:16 pm, George Dunlap wrote: > > On Mon, Mar 18, 2024 at 4:36 PM Andrew Cooper > > wrote: > >> There is no need for bitfields anywhere - use more sensible types. There > >> is > &

Re: [PATCH 2/7] xen/credit2: Clean up trace handling

2024-03-20 Thread George Dunlap
On Mon, Mar 18, 2024 at 4:36 PM Andrew Cooper wrote: > > There is no need for bitfields anywhere - use more sensible types. There is > also no need to cast 'd' to (unsigned char *) before passing it to a function > taking void *. Switch to new trace_time() API. > > No functional change. Hey And

Re: [PATCH 1/7] xen/trace: Introduce new API

2024-03-20 Thread George Dunlap
ll do what I think it should do, and 2) it works both in gcc and clang. We should give Jan a chance to explain his second point more clearly before checking it in; but: Reviewed-by: George Dunlap

Re: [PATCH v5] x86/PoD: tie together P2M update and increment of entry count

2024-03-20 Thread George Dunlap
nks for doing this -- I hadn't responded because I wasn't sure whether I was bikeshedding, and then it sort of fell off my radar. At any rate: Reviewed-by: George Dunlap

Re: [XEN PATCH 10/10] xen/sched: address violations of MISRA C Rule 20.7

2024-03-18 Thread George Dunlap
e problematic in this line wouldn't compile in the line above. But it's almost certainly not worth the effort of documenting or deviating, so: Acked-by: George Dunlap

Re: [PATCH] do_multicall and MISRA Rule 8.3\

2024-03-15 Thread George Dunlap
On Fri, Mar 15, 2024 at 2:13 PM Jan Beulich wrote: > > On 15.03.2024 14:55, Julien Grall wrote: > > Hi Jan, > > > > On 15/03/2024 13:24, Jan Beulich wrote: > >> On 15.03.2024 13:17, George Dunlap wrote: > >>> On Fri, Mar 15, 2024 at 11:57 AM Jan Be

Re: [PATCH] do_multicall and MISRA Rule 8.3\

2024-03-15 Thread George Dunlap
On Fri, Mar 15, 2024 at 11:57 AM Jan Beulich wrote: > > It sounds like Andy and Stefano feel like this is a situation where "a > > fixed width quantity is meant"; absent any further guidance from the > > CODING_STYLE about when fixed widths should or should not be used, I > > don't think this chan

Re: [PATCH] do_multicall and MISRA Rule 8.3\

2024-03-15 Thread George Dunlap
On Fri, Mar 15, 2024 at 6:54 AM Jan Beulich wrote: > > On 15.03.2024 01:21, Stefano Stabellini wrote: > > On Mon, 11 Mar 2024, Julien Grall wrote: > >> On 11/03/2024 11:32, George Dunlap wrote: > >>> On Sat, Mar 9, 2024 at 1:59 AM Stefano Stabellini > >&

Re: [PATCH] SUPPORT.MD: Fix matrix generation after 43c416d0d819 and 77c39a53cf5b

2024-03-15 Thread George Dunlap
On Thu, Mar 14, 2024 at 5:39 PM Julien Grall wrote: > > From: Julien Grall > > The script docs/support-matrix-generate throw the following error on the > latest staging. I wonder if it would be worth adding a follow-up patch to run that script, maybe only when debug=y, so it catches errors in de

Re: [PATCH] docs/misra: document the expected sizes of integer types

2024-03-14 Thread George Dunlap
On Thu, Mar 14, 2024 at 7:36 AM Jan Beulich wrote: > > On 14.03.2024 00:23, Stefano Stabellini wrote: > > Xen makes assumptions about the size of integer types on the various > > architectures. Document these assumptions. > > This all reads as if we required exact widths. Is that really the case?

Re: [PATCH v4] x86/PoD: tie together P2M update and increment of entry count

2024-03-13 Thread George Dunlap
On Wed, Mar 13, 2024 at 2:00 PM Jan Beulich wrote: > > When not holding the PoD lock across the entire region covering P2M > update and stats update, the entry count - if to be incorrect at all - > should indicate too large a value in preference to a too small one, to > avoid functions bailing ear

Re: Mailing list changes

2024-03-13 Thread George Dunlap
On Wed, Mar 13, 2024 at 2:59 PM Kelly Choi wrote: > > Hi everyone, > > We recently discussed some mailing list changes in our last community call. > > Issue: > > Lists.xenproject.org software is outdated, DKIM, DMARC, ARC is no longer > sufficient, and there's no clear update path from Mailman2 t

[PATCH v2 0/3] AMD Nested Virt Preparation

2024-03-13 Thread George Dunlap
features are not present. George Dunlap (3): x86: Move SVM features exposed to guest into hvm_max_cpu_policy nestedsvm: Disable TscRateMSR svm/nestedsvm: Introduce nested capabilities bit docs/designs/nested-svm-cpu-features.md | 111 +++ xen/arch/x86/cpu-policy.c

[PATCH v2 2/3] nestedsvm: Disable TscRateMSR

2024-03-13 Thread George Dunlap
t should when TSCRATEMSR is clear) - Remove ns_tscratio from struct nestedhvm, and all code that touches it Unfortunately this means ripping out the scaling calculation stuff as well, since it's only used in the nested case; it's there in the git tree if we need it for reference wh

[PATCH v2 3/3] svm/nestedsvm: Introduce nested capabilities bit

2024-03-13 Thread George Dunlap
D bits 0-7 have been considered. Bits 10-16 may be considered in a follow-up patch. Signed-off-by: George Dunlap --- v2: - Fixed typo in title - Added hvm_nested_virt_supported() def for !CONFIG_HVM - Rebased over previous changes - Tweak some wording in document - Require npt rather than n

[PATCH v2 1/3] x86: Move SVM features exposed to guest into hvm_max_cpu_policy

2024-03-13 Thread George Dunlap
Currently (nested) SVM features we're willing to expose to the guest are defined in calculate_host_policy, and stored in host_cpu_policy. This is the wrong place for this; move it into calculate_hvm_max_policy(), and store it in hvm_max_cpu_policy. Signed-off-by: George Dunlap --- v2:

Re: [PATCH v3] x86/PoD: tie together P2M update and increment of entry count

2024-03-13 Thread George Dunlap
On Wed, Mar 13, 2024 at 12:25 PM George Dunlap wrote: > I keep missing your post-commit-message remarks due to the way I'm > applying your series. Er, just to be clear, this is a problem with my workflow, not with your patches... -George

Re: [PATCH v3] x86/PoD: tie together P2M update and increment of entry count

2024-03-13 Thread George Dunlap
On Wed, Mar 13, 2024 at 12:19 PM Jan Beulich wrote: > > On 13.03.2024 11:58, George Dunlap wrote: > > On Tue, Mar 12, 2024 at 3:22 PM Jan Beulich wrote: > >> > >> When not holding the PoD lock across the entire region covering P2M > >> update and s

Re: [PATCH v3] x86/PoD: tie together P2M update and increment of entry count

2024-03-13 Thread George Dunlap
BUG_ON(p2m->pod.entry_count < 0); > -pod_unlock(p2m); > > ioreq_request_mapcache_invalidate(d); > } > @@ -1373,6 +1379,8 @@ mark_populate_on_demand(struct domain *d > domain_crash(d); > } > > +pod_unlock(p2m); We're confident that neither domain_crash() nor ioreq_request_mapcache_invalidate() will grab any of the p2m locks? If so, Reviewed-by: George Dunlap

Re: [PATCH v2] x86/PoD: move increment of entry count

2024-03-11 Thread George Dunlap
On Tue, Jan 4, 2022 at 10:58 AM Jan Beulich wrote: > When not holding the PoD lock across the entire region covering P2M > update and stats update, the entry count should indicate too large a > value in preference to a too small one, to avoid functions bailing early > when they find the count is

Re: [PATCH] do_multicall and MISRA Rule 8.3

2024-03-11 Thread George Dunlap
On Sat, Mar 9, 2024 at 1:59 AM Stefano Stabellini wrote: > > I would like to resurrect this thread and ask other opinions. > > > On Thu, 23 Nov 2023, Jan Beulich wrote: > > On 22.11.2023 22:46, Stefano Stabellini wrote: > > > Two out of three do_multicall definitions/declarations use uint32_t as >

Re: [PATCH v2] Argo: don't obtain excess page references

2024-03-07 Thread George Dunlap
On Wed, Mar 6, 2024 at 11:38 PM Christopher Clark wrote: > > On Sun, Feb 18, 2024 at 10:01 AM Julien Grall wrote: > > > > Hi Jan, > > > > On 14/02/2024 10:12, Jan Beulich wrote: > > > find_ring_mfn() already holds a page reference when trying to obtain a > > > writable type reference. We shouldn'

Re: [PATCH 5/6] nestedsvm: Remove bogus debug message from nestedsvm_check_intercepts

2024-03-04 Thread George Dunlap
On Tue, Feb 27, 2024 at 12:47 AM Andrew Cooper wrote: > > On 06/02/2024 1:20 am, George Dunlap wrote: > > Changeset ef3e8db8068 ("x86/hvm: Corrections and improvements to > > unhandled vmexit logging") introduced a printk to the default path of

Re: [PATCH 6/6] svm/nestedvm: Introduce nested capabilities bit

2024-02-22 Thread George Dunlap
On Tue, Feb 20, 2024 at 12:25 AM Jan Beulich wrote: > > On 06.02.2024 02:20, George Dunlap wrote: > > --- /dev/null > > +++ b/docs/designs/nested-svm-cpu-features.md > > @@ -0,0 +1,110 @@ > > +# Nested SVM (AMD) CPUID requirements > > + > > +The first ste

Re: [PATCH 5/6] nestedsvm: Remove bogus debug message from nestedsvm_check_intercepts

2024-02-22 Thread George Dunlap
On Mon, Feb 19, 2024 at 11:56 PM Jan Beulich wrote: > > On 06.02.2024 02:20, George Dunlap wrote: > > Changeset ef3e8db8068 ("x86/hvm: Corrections and improvements to > > unhandled vmexit logging") introduced a printk to the default path of > > the switch state

Re: [PATCH 4/6] nestedsvm: Disable TscRateMSR

2024-02-22 Thread George Dunlap
On Thu, Feb 22, 2024 at 5:50 PM Jan Beulich wrote: > > On 22.02.2024 10:30, George Dunlap wrote: > > On Wed, Feb 21, 2024 at 6:52 PM Jan Beulich wrote: > >>>> But then of course Andrew may know of reasons why all of this is done > >>>> in calculate_hos

Re: [PATCH 4/6] nestedsvm: Disable TscRateMSR

2024-02-22 Thread George Dunlap
On Wed, Feb 21, 2024 at 6:52 PM Jan Beulich wrote: > >> But then of course Andrew may know of reasons why all of this is done > >> in calculate_host_policy() in the first place, rather than in HVM > >> policy calculation. > > > > It sounds like maybe you're confusing host_policy with > > x86_capab

Re: [PATCH 2/2] almost fully ignore zero-size flush requests

2024-02-21 Thread George Dunlap
On Wed, Feb 21, 2024 at 3:17 PM Jan Beulich wrote: > > #1 by itself is probably enough to counterindicate this kind of > > behavior. Add them together, and I'm inclined to say that we should > > write a policy against such optimizations, without specific > > justifications. > > It's not like I di

Re: [PATCH 4/6] nestedsvm: Disable TscRateMSR

2024-02-21 Thread George Dunlap
On Mon, Feb 19, 2024 at 11:22 PM Jan Beulich wrote: > > On 06.02.2024 02:20, George Dunlap wrote: > > For now, just disable the functionality entirely until we can > > implement it properly: > > > > - Don't set TSCRATEMSR in the host CPUID policy > >

Re: [PATCH 1/6] xen/hvm: Convert hap_capabilities into a bitfield

2024-02-20 Thread George Dunlap
On Wed, Feb 21, 2024 at 3:23 PM Jan Beulich wrote: > > On 21.02.2024 08:02, George Dunlap wrote: > > On Mon, Feb 19, 2024 at 9:36 PM Jan Beulich wrote: > >> On 06.02.2024 02:20, George Dunlap wrote: > >>> --- a/xen/arch/x86/hvm/vmx/vmcs.c > >>> +++

Re: [PATCH 3/6] xen/hvm: Move other hvm_function_table booleans into the caps bitfield

2024-02-20 Thread George Dunlap
On Tue, Feb 20, 2024 at 12:08 AM Jan Beulich wrote: > > On 06.02.2024 02:20, George Dunlap wrote: > > --- a/xen/arch/x86/include/asm/hvm/hvm.h > > +++ b/xen/arch/x86/include/asm/hvm/hvm.h > > @@ -86,20 +86,19 @@ struct hvm_vcpu_nonreg_state { > > struct hvm_functi

Re: [PATCH 2/6] svm: Improve type of cpu_has_svm_feature

2024-02-20 Thread George Dunlap
On Mon, Feb 19, 2024 at 11:24 PM Jan Beulich wrote: > > On 06.02.2024 02:20, George Dunlap wrote: > > --- a/xen/arch/x86/include/asm/hvm/svm/svm.h > > +++ b/xen/arch/x86/include/asm/hvm/svm/svm.h > > @@ -38,7 +38,10 @@ extern u32 svm_feature_flags; > > #define SVM_F

Re: [PATCH 2/6] svm: Improve type of cpu_has_svm_feature

2024-02-20 Thread George Dunlap
On Mon, Feb 19, 2024 at 10:03 PM Jan Beulich wrote: > > On 06.02.2024 02:20, George Dunlap wrote: > > The "effective type" of the cpu_has_svm_feature macro is effectively > > an unsigned log with one bit set (or not); at least one place someone > > felt compelled

Re: [PATCH 1/6] xen/hvm: Convert hap_capabilities into a bitfield

2024-02-20 Thread George Dunlap
On Mon, Feb 19, 2024 at 9:36 PM Jan Beulich wrote: > > On 06.02.2024 02:20, George Dunlap wrote: > > hvm_function_table is an internal structure; rather than manually > > |-ing and &-ing bits, just make it a boolean bitfield and let the > > compiler do all the work.

Re: [PATCH V3] libxl: Add "grant_usage" parameter for virtio disk devices

2024-02-20 Thread George Dunlap
is retained > (we enable grants if backend-domid != 0). > > Signed-off-by: Oleksandr Tyshchenko Golang bits: Acked-by: George Dunlap

  1   2   3   4   5   6   7   8   9   10   >