Re: [PATCH v1 2/3] Enable adapter_indicators_set to use mapped pages
From: Matthew Rosato
Date: Wed Mar 11 2026 - 16:25:02 EST
On 3/7/26 10:04 PM, Douglas Freimuth wrote:
> Patch 2: This patch enables adapter_indicators_set to use mapped pages.
See comments from patch 1 of this series.
> If adapter indicator pages are not mapped then local mapping is done as
> it is prior to this patch. For example, Secure Execution environments
> will take the local mapping path as it does prior to this patch.
>
> Signed-off-by: Douglas Freimuth <freimuth@xxxxxxxxxxxxx>
> - idx = srcu_read_lock(&kvm->srcu);
> - map = page_address(ind_page);
> - bit = get_ind_bit(adapter_int->ind_addr,
> - adapter_int->ind_offset, adapter->swap);
> - set_bit(bit, map);
> - mark_page_dirty(kvm, adapter_int->ind_gaddr >> PAGE_SHIFT);
> - set_page_dirty_lock(ind_page);
> - map = page_address(summary_page);
> - bit = get_ind_bit(adapter_int->summary_addr,
> - adapter_int->summary_offset, adapter->swap);
> - summary_set = test_and_set_bit(bit, map);
> - mark_page_dirty(kvm, adapter_int->summary_gaddr >> PAGE_SHIFT);
> - set_page_dirty_lock(summary_page);
> - srcu_read_unlock(&kvm->srcu, idx);
> -
> - put_page(ind_page);
> - put_page(summary_page);
Hitting compile errors if only apply up to this patch, looks like this area is the culprit.
I think you're missing a few lines here that accidentally wound up in patch 3?
+ summary_info = get_map_info(adapter, adapter_int->summary_addr);
+ if (!summary_info) {
> + summary_page = get_map_page(kvm, adapter_int->summary_addr);
> + if (!summary_page) {
> + put_page(ind_page);
> + return -1;
> + }