mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/mm: reject XENMEM_claim_pages when using LLC coloring
The coloring allocator ignores claims; reject the usage of the hypercall if
LLC coloring is enabled. Note that the usage of alloc_color_heap_page() is
selected at boot time, and it's a system wide decision. Once enabled all
domains will use alloc_color_heap_page() for allocations, which ignores any
outstanding claims.
The hypercall can be enabled if/when LLC coloring is adjusted to support
claims.
Fixes: 95debe51a9 ("xen: add cache coloring allocator for domains")
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
62412a235b
commit
b068cafc73
1 file changed
+4
@@ -16,6 +16,7 @@
|
||||
#include <xen/iocap.h>
|
||||
#include <xen/ioreq.h>
|
||||
#include <xen/lib.h>
|
||||
#include <xen/llc-coloring.h>
|
||||
#include <xen/mem_access.h>
|
||||
#include <xen/mm.h>
|
||||
#include <xen/numa.h>
|
||||
@@ -1660,6 +1661,9 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
|
||||
break;
|
||||
|
||||
case XENMEM_claim_pages:
|
||||
if ( llc_coloring_enabled )
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if ( unlikely(start_extent) )
|
||||
return -EINVAL;
|
||||
|
||||
|
||||