qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: qemu-devel@nongnu.org, Avi Kivity <avi@qumranet.com>
Subject: [Qemu-devel] Re: Breakage with local APIC routing
Date: Thu, 27 Aug 2009 20:07:09 +0200	[thread overview]
Message-ID: <4A96CB4D.30401@web.de> (raw)
In-Reply-To: <alpine.DEB.1.00.0908251535570.19140@intel-tinevez-2-302>

[-- Attachment #1: Type: text/plain, Size: 4464 bytes --]

Johannes Schindelin wrote:
> Hi,
> 
> On Tue, 25 Aug 2009, Jan Kiszka wrote:
> 
>> Johannes Schindelin wrote:
>>
>>> On Tue, 25 Aug 2009, Jan Kiszka wrote:
>>>
>>>> Johannes Schindelin wrote:
>>>>
>>>>> On Sun, 17 Aug 2008, Jan Kiszka wrote:
>>>>>
>>>>>> Johannes Schindelin wrote:
>>>>>>
>>>>>>> On Wed, 13 Aug 2008, Jan Kiszka wrote:
>>>>>>>
>>>>>>>> Johannes Schindelin wrote:
>>>>>>>>> due to the change in revision 3371 (well, at that time, CVS was 
>>>>>>>>> used, which was no better than Subversion) installation of win64 
>>>>>>>>> is broken in QEmu.  The commit message reads like this:
>>>>>>>>>
>>>>>>>>> 	Don't route PIC interrupts through the local APIC if the local 
>>>>>>>>> 	APIC config says so. By Ari Kivity.
>>>>>>>> I recalled some earlier post on this which claimed to fix the issue 
>>>>>>>> and found it in the archive:
>>>>>>>>
>>>>>>>> http://permalink.gmane.org/gmane.comp.emulators.qemu/25415
>>>>>>> I tried this, and it changes the symptoms, indeed.  Instead of an 
>>>>>>> endless loop, it results in a bluescreen.
>>>>>>>
>>>>>>> As the OP said that it worked for him, I guess it is either in 
>>>>>>> commits that came after his post, or in my add-on patches.
>>>>>> So we are likely on the wrong path. Maybe we have to understand what
>>>>>> happens here first...
>>>>>>
>>>>>>> Hopefully I will find some time to work more on this bug.
>>>>>> Would be interesting to know
>>>>>>  - if pic_irq_request is continuously called or if it stops when windows 
>>>>>>    hangs
>>>>>>  - what IRQ vectors are delivered
>>>>>>  - in what state the apic is, namely the s->lvt[APIC_LVT_LINT0]
>>>>> Sorry for the long delay.  I just don't have time to take care of the 
>>>>> issue, but I quickly verified that it still does not work, with aa0cba4 
>>>>> (Aug 13 2009).
>>>>>
>>>>> If you are still interested in this issue, could you give me a hint 
>>>>> _where_ I should output _which_ values?  I'll gladly take time for that 
>>>>> now.
>>>> If some OS does not properly install due to a possible emulation bug, I
>>>> am interested, for sure. Let's restart this by specifying the test case
>>>> more precisely: What version of Windows are you trying to install?
>>> As far as I remember, it is a plain version of 64-bit XP Pro.  (Maybe it 
>>> is a custom .iso for my day-job, but I think this is not the case).
>>>
>>>> What is your qemu command line?
>>> test -h pc-bios/keymaps || ln -s ../keymaps pc-bios/
>>>
>>> ./x86_64-softmmu/qemu-system-x86_64 \
>>>         -L pc-bios/ \
>>>         -m 1024 \
>>>         -monitor stdio \
>>>         -k en-us \
>>>         -hda w64.img \
>>>         -cdrom en_win_xp_pro_x64bit.iso \
>>>         -fda fat:fat \
>>>         -boot d \
>>>         -net none \
>>>         -localtime
>>>
>>>> Where does the installation fail?
>>> "Setup is starting Windows". (Just after "Setup is loading files (...)" 
>>> phase.)
>>>
>>>> Are there specific steps required during the installation to reproduce 
>>>> the problem?
>>> You need a 64-bit XP Pro, then call the command line as I did.  It hangs 
>>> at
>>>
>>> 	(qemu) info cpus
>>> 	* CPU #0: pc=0xfffff800010cabeb
>>>
>>> This is 100% reproducible.
>>>
>>>> And one more question: Did you check that you were using the 
>>>> corresponding BIOS to aa0cba4?
>>> Yes, I always use -L pc-bios/ in the same Git working directory, and I 
>>> just verified that indeed, the source is clean.
>>>
>>> A tiny, gentle reminder: the revision which is now available as 0e21e12b 
>>> introduced this particular breakage.
>> OK, just found some 64-bit Windows ISO (Server 2003) that also makes no
>> progress at the point you described. Will play with it later today,
>> specifically with the LAPIC changes you referred to.
> 
> Thank you very much!
> 
> If you need me to test something, just let me know; I'll try to squeeze 
> that into my time schedule.

I'm starting to get clueless about this issue. It looks like a timing
issue as I was able to crash Windows when using qemu-kvm (in kvm mode)
and attaching a guest debugger to the "right" spot. As you may know,
this also happens today (after dyngen to TCG switch) when resetting the
CPU interrupt in pic_irq_request on !level. To exclude that Windows is
simply fragile here, I need a better test case, ideally some with source
code. Think I will look into Mohammed's Ubuntu case again.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  parent reply	other threads:[~2009-08-27 18:07 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-11 14:28 [Qemu-devel] Breakage with local APIC routing Johannes Schindelin
2008-08-13  8:14 ` [Qemu-devel] " Jan Kiszka
2008-08-13  9:08   ` Jan Kiszka
2008-08-17 15:00     ` Johannes Schindelin
2008-08-17 15:28   ` Johannes Schindelin
2008-08-17 16:52     ` Jan Kiszka
2009-08-13 16:21       ` Johannes Schindelin
2009-08-25  6:56         ` Jan Kiszka
2009-08-25  8:24           ` Mohammed Gamal
2009-08-25  8:59             ` Jan Kiszka
2009-08-25  9:09               ` Mohammed Gamal
2009-08-25  9:33                 ` Jan Kiszka
2009-08-25 10:16                   ` Mohammed Gamal
2009-08-25 10:21                     ` Mohammed Gamal
2009-08-25 10:38                       ` Jan Kiszka
2009-08-26 22:10                         ` Juergen Lock
2009-08-27 17:56                           ` Jan Kiszka
2009-08-29 21:18                             ` Juergen Lock
2009-08-31  7:47                               ` Jan Kiszka
2009-08-31 21:27                                 ` Juergen Lock
2009-09-01 20:12                                   ` Juergen Lock
2009-09-07 20:59                                     ` FreeBSD timing issues and qemu (was: Re: [Qemu-devel] Re: Breakage with local APIC routing) Juergen Lock
2009-09-08  2:17                                       ` Ryan Stone
2009-09-09 20:15                                         ` Juergen Lock
2009-09-09 20:39                                           ` Ryan Stone
2009-09-09 20:46                                       ` Luigi Rizzo
2009-09-10 17:46                                         ` Juergen Lock
2009-09-10 19:08                                           ` Luigi Rizzo
2009-09-10 20:44                                             ` Juergen Lock
2009-09-11 15:22                                             ` John Baldwin
2009-09-11 17:03                                               ` Luigi Rizzo
2009-09-11 17:01                                                 ` John Baldwin
2009-09-12 15:48                                                   ` Luigi Rizzo
2009-08-25 11:48           ` [Qemu-devel] Re: Breakage with local APIC routing Johannes Schindelin
2009-08-25 12:31             ` Jan Kiszka
2009-08-25 13:36               ` Johannes Schindelin
2009-08-26  7:31                 ` Jan Kiszka
2009-08-26  9:27                   ` Avi Kivity
2009-08-27 18:07                 ` Jan Kiszka [this message]
2008-08-17 17:32 ` [Qemu-devel] " Stefan Weil
2008-08-17 18:58   ` [Qemu-devel] " Jan Kiszka
2008-08-17 20:40     ` Stefan Weil
2008-08-17 20:23   ` [Qemu-devel] " Aurelien Jarno
2008-08-17 21:10     ` Stefan Weil
2008-08-18 14:27       ` Anthony Liguori
2008-08-17 21:14     ` [Qemu-devel] " Jan Kiszka

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=4A96CB4D.30401@web.de \
    --to=jan.kiszka@web.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=avi@qumranet.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).