pc, i440fx: Make smm enable/disable function i440fx independent.

make cpu_smm_update() generic to be independent on i440fx by
registering a callback.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index 97519db..aff7f6d 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -114,8 +114,10 @@
     }
 }
 
-void i440fx_set_smm(PCII440FXState *d, int val)
+static void i440fx_set_smm(int val, void *arg)
 {
+    PCII440FXState *d = arg;
+
     val = (val != 0);
     if (d->smm_enabled != val) {
         d->smm_enabled = val;
@@ -210,6 +212,7 @@
 
     d->dev.config[I440FX_SMRAM] = 0x02;
 
+    cpu_smm_register(&i440fx_set_smm, d);
     return 0;
 }