xen: Place vcpu_info structure into per-cpu memory

An experimental patch for Xen allows guests to place their vcpu_info
structs anywhere.  We try to use this to place the vcpu_info into the
PDA, which allows direct access.

If this works, then switch to using direct access operations for
irq_enable, disable, save_fl and restore_fl.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Keir Fraser <keir@xensource.com>
This commit is contained in:
Jeremy Fitzhardinge 2007-07-17 18:37:07 -07:00 committed by Jeremy Fitzhardinge
parent 3e2b8fbeec
commit 60223a326f
5 changed files with 164 additions and 16 deletions

View file

@ -151,4 +151,17 @@ struct vcpu_set_singleshot_timer {
#define _VCPU_SSHOTTMR_future (0)
#define VCPU_SSHOTTMR_future (1U << _VCPU_SSHOTTMR_future)
/*
* Register a memory location in the guest address space for the
* vcpu_info structure. This allows the guest to place the vcpu_info
* structure in a convenient place, such as in a per-cpu data area.
* The pointer need not be page aligned, but the structure must not
* cross a page boundary.
*/
#define VCPUOP_register_vcpu_info 10 /* arg == struct vcpu_info */
struct vcpu_register_vcpu_info {
uint32_t mfn; /* mfn of page to place vcpu_info */
uint32_t offset; /* offset within page */
};
#endif /* __XEN_PUBLIC_VCPU_H__ */