mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Move IDLE_DOMAIN_ID defn to public header, and change DOMID_INVALID to fix clash.
Signed-off-by: Keir Fraser <keir@xen.org>
This commit is contained in:
1 parent
805a1afca3
commit
45dc0eb888
6 files changed
+11
-9
No files matched your search
@@ -373,7 +373,7 @@ static void continue_cpu_idle_loop(void)
|
||||
void startup_cpu_idle_loop(void)
|
||||
{
|
||||
/* Just some sanity to ensure that the scheduler is set up okay. */
|
||||
ASSERT(current->domain->domain_id == IDLE_DOMAIN_ID);
|
||||
ASSERT(is_idle_vcpu(current));
|
||||
raise_softirq(SCHEDULE_SOFTIRQ);
|
||||
|
||||
continue_cpu_idle_loop();
|
||||
|
||||
@@ -230,7 +230,7 @@ dbg_rw_guest_mem(dbgva_t addr, dbgbyte_t *buf, int len, struct domain *dp,
|
||||
}
|
||||
|
||||
/*
|
||||
* addr is hypervisor addr if domid == IDLE_DOMAIN_ID, else it's guest addr
|
||||
* addr is hypervisor addr if domid == DOMID_IDLE, else it's guest addr
|
||||
* buf is debugger buffer.
|
||||
* if toaddr, then addr = buf (write to addr), else buf = addr (rd from guest)
|
||||
* pgd3: value of init_mm.pgd[3] in guest. see above.
|
||||
@@ -241,7 +241,7 @@ dbg_rw_mem(dbgva_t addr, dbgbyte_t *buf, int len, domid_t domid, int toaddr,
|
||||
uint64_t pgd3)
|
||||
{
|
||||
struct domain *dp = get_domain_by_id(domid);
|
||||
int hyp = (domid == IDLE_DOMAIN_ID);
|
||||
int hyp = (domid == DOMID_IDLE);
|
||||
|
||||
DBGP2("gmem:addr:%lx buf:%p len:$%d domid:%x toaddr:%x dp:%p\n",
|
||||
addr, buf, len, domid, toaddr, dp);
|
||||
|
||||
@@ -1276,7 +1276,7 @@ void __init scheduler_init(void)
|
||||
if ( SCHED_OP(&ops, init) )
|
||||
panic("scheduler returned error on init\n");
|
||||
|
||||
idle_domain = domain_create(IDLE_DOMAIN_ID, 0, 0);
|
||||
idle_domain = domain_create(DOMID_IDLE, 0, 0);
|
||||
BUG_ON(idle_domain == NULL);
|
||||
idle_domain->vcpu = idle_vcpu;
|
||||
idle_domain->max_vcpus = NR_CPUS;
|
||||
|
||||
@@ -380,8 +380,11 @@ typedef uint16_t domid_t;
|
||||
* DOMID_COW is used as the owner of sharable pages */
|
||||
#define DOMID_COW (0x7FF3U)
|
||||
|
||||
/* DOMID_INVALID is used to identity invalid domid */
|
||||
#define DOMID_INVALID (0x7FFFU)
|
||||
/* DOMID_INVALID is used to identify pages with unknown owner. */
|
||||
#define DOMID_INVALID (0x7FF4U)
|
||||
|
||||
/* Idle domain. */
|
||||
#define DOMID_IDLE (0x7FFFU)
|
||||
|
||||
/*
|
||||
* Send an array of these to HYPERVISOR_mmu_update().
|
||||
|
||||
@@ -362,8 +362,7 @@ extern spinlock_t domlist_update_lock;
|
||||
extern rcu_read_lock_t domlist_read_lock;
|
||||
|
||||
extern struct vcpu *idle_vcpu[NR_CPUS];
|
||||
#define IDLE_DOMAIN_ID (0x7FFFU)
|
||||
#define is_idle_domain(d) ((d)->domain_id == IDLE_DOMAIN_ID)
|
||||
#define is_idle_domain(d) ((d)->domain_id == DOMID_IDLE)
|
||||
#define is_idle_vcpu(v) (is_idle_domain((v)->domain))
|
||||
|
||||
#define DOMAIN_DESTROYED (1<<31) /* assumes atomic_t is >= 32 bits */
|
||||
|
||||
@@ -74,7 +74,7 @@ static int flask_domain_alloc_security(struct domain *d)
|
||||
|
||||
dsec->d = d;
|
||||
|
||||
if ( d->domain_id == IDLE_DOMAIN_ID )
|
||||
if ( is_idle_domain(d) )
|
||||
{
|
||||
dsec->sid = SECINITSID_XEN;
|
||||
dsec->create_sid = SECINITSID_DOM0;
|
||||
|
||||