Re: [PATCH v3 2/2] virtio-net: introduce a new control to set macaddr

2013-01-19 Thread Amos Kong
On Fri, Jan 18, 2013 at 12:00:42PM +0100, Stefan Hajnoczi wrote: > On Thu, Jan 17, 2013 at 06:40:12PM +0800, ak...@redhat.com wrote: > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index 395ab4f..837c978 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio

[PATCH v4 2/3] net: split eth_mac_addr for better error handling

2013-01-19 Thread akong
From: Stefan Hajnoczi When we set mac address, software mac address in system and hardware mac address all need to be updated. Current eth_mac_addr() doesn't allow callers to implement error handling nicely. This patch split eth_mac_addr() to prepare part and real commit part, then we can prepar

[PATCH v4 3/3] virtio-net: introduce a new control to set macaddr

2013-01-19 Thread akong
From: Amos Kong Currently we write MAC address to pci config space byte by byte, this means that we have an intermediate step where mac is wrong. This patch introduced a new control command to set MAC address, it's atomic. VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for compatibility. Signe

[PATCH v4 1/3] move virtnet_send_command() above virtnet_set_mac_address()

2013-01-19 Thread akong
From: Amos Kong We want to send vq command to set mac address in virtnet_set_mac_address(), so do this function moving. Fixed a little issue of coding style. Signed-off-by: Amos Kong --- drivers/net/virtio_net.c | 89 1 file changed, 44 insertio

[PATCH v4 0/3] make mac programming for virtio net more robust

2013-01-19 Thread akong
From: Amos Kong Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Third patch introduced a new vq control command to set mac address, it's atomic. V2: check return of sending command, delay eth_mac_addr() V3: restore software address when

[PATCH v2 6/8] KVM: x86 emulator: convert 2-operand IMUL to fastop

2013-01-19 Thread Avi Kivity
Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 62014dc..45ddec8 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -441,6 +441,8 @@ stati

[PATCH v2 5/8] KVM: x86 emulator: convert BT/BTS/BTR/BTC/BSF/BSR to fastop

2013-01-19 Thread Avi Kivity
Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c | 76 +- 1 file changed, 26 insertions(+), 50 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index edb09e9c..62014dc 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/

[PATCH v2 7/8] KVM: x86 emulator: rearrange fastop definitions

2013-01-19 Thread Avi Kivity
Make fastop opcodes usable in other emulations. Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c | 70 +- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 45ddec8..d06354d 100

[PATCH v2 8/8] KVM: x86 emulator: convert a few freestanding emulations to fastop

2013-01-19 Thread Avi Kivity
--- arch/x86/kvm/emulate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index d06354d..e99fb72 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2209,7 +2209,7 @@ static int em_cmpxchg(struct x86_emulat

[PATCH v2 3/8] KVM: x86 emulator: covert SETCC to fastop

2013-01-19 Thread Avi Kivity
This is a bit of a special case since we don't have the usual byte/word/long/quad switch; instead we switch on the condition code embedded in the instruction. Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c | 60 -- 1 file changed, 29 insertio

[PATCH v2 4/8] KVM: x86 emulator: convert INC/DEC to fastop

2013-01-19 Thread Avi Kivity
Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index e13138d..edb09e9c 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2055,6 +2

[PATCH v2 2/8] KVM: x86 emulator: convert shift/rotate instructions to fastop

2013-01-19 Thread Avi Kivity
SHL, SHR, ROL, ROR, RCL, RCR, SAR, SAL Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c | 72 ++ 1 file changed, 31 insertions(+), 41 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index a21773f..a94b1d7 100644 --- a

[PATCH v2 0/8] More fastop patches

2013-01-19 Thread Avi Kivity
After this, only the diffcult MUL and DIV case remains. Changes from v1: - make SHLD/SHRD more consistent with the others - fix SETcc misordering Avi Kivity (8): KVM: x86 emulator: Convert SHLD, SHRD to fastop KVM: x86 emulator: convert shift/rotate instructions to fastop KVM: x86 emulato

[PATCH v2 1/8] KVM: x86 emulator: Convert SHLD, SHRD to fastop

2013-01-19 Thread Avi Kivity
Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 619a33d..a21773f 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -

Re: [PATCH v2] kvm tools: remove redundant "if" condition

2013-01-19 Thread Cong Ding
On Sat, Jan 19, 2013 at 10:58:33AM +0200, Pekka Enberg wrote: > On Wed, Jan 16, 2013 at 6:52 PM, Cong Ding wrote: > > After we check (state.kcount != 0), state.kcount has to be 0 in all the > > "else" > > branchs. > > > > Signed-off-by: Cong Ding > > --- > > tools/kvm/hw/i8042.c |2 +- > >

Re: [PATCH v2] kvm tools: remove redundant "if" condition

2013-01-19 Thread Pekka Enberg
On Wed, Jan 16, 2013 at 6:52 PM, Cong Ding wrote: > After we check (state.kcount != 0), state.kcount has to be 0 in all the "else" > branchs. > > Signed-off-by: Cong Ding > --- > tools/kvm/hw/i8042.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/kvm/hw/i8042.c

Re: [PATCH v2] kvm tools: close opened file

2013-01-19 Thread Pekka Enberg
On Wed, Jan 16, 2013 at 6:51 PM, Cong Ding wrote: > The file should be closed before return. > > Signed-off-by: Cong Ding Applied, thanks! -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.k