[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.5] x86/hvm: implicitly disable an ioreq server when it is destroyed
commit f653b7fd6a876195ee99f021d735d5d1ae6bc330 Author: Paul Durrant <paul.durrant@xxxxxxxxxx> AuthorDate: Tue May 19 11:45:34 2015 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue May 19 11:45:34 2015 +0200 x86/hvm: implicitly disable an ioreq server when it is destroyed Currently, unless a (non-default) ioreq server is explicitly disabled before being destroyed, its gmfns will not be placed back into the p2m but still released back into the ioreq_gmfn mask. This is somewhat counter-intuitive and easily remedied by this small patch. Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> master commit: ebd41901b96565b392e8d434a4c4ab543d5fb52b master date: 2015-04-24 12:14:23 +0200 --- xen/arch/x86/hvm/hvm.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index f835f7a..7d53c6c 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -960,6 +960,7 @@ static int hvm_ioreq_server_init(struct hvm_ioreq_server *s, struct domain *d, static void hvm_ioreq_server_deinit(struct hvm_ioreq_server *s, bool_t is_default) { + ASSERT(!s->enabled); hvm_ioreq_server_remove_all_vcpus(s); hvm_ioreq_server_unmap_pages(s, is_default); hvm_ioreq_server_free_rangesets(s, is_default); @@ -1062,6 +1063,8 @@ static int hvm_destroy_ioreq_server(struct domain *d, ioservid_t id) domain_pause(d); + hvm_ioreq_server_disable(s, 0); + list_del(&s->list_entry); hvm_ioreq_server_deinit(s, 0); @@ -1320,11 +1323,10 @@ static void hvm_destroy_all_ioreq_servers(struct domain *d) { bool_t is_default = (s == d->arch.hvm_domain.default_ioreq_server); + hvm_ioreq_server_disable(s, is_default); + if ( is_default ) - { - hvm_ioreq_server_disable(s, 1); d->arch.hvm_domain.default_ioreq_server = NULL; - } list_del(&s->list_entry); -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.5 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |