[PATCH] x86/hvm: allow XENMEM_machine_memory_map

Roger Pau Monne posted 1 patch 5 months, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20240530075318.67491-1-roger.pau@citrix.com
xen/arch/x86/hvm/hypercall.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] x86/hvm: allow XENMEM_machine_memory_map
Posted by Roger Pau Monne 5 months, 4 weeks ago
For HVM based control domains XENMEM_machine_memory_map must be available so
that the `e820_host` xl.cfg option can be used.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/hvm/hypercall.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c
index 14679dd82971..7fb3136f0c7c 100644
--- a/xen/arch/x86/hvm/hypercall.c
+++ b/xen/arch/x86/hvm/hypercall.c
@@ -25,7 +25,6 @@ long hvm_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
 
     switch ( cmd & MEMOP_CMD_MASK )
     {
-    case XENMEM_machine_memory_map:
     case XENMEM_machphys_mapping:
         return -ENOSYS;
     }
-- 
2.44.0


Re: [PATCH] x86/hvm: allow XENMEM_machine_memory_map
Posted by Andrew Cooper 5 months, 4 weeks ago
On 30/05/2024 8:53 am, Roger Pau Monne wrote:
> For HVM based control domains XENMEM_machine_memory_map must be available so
> that the `e820_host` xl.cfg option can be used.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Seems safe enough to allow.

Does this want a reported-by, or some further discussion about how it
was found?

Also, as it's mostly PVH Dom0 bugfixing, shouldn't we want it in 4.19?

~Andrew

Re: [PATCH] x86/hvm: allow XENMEM_machine_memory_map
Posted by Roger Pau Monné 5 months, 4 weeks ago
On Thu, May 30, 2024 at 09:04:08AM +0100, Andrew Cooper wrote:
> On 30/05/2024 8:53 am, Roger Pau Monne wrote:
> > For HVM based control domains XENMEM_machine_memory_map must be available so
> > that the `e820_host` xl.cfg option can be used.
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> 
> Seems safe enough to allow.
> 
> Does this want a reported-by, or some further discussion about how it
> was found?

I've found it while attempting to repro an issue with e820_host
reported by Marek, but the issue he reported is not related to this.
It's just that I have most of my test systems set as PVH dom0.

> Also, as it's mostly PVH Dom0 bugfixing, shouldn't we want it in 4.19?

Yeah, forgot to add the for-4.19 line and Oleksii, adding him now for
consideration for 4.19.

Thanks, Roger.

Re: [PATCH] x86/hvm: allow XENMEM_machine_memory_map
Posted by Oleksii K. 5 months, 3 weeks ago
On Thu, 2024-05-30 at 10:14 +0200, Roger Pau Monné wrote:
> On Thu, May 30, 2024 at 09:04:08AM +0100, Andrew Cooper wrote:
> > On 30/05/2024 8:53 am, Roger Pau Monne wrote:
> > > For HVM based control domains XENMEM_machine_memory_map must be
> > > available so
> > > that the `e820_host` xl.cfg option can be used.
> > > 
> > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > 
> > Seems safe enough to allow.
> > 
> > Does this want a reported-by, or some further discussion about how
> > it
> > was found?
> 
> I've found it while attempting to repro an issue with e820_host
> reported by Marek, but the issue he reported is not related to this.
> It's just that I have most of my test systems set as PVH dom0.
> 
> > Also, as it's mostly PVH Dom0 bugfixing, shouldn't we want it in
> > 4.19?
> 
> Yeah, forgot to add the for-4.19 line and Oleksii, adding him now for
> consideration for 4.19.
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

~ Oleksii
Re: [PATCH] x86/hvm: allow XENMEM_machine_memory_map
Posted by Andrew Cooper 5 months, 4 weeks ago
On 30/05/2024 9:14 am, Roger Pau Monné wrote:
> On Thu, May 30, 2024 at 09:04:08AM +0100, Andrew Cooper wrote:
>> On 30/05/2024 8:53 am, Roger Pau Monne wrote:
>>> For HVM based control domains XENMEM_machine_memory_map must be available so
>>> that the `e820_host` xl.cfg option can be used.
>>>
>>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>> Seems safe enough to allow.
>>
>> Does this want a reported-by, or some further discussion about how it
>> was found?
> I've found it while attempting to repro an issue with e820_host
> reported by Marek, but the issue he reported is not related to this.
> It's just that I have most of my test systems set as PVH dom0.
>
>> Also, as it's mostly PVH Dom0 bugfixing, shouldn't we want it in 4.19?
> Yeah, forgot to add the for-4.19 line and Oleksii, adding him now for
> consideration for 4.19.

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>