diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-10-29 14:03:56 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-10-29 14:03:56 +0000 |
commit | dd11df9b815419c73c2845df5e4f8433cb43d665 (patch) | |
tree | 5535875f09b2119b0b33a12dd919304a6e58a46b /xen/arch/x86/hvm/io.c | |
parent | 50cb039ecd1d6cf91dc5be4c1bfcd3140b5093ff (diff) | |
download | xen-dd11df9b815419c73c2845df5e4f8433cb43d665.tar.gz xen-dd11df9b815419c73c2845df5e4f8433cb43d665.tar.bz2 xen-dd11df9b815419c73c2845df5e4f8433cb43d665.zip |
Extend max vcpu number for HVM guest
Reduce size of Xen-qemu shared ioreq structure to 32 bytes. This
has two advantages:
1. We can support up to 128 VCPUs with a single shared page
2. If/when we want to go beyond 128 VCPUs, a whole number of ioreq_t
structures will pack into a single shared page, so a multi-page
array will have no ioreq_t straddling a page boundary
Also, while modifying qemu, replace a 32-entry vcpu-indexed array
with a dynamically-allocated array.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/hvm/io.c')
-rw-r--r-- | xen/arch/x86/hvm/io.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c index f49626ea5f..8519bfad51 100644 --- a/xen/arch/x86/hvm/io.c +++ b/xen/arch/x86/hvm/io.c @@ -87,7 +87,7 @@ int hvm_buffered_io_send(ioreq_t *p) qw = 1; break; default: - gdprintk(XENLOG_WARNING, "unexpected ioreq size:%"PRId64"\n", p->size); + gdprintk(XENLOG_WARNING, "unexpected ioreq size: %u\n", p->size); return 0; } @@ -148,12 +148,8 @@ void send_timeoffset_req(unsigned long timeoff) void send_invalidate_req(void) { struct vcpu *v = current; - vcpu_iodata_t *vio = get_ioreq(v); - ioreq_t *p; + ioreq_t *p = get_ioreq(v); - BUG_ON(vio == NULL); - - p = &vio->vp_ioreq; if ( p->state != STATE_IOREQ_NONE ) { gdprintk(XENLOG_ERR, "WARNING: send invalidate req with something " @@ -166,7 +162,6 @@ void send_invalidate_req(void) p->size = 4; p->dir = IOREQ_WRITE; p->data = ~0UL; /* flush all */ - p->io_count++; (void)hvm_send_assist_req(v); } @@ -221,7 +216,7 @@ int handle_mmio_with_translation(unsigned long gva, unsigned long gpfn) void hvm_io_assist(void) { struct vcpu *curr = current; - ioreq_t *p = &get_ioreq(curr)->vp_ioreq; + ioreq_t *p = get_ioreq(curr); enum hvm_io_state io_state; rmb(); /* see IORESP_READY /then/ read contents of ioreq */ |