Re: [PATCH for-4.22 v3 2/2] x86/io_apic: Use next_entry() in loops

2025-10-16 Thread Jason Andryuk
On 2025-10-16 02:53, Jan Beulich wrote: On 15.10.2025 23:04, Jason Andryuk wrote: io_apic.c has a lot of ad-hoc for(;;) and while(1) loops for iterating over irq_pin_list entries. Replace them with a standardized for loop using next_entry() to advance entry. Signed-off-by: Jason Andryuk

Re: [PATCH for-4.21 6/6] github/coverity: switch to building with json-c instead of yajl

2025-10-15 Thread Jason Andryuk
On 2025-10-15 09:40, Roger Pau Monne wrote: Switch the json library used by the Coverity runs. Signed-off-by: Roger Pau Monné Reviewed-by: Jason Andryuk

Re: [PATCH for-4.21 5/6] tools/xl: fix possible uninitialized usage in printf_info()

2025-10-15 Thread Jason Andryuk
ernal XenServer Coverity instance. Fixes: f6c6f2679d49 ("libxl: Convert libxl__object_to_json() to json-c") Signed-off-by: Roger Pau Monné Reviewed-by: Jason Andryuk

Re: [PATCH for-4.21 2/6] tools/libxl: avoid freeing stack rubble in libxl__json_object_to_json()

2025-10-15 Thread Jason Andryuk
erity instance. Fixes: 75fa670e582c ("libxl: Convert libxl__json_object_to_json() to json_object") Signed-off-by: Roger Pau Monné Reviewed-by: Jason Andryuk

Re: [PATCH v2] MAINTAINERS: Add myself as an AMD SVM & IOMMU reviewer

2025-10-09 Thread Jason Andryuk
On 2025-10-09 08:36, Jan Beulich wrote: On 08.10.2025 22:11, Jason Andryuk wrote: --- a/MAINTAINERS +++ b/MAINTAINERS @@ -220,6 +220,23 @@ F: xen/drivers/acpi/ F:xen/include/acpi/ F:tools/libacpi/ +AMD IOMMU +M: Jan Beulich +M: Andrew Cooper +M: Roger Pau Monné +R

Re: [PATCH v2] tools: init-dom0less: Replace err() with more informative messages

2025-10-07 Thread Jason Andryuk
- does not propagate error codes to the caller. - skips "init_domain failed" message by exiting early. - early exit prevents setting up any remaining domains. Replace err() with more informative messages propagating rc when possible. Signed-off-by: Michal Orzel Reviewed-by: Jason Andryuk Thanks, Jason

[PATCH] MAINTAINERS: Add myself as an AMD SVM & IOMMU reviewer

2025-10-02 Thread Jason Andryuk
Split out AMD SVM and AMD IOMMU, and add myself as a reviewer. Jan, Andrew and Roger are set as maintainers as they were for the X86 entry. Signed-off-by: Jason Andryuk --- MAINTAINERS | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b

Re: [XEN PATCH v2 1/8] tools/configure: Introduce deps on json-c lib for libxl

2025-09-30 Thread Jason Andryuk
jl" will make a change to only have one or the other once the code is ready to build with only json-c. Signed-off-by: Anthony PERARD Reviewed-by: Jason Andryuk Thanks, Jason

Re: [PATCH 1/2] x86/IO-APIC: drop setup_ioapic_ids_from_mpc()

2025-09-17 Thread Jason Andryuk
rogram inputs that can cause it to be executed." Otoh it's "only" __init code. Signed-off-by: Jan Beulich Reviewed-by: Jason Andryuk

Re: domU reboot claim failed

2025-09-11 Thread Jason Andryuk
Thanks, everyone. On 2025-09-10 17:57, Andrew Cooper wrote: On 10/09/2025 7:58 pm, Jason Andryuk wrote: Hi, We're running Android as a guest and it's running the Compatibility Test Suite.  During the CTS, the Android domU is rebooted multiple times. In the middle of the CTS,

domU reboot claim failed

2025-09-10 Thread Jason Andryuk
Hi, We're running Android as a guest and it's running the Compatibility Test Suite. During the CTS, the Android domU is rebooted multiple times. In the middle of the CTS, we've seen reboot fail. xl -vvv shows: domainbuilder: detail: Could not allocate memory for HVM guest as we cannot claim

Re: [PATCH] x86/mcheck: allow varying bank counts per CPU

2025-09-08 Thread Jason Andryuk
On 2025-09-08 05:08, Jan Beulich wrote: On 05.09.2025 19:02, Jason Andryuk wrote: On 2025-09-05 12:52, Soham Dandapat wrote: In mca_cap_init function,the mcabanks_alloc allocates and initializes an mca_banks structure for managing MCA banks, setting up a bank map and storing the specified or

Re: [PATCH] symbols: discard stray file symbols

2025-09-07 Thread Jason Andryuk
On 2025-04-16 05:00, Jan Beulich wrote: By observation GNU ld 2.25 may emit file symbols for .data.read_mostly when linking xen.efi. Due to the nature of file symbols in COFF symbol tables (see the code comment) the symbols_offsets[] entries for such symbols would cause assembler warnings regardi

Re: [PATCH] x86/mcheck: allow varying bank counts per CPU

2025-09-07 Thread Jason Andryuk
gs will not be collected for any bank. The fix is to solve this problem. Fixes: 560cf418c845 ("x86/mcheck: allow varying bank counts per CPU") Signed-off-by: Soham Dandapat Reviewed-by: Jason Andryuk Maybe the patch subject should be "x86/mcheck: Fix mca bank initialization" to differentiate from the Fixes commit? Thanks, Jason

Re: [PATCH] x86/apic: Avoid infinite loop in io_apic_level_ack_pending()

2025-09-05 Thread Jason Andryuk
On 2025-09-05 03:39, Jan Beulich wrote: On 04.09.2025 23:51, Jason Andryuk wrote: io_apic_level_ack_pending() will end up in an infinite loop if entry->pin == -1. entry does not change, so it will keep reading -1. Switched to breaking out of the loop. Fixes: f821102450a1 ("x86: IRQ M

[PATCH] x86/apic: Avoid infinite loop in io_apic_level_ack_pending()

2025-09-04 Thread Jason Andryuk
io_apic_level_ack_pending() will end up in an infinite loop if entry->pin == -1. entry does not change, so it will keep reading -1. Switched to breaking out of the loop. Fixes: f821102450a1 ("x86: IRQ Migration logic enhancement.") Signed-off-by: Jason Andryuk --- Notice

Re: [PATCH v9 1/8] xen/cpufreq: embed hwp into struct cpufreq_policy{}

2025-09-04 Thread Jason Andryuk
On 2025-09-04 07:50, Jan Beulich wrote: On 04.09.2025 08:35, Penny Zheng wrote: For cpus sharing one cpufreq domain, cpufreq_driver.init() is only invoked on the firstcpu, so current per-CPU hwp driver data struct hwp_drv_data{} actually fails to be allocated for cpus other than the first one. >

Re: [PATCH v8 8/8] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver

2025-09-03 Thread Jason Andryuk
On 2025-09-02 23:14, Penny, Zheng wrote: [Public] -Original Message- From: Jan Beulich Sent: Thursday, August 28, 2025 7:07 PM To: Penny, Zheng Cc: Huang, Ray ; Anthony PERARD ; Andrew Cooper ; Roger Pau Monné ; xen-devel@lists.xenproject.org Subject: Re: [PATCH v8 8/8] xen/cpufreq: A

Re: [XEN PATCH 06/11] libxl: convert libxl__json_object_to_yajl_gen to libxl__json_object_to_libjsonc_object

2025-08-31 Thread Jason Andryuk
On 2025-08-29 09:56, Anthony PERARD wrote: On Wed, Aug 27, 2025 at 11:37:07AM -0400, Jason Andryuk wrote: On 2025-08-08 10:55, Anthony PERARD wrote: +case JSON_NUMBER: +*jso_out = json_object_new_string(obj->u.string); Is JSON_NUMBER calling json_object_new_string() correct?

Re: [PATCH v2 3/5] symbols: arrange to know where functions end

2025-08-31 Thread Jason Andryuk
On 2025-08-29 02:59, Jan Beulich wrote: On 28.08.2025 19:16, Jason Andryuk wrote: On 2025-08-28 12:11, Jan Beulich wrote: On 28.08.2025 09:28, Jan Beulich wrote: On 28.08.2025 03:03, Jason Andryuk wrote: On 2025-04-02 09:58, Jan Beulich wrote: --- a/xen/tools/symbols.c +++ b/xen/tools

Re: [XEN PATCH 04/11] tools/configure: Introduce deps on json-c lib for libxl

2025-08-31 Thread Jason Andryuk
On 2025-08-29 09:17, Anthony PERARD wrote: On Wed, Aug 27, 2025 at 11:01:59AM -0400, Jason Andryuk wrote: On 2025-08-08 10:55, Anthony PERARD wrote: From: Anthony PERARD To replace yajl. Introduce YAJL_LIBS variable, to be able to remove "-lyajl" later. Signed-off-by: Anth

Re: [PATCH] x86: introduce "hot" and "cold" page copying functions

2025-08-31 Thread Jason Andryuk
On 2025-08-29 02:29, Jan Beulich wrote: On 28.08.2025 23:33, Jason Andryuk wrote: On 2025-08-28 05:17, Jan Beulich wrote: The present copy_page_sse2() is useful in case the destination page isn't going to get touched again soon, or if we want to limit churn on the caches. Just rename i

Re: [PATCH v8 3/8] xen/cpufreq: implement amd-cppc driver for CPPC in passive mode

2025-08-28 Thread Jason Andryuk
On 2025-08-28 07:22, Jan Beulich wrote: On 28.08.2025 12:03, Penny Zheng wrote: +static int cf_check amd_cppc_cpufreq_target(struct cpufreq_policy *policy, +unsigned int target_freq, +unsigned int relation) +

Re: [PATCH] x86: introduce "hot" and "cold" page copying functions

2025-08-28 Thread Jason Andryuk
;t switch any callers just yet - this will be the subject of subsequent changes. Signed-off-by: Jan Beulich Reviewed-by: Jason Andryuk --- Of course both pages can be independently hot/cold, and hence more flavors may be necessary here. To avoid the NOP padding (also in clear_page_hot()) we

Re: [PATCH v2 3/5] symbols: arrange to know where functions end

2025-08-28 Thread Jason Andryuk
On 2025-08-28 12:11, Jan Beulich wrote: On 28.08.2025 09:28, Jan Beulich wrote: On 28.08.2025 03:03, Jason Andryuk wrote: On 2025-04-02 09:58, Jan Beulich wrote: --- a/xen/tools/symbols.c +++ b/xen/tools/symbols.c @@ -318,24 +334,42 @@ static void write_src(void) printf("#e

MCA hypercall with PVH

2025-08-27 Thread Jason Andryuk
Hi, The MCA hypercall, do_mca(), is only available for PV. That is, it's only added to the hypercall table for PV. Is there a particular reason it was omitted from PVH, or did PVH dom0 just not exist? Thanks, Jason

Re: [PATCH v2 2/3] xen/events: Return -EEXIST for bound VIRQs

2025-08-27 Thread Jason Andryuk
On 2025-08-27 11:21, Jürgen Groß wrote: On 26.08.25 02:55, Jason Andryuk wrote: Change find_virq() to return -EEXIST when a VIRQ is bound to a different CPU than the one passed in.  With that, remove the BUG_ON() from bind_virq_to_irq() to propogate the error upwards. Some VIRQs are per-cpu

Re: [PATCH] libxl: preserve errno in libxl__xcinfo2xlinfo()

2025-08-27 Thread Jason Andryuk
; in libxl. I wonder if it would be better to special case libxl_flask_sid_to_context() to preserve errno on ENOSYS. flask returning ENOSYS is common, but libxl_flask_sid_to_context() can legitimately have error. I guess this is fine if we want to use this approach: Reviewed-by: Jason Andryuk

Re: [PATCH] libxl: except Dom0 from setting PoD target

2025-08-27 Thread Jason Andryuk
On 2025-08-27 01:53, Jan Beulich wrote: Dom0 is never started in PoD mode, and hence it can at "best" do harm if we try to set a PoD target for it. Signed-off-by: Jan Beulich Reviewed-by: Jason Andryuk Did you observe an issue, or just notice this when inspecting the code? I

Re: [PATCH] libxl: respect unset video_memkb for Dom0

2025-08-27 Thread Jason Andryuk
On 2025-08-27 01:56, Jan Beulich wrote: Without this, Dom0 will have have a curiously off-by-1 target_memkb value displayed by "xl list -l". Signed-off-by: Jan Beulich Reviewed-by: Jason Andryuk In theory, b_info->video_memkb should have been defaulted to 0. In practice

Re: [PATCH v2 5/5] symbols: prefer symbols which have a type

2025-08-27 Thread Jason Andryuk
"Function" is only forward- looking at this point: The function-ness of symbols (much like their size) is lost when linking PE/COFF binaries from ELF objects with GNU ld up to at least 2.44. Signed-off-by: Jan Beulich Reviewed-by: Jason Andryuk

Re: [PATCH v2 4/5] symbols: centralize and re-arrange $(all_symbols) calculation

2025-08-27 Thread Jason Andryuk
gging. Signed-off-by: Jan Beulich Reviewed-by: Jason Andryuk

Re: [PATCH v2 3/5] symbols: arrange to know where functions end

2025-08-27 Thread Jason Andryuk
On 2025-04-02 09:58, Jan Beulich wrote: When determining the symbol for a given address (e.g. for the %pS logging format specifier), so far the size of a symbol (function) was assumed to be everything until the next symbol. There may be gaps though, which would better be recognizable in output (o

[PATCH v3 2/3] xen/events: Return -EEXIST for bound VIRQs

2025-08-27 Thread Jason Andryuk
up the irq, since we don't know which per_cpu(virq_to_irq) it will be in. Cc: sta...@vger.kernel.org Signed-off-by: Jason Andryuk --- v3: Cc: stable as a pre-req for the subsequent virg tracking change Call __unbind_from_irq() on error ro avoid leaking info v2: New --- drivers/xen/e

Re: [PATCH v2 2/5] symbols: split symbols_num_syms

2025-08-27 Thread Jason Andryuk
-by: Jason Andryuk

[PATCH v3 3/3] xen/events: Update virq_to_irq on migration

2025-08-27 Thread Jason Andryuk
q_to_irq mappings to keep them update to date with the current cpu. This ensures the correct virq_to_irq is cleared in __unbind_from_irq(). Fixes: e46cdb66c8fc ("xen: event channels") Cc: sta...@vger.kernel.org Signed-off-by: Jason Andryuk --- v3: Kernel style brace placement Delay setting o

Re: [PATCH v2 1/5] symbols: add minimal self-test

2025-08-27 Thread Jason Andryuk
On 2025-04-02 09:57, Jan Beulich wrote: ... before making changes to the involved logic. Signed-off-by: Jan Beulich Reviewed-by: Jason Andryuk

[PATCH v3 0/3] xen/events: Fix Global and Domain VIRQ tracking

2025-08-27 Thread Jason Andryuk
with patch 3. Jason Andryuk (3): xen/events: Cleanup find_virq() return codes xen/events: Return -EEXIST for bound VIRQs xen/events: Update virq_to_irq on migration drivers/xen/events/events_base.c | 37 +--- 1 file changed, 29 insertions(+), 8 deletions(-) -- 2.34.1

[PATCH v3 1/3] xen/events: Cleanup find_virq() return codes

2025-08-27 Thread Jason Andryuk
. Fixes: 62cc5fc7b2e0 ("xen/pv-on-hvm kexec: rebind virqs to existing eventchannel ports") Cc: sta...@vger.kernel.org Signed-off-by: Jason Andryuk Reviewed-by: Jan Beulich Reviewed-by: Juergen Gross --- v3: Reduce rc's scope Add R-b: Jan Mention false success in commit message Add F

Re: [XEN PATCH 09/11] tools/libxenstat: Use json-c when available

2025-08-27 Thread Jason Andryuk
On 2025-08-08 10:56, Anthony PERARD wrote: From: Anthony PERARD This is mainly a copy of the existing code in yajl and use json-c instead. Signed-off-by: Anthony PERARD Reviewed-by: Jason Andryuk

Re: [XEN PATCH 08/11] libxl: convert libxl__json_object_to_json() to json_object

2025-08-27 Thread Jason Andryuk
On 2025-08-08 10:55, Anthony PERARD wrote: From: Anthony PERARD But keep the implementation done for YAJL. Signed-off-by: Anthony PERARD Reviewed-by: Jason Andryuk

Re: [XEN PATCH 07/11] libxl: libxl__object_to_json() to json-c

2025-08-27 Thread Jason Andryuk
i=0; i<4; i++) { typedef uint32_t libxl_hwcap[8]; I see this is the same as the yajl implementation, but should this be 8? The remainder looks good: Reviewed-by: Jason Andryuk Thanks, Jason +json_object *jso_value = json_object_new_int((*p)[i]); +if (!jso_value) +

Re: [XEN PATCH 06/11] libxl: convert libxl__json_object_to_yajl_gen to libxl__json_object_to_libjsonc_object

2025-08-27 Thread Jason Andryuk
rect? It looks like the yajl code falls back to a string, so that is okay but surprising. So I just want to double check. If so: Reviewed-by: Jason Andryuk Thanks, Jason +if (!*jso_out) +return ERROR_NOMEM; +return 0;

Re: [XEN PATCH 05/11] libxl: Convert libxl__json_parse() to use json-c

2025-08-27 Thread Jason Andryuk
to let the compiler know we want to copy the string without the terminating nul, as we are adding it just after. Also, it should be possible to keep using YAJL parser when json-c library isn't available. Signed-off-by: Anthony PERARD Reviewed-by: Jason Andryuk

Re: [XEN PATCH 04/11] tools/configure: Introduce deps on json-c lib for libxl

2025-08-27 Thread Jason Andryuk
On 2025-08-08 10:55, Anthony PERARD wrote: From: Anthony PERARD To replace yajl. Introduce YAJL_LIBS variable, to be able to remove "-lyajl" later. Signed-off-by: Anthony PERARD Should the two configure changes be merged and placed at the end of the series? That avoids a half implemented

Re: [XEN PATCH 03/11] libxl: remove duplicated libxl__yajl_gen_asciiz() prototype

2025-08-27 Thread Jason Andryuk
On 2025-08-08 10:55, Anthony PERARD wrote: From: Anthony PERARD Signed-off-by: Anthony PERARD Reviewed-by: Jason Andryuk

Re: [XEN PATCH 01/11] xl: move printf_info prototype to an header

2025-08-27 Thread Jason Andryuk
On 2025-08-08 10:55, Anthony PERARD wrote: From: Anthony PERARD In a single place. Signed-off-by: Anthony PERARD Reviewed-by: Jason Andryuk

Re: [XEN PATCH 02/11] libxl: Remove duplicate libxl_domain_config_gen_json prototype

2025-08-27 Thread Jason Andryuk
ony PERARD Reviewed-by: Jason Andryuk

Re: [PATCH 3/3] drivers/xen/gntdev: use xen_pv_domain() instead of cached value

2025-08-27 Thread Jason Andryuk
Reviewed-by: Jason Andryuk

Re: [PATCH 2/3] xen: replace XENFEAT_auto_translated_physmap with xen_pv_domain()

2025-08-27 Thread Jason Andryuk
Reviewed-by: Jason Andryuk

Re: [PATCH 1/3] xen: rework xen_pv_domain()

2025-08-27 Thread Jason Andryuk
FIG_XEN_PV will be smaller due to dead code elimination. Set the X86_FEATURE_XENPV feature very early, as xen_pv_domain() is used rather early, too. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [PATCH v3 8/8] xen/dom0less: store xenstore event channel in page

2025-08-27 Thread Jason Andryuk
On 2025-08-27 04:03, Orzel, Michal wrote: On 26/08/2025 23:08, Jason Andryuk wrote: Write the associated event channel into the xenstore page so xenstored can read it. xenstored can map the grant by the reserved grant table entry, and then read out the event channel and bind it. This

Re: [PATCH v3 8/8] xen/dom0less: store xenstore event channel in page

2025-08-27 Thread Jason Andryuk
On 2025-08-27 03:58, Jan Beulich wrote: On 26.08.2025 23:08, Jason Andryuk wrote: --- a/xen/common/device-tree/dom0less-build.c +++ b/xen/common/device-tree/dom0less-build.c @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -120,8 +121,14 @@ static void

[PATCH v3 3/8] tools/init-dom0less: Only introduce un-introduced domains

2025-08-26 Thread Jason Andryuk
In preparation for supporting already-introduced domain, only call xs_introduce_domain() if a domain is not already introduced. Their xenstore entries will be written, but the xenstore introduction is skipped. Signed-off-by: Jason Andryuk --- v3: Reordered --- tools/helpers/init-dom0less.c

[PATCH v3 7/8] tools/init-dom0less: Continue on error

2025-08-26 Thread Jason Andryuk
value indicating failure. Signed-off-by: Jason Andryuk --- v3: Use != 0 since there are both positive and negative errors --- tools/helpers/init-dom0less.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/helpers/init-dom0less.c b/tools/helpers/init-dom0less.c

[PATCH v3 1/8] tools/init-dom0less: Make handles global

2025-08-26 Thread Jason Andryuk
with the libxenstore functions that take a handle, transation, and then additional arguments. Suggested-by: Juergen Gross Signed-off-by: Jason Andryuk --- v3: New --- tools/helpers/init-dom0less.c | 37 +++ 1 file changed, 16 insertions(+), 21 deletions(-) diff

[PATCH v3 8/8] xen/dom0less: store xenstore event channel in page

2025-08-26 Thread Jason Andryuk
: Jason Andryuk --- v2: No change This should go in after the init-dom0less changes so init-dom0less is ready for xenstored automatically introducing domains. I'm looking for feedback. This is ARM-only for the time being, but that is the only in-tree user of this code. From the perspective,

[PATCH v3 5/8] tools/init-dom0less: Use introduced to determine no-enhanced

2025-08-26 Thread Jason Andryuk
n. It relies on the local socket xenstore connections being considered privileged. oxenstored has not been updated, so the exist code remains for backwards compatibility. Signed-off-by: Jason Andryuk --- v3: New --- tools/helpers/init-dom0less.c | 18 +++--- 1 file changed, 11 inser

[PATCH v3 4/8] tools/init-dom0less: Switch domain_exists to check xenstore name

2025-08-26 Thread Jason Andryuk
Previously, the xenstore "introduced" state was used to avoid running init-dom0less twice on the same domain. With xenstored auto-introduction, that can no longer be used. Instead check of the domain's name has been set and use that to determine whether or not to bail out. Signe

[PATCH v3 6/8] tools/init-dom0less: Remove use of err()

2025-08-26 Thread Jason Andryuk
err() is fatal - print a message and exit. We want init-dom0less to continue on as much as possible, so replace with returning an error. Signed-off-by: Jason Andryuk --- v3: New --- tools/helpers/init-dom0less.c | 24 1 file changed, 16 insertions(+), 8 deletions

[PATCH v3 2/8] tools/init-dom0less: Factor out xenstore setup

2025-08-26 Thread Jason Andryuk
Factor out the xenstore setup code into configure_xenstore(). This is in preparation for handling already-introduced domains. Signed-off-by: Jason Andryuk --- v3: Remove handle passing --- tools/helpers/init-dom0less.c | 39 +-- 1 file changed, 28 insertions

[PATCH v3 0/8] init-dom0less and dom0less xenstore evtchn

2025-08-26 Thread Jason Andryuk
. Once that is done, dom0less code can populate the event channel in the xenstore page (which triggers the auto-population). The previous posting's ordering of "xen/dom0less: store xenstore event channel in page" before init-dom0less changes would have been broken. Jason Andryuk (8

Re: [PATCH v5 00/11] xenstored patches from split hardware control

2025-08-26 Thread Jason Andryuk
On 2025-08-26 11:53, Jan Beulich wrote: On 26.07.2025 01:58, Jason Andryuk wrote: This is a subset of patches focusing on xenstored changes from my split hardware control domain series. It should address the stubdom breakage from the previous series. stubdom was tested in gitlab-ci - xl list

Re: [PATCH v2 1/3] xen/events: Cleanup find_virq() return codes

2025-08-26 Thread Jason Andryuk
On 2025-08-26 03:22, Jan Beulich wrote: On 26.08.2025 02:55, Jason Andryuk wrote: rc is overwritten by the evtchn_status hypercall in each iteration, so the return value will be whatever the last iteration is. Which may even be a false "success". Especially for that it feels like

[PATCH v2 3/3] xen/events: Update virq_to_irq on migration

2025-08-25 Thread Jason Andryuk
q_to_irq mappings to keep them update to date with the current cpu. This ensures the correct virq_to_irq is cleared in __unbind_from_irq(). Fixes: e46cdb66c8fc ("xen: event channels") Cc: sta...@vger.kernel.org Signed-off-by: Jason Andryuk --- V2: Different approach changing virq_to_irq ---

[PATCH v2 1/3] xen/events: Cleanup find_virq() return codes

2025-08-25 Thread Jason Andryuk
rc is overwritten by the evtchn_status hypercall in each iteration, so the return value will be whatever the last iteration is. Change to an explicit -ENOENT for an un-found virq and return 0 on a successful match. Signed-off-by: Jason Andryuk --- v2: New --- drivers/xen/events/events_base.c

[PATCH v2 2/3] xen/events: Return -EEXIST for bound VIRQs

2025-08-25 Thread Jason Andryuk
up the irq, since we don't know which per_cpu(virq_to_irq) it will be in. Signed-off-by: Jason Andryuk --- V2: New --- drivers/xen/events/events_base.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/xen/events/events_base.c b/drivers/xen/e

[PATCH v2 0/3] xen/events: Fix Global and Domain VIRQ tracking

2025-08-25 Thread Jason Andryuk
v2 is now a series first changing find_virq() to return -EEXIST in some cases, and then tracking cpu movement of VIRQs. This keeps ensures the cpu is correct when calling unbind_from_irq(). Jason Andryuk (3): xen/events: Cleanup find_virq() return codes xen/events: Return -EEXIST for bound

Re: [Reminder] Feature Freeze is Fri Aug 29, 2025

2025-08-25 Thread Jason Andryuk
On 2025-08-25 11:50, Oleksii Kurochko wrote: Hello community, I’d like to remind everyone that the Feature Freeze deadline is approaching, and we still have some outstanding requests from the community for patch series to be merged into 4.21: 1. Enable guest suspend/resume support on ARM via vP

[PATCH v2 1/3] xenconsole: Add connection flag

2025-08-22 Thread Jason Andryuk
cted. Signed-off-by: Jason Andryuk --- v2: Rename "connection" Use uint8_t v1: Remove evtchn notify call Set connected later when there is no error RFC v3: Flip flag values so 0 is connected. The other option would be to add: uint32_t features uint32_t connected New domUs would che

[PATCH v2 3/3] libs/guest: Set console as disconnected on resume

2025-08-22 Thread Jason Andryuk
There is currently an asymmetry between HVM where the page is cleared and PV where the contents are restored. Add xc_dom_console_set_disconnected() to only set the connection flag for PV guests. xenconsoled is responsible for setting the console connected when it attaches. Signed-off-by: Jason

[PATCH v2 2/3] libs/guest: Set console page to disconnected

2025-08-22 Thread Jason Andryuk
Initialize xencons_interface's connection field to XENCONSOLE_DISCONNECTED. xenconsoled will mark the page as connected when it establishes the connection. Signed-off-by: Jason Andryuk --- xc_dom_console_init() seems closer to the functionality of the gnttab functions, so I put

[PATCH v2 0/3] xenconsole: Add connection flag

2025-08-22 Thread Jason Andryuk
Add a connection flag to the console interface page so a domain can tell if it is connected or not. This became a series in v2 to add flag setting to libxenguest. Jason Andryuk (3): xenconsole: Add connection flag libs/guest: Set console page to disconnected libs/guest: Set console as

[PATCH] xen/dom0less: Clear xenstore page

2025-08-20 Thread Jason Andryuk
citly zero the page to avoid this. Fixes: f78895ad78c9 ("tools/xenstored: Read event channel from xenstored page") Signed-off-by: Jason Andryuk --- Tweaked stubdom & dom0less C xenstored pipeline success: Test CI pipeline: https://gitlab.com/xen-project/people/jandryuk-amd/xen/-/pipel

Re: [PATCH] tools/xenstored: fix possible NULL deref

2025-08-20 Thread Jason Andryuk
On 2025-08-20 06:46, Juergen Gross wrote: Avoid dereferencing NULL in introduce_domain() when called during live update. Coverity ID: 1665111 Fixes: f78895ad78c9 ("tools/xenstored: Read event channel from xenstored page") Signed-off-by: Juergen Gross Reviewed-by: Jason Andryu

Re: [PATCH v2 2/2] common: make page_{is,get}_ram_type() x86-only

2025-08-19 Thread Jason Andryuk
On 2025-08-18 03:57, Jan Beulich wrote: The classification is pretty E820-centric anyway, and all uses of the function are now in x86-only code. Switch the boolean return type to properly use bool while at it. Signed-off-by: Jan Beulich Reviewed-by: Jason Andryuk

Re: [PATCH v2 1/2] Arm: drop assertion from page_is_ram_type()

2025-08-19 Thread Jason Andryuk
shouldn't be called on ARM just yet". However, dropping the assertion from a function of this name is deemed problematic. Rename it to better reflect its sole purpose outside of x86-specific code. Fixes: 214c4cd94a80 ("xen: arm: stub page_is_ram_type") Signed-off-by: Jan

Re: [PATCH v1] xenconsole: Add connected flag

2025-08-18 Thread Jason Andryuk
On 2025-08-07 03:00, Jürgen Groß wrote: On 07.08.25 03:56, Jason Andryuk wrote: With hyperlaunch, a domU can start before its console ring is connected by xenconsoled.  With nothing emptying the ring, it can quickly fill during boot.  In domU_write_console(), __write_console() returns 0 when

Re: [PATCH] drivers/xen/xenbus: remove quirk for Xen 3.x

2025-08-15 Thread Jason Andryuk
On 2025-08-15 03:40, Juergen Gross wrote: The kernel is not supported to run as a Xen guest on Xen versions older than 4.0. Remove xen_strict_xenbus_quirk() which is testing the Xen version to be at least 4.0. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

[PATCH v6 4/8] tools/xenstored: Check NULL domain in domain_chk_quota()

2025-08-15 Thread Jason Andryuk
d have already returned. Bail out on !conn->domain to avoid faulting. This adds a similar check to that in domain_max_chk() Signed-off-by: Jason Andryuk --- v6: New --- tools/xenstored/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xenstored/domain.c b/tools/

[PATCH v6 8/8] tools/xenstored: Remove hardcoded implicit path

2025-08-15 Thread Jason Andryuk
Update get_implicit_path to return the correct value for a non-dom0 xenstored domain. Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross --- v5: R-b: Juergen --- tools/xenstored/domain.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/xenstored/domain.c b

[PATCH v6 6/8] tools/xenstored: Rename dom0_domid to store_domid

2025-08-15 Thread Jason Andryuk
ability to call XS_RESUME. xenbus_master_domid() is removed with store_domid being used instead. Add a description of the -m/--master-domid options while doing this. Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross --- v6: R-b: Juergen v5: Remove xenbus_master_domid

[PATCH v6 2/8] tools/xenstored: Add get_domain_evtchn() to find evtchn

2025-08-15 Thread Jason Andryuk
igned-off-by: Jason Andryuk Reviewed-by: Juergen Gross --- v6: R-b: Juergen v5: Split get_domain_evtchn() in minios.c and posix.c versions s/dom0/stubdom/ --- tools/xenstored/core.h | 2 +- tools/xenstored/domain.c | 10 +++--- tools/xenstored/minios.c | 19 --- tools/xens

[PATCH v6 0/8] xenstored patches from split hardware control

2025-08-15 Thread Jason Andryuk
main-0 and Xenstore. "tools/xenstored: Use priv_domid for manual nodes and permission" is an interesting result of looking to rename some internal variables to better align their purpose. Any review or guidance on the approach is appreciated. Jason Andryuk (8): tools/xenstored: Rea

[PATCH v6 7/8] tools/xenstored: Remove stubdom special casing

2025-08-15 Thread Jason Andryuk
rface. The default grant table mapping is performed otherwise. Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross --- v6: R-b: Juergen v5: Re-order later --- tools/xenstored/domain.c | 5 - tools/xenstored/minios.c | 4 +--- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/

[PATCH v6 3/8] tools/xenstored: Auto-introduce domains

2025-08-15 Thread Jason Andryuk
sed to identify . priv_domid from the command line is used, or the first control domain is used. dom0_domid will set to the last xenstore found. This will handle dom0 or dom0less, where only 1 xenstore domain can exist, or stubdom, where dom0 and dom1 exist, and we want to take the stubdom. Signe

[PATCH v6 5/8] tools/xenstored: Use priv_domid for manual nodes and permission

2025-08-15 Thread Jason Andryuk
Usually, priv_domid == dom0_domid == 0, and that is what is expected. If we rename s/dom0_domid/store_domid/, it seems more likely we want to actually have the priv_domid as the owner. That leads to follow on changes to ensure that the priv_domid is created first. Signed-off-by: Jason Andryuk

[PATCH v6 1/8] tools/xenstored: Read event channel from xenstored page

2025-08-15 Thread Jason Andryuk
Make introduce_domain() use an event channel from the the xenstore page. It is only used if non-zero. Otherwise the passed in event channel port is used. The is useful for a xenstored stubdom to configure domains autonomously. Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross --- v4: R

Re: [PATCH] xen/events: Fix Global and Domain VIRQ tracking

2025-08-14 Thread Jason Andryuk
On 2025-08-14 03:05, Jürgen Groß wrote: On 13.08.25 17:03, Jason Andryuk wrote: On 2025-08-12 15:00, Jason Andryuk wrote: VIRQs come in 3 flavors, per-VPU, per-domain, and global.  The existing tracking of VIRQs is handled by per-cpu variables virq_to_irq. The issue is that bind_virq_to_irq

Re: [PATCH] xen/events: Fix Global and Domain VIRQ tracking

2025-08-13 Thread Jason Andryuk
On 2025-08-12 15:00, Jason Andryuk wrote: VIRQs come in 3 flavors, per-VPU, per-domain, and global. The existing tracking of VIRQs is handled by per-cpu variables virq_to_irq. The issue is that bind_virq_to_irq() sets the per_cpu virq_to_irq at registration time - typically CPU 0. Later, the

Re: [PATCH] xen/events: Fix Global and Domain VIRQ tracking

2025-08-12 Thread Jason Andryuk
On 2025-08-12 15:10, Andrew Cooper wrote: On 12/08/2025 8:00 pm, Jason Andryuk wrote: VIRQs come in 3 flavors, per-VPU, per-domain, and global. The existing tracking of VIRQs is handled by per-cpu variables virq_to_irq. The issue is that bind_virq_to_irq() sets the per_cpu virq_to_irq at

[PATCH] xen/events: Fix Global and Domain VIRQ tracking

2025-08-12 Thread Jason Andryuk
no need for per-vcpu tracking. Also, per-domain and global VIRQs need to be registered on CPU 0 and can later move, so this matches the expectation. Fixes: e46cdb66c8fc ("xen: event channels") Cc: sta...@vger.kernel.org Signed-off-by: Jason Andryuk --- Fixes is the introduction of th

Re: [PATCH v1] xenconsole: Add connected flag

2025-08-07 Thread Jason Andryuk
On 2025-08-07 05:19, Jan Beulich wrote: On 07.08.2025 03:56, Jason Andryuk wrote: --- a/xen/include/public/io/console.h +++ b/xen/include/public/io/console.h @@ -19,6 +19,19 @@ struct xencons_interface { char out[2048]; XENCONS_RING_IDX in_cons, in_prod; XENCONS_RING_IDX

Re: [PATCH v1] xenconsole: Add connected flag

2025-08-07 Thread Jason Andryuk
On 2025-08-07 03:00, Jürgen Groß wrote: On 07.08.25 03:56, Jason Andryuk wrote: With hyperlaunch, a domU can start before its console ring is connected by xenconsoled.  With nothing emptying the ring, it can quickly fill during boot.  In domU_write_console(), __write_console() returns 0 when

[PATCH v1] xenconsole: Add connected flag

2025-08-06 Thread Jason Andryuk
cted. Signed-off-by: Jason Andryuk --- v1: Remove evtchn notify call Set connected later when there is no error RFC v3: Flip flag values so 0 is connected. The other option would be to add: uint32_t features uint32_t connected New domUs would check features for a magic value and/or flag to know

Re: [PATCH 2/2] x86/mm: correct PG_log_dirty definition

2025-08-06 Thread Jason Andryuk
f #if PG_log_dirty with similar meaning, if I am not mistaken, so using that would make it more consistent. But CONFIG_PAGING is directly tied to the Kconfig, so maybe it is better? Just something I noticed. Reviewed-by: Jason Andryuk Regards, Jason /* Enable an arbitrary pagi

Re: [PATCH v5 2/2] xen/arm: allow translated iommu mappings

2025-08-06 Thread Jason Andryuk
passed to guest_physmap_remove_page since there is no mfn checking on the p2m_iommu_map_{rw,ro} p2m types during unmap. Pass INVALID_MFN to guest_physmap_remove_page. Signed-off-by: Stefano Stabellini Signed-off-by: Stewart Hildebrand Reviewed-by: Julien Grall Tested-by: Jason Andryuk

Re: [PATCH v5 1/2] xen/arm: fix arm_iommu_map_page after f9f6b22abf1d

2025-08-06 Thread Jason Andryuk
S doorbell register to IOMMU page tables") Signed-off-by: Stefano Stabellini Signed-off-by: Stewart Hildebrand Reviewed-by: Julien Grall Thanks for the review! Is this ready to be committed? Tested-by: Jason Andryuk Thanks, Jason

Re: [XEN][PATCH] xen/dom0less: arm: fix hwdom 1:1 low memory allocation

2025-08-05 Thread Jason Andryuk
On 2025-08-05 14:38, Grygorii Strashko wrote: Hi Jason, On 05.08.25 20:21, Jason Andryuk wrote: On 2025-08-01 11:54, Grygorii Strashko wrote: From: Grygorii Strashko Call stack for dom0less hwdom case (1:1) memory: create_domUs |-construct_domU    |-construct_hwdom

Re: [XEN][PATCH] xen/dom0less: arm: fix hwdom 1:1 low memory allocation

2025-08-05 Thread Jason Andryuk
/arm: dom0less hwdom construction") Signed-off-by: Grygorii Strashko dom0_mem is also mentioned in the comment on line 252. With that changed as well: Reviewed-by: Jason Andryuk Thanks, Jason

  1   2   3   4   5   6   7   8   9   10   >