mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Merge branch 'staging' of ssh://xenbits.xen.org/home/xen/git/xen into staging
This commit is contained in:
commit
90621f1821
6 files changed
+30
-24
No files matched your search
@@ -359,9 +359,6 @@ static int amd_vpmu_initialise(struct vcpu *v)
|
||||
struct vpmu_struct *vpmu = vcpu_vpmu(v);
|
||||
uint8_t family = current_cpu_data.x86;
|
||||
|
||||
if ( vpmu_is_set(vpmu, VPMU_CONTEXT_ALLOCATED) )
|
||||
return 0;
|
||||
|
||||
if ( counters == NULL )
|
||||
{
|
||||
switch ( family )
|
||||
|
||||
@@ -236,10 +236,7 @@ void vpmu_initialise(struct vcpu *v)
|
||||
if ( is_pvh_vcpu(v) )
|
||||
return;
|
||||
|
||||
if ( vpmu_is_set(vpmu, VPMU_CONTEXT_ALLOCATED) )
|
||||
vpmu_destroy(v);
|
||||
vpmu_clear(vpmu);
|
||||
vpmu->context = NULL;
|
||||
ASSERT(!vpmu->flags && !vpmu->context);
|
||||
|
||||
switch ( vendor )
|
||||
{
|
||||
|
||||
@@ -1414,9 +1414,8 @@ do { \
|
||||
// shadow-types.h to shadow-private.h
|
||||
//
|
||||
#if GUEST_PAGING_LEVELS == 4
|
||||
void sh_install_xen_entries_in_l4(struct vcpu *v, mfn_t gl4mfn, mfn_t sl4mfn)
|
||||
void sh_install_xen_entries_in_l4(struct domain *d, mfn_t gl4mfn, mfn_t sl4mfn)
|
||||
{
|
||||
struct domain *d = v->domain;
|
||||
shadow_l4e_t *sl4e;
|
||||
unsigned int slots;
|
||||
|
||||
@@ -1444,7 +1443,7 @@ void sh_install_xen_entries_in_l4(struct vcpu *v, mfn_t gl4mfn, mfn_t sl4mfn)
|
||||
shadow_l4e_from_mfn(sl4mfn, __PAGE_HYPERVISOR);
|
||||
|
||||
/* Self linear mapping. */
|
||||
if ( shadow_mode_translate(v->domain) && !shadow_mode_external(v->domain) )
|
||||
if ( shadow_mode_translate(d) && !shadow_mode_external(d) )
|
||||
{
|
||||
// linear tables may not be used with translated PV guests
|
||||
sl4e[shadow_l4_table_offset(LINEAR_PT_VIRT_START)] =
|
||||
@@ -1465,12 +1464,11 @@ void sh_install_xen_entries_in_l4(struct vcpu *v, mfn_t gl4mfn, mfn_t sl4mfn)
|
||||
// place, which means that we need to populate the l2h entry in the l3
|
||||
// table.
|
||||
|
||||
static void sh_install_xen_entries_in_l2h(struct vcpu *v, mfn_t sl2hmfn)
|
||||
static void sh_install_xen_entries_in_l2h(struct domain *d, mfn_t sl2hmfn)
|
||||
{
|
||||
struct domain *d = v->domain;
|
||||
shadow_l2e_t *sl2e;
|
||||
|
||||
if ( !is_pv_32on64_vcpu(v) )
|
||||
if ( !is_pv_32on64_domain(d) )
|
||||
return;
|
||||
|
||||
sl2e = sh_map_domain_page(sl2hmfn);
|
||||
@@ -1545,11 +1543,13 @@ sh_make_shadow(struct vcpu *v, mfn_t gmfn, u32 shadow_type)
|
||||
{
|
||||
#if GUEST_PAGING_LEVELS == 4
|
||||
case SH_type_l4_shadow:
|
||||
sh_install_xen_entries_in_l4(v, gmfn, smfn); break;
|
||||
sh_install_xen_entries_in_l4(v->domain, gmfn, smfn);
|
||||
break;
|
||||
#endif
|
||||
#if GUEST_PAGING_LEVELS >= 3
|
||||
case SH_type_l2h_shadow:
|
||||
sh_install_xen_entries_in_l2h(v, smfn); break;
|
||||
sh_install_xen_entries_in_l2h(v->domain, smfn);
|
||||
break;
|
||||
#endif
|
||||
default: /* Do nothing */ break;
|
||||
}
|
||||
@@ -1589,7 +1589,7 @@ sh_make_monitor_table(struct vcpu *v)
|
||||
{
|
||||
mfn_t m4mfn;
|
||||
m4mfn = shadow_alloc(d, SH_type_monitor_table, 0);
|
||||
sh_install_xen_entries_in_l4(v, m4mfn, m4mfn);
|
||||
sh_install_xen_entries_in_l4(d, m4mfn, m4mfn);
|
||||
/* Remember the level of this table */
|
||||
mfn_to_page(m4mfn)->shadow_flags = 4;
|
||||
#if SHADOW_PAGING_LEVELS < 4
|
||||
@@ -1613,7 +1613,7 @@ sh_make_monitor_table(struct vcpu *v)
|
||||
l3e[0] = l3e_from_pfn(mfn_x(m2mfn), __PAGE_HYPERVISOR);
|
||||
sh_unmap_domain_page(l3e);
|
||||
|
||||
if ( is_pv_32on64_vcpu(v) )
|
||||
if ( is_pv_32on64_domain(d) )
|
||||
{
|
||||
/* For 32-on-64 PV guests, we need to map the 32-bit Xen
|
||||
* area into its usual VAs in the monitor tables */
|
||||
@@ -1625,7 +1625,7 @@ sh_make_monitor_table(struct vcpu *v)
|
||||
mfn_to_page(m2mfn)->shadow_flags = 2;
|
||||
l3e = sh_map_domain_page(m3mfn);
|
||||
l3e[3] = l3e_from_pfn(mfn_x(m2mfn), _PAGE_PRESENT);
|
||||
sh_install_xen_entries_in_l2h(v, m2mfn);
|
||||
sh_install_xen_entries_in_l2h(d, m2mfn);
|
||||
sh_unmap_domain_page(l3e);
|
||||
}
|
||||
|
||||
|
||||
@@ -361,7 +361,7 @@ mfn_t shadow_alloc(struct domain *d,
|
||||
void shadow_free(struct domain *d, mfn_t smfn);
|
||||
|
||||
/* Install the xen mappings in various flavours of shadow */
|
||||
void sh_install_xen_entries_in_l4(struct vcpu *v, mfn_t gl4mfn, mfn_t sl4mfn);
|
||||
void sh_install_xen_entries_in_l4(struct domain *, mfn_t gl4mfn, mfn_t sl4mfn);
|
||||
|
||||
/* Update the shadows in response to a pagetable write from Xen */
|
||||
int sh_validate_guest_entry(struct vcpu *v, mfn_t gmfn, void *entry, u32 size);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <xen/percpu.h>
|
||||
#include <xen/sched.h>
|
||||
#include <xen/sched-if.h>
|
||||
#include <xen/keyhandler.h>
|
||||
#include <xen/cpu.h>
|
||||
|
||||
#define for_each_cpupool(ptr) \
|
||||
@@ -658,6 +659,12 @@ int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void print_cpumap(const char *str, const cpumask_t *map)
|
||||
{
|
||||
cpulist_scnprintf(keyhandler_scratch, sizeof(keyhandler_scratch), map);
|
||||
printk("%s: %s\n", str, keyhandler_scratch);
|
||||
}
|
||||
|
||||
void dump_runq(unsigned char key)
|
||||
{
|
||||
unsigned long flags;
|
||||
@@ -671,12 +678,17 @@ void dump_runq(unsigned char key)
|
||||
sched_smt_power_savings? "enabled":"disabled");
|
||||
printk("NOW=0x%08X%08X\n", (u32)(now>>32), (u32)now);
|
||||
|
||||
print_cpumap("Online Cpus", &cpu_online_map);
|
||||
if ( !cpumask_empty(&cpupool_free_cpus) )
|
||||
print_cpumap("Free Cpus", &cpupool_free_cpus);
|
||||
|
||||
printk("Idle cpupool:\n");
|
||||
schedule_dump(NULL);
|
||||
|
||||
for_each_cpupool(c)
|
||||
{
|
||||
printk("Cpupool %d:\n", (*c)->cpupool_id);
|
||||
print_cpumap("Cpus", (*c)->cpu_valid);
|
||||
schedule_dump(*c);
|
||||
}
|
||||
|
||||
|
||||
@@ -264,18 +264,17 @@ rt_dump(const struct scheduler *ops)
|
||||
struct list_head *iter_sdom, *iter_svc, *runq, *depletedq, *iter;
|
||||
struct rt_private *prv = rt_priv(ops);
|
||||
struct rt_vcpu *svc;
|
||||
cpumask_t *online;
|
||||
struct rt_dom *sdom;
|
||||
unsigned long flags;
|
||||
|
||||
ASSERT(!list_empty(&prv->sdom));
|
||||
spin_lock_irqsave(&prv->lock, flags);
|
||||
|
||||
if ( list_empty(&prv->sdom) )
|
||||
goto out;
|
||||
|
||||
sdom = list_entry(prv->sdom.next, struct rt_dom, sdom_elem);
|
||||
online = cpupool_scheduler_cpumask(sdom->dom->cpupool);
|
||||
runq = rt_runq(ops);
|
||||
depletedq = rt_depletedq(ops);
|
||||
|
||||
spin_lock_irqsave(&prv->lock, flags);
|
||||
printk("Global RunQueue info:\n");
|
||||
list_for_each( iter, runq )
|
||||
{
|
||||
@@ -303,6 +302,7 @@ rt_dump(const struct scheduler *ops)
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
spin_unlock_irqrestore(&prv->lock, flags);
|
||||
}
|
||||
|
||||
|
||||