[PATCH 2/2 v2] KVM: MMU: Make the way of accessing lpage_info more generic

2010-12-06 Thread Takuya Yoshikawa
> > Well, you can give it a name. Meanwhile I've applied patch 1, thanks. > How about this? === Subject: [PATCH] KVM: MMU: Make the way of accessing lpage_info more generic Large page information has two elements but one of them, write_count, alone is accessed by a helper function. This patc

Re: [PATCH v5 1/3] KVM: MMU: rename 'no_apf' to 'prefault'

2010-12-06 Thread Xiao Guangrong
On 12/07/2010 10:33 AM, Xiao Guangrong wrote: > It's the speculative path if 'no_apf = 1' and we will specially handle this > speculative path in the later patch, so 'prefault' is better to fit the sense > > Signed-off-by: Xiao Guangrong > --- > arch/x86/include/asm/kvm_host.h |3 ++- > arch

Re: [PATCH] KVM: Add reading critical region for kvm_io_bus_read/write

2010-12-06 Thread Sheng Yang
On Monday 06 December 2010 20:58:10 Avi Kivity wrote: > On 12/06/2010 10:44 AM, Sheng Yang wrote: > > Seems we missed it. > > > > Signed-off-by: Sheng Yang > > --- > > Do we need this, or slot_lock covered this? > > > > virt/kvm/kvm_main.c | 24 > > 1 files changed,

[PATCH v5 3/3] KVM: MMU: retry #PF for softmmu

2010-12-06 Thread Xiao Guangrong
Retry #PF for softmmu only when the current vcpu has the same cr3 as the time when #PF occurs Changelog: Just compare cr3 value since It's harmless to instantiate an spte for an unused translation from Marcelo's comment Signed-off-by: Xiao Guangrong --- arch/x86/include/asm/kvm_host.h |

[PATCH v5 1/3] KVM: MMU: rename 'no_apf' to 'prefault'

2010-12-06 Thread Xiao Guangrong
It's the speculative path if 'no_apf = 1' and we will specially handle this speculative path in the later patch, so 'prefault' is better to fit the sense Signed-off-by: Xiao Guangrong --- arch/x86/include/asm/kvm_host.h |3 ++- arch/x86/kvm/mmu.c | 18 +- arch/

[PATCH v5 2/3] KVM: MMU: fix accessed bit set on prefault path

2010-12-06 Thread Xiao Guangrong
Retry #PF is the speculative path, so don't set the accessed bit Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 4954de9..04f9033 100644 --- a/arch/x86/kvm/mmu.c +

KVM call agenda for Dec 7

2010-12-06 Thread Chris Wright
Please send in any agenda items you are interested in covering. thanks, -chris -- 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.kernel.org/majordomo-info.html

Re: [PATCH] Correcting timeout interruption of virtio_console test.

2010-12-06 Thread Lucas Meneghel Rodrigues
On Fri, 2010-12-03 at 14:10 +0100, Jiří Župka wrote: > Catch new exception from kvm_suprocess to avoid killing of tests. Hi guys, I did some rebasing in all your patches to virtio_console and re-sent to the mailing list. All of them are applied, thank you very much for your work on this! Lucas >

[PATCH 2/3] KVM test: virtio_console: Adding SIGIO test

2010-12-06 Thread Lucas Meneghel Rodrigues
Sigio was added in kernel 2.6.37. It was necessary to slightly change structure of virtio_guest, because the signals coming into the main thread of process. Signals which arrived in the main thread cancel system call (os.read and others) and it caused problems New sructure: main thread

[PATCH 3/3] KVM test: virtio_console: Fix execution of tests

2010-12-06 Thread Lucas Meneghel Rodrigues
Multiopen is not critical, basic_loopback is a critical test. Signed-off-by: Lukas Doktor --- client/tests/kvm/tests/virtio_console.py |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm/tests/virtio_console.py b/client/tests/kvm/tests/virtio_console.py

[PATCH 1/3] KVM test: virtio_guest: Add lseek test

2010-12-06 Thread Lucas Meneghel Rodrigues
From: Lukáš Doktor Signed-off-by: Lukas Doktor --- client/tests/kvm/scripts/virtio_guest.py | 23 +++ client/tests/kvm/tests/virtio_console.py | 11 +++ 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/scripts/virtio_guest.py b/cl

Re: [PATCH v2 1/2] Do not register kvmclock savevm section if kvmclock is disabled.

2010-12-06 Thread Marcelo Tosatti
On Mon, Dec 06, 2010 at 07:04:01PM -0200, Marcelo Tosatti wrote: > On Mon, Dec 06, 2010 at 09:03:46AM -0500, Glauber Costa wrote: > > Usually nobody usually thinks about that scenario (me included and > > specially), > > but kvmclock can be actually disabled in the host. > > > > It happens in two

Re: [PATCH v2 1/2] Do not register kvmclock savevm section if kvmclock is disabled.

2010-12-06 Thread Marcelo Tosatti
On Mon, Dec 06, 2010 at 09:03:46AM -0500, Glauber Costa wrote: > Usually nobody usually thinks about that scenario (me included and specially), > but kvmclock can be actually disabled in the host. > > It happens in two scenarios: > 1. host too old. > 2. we passed -kvmclock to our -cpu parameter.

Re: [PATCH 0/3] KVM: SVM: Add support Flush-By-ASID feature

2010-12-06 Thread Marcelo Tosatti
On Fri, Dec 03, 2010 at 03:25:13PM +0100, Joerg Roedel wrote: > Hi Avi, Hi Marcelo, > > here is the patch-set to add support for the Flush-By-ASID feature to > KVM on AMD. Patches 1 and 2 clean up the code a little bit and patch 3 > implements the feature itself. > > Regards, > > Joerg >

Re: [PATCH 07/15] ftrace: fix event alignment: kvm:kvm_hv_hypercall

2010-12-06 Thread David Sharp
On Sat, Dec 4, 2010 at 12:11 AM, Avi Kivity wrote: > On 12/04/2010 02:13 AM, David Sharp wrote: >> >> Signed-off-by: David Sharp >> --- >>  arch/x86/kvm/trace.h |    8 >>  1 files changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h >> in

Re: [Qemu-devel] [PATCH] ceph/rbd block driver for qemu-kvm (v8)

2010-12-06 Thread Christian Brunner
2010/12/6 Kevin Wolf : Hi Kevin, > This lacks a Signed-off-by. Please merge Yehuda's fix for configure when > you resend the patch. I've sent an updated patch. > What's the easiest way to try it out? I tried to use vstart.sh and copy > the generated ceph.conf to /etc/ceph/ceph.conf so that qemu

[PATCH] ceph/rbd block driver for qemu-kvm (v9)

2010-12-06 Thread Christian Brunner
This is a new version of the rbd driver. The only difference from v8 is a check for a recent librados version in configure. If the librados version is too old, rbd support will be disabled. RBD is an block driver for the distributed file system Ceph (http://ceph.newdream.net/). This driver uses l

Re: [PATCH 0/12] KVM: SVM: Add support for VMCB state caching

2010-12-06 Thread Marcelo Tosatti
On Fri, Dec 03, 2010 at 11:45:47AM +0100, Joerg Roedel wrote: > Hi Avi, Hi Marcelo, > > here is a patch-set which adds support for VMCB state caching to KVM. > This is a new CPU feature where software can mark certain parts of the > VMCB as unchanged since the last vmexit and the hardware can then

Re: [PATCH 05/12] KVM: SVM: Add clean-bit for interrupt state

2010-12-06 Thread Marcelo Tosatti
On Fri, Dec 03, 2010 at 11:45:52AM +0100, Joerg Roedel wrote: > This patch implements the clean-bit for all interrupt > related state in the vmcb. This corresponds to vmcb offset > 0x60-0x67. > > Signed-off-by: Joerg Roedel Don't you have to mark dirty on sync_lapic_to_cr8? -- To unsubscribe f

Re: KVM call minutes for Nov 30

2010-12-06 Thread Nadav Har'El
On Wed, Dec 01, 2010, Nadav Har'El wrote about "Re: KVM call minutes for Nov 30": > Specifically, in the last review I was asked to make sure that shadow-on-EPT > works so that users do not need to remember to add the "ept=0" module option > on L0. Unfortunately, while this should have been relati

Re: [Qemu-devel] [PATCH] ceph/rbd block driver for qemu-kvm (v8)

2010-12-06 Thread Yehuda Sadeh Weinraub
On Mon, Dec 6, 2010 at 4:48 AM, Kevin Wolf wrote: > > > What's the easiest way to try it out? I tried to use vstart.sh and copy > the generated ceph.conf to /etc/ceph/ceph.conf so that qemu-img etc. > find the monitor address. However, that leads to a hang when I try "rbd > list" or "./qemu-img cr

Re: [PATCH] KVM: SVM: Add xsetbv intercept

2010-12-06 Thread Roedel, Joerg
On Mon, Dec 06, 2010 at 11:10:46AM -0500, Avi Kivity wrote: > On 12/03/2010 06:42 PM, Joerg Roedel wrote: > > This patch implements the xsetbv intercept to the AMD part > > of KVM. This makes AVX usable in a save way for the guest on > > AVX capable AMD hardware. > > The patch is tested by using AV

Re: [PATCH 5/5] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-12-06 Thread Jan Kiszka
Am 06.12.2010 18:01, Avi Kivity wrote: > On 12/06/2010 06:46 PM, Jan Kiszka wrote: >> Am 06.12.2010 17:40, Avi Kivity wrote: >>> On 12/06/2010 06:34 PM, Jan Kiszka wrote: > > What's the protocol for doing this? I suppose userspace has to disable > interrupts, ioctl(SET_INTX_MASK,

Re: [PATCH v2 0/5] Extra capabilities for device assignment

2010-12-06 Thread Avi Kivity
On 12/06/2010 06:43 PM, Alex Williamson wrote: On Mon, 2010-12-06 at 18:34 +0200, Avi Kivity wrote: > On 12/06/2010 06:21 PM, Alex Williamson wrote: > > v2: > >- Reimplement 2/5 to remove more cruft > > > > v1: > > > > Now that we've got PCI capabilities cleaned up and device assign

Re: [PATCH 5/5] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-12-06 Thread Avi Kivity
On 12/06/2010 06:46 PM, Jan Kiszka wrote: Am 06.12.2010 17:40, Avi Kivity wrote: > On 12/06/2010 06:34 PM, Jan Kiszka wrote: >>> >>> What's the protocol for doing this? I suppose userspace has to disable >>> interrupts, ioctl(SET_INTX_MASK, masked), ..., ioctl(SET_INTX_MASK, >>> unmasked)

[PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v5)

2010-12-06 Thread Anthony Liguori
In certain use-cases, we want to allocate guests fixed time slices where idle guest cycles leave the machine idling. There are many approaches to achieve this but the most direct is to simply avoid trapping the HLT instruction which lets the guest directly execute the instruction putting the proce

Re: [PATCH 5/5] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-12-06 Thread Jan Kiszka
Am 06.12.2010 17:40, Avi Kivity wrote: > On 12/06/2010 06:34 PM, Jan Kiszka wrote: >>> >>> What's the protocol for doing this? I suppose userspace has to disable >>> interrupts, ioctl(SET_INTX_MASK, masked), ..., ioctl(SET_INTX_MASK, >>> unmasked), enable interrupts? >> >> Userspace just has to

Re: [PATCH v2 0/5] Extra capabilities for device assignment

2010-12-06 Thread Alex Williamson
On Mon, 2010-12-06 at 18:34 +0200, Avi Kivity wrote: > On 12/06/2010 06:21 PM, Alex Williamson wrote: > > v2: > > - Reimplement 2/5 to remove more cruft > > > > v1: > > > > Now that we've got PCI capabilities cleaned up and device assignment > > using them, we can add more capabilities to be gues

Re: [PATCH 5/5] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-12-06 Thread Avi Kivity
On 12/06/2010 06:34 PM, Jan Kiszka wrote: > > What's the protocol for doing this? I suppose userspace has to disable > interrupts, ioctl(SET_INTX_MASK, masked), ..., ioctl(SET_INTX_MASK, > unmasked), enable interrupts? Userspace just has to synchronize against itself - what it already does:

Re: [PATCH 2/2] KVM: Fetch guest cr3 from hardware on demand

2010-12-06 Thread Avi Kivity
On 12/05/2010 07:01 PM, Avi Kivity wrote: Instead of syncing the guest cr3 every exit, which is expensince on vmx with ept enabled, sync it only on demand. Somewhat buggy (identity pagetable address leaking into guest), will rework. -- error compiling committee.c: too many arguments to functio

Re: [PATCH 2/2] tools/virtio: virtio_test tool

2010-12-06 Thread Thiago Farina
On Mon, Nov 29, 2010 at 3:16 PM, Michael S. Tsirkin wrote: > +#define container_of(ptr, type, member) ({                     \ > +       const typeof( ((type *)0)->member ) *__mptr = (ptr);    \ > +       (type *)( (char *)__mptr - offsetof(type,member) );}) > + > +#define uninitialized_var(x) x =

Re: [PATCH 5/5] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-12-06 Thread Jan Kiszka
Am 06.12.2010 17:21, Avi Kivity wrote: > On 12/04/2010 01:37 AM, Jan Kiszka wrote: >> From: Jan Kiszka >> >> PCI 2.3 allows to generically disable IRQ sources at device level. This >> enables us to share IRQs of such devices on the host side when passing >> them to a guest. >> >> However, IRQ disab

Re: [PATCH v2 0/5] Extra capabilities for device assignment

2010-12-06 Thread Avi Kivity
On 12/06/2010 06:21 PM, Alex Williamson wrote: v2: - Reimplement 2/5 to remove more cruft v1: Now that we've got PCI capabilities cleaned up and device assignment using them, we can add more capabilities to be guest visible. This adds minimal PCI Express, PCI-X, and Power Management, along w

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Anthony Liguori
On 12/06/2010 10:30 AM, Avi Kivity wrote: On 12/06/2010 06:21 PM, Anthony Liguori wrote: No, right now we intercept SHUTDOWN (and turn it back, in qemu, into a RESET), and we emulate all the SIPI stuff. We also intercepted HLT so we couldn't get that activity state either. Ok, looks like I

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Avi Kivity
On 12/06/2010 06:21 PM, Anthony Liguori wrote: No, right now we intercept SHUTDOWN (and turn it back, in qemu, into a RESET), and we emulate all the SIPI stuff. We also intercepted HLT so we couldn't get that activity state either. Ok, looks like I need to make this per-VM and use a CAP alon

[PATCH v2 5/5] device-assignment: pass through and stub more PCI caps

2010-12-06 Thread Alex Williamson
Some drivers depend on finding capabilities like power management, PCI express/X, vital product data, or vendor specific fields. Now that we have better capability support, we can pass more of these tables through to the guest. Note that VPD and VNDR are direct pass through capabilies, the rest a

[PATCH v2 4/5] device-assignment: Error checking when adding capabilities

2010-12-06 Thread Alex Williamson
Signed-off-by: Alex Williamson --- hw/device-assignment.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 1a90a89..0ae04de 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -1288,7 +1288,7 @

[PATCH v2 3/5] pci: Error on PCI capability collisions

2010-12-06 Thread Alex Williamson
Nothing good can happen when we overlap capabilities Signed-off-by: Alex Williamson --- hw/pci.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index b08113d..288d6fd 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1845,6 +1845,20 @@ int pci_

[PATCH v2 0/5] Extra capabilities for device assignment

2010-12-06 Thread Alex Williamson
v2: - Reimplement 2/5 to remove more cruft v1: Now that we've got PCI capabilities cleaned up and device assignment using them, we can add more capabilities to be guest visible. This adds minimal PCI Express, PCI-X, and Power Management, along with direct passthrough Vital Product Data and Vend

[PATCH v2 1/5] device-assignment: Fix off-by-one in header check

2010-12-06 Thread Alex Williamson
Include the first byte at 40h or else access might go to the hardware instead of the emulated config space, resulting in capability loops, since the ordering is different. Signed-off-by: Alex Williamson --- hw/device-assignment.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) di

[PATCH v2 2/5] pci: Remove PCI_CAPABILITY_CONFIG_*

2010-12-06 Thread Alex Williamson
Half of these aren't used anywhere, the other half are wrong. Now that device assignment is trying to match physical hardware offsets for PCI capabilities, we can't round up the MSI and MSI-X length. MSI-X is always 12 bytes. MSI is variable length depending on features, but for the current devi

Re: [PATCH 5/5] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-12-06 Thread Avi Kivity
On 12/04/2010 01:37 AM, Jan Kiszka wrote: From: Jan Kiszka PCI 2.3 allows to generically disable IRQ sources at device level. This enables us to share IRQs of such devices on the host side when passing them to a guest. However, IRQ disabling via the PCI config space is more costly than masking

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Anthony Liguori
On 12/06/2010 09:16 AM, Avi Kivity wrote: On 12/06/2010 05:07 PM, Anthony Liguori wrote: Not the user space one. The exit we're interested in is external interrupt, and that one isn't delivered to userspace. I guess you could have a loop 1: hlt jmp 1b and enter it programming a time

Re: Roadmap for KVM support on Tile?

2010-12-06 Thread Jan Kiszka
Am 06.12.2010 16:59, Chris Metcalf wrote: > On 12/6/2010 7:13 AM, Jan Kiszka wrote: >> Hi Chris, >> >> as I'm already running around, telling people that Tile might be the >> next arch to gain KVM support, I wanted to back this derived [1] >> information with some more details. Can you share some o

Re: [stable] [PATCH 3/3][STABLE] KVM: add schedule check to napi_enable call

2010-12-06 Thread Avi Kivity
On 12/03/2010 05:44 PM, Peter Lieven wrote: Is there any reason why this patch is not yet in the stable kernel? virtio_net is still crashing under heavy load in current vanilla kernel. This patch *might be* the solution. Perhaps some confusion. I've asked Greg to take kvm patches from Marcelo

Re: [PATCH] KVM: SVM: Add xsetbv intercept

2010-12-06 Thread Avi Kivity
On 12/03/2010 06:42 PM, Joerg Roedel wrote: This patch implements the xsetbv intercept to the AMD part of KVM. This makes AVX usable in a save way for the guest on AVX capable AMD hardware. The patch is tested by using AVX in the guest and host in parallel and checking for data corruption. I also

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Avi Kivity
On 12/06/2010 05:07 PM, Anthony Liguori wrote: Not the user space one. The exit we're interested in is external interrupt, and that one isn't delivered to userspace. I guess you could have a loop 1: hlt jmp 1b and enter it programming a timer to something close, and examine the vcpu

Re: [Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-12-06 Thread Avi Kivity
On 12/01/2010 11:34 PM, Stefan Hajnoczi wrote: >> The guest CPU utilization numbers include an efficiency metric: %vcpu >> per MB/sec. Here we see significant improvements too. Guests that >> previously couldn't get more CPU work done now have regained some >> breathing space. > > Thanks f

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Anthony Liguori
On 12/06/2010 08:33 AM, Avi Kivity wrote: On 12/06/2010 04:03 PM, Anthony Liguori wrote: It does. Good, it simplifies the patch. Any ideas if the unit test framework can be used to validate this? The behavior makes perfect sense but I wanted an excuse to play around with it :-) Not th

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Avi Kivity
On 12/06/2010 04:03 PM, Anthony Liguori wrote: It does. Good, it simplifies the patch. Any ideas if the unit test framework can be used to validate this? The behavior makes perfect sense but I wanted an excuse to play around with it :-) Not the user space one. The exit we're intereste

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Gleb Natapov
On Mon, Dec 06, 2010 at 08:08:08AM -0600, Anthony Liguori wrote: > On 12/06/2010 08:02 AM, Avi Kivity wrote: > >On 12/06/2010 04:01 PM, Avi Kivity wrote: > >>>It's not just possible, it appears to be exactly what happens. > >>> > >>>I guess it makes sense that RIP gets advanced before HLT > >>>begi

Re: [PATCH v2 0/2] savevm odness related to kvmclock

2010-12-06 Thread Paolo Bonzini
On 12/06/2010 03:03 PM, Glauber Costa wrote: Some users told me that savevm path is behaving oddly wrt kvmclock. The first oddness is that a guarantee we never made (AFAIK) is being broken: two consecutive "savevm" operations, with the machine stopped in between produces different results, due to

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Anthony Liguori
On 12/06/2010 08:02 AM, Avi Kivity wrote: On 12/06/2010 04:01 PM, Avi Kivity wrote: It's not just possible, it appears to be exactly what happens. I guess it makes sense that RIP gets advanced before HLT begins to wait. It does. Good, it simplifies the patch. btw, this is how kvm emul

[PATCH v2 0/2] savevm odness related to kvmclock

2010-12-06 Thread Glauber Costa
Some users told me that savevm path is behaving oddly wrt kvmclock. The first oddness is that a guarantee we never made (AFAIK) is being broken: two consecutive "savevm" operations, with the machine stopped in between produces different results, due to the call to KVM_GET_CLOCK ioctl. I believe the

[PATCH v2 2/2] make kvmclock value idempotent for stopped machine

2010-12-06 Thread Glauber Costa
Although we never made such commitment clear (well, to the best of my knowledge), some people expect that two savevm issued in sequence in a stopped machine will yield the same results. This is not a crazy requirement, since we don't expect a stopped machine to be updating its state, for any device

[PATCH v2 1/2] Do not register kvmclock savevm section if kvmclock is disabled.

2010-12-06 Thread Glauber Costa
Usually nobody usually thinks about that scenario (me included and specially), but kvmclock can be actually disabled in the host. It happens in two scenarios: 1. host too old. 2. we passed -kvmclock to our -cpu parameter. In both cases, we should not register kvmclock savevm section. This patch

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Anthony Liguori
On 12/06/2010 08:01 AM, Avi Kivity wrote: On 12/06/2010 03:58 PM, Anthony Liguori wrote: On 12/06/2010 02:35 AM, Avi Kivity wrote: On 12/06/2010 10:28 AM, Avi Kivity wrote: I wasn't sure about this. Don't you want EIP to point to the beginning of the instruction such that the exception will c

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Avi Kivity
On 12/06/2010 04:01 PM, Avi Kivity wrote: It's not just possible, it appears to be exactly what happens. I guess it makes sense that RIP gets advanced before HLT begins to wait. It does. Good, it simplifies the patch. btw, this is how kvm emulates HLT - first we advance rip, then we slee

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Avi Kivity
On 12/06/2010 03:58 PM, Anthony Liguori wrote: On 12/06/2010 02:35 AM, Avi Kivity wrote: On 12/06/2010 10:28 AM, Avi Kivity wrote: I wasn't sure about this. Don't you want EIP to point to the beginning of the instruction such that the exception will cause the instruction to restart? An int

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Anthony Liguori
On 12/06/2010 02:35 AM, Avi Kivity wrote: On 12/06/2010 10:28 AM, Avi Kivity wrote: I wasn't sure about this. Don't you want EIP to point to the beginning of the instruction such that the exception will cause the instruction to restart? An interrupt causes the HLT to complete execution. A

[PATCHv7 03/16] Keep track of ISA ports ISA device is using in qdev.

2010-12-06 Thread Gleb Natapov
Store all io ports used by device in ISADevice structure. Signed-off-by: Gleb Natapov --- hw/cs4231a.c |1 + hw/fdc.c |3 +++ hw/gus.c |4 hw/ide/isa.c |2 ++ hw/isa-bus.c | 25 + hw/isa.h |4 hw/m48t59.c

[PATCHv7 05/16] Store IDE bus id in IDEBus structure for easy access.

2010-12-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- hw/ide/cmd646.c |4 ++-- hw/ide/internal.h |3 ++- hw/ide/isa.c |2 +- hw/ide/piix.c |4 ++-- hw/ide/qdev.c |3 ++- hw/ide/via.c |4 ++-- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/hw/ide/cmd646.c b/

[PATCHv7 01/16] Introduce fw_name field to DeviceInfo structure.

2010-12-06 Thread Gleb Natapov
Add "fw_name" to DeviceInfo to use in device path building. In contrast to "name" "fw_name" should refer to functionality device provides instead of particular device model like "name" does. Signed-off-by: Gleb Natapov --- hw/fdc.c|1 + hw/ide/isa.c|1 + hw/ide/qdev.c |

[PATCHv7 10/16] Add get_fw_dev_path callback for usb bus.

2010-12-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- hw/usb-bus.c | 42 ++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/hw/usb-bus.c b/hw/usb-bus.c index 256b881..8b4583c 100644 --- a/hw/usb-bus.c +++ b/hw/usb-bus.c @@ -5,11 +5,13 @@ #include "monitor.h"

[PATCHv7 00/16] boot order specification

2010-12-06 Thread Gleb Natapov
I am using open firmware naming scheme to specify device path names. Changes from last version: rebase to master, added pointers to OF specs, added bootindex parameter documentation. Gleb Natapov (16): Introduce fw_name field to DeviceInfo structure. Introduce new Bu

[PATCHv7 13/16] Change fw_cfg_add_file() to get full file path as a parameter.

2010-12-06 Thread Gleb Natapov
Change fw_cfg_add_file() to get full file path as a parameter instead of building one internally. Two reasons for that. First caller may need to know how file is named. Second this moves policy of file naming out from fw_cfg. Platform may want to use more then two levels of directories for instance

[PATCHv7 15/16] Add notifier that will be called when machine is fully created.

2010-12-06 Thread Gleb Natapov
Action that depends on fully initialized device model should register with this notifier chain. Signed-off-by: Gleb Natapov --- sysemu.h |2 ++ vl.c | 15 +++ 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/sysemu.h b/sysemu.h index 48f8eee..c42f33a 100644 -

[PATCHv7 08/16] Add get_fw_dev_path callback for pci bus.

2010-12-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- hw/pci.c | 108 - 1 files changed, 85 insertions(+), 23 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 0c15b13..e7ea907 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -43,6 +43,7 @@ static void pcibus_

[PATCHv7 16/16] Pass boot device list to firmware.

2010-12-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- hw/fw_cfg.c | 14 ++ sysemu.h|1 + vl.c| 48 3 files changed, 63 insertions(+), 0 deletions(-) diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c index 7b9434f..20a816f 100644 --- a/hw/fw_cfg.c

[PATCHv7 14/16] Add bootindex for option roms.

2010-12-06 Thread Gleb Natapov
Extend -option-rom command to have additional parameter ,bootindex=. Signed-off-by: Gleb Natapov --- hw/loader.c| 16 +++- hw/loader.h|8 hw/multiboot.c |3 ++- hw/ne2000.c|2 +- hw/nseries.c |4 ++-- hw/palm.c |6 +++--- hw/pc.c

[PATCHv7 07/16] Add get_fw_dev_path callback for system bus.

2010-12-06 Thread Gleb Natapov
Prints out mmio or pio used to access child device. Signed-off-by: Gleb Natapov --- hw/pci_host.c |2 ++ hw/sysbus.c | 30 ++ hw/sysbus.h |4 3 files changed, 36 insertions(+), 0 deletions(-) diff --git a/hw/pci_host.c b/hw/pci_host.c index bc5b771

[PATCHv7 12/16] Add bootindex parameter to net/block/fd device

2010-12-06 Thread Gleb Natapov
If bootindex is specified on command line a string that describes device in firmware readable way is added into sorted list. Later this list will be passed into firmware to control boot order. Signed-off-by: Gleb Natapov --- block_int.h |4 +++- hw/e1000.c |4 hw/eepro100.c

[PATCHv7 11/16] Add get_fw_dev_path callback to scsi bus.

2010-12-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- hw/scsi-bus.c | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 93f0e9a..7febb86 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -5,9 +5,12 @@ #include "qdev.h" #include "blockde

[PATCHv7 09/16] Record which USBDevice USBPort belongs too.

2010-12-06 Thread Gleb Natapov
Ports on root hub will have NULL here. This is needed to reconstruct path from device to its root hub to build device path. Signed-off-by: Gleb Natapov --- hw/usb-bus.c |3 ++- hw/usb-hub.c |2 +- hw/usb-musb.c |2 +- hw/usb-ohci.c |2 +- hw/usb-uhci.c |2 +- hw/usb.h

[PATCHv7 04/16] Add get_fw_dev_path callback to ISA bus in qdev.

2010-12-06 Thread Gleb Natapov
Use device ioports to create unique device path. Signed-off-by: Gleb Natapov --- hw/isa-bus.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/hw/isa-bus.c b/hw/isa-bus.c index c0ac7e9..c423c1b 100644 --- a/hw/isa-bus.c +++ b/hw/isa-bus.c @@ -31,11 +31,13

[PATCHv7 02/16] Introduce new BusInfo callback get_fw_dev_path.

2010-12-06 Thread Gleb Natapov
New get_fw_dev_path callback will be used for build device path usable by firmware in contrast to qdev qemu internal device path. Signed-off-by: Gleb Natapov --- hw/qdev.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/hw/qdev.h b/hw/qdev.h index bc71110..f72fbde

[PATCHv7 06/16] Add get_fw_dev_path callback to IDE bus.

2010-12-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- hw/ide/qdev.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 88ff657..01a181b 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -24,9 +24,12 @@ /* - */

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v4)

2010-12-06 Thread Avi Kivity
On 12/06/2010 03:39 PM, Srivatsa Vaddagiri wrote: > >Also, just curious how this would work for idle vcpus that use mwait rather > >than hlt. > > We don't expose mwait to the guest (emulating mwait is very expensive). We seem to be queuing an exception upon mwait (EXIT_REASON_MWAIT_INSTRUCTIO

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v4)

2010-12-06 Thread Srivatsa Vaddagiri
On Mon, Dec 06, 2010 at 03:27:18PM +0200, Avi Kivity wrote: > >A vcpu could be idle not just because of lack of work, but also because its > >waiting on IO completion. Normally idle vcpus that yield would allow their > >companion threads to run and possibly finish pending IO work faster. Now that >

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v4)

2010-12-06 Thread Avi Kivity
On 12/05/2010 06:55 PM, Srivatsa Vaddagiri wrote: On Sat, Dec 04, 2010 at 08:43:21AM -0600, Anthony Liguori wrote: > In certain use-cases, we want to allocate guests fixed time slices where idle > guest cycles leave the machine idling. There are many approaches to achieve > this but the most

Re: [PATCH v4 3/3] KVM: MMU: retry #PF for softmmu

2010-12-06 Thread Avi Kivity
On 12/06/2010 12:22 PM, Xiao Guangrong wrote: Hi Avi, On 12/06/2010 05:48 PM, Avi Kivity wrote: > On 12/02/2010 11:46 AM, Xiao Guangrong wrote: >> Retry #PF for softmmu only when the current vcpu has the same cr3 as >> the time >> when #PF occurs >> >> Changelog: >> Just compare cr3 val

Re: Block device resize detection

2010-12-06 Thread Kevin Wolf
Am 06.12.2010 12:29, schrieb Alexander Graf: > On 06.12.2010, at 11:49, Vandeir Eduardo wrote: >> >> I have a KVM guest machine, lets name it VMTEST, >> using an iSCSI LUN as a virtio device. Something like this: >> >> >> >> > dev='/dev/disk/by-path/ip-w.x.y.z:3260-iscsi-iqn.2010-10.br.furb.i

Re: [PATCH 2/2 rebased] KVM: MMU: Introduce a helper to access lpage_info

2010-12-06 Thread Avi Kivity
On 12/06/2010 10:57 AM, Takuya Yoshikawa wrote: (2010/12/06 16:55), Takuya Yoshikawa wrote: (2010/12/06 15:37), Xiao Guangrong wrote: On 12/06/2010 12:13 AM, Takuya Yoshikawa wrote: From: Takuya Yoshikawa Index calculation to access lpage_info appears three times. A helper is worthwhile. W

Re: [PATCH] KVM: Add reading critical region for kvm_io_bus_read/write

2010-12-06 Thread Avi Kivity
On 12/06/2010 10:44 AM, Sheng Yang wrote: Seems we missed it. Signed-off-by: Sheng Yang --- Do we need this, or slot_lock covered this? virt/kvm/kvm_main.c | 24 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main

Re: [Qemu-devel] [PATCH] ceph/rbd block driver for qemu-kvm (v8)

2010-12-06 Thread Kevin Wolf
Am 17.11.2010 22:42, schrieb Christian Brunner: > Here is another update for the ceph storage driver. It includes changes > for the annotations Stefan made last week and a bit more things Sage > discovered while looking over the driver again. > > I really hope that this time we are not only close,

Re: Block device resize detection

2010-12-06 Thread Vandeir Eduardo
Humm, unfortunately I'm not a developer, only a sys admin, but this would be a nice feature to avoid restarting vm guests. I didn't want, but I think I will have to add another software layer (LVM) inside the guest vm. This way, when I need more space, I hot-add another device and add it to the v

[PATCH 1/2] * Add lseek test

2010-12-06 Thread Lukas Doktor
Signed-off-by: Lukas Doktor --- client/tests/kvm/scripts/virtio_guest.py | 23 +++ client/tests/kvm/tests/virtio_console.py | 11 +++ 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/scripts/virtio_guest.py b/client/tests/kvm/script

[PATCH 2/2] FIX tbasic_loopback execution FIX critical tests; multioupen is not critical; basic_loopback is critical test

2010-12-06 Thread Lukas Doktor
Signed-off-by: Lukas Doktor --- client/tests/kvm/tests/virtio_console.py |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm/tests/virtio_console.py b/client/tests/kvm/tests/virtio_console.py index 30bdcbf..144aca3 100644 --- a/client/tests/kvm/tests/virt

