From owner-freebsd-virtualization@FreeBSD.ORG Tue May 28 21:34:05 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AD725683 for ; Tue, 28 May 2013 21:34:05 +0000 (UTC) (envelope-from bounces+73574-9b34-freebsd-virtualization=freebsd.org@sendgrid.me) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) by mx1.freebsd.org (Postfix) with SMTP id 6AFCDB48 for ; Tue, 28 May 2013 21:34:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpapi; bh=FDhmtoph41CXde4pcXthb1 JkJeA=; b=VepaRyE3w9GKnv7Fw6F1q5uuI9CH1ZdgqkCvrKCL8rEy7XJsS2uMZ8 HdYco8KuOptX5S4+DegMxwRSAB/aqhWrgJRD2LhiKnnBero5yyOFZfpmhT0WLCR2 z420tWwJMByyuYs6+E/He5M5k+jkY4JBYqQZP+NFdg91gxsnOgM90= Received: by 10.4.35.246 with SMTP id mf61.14530.51A522C63 Tue, 28 May 2013 21:33:58 +0000 (UTC) Received: from mail.tarsnap.com (unknown [10.60.208.13]) by mi21 (SG) with ESMTP id 13eed0fd899.5f83.ccb0ab for ; Tue, 28 May 2013 16:33:58 -0500 (CST) Received: (qmail 83663 invoked from network); 28 May 2013 21:33:57 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 28 May 2013 21:33:57 -0000 Received: (qmail 67058 invoked from network); 28 May 2013 21:33:19 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 28 May 2013 21:33:19 -0000 Message-ID: <51A5229F.80205@freebsd.org> Date: Tue, 28 May 2013 14:33:19 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130406 Thunderbird/17.0.5 MIME-Version: 1.0 To: Matt Wilson , =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= Subject: Re: [Xen-devel] FreeBSD PVHVM call for testing References: <51957D42.9060801@citrix.com> <51959ED9.6040405@freebsd.org> <51974EC9.9030204@citrix.com> <5197A1EA.2040404@freebsd.org> <519CAFC7.1070908@citrix.com> <519D24A9.3050407@freebsd.org> <519DDC0A.9000201@citrix.com> <519E6958.6020606@freebsd.org> <519F3CD0.5090405@citrix.com> <51A4D804.9050208@citrix.com> <20130528191855.GA13736@u109add4315675089e695.ant.amazon.com> In-Reply-To: <20130528191855.GA13736@u109add4315675089e695.ant.amazon.com> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SG-EID: 5BcF9P+ypITprUjXJktHhsiUBkkeW691hQUndAFAEhADTHpMuO2yZVPB1LkeEe7rVixeEjSBW0cTZyrQfaH6gJBHfV6TecxbvGGjVDh43KVhIjQUH0/8/42eMsrq9lokg4fRwpPMDFBi25hb3LDO+Q== Cc: "freebsd-xen@freebsd.org" , xen-devel , "freebsd-virtualization@freebsd.org" , "xen-users@lists.xen.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 May 2013 21:34:05 -0000 On 05/28/13 12:18, Matt Wilson wrote: > VCPUOP_set_singleshot_timer returns -EINVAL when: > > 1) the specified vCPU ID is out of range (<0 or >MAX_VIRT_CPUS) > 2) the specified vCPU ID doesn't match the running vCPU. > > It seems that there is a confusion between the logical vCPU ID and the > local APIC physical ID. > [...] > (XEN) Domain 1 (vcpu#16) VCPUOP_set_singleshot_timer specified vcpuid 1 > [...] > APIC: CPU 1 has ACPI ID 16 Thanks Matt! Looks like we need to pass our acpi_id to the Xen hypercall instead of our cpuid. Roger, changing the line int cpu = PCPU_GET(cpuid); to int cpu = PCPU_GET(acpi_id); in xentimer_et_start and xentimer_et_stop fixes this panic and gets me slightly further; the following lines are now added to the console output prior to the system appearing to hang: > ioapic0: routing intpin 1 (ISA IRQ 1) to lapic 1 vector 48 > ioapic0: routing intpin 4 (ISA IRQ 4) to lapic 2 vector 48 > ioapic0: routing intpin 9 (ISA IRQ 9) to lapic 3 vector 48 > ioapic0: routing intpin 12 (ISA IRQ 12) to lapic 4 vector 48 > ioapic0: routing intpin 14 (ISA IRQ 14) to lapic 5 vector 48 > ioapic0: routing intpin 15 (ISA IRQ 15) to lapic 6 vector 48 > ioapic0: routing intpin 28 (PCI IRQ 28) to lapic 7 vector 48 > TSC timecounter discards lower 1 bit(s) > Timecounter "TSC-low" frequency 1300024860 Hz quality -100 > WARNING: WITNESS option enabled, expect reduced performance. On a cc2.8xlarge EC2 instance, the lines which come after this are > GEOM: new disk xbd1 > GEOM: new disk xbd2 > GEOM: new disk xbd3 > GEOM: new disk xbd4 > Trying to mount root from ufs:/dev/ad0a [rw]... > start_init: trying /sbin/init and then the userland boot process; have you made any bug fixes after your pvhvm_v7 which would explain why tasting disks was hanging? -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid