diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-01-12 11:13:57 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-01-12 11:13:57 +0000 |
commit | bc6c5510dbaa5b3be862d28ee62e3acf6c35f0bb (patch) | |
tree | 7ebd131f56422eaf67302fcad0dfe2e46f843883 /xen/arch/x86/hvm/rtc.c | |
parent | 3790d2ab9b967c9c3dfdedb56c22bc01b07ffbc2 (diff) | |
download | xen-bc6c5510dbaa5b3be862d28ee62e3acf6c35f0bb.tar.gz xen-bc6c5510dbaa5b3be862d28ee62e3acf6c35f0bb.tar.bz2 xen-bc6c5510dbaa5b3be862d28ee62e3acf6c35f0bb.zip |
hvm: Improve in-Xen PIO emulation to better handle string PIO
instructions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/hvm/rtc.c')
-rw-r--r-- | xen/arch/x86/hvm/rtc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c index ece6f29ad9..b9e4b4a241 100644 --- a/xen/arch/x86/hvm/rtc.c +++ b/xen/arch/x86/hvm/rtc.c @@ -395,24 +395,25 @@ static uint32_t rtc_ioport_read(RTCState *s, uint32_t addr) return ret; } -static int handle_rtc_io(ioreq_t *p) +static int handle_rtc_io( + int dir, uint32_t port, uint32_t bytes, uint32_t *val) { struct RTCState *vrtc = vcpu_vrtc(current); - if ( (p->size != 1) || p->data_is_ptr || (p->type != IOREQ_TYPE_PIO) ) + if ( bytes != 1 ) { gdprintk(XENLOG_WARNING, "HVM_RTC bas access\n"); return 1; } - if ( p->dir == IOREQ_WRITE ) + if ( dir == IOREQ_WRITE ) { - if ( rtc_ioport_write(vrtc, p->addr, p->data & 0xFF) ) + if ( rtc_ioport_write(vrtc, port, (uint8_t)*val) ) return 1; } else if ( vrtc->hw.cmos_index < RTC_CMOS_SIZE ) { - p->data = rtc_ioport_read(vrtc, p->addr); + *val = rtc_ioport_read(vrtc, port); return 1; } |