On 02/20/13 22:46, David Woodhouse wrote:

> +static void i440fx_reset(DeviceState *ds)
> +{
> +    PCIDevice *dev = PCI_DEVICE(ds);
> +    PCII440FXState *d = I440FX_PCI_DEVICE(dev);
> +    uint8_t *pci_conf = dev->config;
> +
> +    pci_conf[0x59] = 0x00; /* Reset PAM setup */
> +    pci_conf[0x5a] = 0x00;
> +    pci_conf[0x5b] = 0x00;
> +    pci_conf[0x5c] = 0x00;
> +    pci_conf[0x5d] = 0x00;
> +    pci_conf[0x5e] = 0x00;
> +    pci_conf[0x5f] = 0x00;
> +    pci_conf[0x72] = 0x02; /* And SMM */
> +
> +    i440fx_update_memory_mappings(d);
> +}

Consider

    memset(pci_conf + I440FX_PAM, 0, I440FX_PAM_SIZE);
    pci_conf[I440FX_SMRAM] = 0x02;

But I'll let you decide of course.

I tested guest reboot with this series applied, on my
unrestricted-guest-incapable host (Xeon W3550) with OVMF + SeaBIOS CSM.
It works great. Many thanks.

Series

Tested-by: Laszlo Ersek <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>

Laszlo

Reply via email to