aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/intercept.c
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2010-10-29 18:42:34 +0100
committerKeir Fraser <keir@xen.org>2010-10-29 18:42:34 +0100
commitf0ad21c499f735b1e9b04cf2454ed3808201fc56 (patch)
treeac628efd879ff657f6838c364be1a73319bf2377 /xen/arch/x86/hvm/intercept.c
parent2911af8256327c067ad8ec05ed5054e9812fc06d (diff)
downloadxen-f0ad21c499f735b1e9b04cf2454ed3808201fc56.tar.gz
xen-f0ad21c499f735b1e9b04cf2454ed3808201fc56.tar.bz2
xen-f0ad21c499f735b1e9b04cf2454ed3808201fc56.zip
x86 hvm: Introduce pmtimer_change_ioport and HVM_PARAM_ACPI_IOPORTS_LOCATION
By default, Xen will handle the old ACPI IO port. But it can switch to the new one by setting the HVM_PARAM_ACPI_IOPORTS_LOCATION to 1. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/hvm/intercept.c')
-rw-r--r--xen/arch/x86/hvm/intercept.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/xen/arch/x86/hvm/intercept.c b/xen/arch/x86/hvm/intercept.c
index 2d88cc86b0..6ce49b6ad8 100644
--- a/xen/arch/x86/hvm/intercept.c
+++ b/xen/arch/x86/hvm/intercept.c
@@ -241,24 +241,18 @@ void register_io_handler(
handler->num_slot++;
}
-void unregister_io_handler(
- struct domain *d, unsigned long addr, unsigned long size, int type)
+void relocate_io_handler(
+ struct domain *d, unsigned long old_addr, unsigned long new_addr,
+ unsigned long size, int type)
{
struct hvm_io_handler *handler = &d->arch.hvm_domain.io_handler;
int i;
for ( i = 0; i < handler->num_slot; i++ )
- if ( (handler->hdl_list[i].addr == addr) &&
+ if ( (handler->hdl_list[i].addr == old_addr) &&
(handler->hdl_list[i].size == size) &&
(handler->hdl_list[i].type == type) )
- goto found;
- return;
-
- found:
- memcpy(&handler->hdl_list[i],
- &handler->hdl_list[handler->num_slot-1],
- sizeof(struct io_handler));
- handler->num_slot--;
+ handler->hdl_list[i].addr = new_addr;
}
/*