Re: SDM Updates available

2012-08-30 Thread Jan Kiszka
On 2012-08-31 06:52, Nakajima, Jun wrote: > It includes the new VT features for interrupt/APIC virtualization that > I mentioned at XenSummit and Linux Plumbers Conference. > > http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html > Cool features ahead :

Re: KVM: MMU: Tracking guest writes through EPT entries ?

2012-08-30 Thread Xiao Guangrong
On 08/31/2012 02:59 AM, Hugo wrote: > On Thu, Aug 30, 2012 at 5:22 AM, Xiao Guangrong > wrote: >> On 08/28/2012 11:30 AM, Felix wrote: >>> Xiao Guangrong linux.vnet.ibm.com> writes: >>> On 07/31/2012 01:18 AM, Sunil wrote: > Hello List, > > I am a KVM newbie and studying KVM

Re: KVM: MMU: Tracking guest writes through EPT entries ?

2012-08-30 Thread Davidlohr Bueso
On Tue, 2012-07-31 at 14:53 -0400, Sunil Agham wrote: > On Mon, Jul 30, 2012 at 10:49 PM, Xiao Guangrong > wrote: > > On 07/31/2012 01:18 AM, Sunil wrote: > >> Hello List, > >> > >> I am a KVM newbie and studying KVM mmu code. > >> > >> On the existing guest, I am trying to track all guest writes

[PATCH] target-i386: Allow changing of Hypervisor CPUIDs.

2012-08-30 Thread Don Slutz
This is primarily done so that the guest will think it is running under vmware when hypervisor=vmware is specified as a property of a cpu. Also allow this to work in accel=tcg mode. The new cpu properties hyper_level, hyper_extra, hyper_extra_a, and hyper_extra_b can be used to further adjust wha

[PATCH] target-i386: Allow changing of Hypervisor CPUIDs.

2012-08-30 Thread Don Slutz
This is primarily done so that the guest will think it is running under vmware when hypervisor=vmware is specified as a property of a cpu. Also allow this to work in accel=tcg mode. The new cpu properties hyper_level, hyper_extra, hyper_extra_a, and hyper_extra_b can be used to further adjust wha

[PATCH] target-i386: Allow changing of Hypervisor CPUIDs.

2012-08-30 Thread Don Slutz
This is primarily done so that the guest will think it is running under vmware when hypervisor=vmware is specified as a property of a cpu. Also allow this to work in accel=tcg mode. The new cpu properties hyper_level, hyper_extra, hyper_extra_a, and hyper_extra_b can be used to further adjust wha

[PATCH] target-i386: Allow changing of Hypervisor CPUIDs.

2012-08-30 Thread Don Slutz
This is primarily done so that the guest will think it is running under vmware when hypervisor=vmware is specified as a property of a cpu. Also allow this to work in accel=tcg mode. The new cpu properties hyper_level, hyper_extra, hyper_extra_a, and hyper_extra_b can be used to further adjust wha

Re: KVM: MMU: Tracking guest writes through EPT entries ?

2012-08-30 Thread Hugo
On Thu, Aug 30, 2012 at 5:22 AM, Xiao Guangrong wrote: > On 08/28/2012 11:30 AM, Felix wrote: >> Xiao Guangrong linux.vnet.ibm.com> writes: >> >>> >>> On 07/31/2012 01:18 AM, Sunil wrote: Hello List, I am a KVM newbie and studying KVM mmu code. On the existing guest, I am

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-30 Thread David Ahern
In addition to Andrew's comment about making the stats struct and functions generic... On 8/27/12 3:51 AM, Dong Hao wrote: ---8<--- +static void exit_event_decode_key(struct event_key *key, char decode[20]) +{ + const char *exit_reason = get_exit_reason(key->key); + + snprintf(deco

Re: [PATCH -v3] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-08-30 Thread Michael S. Tsirkin
On Fri, Aug 31, 2012 at 01:09:56AM +0900, Takuya Yoshikawa wrote: > On Thu, 30 Aug 2012 16:21:31 +0300 > "Michael S. Tsirkin" wrote: > > > > +static u32 apic_read_reg(int reg_off, void *bitmap) > > > +{ > > > + return *((u32 *)(bitmap + reg_off)); > > > +} > > > + > > > > Contrast with apic_set

Re: [PATCH -v3] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-08-30 Thread Takuya Yoshikawa
On Thu, 30 Aug 2012 16:21:31 +0300 "Michael S. Tsirkin" wrote: > > +static u32 apic_read_reg(int reg_off, void *bitmap) > > +{ > > + return *((u32 *)(bitmap + reg_off)); > > +} > > + > > Contrast with apic_set_reg which gets apic, > add fact that all callers invoke REG_POS and you will > see

Re: [PATCH 0/5] Multiqueue virtio-scsi

2012-08-30 Thread Paolo Bonzini
Il 30/08/2012 16:53, Michael S. Tsirkin ha scritto: >> > this series adds multiqueue support to the virtio-scsi driver, based >> > on Jason Wang's work on virtio-net. It uses a simple queue steering >> > algorithm that expects one queue per CPU. LUNs in the same target always >> > use the same qu

Re: Biweekly upstream qemu-kvm test report (using autotest) - Week 35

2012-08-30 Thread Lucas Meneghel Rodrigues
On Thu, Aug 30, 2012 at 8:37 AM, santwana wrote: > Hi All, > > Please find the results of upstream testing. > > We are evaluating the failures and will be raising the issues with the > appropriate community. > > Environment: > Host Kernel: 3.5.0-rc6 > KVM Version: 1.1.90 > Date: Thu Aug 30 15:29:0

Re: [PATCH 0/5] Multiqueue virtio-scsi

2012-08-30 Thread Michael S. Tsirkin
On Tue, Aug 28, 2012 at 01:54:12PM +0200, Paolo Bonzini wrote: > Hi all, > > this series adds multiqueue support to the virtio-scsi driver, based > on Jason Wang's work on virtio-net. It uses a simple queue steering > algorithm that expects one queue per CPU. LUNs in the same target always > use

[Bug 42782] IO_PAGE_FAULT while starting xorg

2012-08-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42782 Alan changed: What|Removed |Added CC||a...@lxorguk.ukuu.org.uk Kernel Version|3.2.6

Re: [PATCH v3 1/2] virtio-ring: Use threshold for switching to indirect descriptors

2012-08-30 Thread Michael S. Tsirkin
On Thu, Aug 30, 2012 at 01:21:57PM +0200, Sasha Levin wrote: > Currently if VIRTIO_RING_F_INDIRECT_DESC is enabled we will use indirect > descriptors even if we have plenty of space in the ring. This means that > we take a performance hit at all times due to the overhead of creating > indirect desc

[Bug 42600] Live migration of very large vm get's stuck

2012-08-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42600 Alan changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: [PATCH v3 2/2] virtio-ring: Allocate indirect buffers from cache when possible

2012-08-30 Thread Michael S. Tsirkin
On Thu, Aug 30, 2012 at 01:21:58PM +0200, Sasha Levin wrote: > Currently if VIRTIO_RING_F_INDIRECT_DESC is enabled we will > use indirect descriptors and allocate them using a simple > kmalloc(). > > This patch adds a cache which will allow indirect buffers under > a configurable size to be alloca

Re: [PATCH -v3] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-08-30 Thread Michael S. Tsirkin
On Thu, Aug 30, 2012 at 09:30:19PM +0900, Takuya Yoshikawa wrote: > find_highest_vector() and count_vectors(): > - Instead of using magic values, define and use proper interfaces >to access registers. > > find_highest_vector(): > - Remove likely() which is there only for historical reasons a

[PATCH -v3] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-08-30 Thread Takuya Yoshikawa
find_highest_vector() and count_vectors(): - Instead of using magic values, define and use proper interfaces to access registers. find_highest_vector(): - Remove likely() which is there only for historical reasons and not doing correct branch predictions anymore. Using such heuristics

Biweekly upstream qemu-kvm test report (using autotest) - Week 35

2012-08-30 Thread santwana
Hi All, Please find the results of upstream testing. We are evaluating the failures and will be raising the issues with the appropriate community. Environment: Host Kernel: 3.5.0-rc6 KVM Version: 1.1.90 Date: Thu Aug 30 15:29:06 2012 Stats: 41 tests executed (26 tests passed, 15 tests failed)

[PATCH v3 1/2] virtio-ring: Use threshold for switching to indirect descriptors

2012-08-30 Thread Sasha Levin
Currently if VIRTIO_RING_F_INDIRECT_DESC is enabled we will use indirect descriptors even if we have plenty of space in the ring. This means that we take a performance hit at all times due to the overhead of creating indirect descriptors. Instead, use it only after we're below a configurable offse

[PATCH v3 2/2] virtio-ring: Allocate indirect buffers from cache when possible

2012-08-30 Thread Sasha Levin
Currently if VIRTIO_RING_F_INDIRECT_DESC is enabled we will use indirect descriptors and allocate them using a simple kmalloc(). This patch adds a cache which will allow indirect buffers under a configurable size to be allocated from that cache instead. Signed-off-by: Sasha Levin --- drivers/bl

Re: [PATCH] KVM: x86: lapic: Fix the misuse of likely() in find_highest_vector()

2012-08-30 Thread Michael S. Tsirkin
On Thu, Aug 30, 2012 at 07:24:39PM +0900, Takuya Yoshikawa wrote: > On Thu, 30 Aug 2012 13:10:33 +0300 > "Michael S. Tsirkin" wrote: > > > > OK, I'll do these on top of this patch. > > > > Tweaking these 5 lines for readability across multiple > > patches is just not worth it. > > As long as we

Re: How KVM sync guest page table with corresponding shadow page table?

2012-08-30 Thread Xiao Guangrong
On 08/24/2012 03:29 PM, 陳韋任 (Wei-Ren Chen) wrote: > Hi Guangrong, > > I am not familiar with the term used in paging world, so I need to ask > some dumb questions. > >> It is controlled by shadow page table, guest-page-tables are write-protected >> on shadow pages (the W bit on PTE is cleared).

Re: [PATCH v2 2/2] virtio-ring: Allocate indirect buffers from cache when possible

2012-08-30 Thread Sasha Levin
On 08/29/2012 05:14 PM, Michael S. Tsirkin wrote: >> > Note that these are simple tests with netperf listening on one end and a >> > simple >> > 'netperf -H [host]' within the guest. If there are other tests which may be >> > interesting please let me know. > Checking that host CPU utilization did

[PATCH] KVM: PIC: fix use of uninitialised variable.

2012-08-30 Thread Jamie Iles
Commit aea218f3cbbc (KVM: PIC: call ack notifiers for irqs that are dropped form irr) used an uninitialised variable to track whether an appropriate apic had been found. This could result in calling the ack notifier incorrectly. Cc: Gleb Natapov Cc: Avi Kivity Signed-off-by: Jamie Iles --- ar

Re: [PATCH] KVM: x86: lapic: Fix the misuse of likely() in find_highest_vector()

2012-08-30 Thread Takuya Yoshikawa
On Thu, 30 Aug 2012 13:10:33 +0300 "Michael S. Tsirkin" wrote: > > OK, I'll do these on top of this patch. > > Tweaking these 5 lines for readability across multiple > patches is just not worth it. > As long as we do random cleanups of this function it's probably easier > to just do them all in

Re: [PATCH v10] kvm: notify host when the guest is panicked

2012-08-30 Thread Sasha Levin
On 08/30/2012 04:03 AM, Wen Congyang wrote: > At 08/29/2012 07:56 PM, Sasha Levin Wrote: >> On 08/29/2012 07:18 AM, Wen Congyang wrote: >>> diff --git a/Documentation/virtual/kvm/pv_event.txt >>> b/Documentation/virtual/kvm/pv_event.txt >>> new file mode 100644 >>> index 000..bb04de0 >>> --- /

Re: KVM: MMU: Tracking guest writes through EPT entries ?

2012-08-30 Thread Xiao Guangrong
On 08/28/2012 11:30 AM, Felix wrote: > Xiao Guangrong linux.vnet.ibm.com> writes: > >> >> On 07/31/2012 01:18 AM, Sunil wrote: >>> Hello List, >>> >>> I am a KVM newbie and studying KVM mmu code. >>> >>> On the existing guest, I am trying to track all guest writes by >>> marking page table entry

Re: [PATCH] KVM: x86: lapic: Fix the misuse of likely() in find_highest_vector()

2012-08-30 Thread Michael S. Tsirkin
On Thu, Aug 30, 2012 at 06:50:52PM +0900, Takuya Yoshikawa wrote: > On Thu, 30 Aug 2012 09:37:02 +0300 > "Michael S. Tsirkin" wrote: > > > After staring at your code for a while it does appear to > > do the right thing, and looks cleaner than what > > we have now. commit log could be clearer. > >

Re: [PATCH] KVM: x86: lapic: Fix the misuse of likely() in find_highest_vector()

2012-08-30 Thread Takuya Yoshikawa
On Thu, 30 Aug 2012 09:37:02 +0300 "Michael S. Tsirkin" wrote: > After staring at your code for a while it does appear to > do the right thing, and looks cleaner than what > we have now. commit log could be clearer. > It should state something like: > > > Clean up code in find_highest_vector: >

Re: [PATCH 1/7] kvm tools: add HOME env var to hostfs

2012-08-30 Thread Sasha Levin
On 08/30/2012 11:48 AM, Pekka Enberg wrote: > On Thu, Aug 30, 2012 at 12:44 PM, Sasha Levin wrote: >> On 08/30/2012 09:50 AM, Cyrill Gorcunov wrote: >>> On Thu, Aug 30, 2012 at 09:36:37AM +0200, Sasha Levin wrote: +char *new_env[] = { "TERM=linux", "DISPLAY=192.168.33.1:0", +

Re: [PATCH 1/7] kvm tools: add HOME env var to hostfs

2012-08-30 Thread Pekka Enberg
On Thu, Aug 30, 2012 at 12:44 PM, Sasha Levin wrote: > On 08/30/2012 09:50 AM, Cyrill Gorcunov wrote: >> On Thu, Aug 30, 2012 at 09:36:37AM +0200, Sasha Levin wrote: >>> +char *new_env[] = { "TERM=linux", "DISPLAY=192.168.33.1:0", >>> +"HOME=/virt/home", NULL }; >>>

Re: [PATCH 1/7] kvm tools: add HOME env var to hostfs

2012-08-30 Thread Sasha Levin
On 08/30/2012 09:50 AM, Cyrill Gorcunov wrote: > On Thu, Aug 30, 2012 at 09:36:37AM +0200, Sasha Levin wrote: >> +char *new_env[] = { "TERM=linux", "DISPLAY=192.168.33.1:0", >> +"HOME=/virt/home", NULL }; >> + >> +mkdir("/virt/home", 0755); > > Please add check

Re: [PATCH 5/7] kvm tools: enable LTO

2012-08-30 Thread Pekka Enberg
On Thu, Aug 30, 2012 at 11:22 AM, Cyrill Gorcunov wrote: > Maybe we could enable it via some make option? > Say make LTO=1 or something? That is not going to help much in catching LTO issues early. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to major

Re: [PATCH] Add a page cache-backed balloon device driver.

2012-08-30 Thread Michael S. Tsirkin
On Tue, Jun 26, 2012 at 01:32:58PM -0700, Frank Swiderski wrote: > +static void fill_balloon(struct virtio_balloon *vb, size_t num) > +{ > + int err; > + > + /* We can only do one array worth at a time. */ > + num = min(num, ARRAY_SIZE(vb->pfns)); > + > + for (vb->num_pfns = 0; vb->

Re: [PATCH 5/7] kvm tools: enable LTO

2012-08-30 Thread Cyrill Gorcunov
On Thu, Aug 30, 2012 at 10:33:21AM +0200, Sasha Levin wrote: > >>> > >>> Ingo, any objections to this? > >> > >> No objections if you can live with a 2x-4x increase in build > >> time - at worst it might cause funnies with the BIOS linker > >> script and such. > > > > Maybe we could enable it vi

Re: [PATCH 5/7] kvm tools: enable LTO

2012-08-30 Thread Sasha Levin
On 08/30/2012 10:22 AM, Cyrill Gorcunov wrote: > On Thu, Aug 30, 2012 at 10:16:54AM +0200, Ingo Molnar wrote: >> >> * Pekka Enberg wrote: >> >>> On Thu, Aug 30, 2012 at 10:36 AM, Sasha Levin >>> wrote: Build with -flto set, which should enable link-time-optimizations. I'm not sure

Re: [PATCH 5/7] kvm tools: enable LTO

2012-08-30 Thread Cyrill Gorcunov
On Thu, Aug 30, 2012 at 10:16:54AM +0200, Ingo Molnar wrote: > > * Pekka Enberg wrote: > > > On Thu, Aug 30, 2012 at 10:36 AM, Sasha Levin > > wrote: > > > Build with -flto set, which should enable link-time-optimizations. > > > > > > I'm not sure if it provides a significant performance incre

Re: [PATCH 5/7] kvm tools: enable LTO

2012-08-30 Thread Ingo Molnar
* Pekka Enberg wrote: > On Thu, Aug 30, 2012 at 10:36 AM, Sasha Levin wrote: > > Build with -flto set, which should enable link-time-optimizations. > > > > I'm not sure if it provides a significant performance increase, but > > it's probably just worth it for catching issues which it may cause.

Re: [PATCH 0/5] Multiqueue virtio-scsi

2012-08-30 Thread Stefan Hajnoczi
On Tue, Aug 28, 2012 at 01:54:12PM +0200, Paolo Bonzini wrote: > this series adds multiqueue support to the virtio-scsi driver, based > on Jason Wang's work on virtio-net. It uses a simple queue steering > algorithm that expects one queue per CPU. LUNs in the same target always > use the same que

Re: [PATCH 5/7] kvm tools: enable LTO

2012-08-30 Thread Pekka Enberg
On Thu, Aug 30, 2012 at 10:36 AM, Sasha Levin wrote: > Build with -flto set, which should enable link-time-optimizations. > > I'm not sure if it provides a significant performance increase, but > it's probably just worth it for catching issues which it may cause. > > Signed-off-by: Sasha Levin I

Re: [PATCH 1/7] kvm tools: add HOME env var to hostfs

2012-08-30 Thread Cyrill Gorcunov
On Thu, Aug 30, 2012 at 09:36:37AM +0200, Sasha Levin wrote: > + char *new_env[] = { "TERM=linux", "DISPLAY=192.168.33.1:0", > + "HOME=/virt/home", NULL }; > + > + mkdir("/virt/home", 0755); Please add check for mkdir error code. Frankly, this is a bad habbit to

[PATCH 7/7] kvm tools: simplify virtio config handling

2012-08-30 Thread Sasha Levin
Instead of a get/set for config values, just request the address of the config region, and handle that by simply reading directly from that region. Signed-off-by: Sasha Levin --- tools/kvm/include/kvm/virtio.h | 3 +-- tools/kvm/virtio/9p.c | 12 ++-- tools/kvm/virtio/balloon.c

[PATCH 6/7] kvm tools: 9p don't nuke fids on attach

2012-08-30 Thread Sasha Levin
We're not supposed to kill all fids when a new attach request arrives. This used to cause issues when the guest would send multiple attach requests. Signed-off-by: Sasha Levin --- tools/kvm/virtio/9p.c | 22 -- 1 file changed, 22 deletions(-) diff --git a/tools/kvm/virtio/9p

[PATCH 5/7] kvm tools: enable LTO

2012-08-30 Thread Sasha Levin
Build with -flto set, which should enable link-time-optimizations. I'm not sure if it provides a significant performance increase, but it's probably just worth it for catching issues which it may cause. Signed-off-by: Sasha Levin --- tools/kvm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 4/7] kvm tools: fix warnings in virtio-blk

2012-08-30 Thread Sasha Levin
Fix up warnings related to not checking return value of read/write by actually handling errors there. Signed-off-by: Sasha Levin --- tools/kvm/virtio/blk.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/kvm/virtio/blk.c b/tools/kvm/virtio/blk.c index 740442a

[PATCH 3/7] kvm tools: Use the new KVM_SIGNAL_MSI ioctl to inject interrupts directly.

2012-08-30 Thread Sasha Levin
We still create GSIs and keep them for two reasons: - They're required by virtio-* devices. - There's not much overhead since we just create them when starting the guest, they don't use anything when the guest is running. Signed-off-by: Sasha Levin --- tools/kvm/include/kvm/virtio-pci.h | 3

[PATCH 2/7] kvm tools: clean garbage from ioeventfd code

2012-08-30 Thread Sasha Levin
Signed-off-by: Sasha Levin --- tools/kvm/ioeventfd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/kvm/ioeventfd.c b/tools/kvm/ioeventfd.c index 226876f..742b008 100644 --- a/tools/kvm/ioeventfd.c +++ b/tools/kvm/ioeventfd.c @@ -44,7 +44,6 @@ static void *ioeventfd__thread(void *param)

[PATCH 1/7] kvm tools: add HOME env var to hostfs

2012-08-30 Thread Sasha Levin
Add a HOME env var when booting a hostfs guest. This will point out to a home dir within the given guest name. This will make several apps happier when being run under hostfs. Signed-off-by: Sasha Levin --- tools/kvm/guest/init.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff -