x86/pvh: Initialize ioreq server for PVH guests
PATCH 1/1 x86/pvh: Initialize ioreq server for PVH guests
ioreq server list needs to be initialized for PVH guests. This list is walked in handle_hvm_io_completion() by all guests in HVM containers and leaving it uninitialized may cause PVH guests to crash there.
Signed-off-by Boris Ostrovsky <[email protected]>
--- xen/arch/x86/hvm/hvm.c | 4 ++-- xen/arch/x86/hvm/ioreq.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
xen/arch/x86/hvm/hvm.c +2 -2
@@ -621,6 +621,8 @@ int hvm_domain_initialise(struct domain *d)register_dpci_portio_handler (d); +hvm_ioreq_init (d); +if (is_pvh_domain (d) ) {register_portio_handler (d,0 ,0x10003 , handle_pvh_io);
@@ -645,8 +647,6 @@ int hvm_domain_initialise(struct domain *d)register_portio_handler (d,0xe9 ,1 , hvm_print_line); -hvm_ioreq_init (d); -if ( hvm_tsc_scaling_supported ) d->arch.hvm_domain.tsc_scaling_ratio = hvm_default_tsc_scaling_ratio;
xen/arch/x86/hvm/ioreq.c +2 -1
@@ -1361,7 +1361,8 @@ void hvm_ioreq_init(struct domain *d)spin_lock_init (&d->arch.hvm_domain.ioreq_server.lock);INIT_LIST_HEAD (&d->arch.hvm_domain.ioreq_server.list); -register_portio_handler (d,0xcf8 ,4 , hvm_access_cf8); +if ( !is_pvh_domain (d) ) +register_portio_handler (d,0xcf8 ,4 , hvm_access_cf8); }/*
Signature · 7 lines
1.8.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 04.04.16 at 23:05, <[email protected]> wrote:
ioreq server list needs to be initialized for PVH guests. This list is walked in
handle_hvm_io_completion()by all guests in HVM containers and leaving it uninitialized may cause PVH guests to crash there.Signed-off-by Boris Ostrovsky <[email protected]>
Reviewed-by Jan Beulich <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel