From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TUj7J-0006Xk-29 for qemu-devel@nongnu.org; Sat, 03 Nov 2012 15:10:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TUj7H-0003ba-NF for qemu-devel@nongnu.org; Sat, 03 Nov 2012 15:10:48 -0400 Received: from mout.web.de ([212.227.17.12]:60241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TUj7H-0003bS-D0 for qemu-devel@nongnu.org; Sat, 03 Nov 2012 15:10:47 -0400 Message-ID: <50956C35.1080002@web.de> Date: Sat, 03 Nov 2012 20:10:45 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <509567BE.9000306@web.de> <50956A73.1070605@web.de> In-Reply-To: <50956A73.1070605@web.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig78FC0923C5F5A28C5ADD4532" Subject: Re: [Qemu-devel] [PATCH] kvm: fix Win2k boot without KVM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig78FC0923C5F5A28C5ADD4532 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2012-11-03 20:03, Jan Kiszka wrote: > On 2012-11-03 19:56, Blue Swirl wrote: >> On Sat, Nov 3, 2012 at 6:51 PM, Jan Kiszka wrote: >>> On 2012-11-03 19:49, Blue Swirl wrote: >>>> Ignore accesses to VAPIC when kvmvapic is not enabled. >>>> >>>> Cc: Jan Kiszka >>>> Signed-off-by: Blue Swirl >>>> --- >>>> hw/kvmvapic.c | 7 ++++--- >>>> 1 files changed, 4 insertions(+), 3 deletions(-) >>>> >>>> diff --git a/hw/kvmvapic.c b/hw/kvmvapic.c >>>> index dc111ee..a97d532 100644 >>>> --- a/hw/kvmvapic.c >>>> +++ b/hw/kvmvapic.c >>>> @@ -612,6 +612,9 @@ static void vapic_write(void *opaque, hwaddr add= r, uint64_t data, >>>> hwaddr rom_paddr; >>>> VAPICROMState *s =3D opaque; >>>> >>>> + if (!kvm_irqchip_in_kernel()) { >>>> + return; >>>> + } >>>> cpu_synchronize_state(env); >>>> >>>> /* >>>> @@ -665,9 +668,7 @@ static void vapic_write(void *opaque, hwaddr add= r, uint64_t data, >>>> break; >>>> default: >>>> case 4: >>>> - if (!kvm_irqchip_in_kernel()) { >>>> - apic_poll_irq(env->apic_state); >>>> - } >>>> + apic_poll_irq(env->apic_state); >>>> break; >>>> } >>>> } >>>> >>> >>> NACK, I'm already debugging the true reason (related to code patching= ). >> >> This is a minimal fix that lets Win2k boot, now it does not work at >> all. I think it should be applied for 1.3, it can be reverted when >> (if) you find a better fix. There's no hurry though. >=20 > If you want to disable it, flip apic.vapic for !kvm_enabled. Your patch= > affects user space APIC with KVM as well, though that is perfectly fine= =2E >=20 > But first of all give this some days as I just started. =2E..even more as this regression may not be related to the introduction of the kvmvapic: My original test case for the kvmvapic under TCG, WinXP, is now also broken, causing a segfault too. What I'm seeing is that tb_invalidate_phys_page_range in patch_instruction no longer seems to detect that the currently executed tb was just changed. Any ideas what may cause this are welcome. Jan --------------enig78FC0923C5F5A28C5ADD4532 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlCVbDUACgkQitSsb3rl5xSnRACfbznb6kz6GjRy7wNqgWC7Y/Ux aM0An1I+gs5xUL4xtJifZO8kN26BgMVr =dqLE -----END PGP SIGNATURE----- --------------enig78FC0923C5F5A28C5ADD4532--