Re: [PATCH] Test case of multibyte NOP in emulation mode

2013-06-05 Thread 李春奇
Yes, that should be the point. x86/realmode.c is always running in emulation mode. I added the testing here there but no error occurred. I cannot find the reason. The code is as follows added to x86/realmode.c static void test_nopl(void) { MK_INSN(nopl, ".byte 0x0f, 0x1f, 0x00\n\r");

RE: [RFC PATCH 0/6] KVM: PPC: Book3E: AltiVec support

2013-06-05 Thread Caraman Mihai Claudiu-B02008
> -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, June 05, 2013 12:39 AM > To: Caraman Mihai Claudiu-B02008 > Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org; Alexander Graf > Subject: Re: [RFC PATCH 0/6] KVM: PPC: Book3E: AltiVec support

RE: [RFC PATCH 2/6] KVM: PPC: Book3E: Refactor SPE_FP exit handling

2013-06-05 Thread Caraman Mihai Claudiu-B02008
> > + /* > > +* The interrupt is shared, KVM support for the > > featured unit > > +* is detected at run-time. > > +*/ > > This is a decent comment for the changelog, but for the code itself it > seems fairly obvious if you look at the definition of >

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Rusty Russell
"Michael S. Tsirkin" writes: >> By my count, net still has 7 feature bits left, so I don't think the >> feature bits are likely to be a limitation in the next 6 months? > > Yes but you wanted a generic transport feature bit > for flexible SG layout. > Are you happy with VIRTIO_NET_F_ANY_HEADER_SG

[PATCH] vhost_net: clear msg.control for non-zerocopy case during tx

2013-06-05 Thread Jason Wang
When we decide not use zero-copy, msg.control should be set to NULL otherwise macvtap/tap may set zerocopy callbacks which may decrease the kref of ubufs wrongly. Bug were introduced by commit cedb9bdce099206290a2bdd02ce47a7b253b6a84 (vhost-net: skip head management if no outstanding). This solve

RE: [RFC PATCH 3/6] KVM: PPC: Book3E: Rename IRQPRIO names to accommodate ALTIVEC

2013-06-05 Thread Caraman Mihai Claudiu-B02008
> -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, June 05, 2013 1:28 AM > To: Caraman Mihai Claudiu-B02008 > Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org; Caraman Mihai Claudiu-B02008 > Subject: Re: [RFC PATCH 3/6] KVM: PPC: Book3E: Ren

Re: [PATCH] Test case of multibyte NOP in emulation mode

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 03:00:33PM +0800, 李春奇 wrote: > Yes, that should be the point. x86/realmode.c is always running in > emulation mode. I added the testing here there but no error occurred. I > cannot find the reason. > > The code is as follows added to x86/realmode.c > static void test_nopl(

Re: [PATCH v2 0/2] kvm: x86: Emulate MSR_PLATFORM_INFO

2013-06-05 Thread Gleb Natapov
On Tue, Jun 04, 2013 at 12:02:16PM -0400, Bandan Das wrote: > These patches add an emulated MSR_PLATFORM_INFO that kvm guests > can read as described in section 14.3.2.4 of the Intel SDM. > The relevant changes and details are in [2/2]; [1/2] makes vendor_intel > generic. There are atleat two know

Re: [PATCH] vhost_net: clear msg.control for non-zerocopy case during tx

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 03:40:46PM +0800, Jason Wang wrote: > When we decide not use zero-copy, msg.control should be set to NULL otherwise > macvtap/tap may set zerocopy callbacks which may decrease the kref of ubufs > wrongly. > > Bug were introduced by commit cedb9bdce099206290a2bdd02ce47a7b253

Re: [nVMX w/ Haswell] KVM unit-tests in L1 - eventinj test fails trying to send NMI

2013-06-05 Thread Kashyap Chamarthy
Adding Jan, Jun, to see if they have any inputs here. /kashyap On Tue, Jun 4, 2013 at 6:14 PM, Kashyap Chamarthy wrote: > Heya, > > So, I invoked this in L1 with: > === > [test@foo kvm-unit-tests]$ time qemu-system-x86_64 -enable-kvm -device > pc-testdev -serial stdio -nograp

RE: [RFC PATCH 6/6] KVM: PPC: Book3E: Enhance FPU laziness

2013-06-05 Thread Caraman Mihai Claudiu-B02008
> -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, June 05, 2013 1:54 AM > To: Caraman Mihai Claudiu-B02008 > Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org; Caraman Mihai Claudiu-B02008 > Subject: Re: [RFC PATCH 6/6] KVM: PPC: Book3E: Enh

Re: [PATCH] Test case of multibyte NOP in emulation mode

2013-06-05 Thread 李春奇
Yes, I load kvm-intel with unrestricted_guest=0 and the emulator runs well. I will give another test case in x86/realmode.c later. BTW, what is the action when a 64-bit instruction executes in x86/realmode.c? Should I add 64-bit insn tests only in x86/emulator.c? On Wed, Jun 5, 2013 at 4:27 PM, G

RE: [RFC PATCH 4/6] KVM: PPC: Book3E: Add AltiVec support

2013-06-05 Thread Caraman Mihai Claudiu-B02008
> > + * Simulate AltiVec unavailable fault to load guest state > > + * from thread to AltiVec unit. > > + * It requires to be called with preemption disabled. > > + */ > > +static inline void kvmppc_load_guest_altivec(struct kvm_vcpu *vcpu) > > +{ > > +#ifdef CONFIG_ALTIVEC > > + if (cpu_has_feat

Re: [PATCH] Test case of multibyte NOP in emulation mode

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 05:23:18PM +0800, 李春奇 wrote: > Yes, I load kvm-intel with unrestricted_guest=0 and the emulator runs > well. I will give another test case in x86/realmode.c later. > The test fails for me on CPU without unrestricted guest support. This means you either test on fixed kernel

Re: Planning the merge of KVM/arm64

2013-06-05 Thread Catalin Marinas
On Wed, Jun 05, 2013 at 07:01:05AM +0100, Gleb Natapov wrote: > On Tue, Jun 04, 2013 at 10:57:32PM -0700, Christoffer Dall wrote: > > On 4 June 2013 09:37, Gleb Natapov wrote: > > > On Tue, Jun 04, 2013 at 05:51:41PM +0200, Paolo Bonzini wrote: > > >> Il 04/06/2013 17:43, Christoffer Dall ha scrit

[PATCH] Test case of emulating multibyte NOP

2013-06-05 Thread 李春奇
Add multibyte NOP test case to kvm-unit-tests. This version adds test cases into x86/realmode.c. This can test one of bugs when booting RHEL5.9 64-bit. Signed-off-by: Arthur Chunqi Li --- x86/realmode.c | 24 1 file changed, 24 insertions(+) diff --git a/x86/realmode

Re: [PATCH] Test case of multibyte NOP in emulation mode

2013-06-05 Thread 李春奇
I mean after adding unrestricted_guest=0, the error is reproduced. Sorry for confused expression. I have committed another patch in x86/realmode.c. On Wed, Jun 5, 2013 at 5:28 PM, Gleb Natapov wrote: > On Wed, Jun 05, 2013 at 05:23:18PM +0800, 李春奇 wrote: >> Yes, I load kvm-intel with unrestricte

Re: [PATCH] Test case of multibyte NOP in emulation mode

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 05:46:31PM +0800, 李春奇 wrote: > I mean after adding unrestricted_guest=0, the error is reproduced. Ah, OK. unrestricted_guest=0 works then :) > Sorry for confused expression. I have committed another patch in > x86/realmode.c. > > On Wed, Jun 5, 2013 at 5:28 PM, Gleb Natap

Re: [PATCH v8 00/11] KVM: MMU: fast zap all shadow pages

2013-06-05 Thread Gleb Natapov
On Tue, Jun 04, 2013 at 10:26:01PM -0300, Marcelo Tosatti wrote: > On Fri, May 31, 2013 at 08:36:19AM +0800, Xiao Guangrong wrote: > > Hi Gleb, Paolo, Marcelo, > > > > I have putted the potential controversial patches to the latter that are > > patch 8 ~ 10, patch 11 depends on patch 9. Other patc

Re: [PATCH v8 00/11] KVM: MMU: fast zap all shadow pages

2013-06-05 Thread Gleb Natapov
On Fri, May 31, 2013 at 08:36:19AM +0800, Xiao Guangrong wrote: > Hi Gleb, Paolo, Marcelo, > > I have putted the potential controversial patches to the latter that are > patch 8 ~ 10, patch 11 depends on patch 9. Other patches are fully reviewed, > I think its are ready for being merged. If not lu

Re: [PATCH 1/1] KVM: add kvm_para_available to asm-generic/kvm_para.h

2013-06-05 Thread Gleb Natapov
On Tue, Jun 04, 2013 at 12:33:19PM +0100, James Hogan wrote: > On 4 June 2013 10:05, Gleb Natapov wrote: > > On Wed, May 22, 2013 at 12:29:22PM +0100, James Hogan wrote: > >> According to include/uapi/linux/kvm_para.h architectures should define > >> kvm_para_available, so add an implementation to

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 04:49:22PM +0930, Rusty Russell wrote: > "Michael S. Tsirkin" writes: > >> By my count, net still has 7 feature bits left, so I don't think the > >> feature bits are likely to be a limitation in the next 6 months? > > > > Yes but you wanted a generic transport feature bit >

Re: vhost && kernel BUG at /build/linux/mm/slub.c:3352!

2013-06-05 Thread Michael S. Tsirkin
On Tue, Jun 04, 2013 at 09:50:59PM +0300, Tommi Rantala wrote: > Hello, > > Hit this right after killing trinity with Ctrl-C. Was fuzzing > v3.10-rc4-0-gd683b96 in a qemu virtual machine as the root user. > > Tommi Thanks a lot for the report. If found some bugs when looking at this: I think the

Re: Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with "entry failed, hardware error 0x80000021"

2013-06-05 Thread Stefan Pietsch
On 19.05.2013 14:32, Gleb Natapov wrote: > On Sun, May 19, 2013 at 02:00:31AM +0100, Ben Hutchings wrote: >> Dear KVM maintainers, it appears that there is a gap in x86 emulation, >> at least on a 32-bit host. Stefan found this when running GRML, a live >> distribution which can be downloaded from

Re: vhost && kernel BUG at /build/linux/mm/slub.c:3352!

2013-06-05 Thread Tommi Rantala
2013/6/5 Michael S. Tsirkin : > On Tue, Jun 04, 2013 at 09:50:59PM +0300, Tommi Rantala wrote: >> Hello, >> >> Hit this right after killing trinity with Ctrl-C. Was fuzzing >> v3.10-rc4-0-gd683b96 in a qemu virtual machine as the root user. >> >> Tommi > > Thanks a lot for the report. If found some

Re: vhost && kernel BUG at /build/linux/mm/slub.c:3352!

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 03:06:33PM +0300, Tommi Rantala wrote: > 2013/6/5 Michael S. Tsirkin : > > On Tue, Jun 04, 2013 at 09:50:59PM +0300, Tommi Rantala wrote: > >> Hello, > >> > >> Hit this right after killing trinity with Ctrl-C. Was fuzzing > >> v3.10-rc4-0-gd683b96 in a qemu virtual machine a

Re: Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with "entry failed, hardware error 0x80000021"

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 01:57:25PM +0200, Stefan Pietsch wrote: > On 19.05.2013 14:32, Gleb Natapov wrote: > > On Sun, May 19, 2013 at 02:00:31AM +0100, Ben Hutchings wrote: > >> Dear KVM maintainers, it appears that there is a gap in x86 emulation, > >> at least on a 32-bit host. Stefan found thi

Re: Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with "entry failed, hardware error 0x80000021"

2013-06-05 Thread Stefan Pietsch
On 05.06.2013 14:10, Gleb Natapov wrote: > On Wed, Jun 05, 2013 at 01:57:25PM +0200, Stefan Pietsch wrote: >> On 19.05.2013 14:32, Gleb Natapov wrote: >>> On Sun, May 19, 2013 at 02:00:31AM +0100, Ben Hutchings wrote: Dear KVM maintainers, it appears that there is a gap in x86 emulation,

Re: Planning the merge of KVM/arm64

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 10:31:46AM +0100, Catalin Marinas wrote: > On Wed, Jun 05, 2013 at 07:01:05AM +0100, Gleb Natapov wrote: > > On Tue, Jun 04, 2013 at 10:57:32PM -0700, Christoffer Dall wrote: > > > On 4 June 2013 09:37, Gleb Natapov wrote: > > > > On Tue, Jun 04, 2013 at 05:51:41PM +0200, P

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Tue, Jun 04, 2013 at 03:01:50PM +0930, Rusty Russell wrote: > You mean make BAR0 an MMIO BAR? > Yes, it would break current windows guests. > Further, as long as we use same address to notify all queues, > we would also need to decode the instruction on x86 and t

Re: Planning the merge of KVM/arm64

2013-06-05 Thread Marc Zyngier
On 05/06/13 13:57, Gleb Natapov wrote: > On Wed, Jun 05, 2013 at 10:31:46AM +0100, Catalin Marinas wrote: >> On Wed, Jun 05, 2013 at 07:01:05AM +0100, Gleb Natapov wrote: >>> On Tue, Jun 04, 2013 at 10:57:32PM -0700, Christoffer Dall wrote: On 4 June 2013 09:37, Gleb Natapov wrote: > On T

[PATCH] vhost: Make local function static

2013-06-05 Thread Asias He
$ make C=1 M=drivers/vhost drivers/vhost/net.c:168:5: warning: symbol 'vhost_net_set_ubuf_info' was not declared. Should it be static? drivers/vhost/net.c:194:6: warning: symbol 'vhost_net_vq_reset' was not declared. Should it be static? drivers/vhost/scsi.c:219:6: warning: symbol 'tcm_vhost_don

Re: [PATCH] Test case of emulating multibyte NOP

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 05:41:41PM +0800, 李春奇 wrote: > Add multibyte NOP test case to kvm-unit-tests. This version adds test > cases into x86/realmode.c. This can test one of bugs when booting > RHEL5.9 64-bit. > The patch is mangled. Lines are wrapped, tabs are replaced with spaces. > Signed-o

Re: [PATCH 1/2] kvm: zero-initialize KVM_SET_GSI_ROUTING input

2013-06-05 Thread Gleb Natapov
On Tue, Jun 04, 2013 at 02:52:32PM +0300, Michael S. Tsirkin wrote: > kvm_add_routing_entry makes an attempt to > zero-initialize any new routing entry. > However, it fails to initialize padding > within the u field of the structure > kvm_irq_routing_entry. > > Other functions like kvm_irqchip_upd

Re: [PATCH] vhost_net: clear msg.control for non-zerocopy case during tx

2013-06-05 Thread Sergei Shtylyov
Hello. On 05-06-2013 11:40, Jason Wang wrote: When we decide not use zero-copy, msg.control should be set to NULL otherwise macvtap/tap may set zerocopy callbacks which may decrease the kref of ubufs wrongly. Bug were introduced by commit cedb9bdce099206290a2bdd02ce47a7b253b6a84 (vhost-net:

Re: [PATCH 1/2] kvm: zero-initialize KVM_SET_GSI_ROUTING input

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 04:00:20PM +0300, Gleb Natapov wrote: > On Tue, Jun 04, 2013 at 02:52:32PM +0300, Michael S. Tsirkin wrote: > > kvm_add_routing_entry makes an attempt to > > zero-initialize any new routing entry. > > However, it fails to initialize padding > > within the u field of the stru

Re: [PATCH 1/2] kvm: zero-initialize KVM_SET_GSI_ROUTING input

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 05:02:07PM +0300, Michael S. Tsirkin wrote: > On Wed, Jun 05, 2013 at 04:00:20PM +0300, Gleb Natapov wrote: > > On Tue, Jun 04, 2013 at 02:52:32PM +0300, Michael S. Tsirkin wrote: > > > kvm_add_routing_entry makes an attempt to > > > zero-initialize any new routing entry. >

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 07:59:33AM -0500, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > On Tue, Jun 04, 2013 at 03:01:50PM +0930, Rusty Russell wrote: > > You mean make BAR0 an MMIO BAR? > > Yes, it would break current windows guests. > > Further, as long as we use same address to n

Re: [PATCH 1/2] kvm: zero-initialize KVM_SET_GSI_ROUTING input

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 05:04:55PM +0300, Gleb Natapov wrote: > On Wed, Jun 05, 2013 at 05:02:07PM +0300, Michael S. Tsirkin wrote: > > On Wed, Jun 05, 2013 at 04:00:20PM +0300, Gleb Natapov wrote: > > > On Tue, Jun 04, 2013 at 02:52:32PM +0300, Michael S. Tsirkin wrote: > > > > kvm_add_routing_ent

Re: [PATCH 1/2] kvm: zero-initialize KVM_SET_GSI_ROUTING input

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 05:11:44PM +0300, Michael S. Tsirkin wrote: > On Wed, Jun 05, 2013 at 05:04:55PM +0300, Gleb Natapov wrote: > > On Wed, Jun 05, 2013 at 05:02:07PM +0300, Michael S. Tsirkin wrote: > > > On Wed, Jun 05, 2013 at 04:00:20PM +0300, Gleb Natapov wrote: > > > > On Tue, Jun 04, 201

Re: [PATCH 1/2] kvm: zero-initialize KVM_SET_GSI_ROUTING input

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 05:12:32PM +0300, Gleb Natapov wrote: > On Wed, Jun 05, 2013 at 05:11:44PM +0300, Michael S. Tsirkin wrote: > > On Wed, Jun 05, 2013 at 05:04:55PM +0300, Gleb Natapov wrote: > > > On Wed, Jun 05, 2013 at 05:02:07PM +0300, Michael S. Tsirkin wrote: > > > > On Wed, Jun 05, 201

Re: [PATCH 1/2] kvm: zero-initialize KVM_SET_GSI_ROUTING input

2013-06-05 Thread Gleb Natapov
On Tue, Jun 04, 2013 at 02:52:32PM +0300, Michael S. Tsirkin wrote: > kvm_add_routing_entry makes an attempt to > zero-initialize any new routing entry. > However, it fails to initialize padding > within the u field of the structure > kvm_irq_routing_entry. > > Other functions like kvm_irqchip_upd

Re: [PATCH] Test case of emulating multibyte NOP

2013-06-05 Thread 李春奇
Hi Gleb, I generate this mail by git send-email and I think the format is OK. This is my first try to commit a patch in open source community. Sorry for annoying you guys so much. Thanks, Arthur On Wed, Jun 5, 2013 at 10:54 PM, Arthur Chunqi Li wrote: > Add multibyte NOP test case to kvm-unit-t

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Wed, Jun 05, 2013 at 07:59:33AM -0500, Anthony Liguori wrote: >> "Michael S. Tsirkin" writes: >> >> > On Tue, Jun 04, 2013 at 03:01:50PM +0930, Rusty Russell wrote: >> > You mean make BAR0 an MMIO BAR? >> > Yes, it would break current windows guests. >> > Furth

Re: [PATCH] vfio: fix crash on rmmod

2013-06-05 Thread Alex Williamson
On Wed, 2013-06-05 at 16:03 +1000, Alexey Kardashevskiy wrote: > devtmpfs_delete_node() calls devnode() callback with mode==NULL but > vfio still tries to write there. > > The patch fixes this. > > Signed-off-by: Alexey Kardashevskiy > > --- Oops. Applied. The mode change just went in for 3.

Re: [PATCH] Test case of emulating multibyte NOP

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 10:56:54PM +0800, 李春奇 wrote: > Hi Gleb, > I generate this mail by git send-email and I think the format is OK. > But I have not received the email, only this your reply to it. > This is my first try to commit a patch in open source community. Sorry > for annoying you guys

Re: [PATCH] Test case of emulating multibyte NOP

2013-06-05 Thread 李春奇
On Wed, Jun 5, 2013 at 11:11 PM, Gleb Natapov wrote: > On Wed, Jun 05, 2013 at 10:56:54PM +0800, 李春奇 wrote: >> Hi Gleb, >> I generate this mail by git send-email and I think the format is OK. >> > But I have not received the email, only this your reply to it. Maybe the initial mail is in your spa

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 10:08:37AM -0500, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > On Wed, Jun 05, 2013 at 07:59:33AM -0500, Anthony Liguori wrote: > >> "Michael S. Tsirkin" writes: > >> > >> > On Tue, Jun 04, 2013 at 03:01:50PM +0930, Rusty Russell wrote: > >> > You mean mak

Re: [PATCH] Test case of emulating multibyte NOP

2013-06-05 Thread 李春奇
On Wed, Jun 5, 2013 at 11:17 PM, Gleb Natapov wrote: > On Wed, Jun 05, 2013 at 11:13:37PM +0800, 李春奇 wrote: >> On Wed, Jun 5, 2013 at 11:11 PM, Gleb Natapov wrote: >> > On Wed, Jun 05, 2013 at 10:56:54PM +0800, 李春奇 wrote: >> >> Hi Gleb, >> >> I generate this mail by git send-email and I think t

Re: [PATCH] Test case of emulating multibyte NOP

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 11:13:37PM +0800, 李春奇 wrote: > On Wed, Jun 5, 2013 at 11:11 PM, Gleb Natapov wrote: > > On Wed, Jun 05, 2013 at 10:56:54PM +0800, 李春奇 wrote: > >> Hi Gleb, > >> I generate this mail by git send-email and I think the format is OK. > >> > > But I have not received the email,

Re: [PATCH] Test case of emulating multibyte NOP

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 11:22:19PM +0800, 李春奇 wrote: > On Wed, Jun 5, 2013 at 11:17 PM, Gleb Natapov wrote: > > On Wed, Jun 05, 2013 at 11:13:37PM +0800, 李春奇 wrote: > >> On Wed, Jun 5, 2013 at 11:11 PM, Gleb Natapov wrote: > >> > On Wed, Jun 05, 2013 at 10:56:54PM +0800, 李春奇 wrote: > >> >> Hi

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Wed, Jun 05, 2013 at 10:08:37AM -0500, Anthony Liguori wrote: >> "Michael S. Tsirkin" writes: >> >> > On Wed, Jun 05, 2013 at 07:59:33AM -0500, Anthony Liguori wrote: >> >> "Michael S. Tsirkin" writes: >> >> >> >> > On Tue, Jun 04, 2013 at 03:01:50PM +0930, R

Re: [PULL] vhost: cleanups and fixes

2013-06-05 Thread Michael S. Tsirkin
On Thu, May 02, 2013 at 12:49:42PM -0700, Linus Torvalds wrote: > On Thu, May 2, 2013 at 12:33 PM, Michael S. Tsirkin wrote: > > > > I prefer not rebasing, > > Good. > > > will play with git to see why > > does request-pull get me a wrong diffstat and how > > to trick it into d

[PATCH] Test case of emulating multibyte NOP

2013-06-05 Thread Arthur Chunqi Li
Add multibyte NOP test case to kvm-unit-tests. This version adds test cases into x86/realmode.c. This can test one of bugs when booting RHEL5.9 64-bit. Signed-off-by: Arthur Chunqi Li --- x86/realmode.c | 24 1 file changed, 24 insertions(+) diff --git a/x86/realmode

[PATCH] Test case of emulating multibyte NOP

2013-06-05 Thread yzt356
From: Arthur Chunqi Li Add multibyte NOP test case to kvm-unit-tests. This version adds test cases into x86/realmode.c. This can test one of bugs when booting RHEL5.9 64-bit. Signed-off-by: Arthur Chunqi Li --- x86/realmode.c | 24 1 file changed, 24 insertions(+)

Re: [PATCH] Test case of emulating multibyte NOP

2013-06-05 Thread Gleb Natapov
This time the email is perfect :) On Thu, Jun 06, 2013 at 12:02:52AM +0800, Arthur Chunqi Li wrote: > Add multibyte NOP test case to kvm-unit-tests. This version adds test cases > into x86/realmode.c. This can test one of bugs when booting RHEL5.9 64-bit. > > Signed-off-by: Arthur Chunqi Li > -

Re: [PATCH] Test case of emulating multibyte NOP

2013-06-05 Thread 李春奇
On Thu, Jun 6, 2013 at 12:13 AM, Gleb Natapov wrote: > This time the email is perfect :) > > On Thu, Jun 06, 2013 at 12:02:52AM +0800, Arthur Chunqi Li wrote: >> Add multibyte NOP test case to kvm-unit-tests. This version adds test cases >> into x86/realmode.c. This can test one of bugs when boot

Re: [RFC PATCH 0/6] KVM: PPC: Book3E: AltiVec support

2013-06-05 Thread Scott Wood
On 06/05/2013 02:10:07 AM, Caraman Mihai Claudiu-B02008 wrote: > -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, June 05, 2013 12:39 AM > To: Caraman Mihai Claudiu-B02008 > Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org; Alexander Graf

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 10:46:15AM -0500, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > On Wed, Jun 05, 2013 at 10:08:37AM -0500, Anthony Liguori wrote: > >> "Michael S. Tsirkin" writes: > >> > >> > On Wed, Jun 05, 2013 at 07:59:33AM -0500, Anthony Liguori wrote: > >> >> "Michael

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Wed, Jun 05, 2013 at 10:46:15AM -0500, Anthony Liguori wrote: >> Look, it's very simple. > We only need to do it if we do a change that breaks guests. > > Please find a guest that is broken by the patches. You won't find any. I think the problem in this whole di

Re: [RFC PATCH 2/6] KVM: PPC: Book3E: Refactor SPE_FP exit handling

2013-06-05 Thread Scott Wood
On 06/05/2013 02:29:47 AM, Caraman Mihai Claudiu-B02008 wrote: > > case BOOKE_INTERRUPT_SPE_FP_ROUND: > > +#ifdef CONFIG_SPE > > kvmppc_booke_queue_irqprio(vcpu, > > BOOKE_IRQPRIO_SPE_FP_ROUND); > > r = RESUME_GUEST; > > break; > > Why not use kvmpp

Re: Error while running android as guest ---FastModels

2013-06-05 Thread Christoffer Dall
On Wed, Jun 05, 2013 at 08:31:13PM +0200, Mai Daftedar wrote: > Dear All, > > After following the "Android on Fast Models" pdf. I managed to successfully > run android as the host and when running the following command to run > android as a guest: > > ./qemu-system-arm \ > -vnc :0 \ > -k en-us \

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 01:57:16PM -0500, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > On Wed, Jun 05, 2013 at 10:46:15AM -0500, Anthony Liguori wrote: > >> Look, it's very simple. > > We only need to do it if we do a change that breaks guests. > > > > Please find a guest that is b

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 10:43:17PM +0300, Michael S. Tsirkin wrote: > On Wed, Jun 05, 2013 at 01:57:16PM -0500, Anthony Liguori wrote: > > "Michael S. Tsirkin" writes: > > > > > On Wed, Jun 05, 2013 at 10:46:15AM -0500, Anthony Liguori wrote: > > >> Look, it's very simple. > > > We only need to d

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 01:57:16PM -0500, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > On Wed, Jun 05, 2013 at 10:46:15AM -0500, Anthony Liguori wrote: > >> Look, it's very simple. > > We only need to do it if we do a change that breaks guests. > > > > Please find a guest that is b

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Wed, Jun 05, 2013 at 01:57:16PM -0500, Anthony Liguori wrote: >> "Michael S. Tsirkin" writes: >> >> > On Wed, Jun 05, 2013 at 10:46:15AM -0500, Anthony Liguori wrote: >> >> Look, it's very simple. >> > We only need to do it if we do a change that breaks guests.

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Wed, Jun 05, 2013 at 10:43:17PM +0300, Michael S. Tsirkin wrote: >> On Wed, Jun 05, 2013 at 01:57:16PM -0500, Anthony Liguori wrote: >> > "Michael S. Tsirkin" writes: >> > >> > > On Wed, Jun 05, 2013 at 10:46:15AM -0500, Anthony Liguori wrote: >> > >> Look, it'

Re: [RFC PATCH 6/6] KVM: PPC: Book3E: Enhance FPU laziness

2013-06-05 Thread Scott Wood
On 06/05/2013 04:14:21 AM, Caraman Mihai Claudiu-B02008 wrote: > -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, June 05, 2013 1:54 AM > To: Caraman Mihai Claudiu-B02008 > Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org; Caraman Mihai Cl

[PATCH] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-05 Thread Luiz Capitulino
The balloon_page_dequeue() function can return NULL. If it does for the first page being freed, then leak_balloon() will create a scatter list with len=0. Which in turn seems to generate an invalid virtio request. Signed-off-by: Luiz Capitulino --- PS: I didn't get this in practice. I found it b

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread H. Peter Anvin
On 06/05/2013 09:20 AM, Michael S. Tsirkin wrote: > > Spec says IO and memory can be enabled/disabled, separately. > PCI Express spec says devices should work without IO. > For "native endpoints". Currently virtio would be a "legacy endpoint" which is quite correct -- it is compatible with a le

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 03:42:57PM -0500, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > On Wed, Jun 05, 2013 at 01:57:16PM -0500, Anthony Liguori wrote: > >> "Michael S. Tsirkin" writes: > >> > >> > On Wed, Jun 05, 2013 at 10:46:15AM -0500, Anthony Liguori wrote: > >> >> Look, it'

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread H. Peter Anvin
On 06/05/2013 01:45 PM, Anthony Liguori wrote: > > But if you want to boot from the 16th device, the BIOS needs to solve > this problem anyway. > No. Just have the BIOS plumb the path to the device it wants to boot from. Problem solved. -hpa -- To unsubscribe from this list: send th

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 03:45:09PM -0500, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > On Wed, Jun 05, 2013 at 10:43:17PM +0300, Michael S. Tsirkin wrote: > >> On Wed, Jun 05, 2013 at 01:57:16PM -0500, Anthony Liguori wrote: > >> > "Michael S. Tsirkin" writes: > >> > > >> > > On

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 02:10:03PM -0700, H. Peter Anvin wrote: > On 06/05/2013 09:20 AM, Michael S. Tsirkin wrote: > > > > Spec says IO and memory can be enabled/disabled, separately. > > PCI Express spec says devices should work without IO. > > > > For "native endpoints". Currently virtio wou

Re: [PATCH] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-05 Thread Rafael Aquini
On Wed, Jun 05, 2013 at 05:10:31PM -0400, Luiz Capitulino wrote: > The balloon_page_dequeue() function can return NULL. If it does for > the first page being freed, then leak_balloon() will create a > scatter list with len=0. Which in turn seems to generate an invalid > virtio request. > > Signed-

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Anthony Liguori
"H. Peter Anvin" writes: > On 06/05/2013 09:20 AM, Michael S. Tsirkin wrote: >> >> Spec says IO and memory can be enabled/disabled, separately. >> PCI Express spec says devices should work without IO. >> > > For "native endpoints". Currently virtio would be a "legacy endpoint" > which is quite

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Wed, Jun 05, 2013 at 03:42:57PM -0500, Anthony Liguori wrote: >> "Michael S. Tsirkin" writes: >> >> Can you explain? I thought the whole trick with separating out the >> virtqueue notification register was to regain the performance? > > Yes but this trick only

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread H. Peter Anvin
On 06/05/2013 02:50 PM, Anthony Liguori wrote: > "H. Peter Anvin" writes: > >> On 06/05/2013 09:20 AM, Michael S. Tsirkin wrote: >>> >>> Spec says IO and memory can be enabled/disabled, separately. >>> PCI Express spec says devices should work without IO. >>> >> >> For "native endpoints". Curren

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Anthony Liguori
"H. Peter Anvin" writes: > On 06/05/2013 02:50 PM, Anthony Liguori wrote: >> "H. Peter Anvin" writes: >> >>> On 06/05/2013 09:20 AM, Michael S. Tsirkin wrote: Spec says IO and memory can be enabled/disabled, separately. PCI Express spec says devices should work without IO. >

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Benjamin Herrenschmidt
On Wed, 2013-06-05 at 16:53 -0500, Anthony Liguori wrote: > Existing PowerPC remaps PIO to MMAP so it works fine today. > > Future platforms may not do this but future platforms can use a > different device. They certainly won't be able to use the existing > drivers anyway. > > Ben, am I wrong

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Anthony Liguori
Benjamin Herrenschmidt writes: > On Wed, 2013-06-05 at 16:53 -0500, Anthony Liguori wrote: > >> A smart BIOS can also use MMIO to program virtio. > > Indeed :-) > > I see no reason why not providing both access path though. Have the PIO > BAR there for compatibility/legacy/BIOS/x86 purposes and *

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread H. Peter Anvin
On 06/05/2013 03:08 PM, Anthony Liguori wrote: >> >> Definitely an option. However, we want to be able to boot from native >> devices, too, so having an I/O BAR (which would not be used by the OS >> driver) should still at the very least be an option. > > What makes it so difficult to work with a

Re: [PATCH] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-05 Thread Luiz Capitulino
On Wed, 5 Jun 2013 18:24:49 -0300 Rafael Aquini wrote: > On Wed, Jun 05, 2013 at 05:10:31PM -0400, Luiz Capitulino wrote: > > The balloon_page_dequeue() function can return NULL. If it does for > > the first page being freed, then leak_balloon() will create a > > scatter list with len=0. Which in

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Benjamin Herrenschmidt
On Wed, 2013-06-05 at 17:53 -0500, Anthony Liguori wrote: > If strictly speaking it's just that MMIO is a bit faster, I'm not sure > that complexity is worth it without seeing performance numbers first. You mean PIO. I agree with all your points here. The only thing I saw as an option would be to

Re: [PATCH] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-05 Thread Rafael Aquini
On Wed, Jun 05, 2013 at 07:08:44PM -0400, Luiz Capitulino wrote: > On Wed, 5 Jun 2013 18:24:49 -0300 > Rafael Aquini wrote: > > > On Wed, Jun 05, 2013 at 05:10:31PM -0400, Luiz Capitulino wrote: > > > The balloon_page_dequeue() function can return NULL. If it does for > > > the first page being f

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Anthony Liguori
"H. Peter Anvin" writes: > On 06/05/2013 03:08 PM, Anthony Liguori wrote: >>> >>> Definitely an option. However, we want to be able to boot from native >>> devices, too, so having an I/O BAR (which would not be used by the OS >>> driver) should still at the very least be an option. >> >> What m

