ioreq server regression
Looks like commit e7dabe59c ("x86/hvm: don't unconditionally create a default ioreq server") breaks restore for HVM guests.
I see "qemu: hardware error: Invalid ioreq type 0x53" in qemu log.
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 12.12.16 at 17:01, <[email protected]> wrote:
Looks like commit
e7dabe59c("x86/hvm: don't unconditionally create a default ioreq server") breaks restore for HVM guests.I see "qemu: hardware error: Invalid ioreq type
0x53" in qemu log.
And that's qemu-trad or qemu-upstream?
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 6 lines · Jan Beulich
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 12.12.16 at 17:01, <[email protected]> wrote:
Looks like commit
e7dabe59c("x86/hvm: don't unconditionally create a default ioreq server") breaks restore for HVM guests.I see "qemu: hardware error: Invalid ioreq type
0x53" in qemu log.And that's qemu-trad or qemu-upstream?
Traditional. Which explains now why my 32-bit guest (which uses upstream qemu) worked fine.
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 9 lines
-----Original Message-----
From: Boris Ostrovsky [mailto:[email protected]]
Sent: 12 December 2016 16:02
To: Paul Durrant <[email protected]>; Jan Beulich <[email protected]>; Andrew Cooper <[email protected]>; Juergen Gross <[email protected]>; xen-devel <[email protected]>
Cc: [email protected]
Subject: ioreq server regression
Quoted 5 lines
Looks like commit
e7dabe59c("x86/hvm: don't unconditionally create a default ioreq server") breaks restore for HVM guests.I see "qemu: hardware error: Invalid ioreq type
0x53" in qemu log.
Damn, yes that will be the case when migrating with legacy QEMU... we're going to need another flag that's set on the domain by the restore code so that the default server also gets created on restore.
Paul
Quoted 1 line
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 9 lines · Paul Durrant
Quoted 9 lines
-----Original Message-----
From: Boris Ostrovsky [mailto:[email protected]]
Sent: 12 December 2016 16:02
To: Paul Durrant <[email protected]>; Jan Beulich <[email protected]>; Andrew Cooper <[email protected]>; Juergen Gross <[email protected]>; xen-devel <[email protected]>
Cc: [email protected]
Subject: ioreq server regression
Quoted 6 lines
Quoted 5 lines
Looks like commit
e7dabe59c("x86/hvm: don't unconditionally create a default ioreq server") breaks restore for HVM guests.I see "qemu: hardware error: Invalid ioreq type
0x53" in qemu log.Damn, yes that will be the case when migrating with legacy QEMU... we're going to need another flag that's set on the domain by the restore code so that the default server also gets created on restore.
I don't understand why the existing code doesn't suffice. A domain being restored is conceptually no different from one which is still being constructed.
The creation_finished flag should still be clear at this point during restore. Is it perhaps something else doing a pause/unpause on the domain before qemu starts up? The creation_finished flag should only be set at the first point the refcount goes to zero, not the first unpause hypercall.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 28 lines
-----Original Message-----
From: Andrew Cooper
Sent: 12 December 2016 16:27
To: Paul Durrant <[email protected]>; Boris Ostrovsky <[email protected]>; Jan Beulich <[email protected]>; Juergen Gross <[email protected]>; xen-devel <[email protected]>
Cc: [email protected]
Subject: Re: ioreq server regressionQuoted 9 lines · Paul Durrant
Quoted 9 lines
-----Original Message-----
From: Boris Ostrovsky [mailto:[email protected]]
Sent: 12 December 2016 16:02
To: Paul Durrant <[email protected]>; Jan Beulich <[email protected]>; Andrew Cooper <[email protected]>; Juergen Gross <[email protected]>; xen-devel <[email protected]>
Cc: [email protected]
Subject: ioreq server regressionQuoted 6 lines
Quoted 5 lines
Looks like commit
e7dabe59c("x86/hvm: don't unconditionally create a default ioreq server") breaks restore for HVM guests.I see "qemu: hardware error: Invalid ioreq type
0x53" in qemu log.Damn, yes that will be the case when migrating with legacy QEMU... we're
going to need another flag that's set on the domain by the restore code so that the default server also gets created on restore.
Quoted 6 lines
I don't understand why the existing code doesn't suffice. A domain being restored is conceptually no different from one which is still being constructed.
The
creation_finishedflag should still be clear at this point during restore.
That's the problem... The creation flag is clear so reading the HVM params does not instantiate the default ioreq server in the target domain.
Paul
Quoted 6 lines
Is it perhaps something else doing a pause/unpause on the
domain before qemu starts up? Thecreation_finishedflag should only be set at the first point the refcount goes to zero, not the first unpause hypercall.~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 43 lines
-----Original Message-----
From: Paul Durrant
Sent: 12 December 2016 16:29
To: Andrew Cooper <[email protected]>; Boris Ostrovsky <[email protected]>; Jan Beulich <[email protected]>; Juergen Gross <[email protected]>; xen-devel <[email protected]>
Cc: [email protected]
Subject: RE: ioreq server regressionQuoted 9 lines
-----Original Message-----
From: Andrew Cooper
Sent: 12 December 2016 16:27
To: Paul Durrant <[email protected]>; Boris Ostrovsky <[email protected]>; Jan Beulich <[email protected]>; Juergen Gross <[email protected]>; xen-devel <[email protected]>
Cc: [email protected]
Subject: Re: ioreq server regressionQuoted 7 lines
Quoted 6 lines · Paul Durrant
Quoted 6 lines
-----Original Message-----
From: Boris Ostrovsky [mailto:[email protected]]
Sent: 12 December 2016 16:02
To: Paul Durrant <[email protected]>; Jan Beulich <[email protected]>; Andrew Cooper <[email protected]>; Juergen Gross <[email protected]>; xen-devel <xen-Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Cc: [email protected]
Subject: ioreq server regressionLooks like commit
e7dabe59c("x86/hvm: don't unconditionally create a default ioreq server") breaks restore for HVM guests.I see "qemu: hardware error: Invalid ioreq type
0x53" in qemu log.Damn, yes that will be the case when migrating with legacy QEMU...
we're
Quoted 7 lines
going to need another flag that's set on the domain by the restore code so that the default server also gets created on restore.
I don't understand why the existing code doesn't suffice. A domain being restored is conceptually no different from one which is still being constructed.
Quoted 6 lines
Quoted 2 lines
The
creation_finishedflag should still be clear at this point during restore.That's the problem... The creation flag is clear so reading the HVM params does not instantiate the default ioreq server in the target domain.
Sorry, ignore me... I my logic backwards.
I guess the creation flag must get set too early on restore.
Paul
Quoted 8 lines
Paul
Quoted 6 lines
Is it perhaps something else doing a pause/unpause on the
domain before qemu starts up? Thecreation_finishedflag should only be set at the first point the refcount goes to zero, not the first unpause hypercall.~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 7 lines · Boris Ostrovsky
Looks like commit
e7dabe59c("x86/hvm: don't unconditionally create a default ioreq server") breaks restore for HVM guests.I see "qemu: hardware error: Invalid ioreq type
0x53" in qemu log.-boris
Does this help? The current creation_finished logic is wrong if a 2nd toolstack component performs a pause/unpause pair on the domain.
xen/common/domain.c +0 -0
@@ -1004,13 +1004,6 @@ int domain_unpause_by_systemcontroller(struct
domain *d)
{
int old, new, prev = d->controller_pause_count;- /*
- * We record this information here for populate_physmap to figure out
- * that the domain has finished being created. In fact, we're only
- * allowed to set the MEMF_no_tlbflush flag during VM creation.
- */
- d->creation_finished = true;
-
do
{
old = prev;
@@ -1022,6 +1015,14 @@ int domain_unpause_by_systemcontroller(struct
domain *d)
prev = cmpxchg(&d->controller_pause_count, old, new);
} while ( prev != old );+ /*
+ * We record this information here for populate_physmap to figure out
+ * that the domain has finished being created. In fact, we're only
+ * allowed to set the MEMF_no_tlbflush flag during VM creation.
+ */
+ if ( prev == 0 )
+ d->creation_finished = true;
+
domain_unpause(d);
return 0;_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 10 lines · Andrew Cooper
Quoted 7 lines · Boris Ostrovsky
Looks like commit
e7dabe59c("x86/hvm: don't unconditionally create a default ioreq server") breaks restore for HVM guests.I see "qemu: hardware error: Invalid ioreq type
0x53" in qemu log.-boris
Does this help? The current
creation_finishedlogic is wrong if a 2nd toolstack component performs a pause/unpause pair on the domain.
Yes, this seems to work.
-boris
Quoted 35 lines
xen/common/domain.c +0
-7@@ -1004,13 +1004,6 @@ int domain_unpause_by_systemcontroller(struct domain *d) {int old, new, prev = d->controller_pause_count; -/* -* We record this information here for populate_physmap to figure out -* that the domain has finished being created. In fact, we're only -* allowed to set the MEMF_no_tlbflush flag during VM creation. -*/ - d->creation_finished = true; - do {old = prev;xen/common/domain.c +8
-0@@ -1022,6 +1015,14 @@ int domain_unpause_by_systemcontroller(struct domain *d) prev =cmpxchg (&d->controller_pause_count, old, new); }while ( prev != old ); +/* +* We record this information here for populate_physmap to figure out +* that the domain has finished being created. In fact, we're only +* allowed to set the MEMF_no_tlbflush flag during VM creation. +*/ +if ( prev ==0 ) + d->creation_finished = true; +domain_unpause (d);
Quoted 2 lines
return 0;
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel