Prevent domain with attached vTPM from doing local migration
The attached patch prevents a domain with an attached vTPM from doing local migration since this does not seem to work correctly (see tests in xm test suite). If no vTPM has been attached, the local migration proceeds as usual.
xen-unstable.hg/tools/examples/vtpm-common.sh +5 -0
@@ -48,6 +48,9 @@ else function vtpm_migrate() { echo "Error: vTPM migration accross machines not implemented." } + function vtpm_migrate_local() { + echo "Error: local vTPM migration not supported" + } function vtpm_migrate_recover() { true }
@@ -353,6 +356,8 @@ function vtpm_migration_step() { local res=$(vtpm_isLocalAddress $1) if [ "$res" == "0" ]; then vtpm_migrate $1 $2 $3 + else + vtpm_migrate_local fi }
xen-unstable.hg/tools/examples/vtpm-impl +3 -0
@@ -184,3 +184,6 @@ function vtpm_migrate_recover() { echo "Error: Recovery not supported yet" } +function vtpm_migrate_local() { + echo "Error: local vTPM migration not supported" +}
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 6 lines · Stefan Berger
The attached patch prevents a domain with an attached vTPM from doing local migration since this does not seem to work correctly (see tests in xm test suite). If no vTPM has been attached, the local migration proceeds as usual.
Signed-off-by Stefan Berger <[email protected]>
I've applied this, thanks. Do you know what it would take to get localhost migration working for domains with a vTPM? Localhost migration is a useful test, and it seems a shame to break it in this case.
Ewan.
[email protected] wrote on 09/05/2006 08:50:49 AM:
Quoted 4 lines · Stefan Berger
Quoted 3 lines
The attached patch prevents a domain with an attached vTPM from doing local migration since this does not seem to work correctly (see tests
in
Quoted 6 lines
Quoted 4 lines
xm test suite). If no vTPM has been attached, the local migration proceeds as usual.
Signed-off-by Stefan Berger <[email protected]>I've applied this, thanks. Do you know what it would take to get
localhost
Quoted 1 line
migration working for domains with a vTPM? Localhost migration is a
useful
Quoted 1 line
test, and it seems a shame to break it in this case.
The vTPM needs to be able to handle the messages that are sent to it via the hotplug scripts either in-order or out-of-order, where in-order means that an equivalent of a 'close' message comes before the 'open' and out-of-order means that the 'open' comes before the 'close'. From what I saw when I wrote and tested the vTPM hotplug scripts is that the messages sent from these scripts (kicked-off by the xenbus) can come in either one of these orders when doing local migration, probably due to timing. The vTPM also must not tear down its state when the 'close' comes since a) the 'open' might have come before it *and* b) one would have to re-initialize the vTPM. The reason for this is that a TPM keeps internal state, such as keys, that are created or loaded into it and that can normally be removed upon a 'close' *if* that 'close' always means power-off. Here (in Xen) it has to be treated differently, which boils down to ignoring the 'close' since this can also be sent during a suspend. So the trick that I found was to handle things late in the 'open' where I can determine whether a domain was 'created' or 'resumed' (after local migration or suspend/resume) and reset the device if necessary. Well, it's a bit tricky intergrating the vTPM.
Stefan
Quoted 7 lines
Ewan.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel