Bug#1033676: marked as done (unblock: xen/4.17.0+74-g3eac216e6e-1) (2/3
From
Debian Bug Tracking System@21:1/5 to
All on Tue Apr 4 23:40:02 2023
[continued from previous message]
+ domain_lock(d);
+
list_for_each_entry_rcu ( range,
&d->arch.hvm.pinned_cacheattr_ranges,
list )
@@ -666,25 +671,36 @@
rc = -EBUSY;
break;
}
+ ++nr;
}
- rcu_read_unlock(&pinned_cacheattr_rcu_lock);
+
if ( rc <= 0 )
- return rc;
+ /* nothing */;
+ else if ( nr >= 64 /* The limit is arbitrary. */ )
+ rc = -ENOSPC;
+ else if ( !newr )
+ rc = -ENOMEM;
+ else
+ {
+ newr->start = gfn_start;
+ newr->end = gfn_end;
+ newr->type = type;
+
+ list_add_rcu(&newr->list, &d->arch.hvm.pinned_cacheattr_ranges);
+
+ newr = NULL;
+ rc = 0;
+ }
- range = xzalloc(struct hvm_mem_pinned_cacheattr_range);
- if ( range == NULL )
- return -ENOMEM;
+ domain_unlock(d);
- range->start = gfn_start;
- range->end = gfn_end;
- range->type = type;
+ xfree(newr);
- list_add_rcu(&range->list, &d->arch.hvm.pinned_cacheattr_ranges);
p2m_memory_type_changed(d);
if ( type != PAT_TYPE_WRBACK )
flush_all(FLUSH_CACHE);
- return 0;
+ return rc;
}
static int cf_check hvm_save_mtrr_msr(struct vcpu *v, hvm_domain_context_t *h) diff -Nru xen-4.17.0+46-gaaf74a532c/xen/arch/x86/hvm/vmx/vmcs.c xen-4.17.0+74-g3eac216e6e/xen/arch/x86/hvm/vmx/vmcs.c
--- xen-4.17.0+46-gaaf74a532c/xen/arch/x86/hvm/vmx/vmcs.c 2023-02-22 15:14:33.000000000 +0100
+++ xen-4.17.0+74-g3eac216e6e/xen/arch/x86/hvm/vmx/vmcs.c 2023-03-21 13:47:52.000000000 +0100
@@ -67,6 +67,9 @@
static unsigned int __read_mostly ple_window = 4096;
integer_param("ple_window", ple_window);
+static unsigned int __ro_after_init vm_notify_window; +integer_param("vm-notify-window", vm_notify_window);
+
static bool __read_mostly opt_ept_pml = true;
static s8 __read_mostly opt_ept_ad = -1;
int8_t __read_mostly opt_ept_exec_sp = -1;
@@ -209,6 +212,8 @@
P(cpu_has_vmx_virt_exceptions, "Virtualisation Exceptions");
P(cpu_has_vmx_pml, "Page Modification Logging");
P(cpu_has_vmx_tsc_scaling, "TSC Scaling");
+ P(cpu_has_vmx_bus_lock_detection, "Bus Lock Detection");
+ P(cpu_has_vmx_notify_vm_exiting, "Notify VM Exit");
#undef P
if ( !printed )
@@ -318,7 +323,8 @@
SECONDARY_EXEC_ENABLE_VM_FUNCTIONS |
SECONDARY_EXEC_ENABLE_VIRT