[KVM-autotest][PATCH] virtio_console: add lseek test

2010-12-06 Thread Lukas Doktor
Hello, The first patch adds an lseek test. The second one is just a mirror corrections of critical flags for some of the smoke_test subtests. The lseek test do what is expected. The result of lseek on virtconsole/virtserialport should be -ESPIPE or err 29 in python. Regards, Lukáš -- To unsub

[KVM-Autotest][PATCH][virtio-console] Adding SIGIO test to virtio_console.

2010-12-06 Thread Jiří Župka
Sigio was added in kernel 2.6.37. It was necessary to slightly change structure of virtio_guest, because the signals coming into the main thread of process. Signals which arrived in the main thread cancel system call (os.read and others) and it caused problems New sructure: main thread

Re: Block device resize detection

2010-12-06 Thread Alexander Graf
Hi Vandeir, On 06.12.2010, at 11:49, Vandeir Eduardo wrote: > Hi guys, > > I have a KVM guest machine, lets name it VMTEST, > using an iSCSI LUN as a virtio device. Something like this: > > > >dev='/dev/disk/by-path/ip-w.x.y.z:3260-iscsi-iqn.2010-10.br.furb.inf:disk0-lun-4'/> > >

Block device resize detection

2010-12-06 Thread Vandeir Eduardo
Hi guys, I have a KVM guest machine, lets name it VMTEST, using an iSCSI LUN as a virtio device. Something like this: On iSCSI server, if I resize this LUN, this resize is detected on KVM host, but not on the VMTEST. The device resize is only detected if I restart VMTEST. Is the

Re: [PATCH 0/2] Emulator intercept frameworks

2010-12-06 Thread Roedel, Joerg
Hi Avi, On Sun, Dec 05, 2010 at 05:18:23AM -0500, Avi Kivity wrote: > This patchset defines a framework for intercepting emulated instructions. It > takes a middle ground to the two previous proposals: putting everything in > an arch callback, or putting everything in the emulator. Instead, it m

Re: [PATCH v4 3/3] KVM: MMU: retry #PF for softmmu

2010-12-06 Thread Xiao Guangrong
Hi Avi, On 12/06/2010 05:48 PM, Avi Kivity wrote: > On 12/02/2010 11:46 AM, Xiao Guangrong wrote: >> Retry #PF for softmmu only when the current vcpu has the same cr3 as >> the time >> when #PF occurs >> >> Changelog: >>Just compare cr3 value since It's harmless to instantiate an spte >> for a

Re: [PATCH v4 3/3] KVM: MMU: retry #PF for softmmu

2010-12-06 Thread Avi Kivity
On 12/02/2010 11:46 AM, Xiao Guangrong wrote: Retry #PF for softmmu only when the current vcpu has the same cr3 as the time when #PF occurs Changelog: Just compare cr3 value since It's harmless to instantiate an spte for an unused translation from Marcelo's comment It's not harmless. W

Re: [PATCH v4 1/3] KVM: MMU: rename 'no_apf' to 'prefault'

2010-12-06 Thread Gleb Natapov
On Fri, Dec 03, 2010 at 06:30:55PM -0200, Marcelo Tosatti wrote: > On Thu, Dec 02, 2010 at 05:44:43PM +0800, Xiao Guangrong wrote: > > It's the speculative path if 'no_apf = 1' and we will specially handle this > > speculative path in the later patch, so 'prefault' is better to fit the > > sense >

Re: [PATCH 2/2 rebased] KVM: MMU: Introduce a helper to access lpage_info

2010-12-06 Thread Takuya Yoshikawa
(2010/12/06 16:55), Takuya Yoshikawa wrote: (2010/12/06 15:37), Xiao Guangrong wrote: On 12/06/2010 12:13 AM, Takuya Yoshikawa wrote: From: Takuya Yoshikawa Index calculation to access lpage_info appears three times. A helper is worthwhile. Why not get lpage_info instead of index in the hel

[PATCH] KVM: Add reading critical region for kvm_io_bus_read/write

2010-12-06 Thread Sheng Yang
Seems we missed it. Signed-off-by: Sheng Yang --- Do we need this, or slot_lock covered this? virt/kvm/kvm_main.c | 24 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index c4ee364..3e71b91 100644 --- a/virt/k

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Avi Kivity
On 12/06/2010 10:28 AM, Avi Kivity wrote: I wasn't sure about this. Don't you want EIP to point to the beginning of the instruction such that the exception will cause the instruction to restart? An interrupt causes the HLT to complete execution. APF completion counts as an interrupt in th

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Avi Kivity
On 12/04/2010 03:48 PM, Anthony Liguori wrote: No, an interrupt causes the HLT to be executed, and rip advanced past it. You need to preserve this (both for interrupts and for the apf completion exception). Yeah, I see in the architecture manual it specifically calls out the rip advancing a

  1   2   >