[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Masking all interrupts in TCG mode

From: Arnabjyoti Kalita
Subject: Re: Masking all interrupts in TCG mode
Date: Fri, 2 Oct 2020 22:20:10 +0530

Thank you Peter for the answer.

What I can understand is that when we restore the VM State, the same interrupt state will be restored which was before we did a savevm. And then these interrupts will be executed appropriately.

If there is an interrupt at the start of restore, then the interrupt will be executed first before the process of executing and finding the TB starts, based on the below logic. Am I correct ?

while (!cpu_has_exception()) {
    while (!cpu_has_interrupt()) {
        tb = tb_find()

Is it possible that the same interrupt could have different numbers in the KVM mode and in TCG mode? Like say, an interrupt is 0x15 in KVM, but is 0x75 in TCG.

Best Regards,

On Fri, Oct 2, 2020 at 4:05 PM Peter Maydell <peter.maydell@linaro.org> wrote:
On Fri, 2 Oct 2020 at 04:17, Arnabjyoti Kalita
<akalita@cs.stonybrook.edu> wrote:
> Is there a way to mask all interrupts in the TCG mode of QEMU execution? How should I go about doing that in code?
> Scenario:
> I start the QEMU process in KVM mode and then do a savevm. I load the saved QEMU state in TCG mode. I'd like all the interrupts to be disabled/masked when I do a load of the saved VM state.

When the VM state is being saved or restored the VM should
be in the 'stopped' state, so no interrupts will occur
during the saving and loading process.

When the VM is restarted after the restore, the guest
interrupt state will be whatever the VM state information
you restored said it should be. If you randomly mask
interrupts that the guest isn't expecting to be masked,
the guest is likely to hang.

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]