public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Nadav Amit <nadav.amit@gmail.com>
To: kvm list <kvm@vger.kernel.org>
Subject: x86: Question regarding the reset value of LINT0
Date: Wed, 8 Apr 2015 19:40:32 +0300	[thread overview]
Message-ID: <2B474EEE-85C9-47C3-89FF-C56754CFEC0D@gmail.com> (raw)

Hi,

I would appreciate if someone explains the reason for enabling LINT0 during
APIC reset. This does not correspond with Intel SDM Figure 10-8: “Local
Vector Table” that says all LVT registers are reset to 0x10000.

In kvm_lapic_reset, I see:

	apic_set_reg(apic, APIC_LVT0,
		SET_APIC_DELIVERY_MODE(0, APIC_MODE_EXTINT));

Which is actually pretty similar to QEMU’s apic_reset_common:

    if (bsp) {
        /*
         * LINT0 delivery mode on CPU #0 is set to ExtInt at initialization
         * time typically by BIOS, so PIC interrupt can be delivered to the
         * processor when local APIC is enabled.
         */
        s->lvt[APIC_LVT_LINT0] = 0x700;
    }

Yet, in both cases, I miss the point - if it is typically done by the BIOS,
why does QEMU or KVM enable it?

BTW: KVM seems to run fine without it, and I think setting it causes me
problems in certain cases.

Thanks,
Nadav

             reply	other threads:[~2015-04-08 16:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 16:40 Nadav Amit [this message]
2015-04-08 16:44 ` x86: Question regarding the reset value of LINT0 Jan Kiszka
2015-04-08 16:59   ` Nadav Amit
2015-04-08 17:06     ` Jan Kiszka
2015-04-08 17:40       ` Nadav Amit
2015-04-08 17:51         ` Jan Kiszka
2015-04-08 21:49           ` Nadav Amit
2015-04-08 22:11             ` Bandan Das
2015-04-09 18:21               ` Nadav Amit
2015-04-09 18:28                 ` Avi Kivity
2015-04-09 18:49                   ` Nadav Amit
2015-04-09 19:17                     ` Bandan Das
2015-04-10  9:12                       ` Paolo Bonzini
2015-04-12 18:29                         ` Nadav Amit
2015-04-12 22:53                           ` [PATCH] KVM: x86: Support for disabling quirks Nadav Amit
2015-04-13 10:34                             ` Paolo Bonzini
2015-04-13 12:02                               ` Nadav Amit

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=2B474EEE-85C9-47C3-89FF-C56754CFEC0D@gmail.com \
    --to=nadav.amit@gmail.com \
    --cc=kvm@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox