All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] Fix emergency_restart (sysrq-b) with kvm loaded on	Intel hosts
Date: Mon, 25 Aug 2008 12:27:26 +0300	[thread overview]
Message-ID: <48B27AFE.3080704@qumranet.com> (raw)
In-Reply-To: <20080825091508.GC9114@elte.hu>

Ingo Molnar wrote:
> * Avi Kivity <avi@qumranet.com> wrote:
>
>   
>> Enabling Intel VT has the curious side effect whereby the INIT signal 
>> is blocked.  Rather than comment on the wisdom of this side effect, 
>> this patch adds an emergency restart reboot notifier, and modifies the 
>> kvm reboot notifier to disable VT on emergency reboot.
>>     
>
> looks good to me - i was bitten by that problem on a testbox.
>   

I'm a little worried about making emergency restart more complex.

Another thing that worries me is that emergency_restart() doesn't reset 
the box -- it sends INIT.  We could do better by using the ACPI FADT 
reset register (hopefully that's connected to RESET).

The ACPI spec says:

> 4.7.3.6 Reset Register
>
> The optional ACPI reset mechanism specifies a standard mechanism that 
> provides a complete system reset.
> When implemented, this mechanism must reset the entire system. This 
> includes processors, core logic, all
> buses, and all peripherals. From an OSPM perspective, asserting the 
> reset mechanism is the logical
> equivalent to power cycling the machine. Upon gaining control after a 
> reset, OSPM will perform actions in
> like manner to a cold boot.
> The reset mechanism is implemented via an 8-bit register described by 
> RESET_REG in the FADT (always
> accessed via the natural alignment and size described in RESET_REG). 
> To reset the machine, software will
> write a value (indicated in RESET_VALUE in FADT) to the reset 
> register. The RESET_REG field in the
> FADT indicates the location of the reset register.
> The reset register may exist only in I/O space, Memory space, or in 
> PCI Configuration space on a function
> in bus 0. Therefore, the Address_Space_ID value in RESET_REG must be 
> set to I/O space, Memory space,
> or PCI Configuration space (with a bus number of 0). As the register 
> is only 8 bits, Register_Bit_Width
> must be 8 and Register_Bit_Offset must be 0.
> The system must reset immediately following the write to this 
> register. OSPM assumes that the processor
> will not execute beyond the write instruction. OSPM should execute 
> spin loops on the CPUs in the system
> following a write to this register.

Which seems to be what we want? Maybe we should just try acpi_reboot() 
before the other stuff.

>   Acked-by: Ingo Molnar <mingo@elte.hu>
>
> Seems best to merge this via the KVM tree, right?
>
>   

I'm happy to do that, if everyone feels the patch is fine.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2008-08-25  9:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-25  9:11 [PATCH] Fix emergency_restart (sysrq-b) with kvm loaded on Intel hosts Avi Kivity
2008-08-25  9:15 ` Ingo Molnar
2008-08-25  9:27   ` Avi Kivity [this message]
2008-08-25  9:30     ` Ingo Molnar
2008-08-25 10:03       ` Avi Kivity
2008-08-25 10:27         ` Ingo Molnar
2008-08-25 10:36           ` Avi Kivity
2008-08-25 13:12   ` Eric W. Biederman
2008-08-25 13:35     ` Avi Kivity
2008-08-25 13:14   ` Eric W. Biederman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48B27AFE.3080704@qumranet.com \
    --to=avi@qumranet.com \
    --cc=ebiederm@xmission.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.