diff options
author | Keir Fraser <keir@xensource.com> | 2007-04-13 14:59:06 +0100 |
---|---|---|
committer | Keir Fraser <keir@xensource.com> | 2007-04-13 14:59:06 +0100 |
commit | 0c8a05c14251778943ed7243bb2c20eb9dcf9b65 (patch) | |
tree | c48581b9d1b6667138c5c17a015b17c51c1e8a9c /xen/include/asm-x86/hvm/support.h | |
parent | 4a507d9105776305edbafca73bdc5e3ad8edda0f (diff) | |
download | xen-0c8a05c14251778943ed7243bb2c20eb9dcf9b65.tar.gz xen-0c8a05c14251778943ed7243bb2c20eb9dcf9b65.tar.bz2 xen-0c8a05c14251778943ed7243bb2c20eb9dcf9b65.zip |
hvm: Clean up treatment of is_dying per-domain boolean. All critical
checks are done under an appropriate lock, allowing the lock-free
protocols surrounding this boolean to be removed.
Also simplification and fixes to code for setting/zapping the ioreq
and buf_ioreq shared pages.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/asm-x86/hvm/support.h')
-rw-r--r-- | xen/include/asm-x86/hvm/support.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/xen/include/asm-x86/hvm/support.h b/xen/include/asm-x86/hvm/support.h index 1d331ef5da..efbc2b39b0 100644 --- a/xen/include/asm-x86/hvm/support.h +++ b/xen/include/asm-x86/hvm/support.h @@ -32,14 +32,13 @@ #define HVM_DEBUG 1 #endif -static inline shared_iopage_t *get_sp(struct domain *d) +static inline vcpu_iodata_t *get_ioreq(struct vcpu *v) { - return (shared_iopage_t *) d->arch.hvm_domain.shared_page_va; -} - -static inline vcpu_iodata_t *get_vio(struct domain *d, unsigned long cpu) -{ - return &get_sp(d)->vcpu_iodata[cpu]; + struct domain *d = v->domain; + shared_iopage_t *p = d->arch.hvm_domain.ioreq.va; + ASSERT((v == current) || spin_is_locked(&d->arch.hvm_domain.ioreq.lock)); + ASSERT(d->arch.hvm_domain.ioreq.va != NULL); + return &p->vcpu_iodata[v->vcpu_id]; } /* XXX these are really VMX specific */ |