From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36685 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P4MUk-0000l0-3e for qemu-devel@nongnu.org; Fri, 08 Oct 2010 19:36:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P4MUi-0006Tp-OH for qemu-devel@nongnu.org; Fri, 08 Oct 2010 19:36:58 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:33493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P4MUi-0006Tk-Ks for qemu-devel@nongnu.org; Fri, 08 Oct 2010 19:36:56 -0400 Received: by qwk4 with SMTP id 4so1087551qwk.4 for ; Fri, 08 Oct 2010 16:36:55 -0700 (PDT) Message-ID: <4CAFAB13.30707@codemonkey.ws> Date: Fri, 08 Oct 2010 18:36:51 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] net: provide a friendly message when a user passes a bad -net tap, fd=X References: <1286575496-10314-1-git-send-email-aliguori@us.ibm.com> <88E5A184-0EB3-41C6-917A-482E47DE9288@suse.de> In-Reply-To: <88E5A184-0EB3-41C6-917A-482E47DE9288@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-devel@nongnu.org On 10/08/2010 06:28 PM, Alexander Graf wrote: > On 09.10.2010, at 00:04, Anthony Liguori wrote: > > >> A lot of people copy libvirt's command line from ps -ef and then wonder why the >> VM isn't working correctly. Let's be kind and tell them what they should do >> instead. >> >> Without this patch, if you run with an invalid -net tap,fd=X, the guest still >> runs and we poll 100% on a bad file descriptor. With this patch, you get: >> >> qemu: -net tap,fd=42: invalid fd= for tap network device. If you're copying >> from libvirt, use `virsh dom2xml-to-native' instead >> qemu: -net tap,fd=42: Device 'tap' could not be initialized >> >> Signed-off-by: Anthony Liguori >> >> diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c >> index 1d83400..5f9f749 100644 >> --- a/hw/usb-uhci.c >> +++ b/hw/usb-uhci.c >> @@ -64,7 +64,7 @@ >> #define UHCI_PORT_CSC (1<< 1) >> #define UHCI_PORT_CCS (1<< 0) >> >> -#define FRAME_TIMER_FREQ 1000 >> +#define FRAME_TIMER_FREQ 500 >> >> #define FRAME_MAX_LOOPS 100 >> >> @@ -1054,7 +1054,7 @@ static void uhci_frame_timer(void *opaque) >> UHCIState *s = opaque; >> >> /* prepare the timer for the next frame */ >> - s->expire_time += (get_ticks_per_sec() / FRAME_TIMER_FREQ); >> + s->expire_time = qemu_get_clock(vm_clock) + (get_ticks_per_sec() / FRAME_TIMER_FREQ); >> > How exactly is this related? > So, didn't have a clean working directory. Regards, Anthony Liguori > Alex > > >