mbox series

[RFC,PATCH-for-9.0,0/9] hw/xen: Have ARM targets use common xen_memory_listener

Message ID 20231114163123.74888-1-philmd@linaro.org (mailing list archive)
Headers show
Series hw/xen: Have ARM targets use common xen_memory_listener | expand

Message

Philippe Mathieu-Daudé Nov. 14, 2023, 4:31 p.m. UTC
Hi,

While looking at Xen target-specific code, I noticed some
generic code used by x86 which is not implemented for ARM.

Maybe ARM machines don't need it, I don't know. But I
wanted to see if I can get this common code target agnostic
and build it once, possibly bringing smth useful to ARM.

The changes don't break CI testing and Avocado local tests.
If this xen_memory_listener feature isn't required for ARM,
I'll send follow up patch that keep this series with common
xen_memory_listener but with a runtime flag to disable.

Patches do the usual "change target-specific API to a
target-agnostic one", in particular using "exec/target_page.h"
at runtime. Then non-x86 code is extracted, then merged to
the generic xen/xen-hvm-common.c.

Thoughts?

Regards,

Phil.

Based-on: <20231114143816.71079-1-philmd@linaro.org>

Philippe Mathieu-Daudé (9):
  hw/xen/hvm: Inline TARGET_PAGE_ALIGN() macro
  hw/xen/hvm: Propagate page_mask to a pair of functions
  hw/xen/hvm: Get target page size at runtime
  hw/xen/hvm: Expose xen_memory_listener declaration
  hw/xen/hvm: Expose xen_read_physmap() prototype
  hw/xen/hvm: Initialize xen_physmap QLIST in xen_read_physmap()
  hw/xen/hvm: Extract common code to xen-hvm-common.c
  hw/xen/hvm: Merge xen-hvm-common.c files
  hw/xen/hvm: Inline xen_arch_set_memory()

 include/hw/xen/xen-hvm-common.h |   5 +-
 hw/arm/xen_arm.c                |  24 --
 hw/i386/xen/xen-hvm.c           | 441 +----------------------------
 hw/xen/xen-hvm-common.c         | 474 +++++++++++++++++++++++++++++++-
 stubs/xen-hw-stub.c             |   4 -
 5 files changed, 468 insertions(+), 480 deletions(-)

Comments

Philippe Mathieu-Daudé Dec. 13, 2023, 5 p.m. UTC | #1
ping?

On 14/11/23 17:31, Philippe Mathieu-Daudé wrote:
> Hi,
> 
> While looking at Xen target-specific code, I noticed some
> generic code used by x86 which is not implemented for ARM.
> 
> Maybe ARM machines don't need it, I don't know. But I
> wanted to see if I can get this common code target agnostic
> and build it once, possibly bringing smth useful to ARM.
> 
> The changes don't break CI testing and Avocado local tests.
> If this xen_memory_listener feature isn't required for ARM,
> I'll send follow up patch that keep this series with common
> xen_memory_listener but with a runtime flag to disable.
> 
> Patches do the usual "change target-specific API to a
> target-agnostic one", in particular using "exec/target_page.h"
> at runtime. Then non-x86 code is extracted, then merged to
> the generic xen/xen-hvm-common.c.
> 
> Thoughts?
> 
> Regards,
> 
> Phil.
> 
> Based-on: <20231114143816.71079-1-philmd@linaro.org>
Philippe Mathieu-Daudé March 6, 2024, 5:03 p.m. UTC | #2
ping ^ 2

On 13/12/23 18:00, Philippe Mathieu-Daudé wrote:
> ping?
> 
> On 14/11/23 17:31, Philippe Mathieu-Daudé wrote:
>> Hi,
>>
>> While looking at Xen target-specific code, I noticed some
>> generic code used by x86 which is not implemented for ARM.
>>
>> Maybe ARM machines don't need it, I don't know. But I
>> wanted to see if I can get this common code target agnostic
>> and build it once, possibly bringing smth useful to ARM.
>>
>> The changes don't break CI testing and Avocado local tests.
>> If this xen_memory_listener feature isn't required for ARM,
>> I'll send follow up patch that keep this series with common
>> xen_memory_listener but with a runtime flag to disable.
>>
>> Patches do the usual "change target-specific API to a
>> target-agnostic one", in particular using "exec/target_page.h"
>> at runtime. Then non-x86 code is extracted, then merged to
>> the generic xen/xen-hvm-common.c.
>>
>> Thoughts?
>>
>> Regards,
>>
>> Phil.
>>
>> Based-on: <20231114143816.71079-1-philmd@linaro.org>
>