Trivial patches for 20 to 27 January 2012
The following changes since commit 331636431af32ece373f4b1fb7c3ae9d0615e2a6:
vga: compile cirrus_vga in hwlib (2012-01-25 18:32:59 +0000)
are available in the git repository at:
git://github.com/stefanha/qemu.git trivial-patches
Jan Kiszka (3):
qdev-property: Make bit property parsing stricter
e1000: Preserve link state across device reset
pcnet: Preserve link state across device reset
Laszlo Ersek (1):
qemu-io: end aio help text sentences with periods
Paolo Bonzini (1):
remove #if 0 code for timers
Sergei Trofimovich (1):
./configure: export xfs config via --{enable, disable}-xfsctl
configure | 4 ++++ hw/e1000.c | 5 +++++ hw/pcnet.c | 3 ++- hw/qdev-properties.c | 4 ++-- qemu-io.c | 4 ++-- qemu-timer.c | 29 ----------------------------- 6 files changed, 15 insertions(+), 34 deletions(-)
Signature · 1 line
1.7.8.3
PATCH 2/6 qdev-property: Make bit property parsing stricter
From: Jan Kiszka <[email protected]>
By using strncasecmp, we allow for arbitrary characters after the "on"/"off" string. Fix this by switching to strcasecmp.
--- hw/qdev-properties.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
hw/qdev-properties.c +2 -2
@@ -40,9 +40,9 @@ static void qdev_prop_cpy(DeviceState *dev, Property *props, void *src)/* Bit */ static int parse_bit (DeviceState *dev,Property *prop,const char *str) { -if (!strncasecmp (str,"on" ,2 )) +if (!strcasecmp (str,"on" ))bit_prop_set (dev, prop, true); -else if (!strncasecmp (str,"off" ,3 )) +else if (!strcasecmp (str,"off" ))bit_prop_set (dev, prop, false);else return -EINVAL ;
Signature · 1 line
1.7.8.3
PATCH 1/6 remove #if 0 code for timers
In reply to Stefan HajnocziFrom: Paolo Bonzini <[email protected]>
--- qemu-timer.c | 29 ----------------------------- 1 files changed, 0 insertions(+), 29 deletions(-)
qemu-timer.c +0 -29
@@ -494,35 +494,6 @@ static void host_alarm_handler(int host_signum)if (!t)return ; -#if 0 -#define DISP_FREQ 1000 - { -static int64_t delta_min =INT64_MAX ; -static int64_t delta_max, delta_cum, last_clock, delta, ti; -static int count; - ti =qemu_get_clock_ns (vm_clock); -if (last_clock !=0 ) { - delta = ti - last_clock; -if (delta < delta_min) - delta_min = delta; -if (delta > delta_max) - delta_max = delta; - delta_cum += delta; -if (++count ==DISP_FREQ ) { -printf ("timer: min=%" PRId64" us max=%" PRId64" us avg=%" PRId64" us avg_freq=%0.3f Hz\n" , -muldiv64 (delta_min,1000000 ,get_ticks_per_sec ()), -muldiv64 (delta_max,1000000 ,get_ticks_per_sec ()), -muldiv64 (delta_cum,1000000 /DISP_FREQ ,get_ticks_per_sec ()), - (double )get_ticks_per_sec () / ((double )delta_cum /DISP_FREQ )); - count =0 ; - delta_min =INT64_MAX ; - delta_max =0 ; - delta_cum =0 ; - } - } - last_clock = ti; - } -#endif if (alarm_has_dynticks (t) ||qemu_next_alarm_deadline () <=0 ) { t->expired =alarm_has_dynticks (t);
Signature · 1 line
1.7.8.3
PATCH 3/6 e1000: Preserve link state across device reset
In reply to Stefan HajnocziFrom: Jan Kiszka <[email protected]>
A device reset does not affect the link state, only set_link does.
--- hw/e1000.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
hw/e1000.c +5 -0
@@ -1133,6 +1133,11 @@ static void e1000_reset(void *opaque)memmove (d->mac_reg, mac_reg_init,sizeof mac_reg_init); d->rxbuf_min_shift =1 ;memset (&d->tx,0 ,sizeof d->tx); + +if (d->nic->nc.link_down) { + d->mac_reg[STATUS ] &= ~E1000_STATUS_LU ; + d->phy_reg[PHY_STATUS ] &= ~MII_SR_LINK_STATUS ; + } }static NetClientInfo net_e1000_info = {
Signature · 1 line
1.7.8.3
PATCH 4/6 pcnet: Preserve link state across device reset
In reply to Stefan HajnocziFrom: Jan Kiszka <[email protected]>
A device reset does not affect the link state, only set_link does.
--- hw/pcnet.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
hw/pcnet.c +2 -1
@@ -688,7 +688,6 @@ static void pcnet_s_reset(PCNetState *s)printf ("pcnet_s_reset\n" );#endif - s->lnkst =0x40 ; s->rdra =0 ; s->tdra =0 ; s->rap =0 ;
@@ -1751,5 +1750,7 @@ int pcnet_common_init(DeviceState *dev, PCNetState *s, NetClientInfo *info) } *(uint16_t *)&s->prom[12 ] =cpu_to_le16 (checksum); + s->lnkst =0x40 ;/* initial link state: up */ +return 0 ; }
Signature · 1 line
1.7.8.3
PATCH 5/6 ./configure: export xfs config via --{enable, disable}-xfsctl
In reply to Stefan HajnocziFrom: Sergei Trofimovich <[email protected]>
--- configure | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
configure +4 -0
@@ -766,6 +766,10 @@ for opt do ;; --enable-rbd) rbd="yes" ;; + --disable-xfsctl) xfs="no" + ;; + --enable-xfsctl) xfs="yes" + ;; --disable-smartcard) smartcard="no" ;; --enable-smartcard) smartcard="yes"
Signature · 1 line
1.7.8.3
Re: [Qemu-devel] [PATCH 2/6] qdev-property: Make bit property parsing stricter
In reply to Stefan HajnocziAm 27.01.2012 08:27, schrieb Stefan Hajnoczi:
Quoted 9 lines
From: Jan Kiszka <[email protected]>
By using strncasecmp, we allow for arbitrary characters after the "on"/"off" string. Fix this by switching to strcasecmp.
Reviewed-by Andreas Färber <[email protected]>Reviewed-by Markus Armbruster <[email protected]>Signed-off-by Jan Kiszka <[email protected]>Signed-off-by Stefan Hajnoczi <[email protected]>
FWIW the ordering is wrong here. The tags are supposed to document the patch flow: The patch was first signed off by the author (Jan), then reviewed, then signed off by committers. Not first reviewed.
No need to respin but please keep in mind for the future. (Yeah, did that wrong myself before.)
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 6 lines · Stefan Hajnoczi
The following changes since commit
331636431af32ece373f4b1fb7c3ae9d0615e2a6:vga: compile cirrus_vga in hwlib (2012-01-25 18:32:59 +0000)are available in the git repository at:
git://github.com/stefanha/qemu.gittrivial-patches
Pulled. Thanks.
Regards,
Anthony Liguori
Quoted 23 lines
Jan Kiszka (3):
qdev-property: Make bit property parsing stricter
e1000: Preserve link state across device reset
pcnet: Preserve link state across device resetLaszlo Ersek (1):
qemu-io: end aio help text sentences with periodsPaolo Bonzini (1):
remove #if 0 code for timersSergei Trofimovich (1):
./configure: export xfs config via --{enable, disable}-xfsctlconfigure | 4 ++++ hw/e1000.c | 5 +++++ hw/pcnet.c | 3 ++- hw/qdev-properties.c | 4 ++-- qemu-io.c | 4 ++-- qemu-timer.c | 29 ----------------------------- 6 files changed, 15 insertions(+), 34 deletions(-)
Re: [Qemu-devel] [PATCH 2/6] qdev-property: Make bit property parsing stricter
In reply to Andreas FärberQuoted 11 lines · Andreas Färber
Am 27.01.2012 08:27, schrieb Stefan Hajnoczi:
Quoted 9 lines
From: Jan Kiszka <[email protected]>
By using strncasecmp, we allow for arbitrary characters after the "on"/"off" string. Fix this by switching to strcasecmp.
Reviewed-by Andreas Färber <[email protected]>Reviewed-by Markus Armbruster <[email protected]>Signed-off-by Jan Kiszka <[email protected]>Signed-off-by Stefan Hajnoczi <[email protected]>
Quoted 6 lines
FWIW the ordering is wrong here. The tags are supposed to document the patch flow: The patch was first signed off by the author (Jan), then reviewed, then signed off by committers. Not first reviewed.
No need to respin but please keep in mind for the future. (Yeah, did that wrong myself before.)
Okay, thanks.
Stefan