[PATCH v2] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-05 Thread Luiz Capitulino
The balloon_page_dequeue() function can return NULL. If it does for the first page being freed, then leak_balloon() will create a scatter list with len=0. Which in turn seems to generate an invalid virtio request. I didn't get this in practice, I found it by code review. On the other hand, such an

Re: Intercepting task switches in svm/vmx with tdp enabled

2013-06-05 Thread Leo Prasath
Thanks much for the reply. It seems Linux stopped using the hardware context switch mechanisms ( like far jmp ) since kernel version 2.2 ( per understanding linux kernel book ). For now, I am just going to use cr3 write interception to detect guest process context switches. ( on a related note how

Re: [PATCH] vhost_net: clear msg.control for non-zerocopy case during tx

2013-06-05 Thread Jason Wang
On 06/05/2013 09:44 PM, Sergei Shtylyov wrote: > Hello. > > On 05-06-2013 11:40, Jason Wang wrote: > >> When we decide not use zero-copy, msg.control should be set to NULL >> otherwise >> macvtap/tap may set zerocopy callbacks which may decrease the kref of >> ubufs >> wrongly. > >> Bug were introd

[PATCH V2] vhost_net: clear msg.control for non-zerocopy case during tx

2013-06-05 Thread Jason Wang
When we decide not use zero-copy, msg.control should be set to NULL otherwise macvtap/tap may set zerocopy callbacks which may decrease the kref of ubufs wrongly. Bug were introduced by commit cedb9bdce099206290a2bdd02ce47a7b253b6a84 (vhost-net: skip head management if no outstanding). This solve

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Rusty Russell
Anthony Liguori writes: > 4) Do virtio-pcie, make it PCI-e friendly (drop the IO BAR completely), give >it a new device/vendor ID. Continue to use virtio-pci for existing >devices potentially adding virtio-{net,blk,...}-pcie variants for >people that care to use them. Now you have a

[PATCH] kvm-unit-tests: Add test case for accessing bpl via modr/m

2013-06-05 Thread Arthur Chunqi Li
Test access to %bpl via modr/m addressing mode. This case can test another bug in the boot of RHEL5.9 64-bit. Signed-off-by: Arthur Chunqi Li --- x86/emulator.c | 41 + 1 file changed, 41 insertions(+) diff --git a/x86/emulator.c b/x86/emulator.c index

Re: Intercepting task switches in svm/vmx with tdp enabled

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 08:44:38PM -0500, Leo Prasath wrote: > Thanks much for the reply. It seems Linux stopped using the hardware > context switch mechanisms ( like far jmp ) since kernel version 2.2 ( > per understanding linux kernel book ). > Linux never used it. > For now, I am just going to

Re: [PATCH] Test case of emulating multibyte NOP

2013-06-05 Thread Gleb Natapov
On Thu, Jun 06, 2013 at 12:28:16AM +0800, 李春奇 wrote: > On Thu, Jun 6, 2013 at 12:13 AM, Gleb Natapov wrote: > > This time the email is perfect :) > > > > On Thu, Jun 06, 2013 at 12:02:52AM +0800, Arthur Chunqi Li wrote: > >> Add multibyte NOP test case to kvm-unit-tests. This version adds test >

Re: [PATCH] kvm-unit-tests: Add test case for accessing bpl via modr/m

2013-06-05 Thread Gleb Natapov
On Thu, Jun 06, 2013 at 01:03:44PM +0800, Arthur Chunqi Li wrote: > Test access to %bpl via modr/m addressing mode. This case can test another > bug in the boot of RHEL5.9 64-bit. > We have growing number of instructions tests using the same tlb trick. I think it is time to make the code more gen

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 07:41:17PM -0500, Anthony Liguori wrote: > "H. Peter Anvin" writes: > > > On 06/05/2013 03:08 PM, Anthony Liguori wrote: > >>> > >>> Definitely an option. However, we want to be able to boot from native > >>> devices, too, so having an I/O BAR (which would not be used by

Re: Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with "entry failed, hardware error 0x80000021"

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 02:51:19PM +0200, Stefan Pietsch wrote: > On 05.06.2013 14:10, Gleb Natapov wrote: > > On Wed, Jun 05, 2013 at 01:57:25PM +0200, Stefan Pietsch wrote: > >> On 19.05.2013 14:32, Gleb Natapov wrote: > >>> On Sun, May 19, 2013 at 02:00:31AM +0100, Ben Hutchings wrote: > De

Re: [PATCH] kvm-unit-tests: Add test case for accessing bpl via modr/m

2013-06-05 Thread 李春奇
On Thu, Jun 6, 2013 at 1:45 PM, Gleb Natapov wrote: > On Thu, Jun 06, 2013 at 01:03:44PM +0800, Arthur Chunqi Li wrote: >> Test access to %bpl via modr/m addressing mode. This case can test another >> bug in the boot of RHEL5.9 64-bit. >> > We have growing number of instructions tests using the s

Re: [PATCH] Test case of emulating multibyte NOP

2013-06-05 Thread 李春奇
On Thu, Jun 6, 2013 at 1:40 PM, Gleb Natapov wrote: > On Thu, Jun 06, 2013 at 12:28:16AM +0800, 李春奇 wrote: >> On Thu, Jun 6, 2013 at 12:13 AM, Gleb Natapov wrote: >> > This time the email is perfect :) >> > >> > On Thu, Jun 06, 2013 at 12:02:52AM +0800, Arthur Chunqi Li wrote: >> >> Add multibyt