Re: virtio scsi host draft specification, v3

2011-07-01 Thread Paolo Bonzini
On 06/29/2011 11:39 AM, Stefan Hajnoczi wrote: Of course, when doing so we would be lose the ability to freely remap LUNs. But then remapping LUNs doesn't gain you much imho. Plus you could always use qemu block backend here if you want to hide the details. And you could always

[PATCH] tools/kvm: Use kernel header version of net/9p/9p.h

2011-07-01 Thread Aneesh Kumar K.V
don't do a copy of the kernel header Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- NOTE: This patch is against -tip. include/net/9p/9p.h |2 +- tools/kvm/include/net/9p/9p.h | 734 - 2 files changed, 1 insertions(+),

Re: virtio scsi host draft specification, v3

2011-07-01 Thread Hannes Reinecke
On 07/01/2011 08:41 AM, Paolo Bonzini wrote: On 06/29/2011 11:39 AM, Stefan Hajnoczi wrote: Of course, when doing so we would be lose the ability to freely remap LUNs. But then remapping LUNs doesn't gain you much imho. Plus you could always use qemu block backend here if you want to

Biweekly KVM Test report, kernel 2e0d8e28... qemu d5893103...

2011-07-01 Thread Ren, Yongjie
Hi All, This is KVM test result against kvm.git 2e0d8e289ef23d0e56923d778e9bea0601a0edb4 based on kernel 3.0.0-rc5+, and qemu-kvm.git d58931037dbb4fbc2fbb33858629d3fabfd1b0d4. We found a make error issue of qemu-kvm.git.  This issue was reported in qemu’s bugzilla by someone else. I commented

[PATCH 0/3] [v4] Megasas HBA emulation

2011-07-01 Thread Hannes Reinecke
Hi all, thanks to Paolo and Stefan most of the SCSI patches are now in, so I've made the next attempt of submitting my Megaraid SAS HBA emulation. To do so, I've done two additional patches, both should be valid cleanups. - Replace 'tag' by 'hba_private' The SCSIRequest structure has a 'tag',

[PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Hannes Reinecke
Occasionally, the buffer needs to be placed at a offset within the iovec when copying the buffer to the iovec. Signed-off-by: Hannes Reinecke h...@suse.de --- hw/virtio-net.c|2 +- hw/virtio-serial-bus.c |2 +- iov.c | 23 ++- iov.h

[PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer

2011-07-01 Thread Hannes Reinecke
'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer 'hba_private'. This saves the lookup for driver handling several commands in parallel. Signed-off-by: Hannes Reinecke h...@suse.de --- hw/esp.c

[PATCH 0/3] KVM test: Windows install fixes

2011-07-01 Thread Lucas Meneghel Rodrigues
These 3 patches fixes problems found when performing a full round of windows installs. Lucas Meneghel Rodrigues (3): KVM test: Render unattended files more properly KVM test: Update Win2003 CD info to match MSDN registers KVM test: Reformat sample windows ini style unattended files

[PATCH 2/3] KVM test: Update Win2003 CD info to match MSDN registers

2011-07-01 Thread Lucas Meneghel Rodrigues
Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/tests_base.cfg.sample | 44 +++ 1 files changed, 32 insertions(+), 12 deletions(-) diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample index

[PATCH 3/3] KVM test: Reformat sample windows ini style unattended files

2011-07-01 Thread Lucas Meneghel Rodrigues
If we prepend spaces on the key=value lines, ConfigParser will fail to parse the file. So let's reformat the files in a way that we won't have this problem again. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/unattended/win2000-32.sif | 95

Re: [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 09:42, Hannes Reinecke wrote: Occasionally, the buffer needs to be placed at a offset within the iovec when copying the buffer to the iovec. So this is a buffer into the iovec, right? Wouldn't it make sense to also modify iov_to_buf respectively then, so the API stays

Re: [PATCH kvm-unit-tests v2] access: check SMEP on prefetch pte path

2011-07-01 Thread Xiao Guangrong
On 06/29/2011 06:24 PM, Yang, Wei wrote: + + /* + * Here we write the ro user page when + * cr0.wp=0, then we execute it and SMEP + * fault should happen. + */ + err_prepare_notwp = ac_test_do_access(at1); + if (!err_prepare_notwp) { +

Re: [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Paolo Bonzini
On 07/01/2011 09:42 AM, Hannes Reinecke wrote: size_t iov_from_buf(struct iovec *iov, unsigned int iovcnt, -const void *buf, size_t size) +const void *buf, size_t offset, size_t size) Wrong commit subject, it seems. :) Paolo -- To unsubscribe from

Re: [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Hannes Reinecke
On 07/01/2011 10:03 AM, Paolo Bonzini wrote: On 07/01/2011 09:42 AM, Hannes Reinecke wrote: size_t iov_from_buf(struct iovec *iov, unsigned int iovcnt, - const void *buf, size_t size) + const void *buf, size_t offset, size_t size) Wrong commit subject, it seems. :) Bummer. Cheers, Hannes

Re: [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Hannes Reinecke
On 07/01/2011 10:02 AM, Alexander Graf wrote: On 01.07.2011, at 09:42, Hannes Reinecke wrote: Occasionally, the buffer needs to be placed at a offset within the iovec when copying the buffer to the iovec. So this is a buffer into the iovec, right? Wouldn't it make sense to also modify

[PATCH 1/3] KVM test: Render unattended files more properly

2011-07-01 Thread Lucas Meneghel Rodrigues
Windows2008 install program does not behave well when we specify dummy paths to alternate install drivers, unlike Windows Vista and Windows 7. This is enough motivation to rewrite the unattended install file rendering code, now: 1) XML files will be properly modified using an XML API 2) ini files

Re: [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 10:07, Hannes Reinecke wrote: On 07/01/2011 10:02 AM, Alexander Graf wrote: On 01.07.2011, at 09:42, Hannes Reinecke wrote: Occasionally, the buffer needs to be placed at a offset within the iovec when copying the buffer to the iovec. So this is a buffer into the

Re: [PATCH v3 7/9] KVM-GST: KVM Steal time accounting

2011-07-01 Thread Peter Zijlstra
On Thu, 2011-06-30 at 23:50 -0300, Glauber Costa wrote: I was under the impression that the proper use of jump labels required each label to be tied to a single location. If we make it inline, the same key would point to multiple locations, and we would have trouble altering all of the

Re: [PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer

2011-07-01 Thread Paolo Bonzini
On 07/01/2011 09:42 AM, Hannes Reinecke wrote: 'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer 'hba_private'. This saves the lookup for driver handling several commands in parallel. This

Re: [PATCH v3 7/9] KVM-GST: KVM Steal time accounting

2011-07-01 Thread Peter Zijlstra
On Thu, 2011-06-30 at 23:53 -0300, Glauber Costa wrote: On 06/30/2011 06:54 PM, Peter Zijlstra wrote: On Wed, 2011-06-29 at 11:29 -0400, Glauber Costa wrote: + if (static_branch(paravirt_steal_enabled)) { How is that going to compile on !CONFIG_PARAVIRT or !x86 in general? Only

Re: virtio scsi host draft specification, v3

2011-07-01 Thread Paolo Bonzini
On 07/01/2011 09:14 AM, Hannes Reinecke wrote: Actually, the kernel does _not_ do a LUN remapping. Not the kernel, the in-kernel target. The in-kernel target can and will map hardware LUNs (target_lun in drivers/target/*) to arbitrary LUNs (mapped_lun). Put in another way: the virtio-scsi

Re: [PATCH v2] staging: zcache: support multiple clients, prep for KVM and RAMster

2011-07-01 Thread Dan Carpenter
On Thu, Jun 30, 2011 at 04:28:14PM -0700, Dan Magenheimer wrote: Hi Dan -- Thanks for the careful review. You're right... some of this was leftover from debugging an off-by-one error, though the code as is still works. OTOH, there's a good chance that much of this sysfs code will

VT-d2 support inside Linux kernel

2011-07-01 Thread Cyclonus J
Hi, Is there any information I can find about VT-d2 support inside Linux kernel? It was marked as WIP on KVM todo list. In current top of tree, I am seeing some ats support for intel-iommu. Does that mean the ATS part is already finished? git log -p -1 93a23a72 commit

Re: [PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer

2011-07-01 Thread Hannes Reinecke
On 07/01/2011 10:27 AM, Paolo Bonzini wrote: On 07/01/2011 09:42 AM, Hannes Reinecke wrote: 'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer 'hba_private'. This saves the lookup for driver

Re: [PATCH 3/3] megasas: LSI Megaraid SAS emulation

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 09:42, Hannes Reinecke wrote: This patch adds an emulation for the LSI Megaraid SAS 8708EM2 HBA. Signed-off-by: Hannes Reinecke h...@suse.de --- Makefile.objs |1 + default-configs/pci.mak |1 + hw/megasas.c| 1923

[PATCH resend] compat_ioctl: fix warning caused by qemu

2011-07-01 Thread Johannes Stezenbach
On Linux x86_64 host with 32bit userspace, running qemu or even just qemu-img create -f qcow2 some.img 1G causes a kernel warning: ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(5326){t:'S';sz:0} arg(7fff) on some.img ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(801c0204){t:02;sz:28}

Re: [PATCH 01/17] KVM: PPC: Fix machine checks on 32-bit Book3S

2011-07-01 Thread Alexander Graf
On 29.06.2011, at 12:16, Paul Mackerras wrote: Commit 69acc0d3ba (KVM: PPC: Resolve real-mode handlers through function exports) resulted in vcpu-arch.trampoline_lowmem and vcpu-arch.trampoline_enter ending up with kernel virtual addresses rather than physical addresses. This is OK on

Re: [RFC PATCH 17/17] KVM: PPC: Add an ioctl for userspace to select which platform to emulate

2011-07-01 Thread Paul Mackerras
On Thu, Jun 30, 2011 at 05:04:23PM +0200, Alexander Graf wrote: On 06/29/2011 12:41 PM, Paul Mackerras wrote: +struct kvm_ppc_set_platform { +__u16 platform; /* defines the OS/hypervisor ABI */ +__u16 guest_arch; /* e.g. decimal 206 for v2.06 */ +__u32 flags;

Re: [RFC PATCH 17/17] KVM: PPC: Add an ioctl for userspace to select which platform to emulate

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 12:09, Paul Mackerras wrote: On Thu, Jun 30, 2011 at 05:04:23PM +0200, Alexander Graf wrote: On 06/29/2011 12:41 PM, Paul Mackerras wrote: +struct kvm_ppc_set_platform { + __u16 platform; /* defines the OS/hypervisor ABI */ + __u16 guest_arch; /* e.g.

Re: [PATCH v2 12/31] kvm tools: Add UDP support for uip

2011-07-01 Thread Ingo Molnar
* Asias He asias.he...@gmail.com wrote: +static void *uip_udp_socket_thread(void *p) +{ + struct epoll_event events[UIP_UDP_MAX_EVENTS]; + struct uip_udp_socket *sk; + struct uip_info *info; + struct uip_eth *eth2; + struct uip_udp *udp2; + struct uip_buf *buf; +

Re: [PATCH 05/17] KVM: PPC: Deliver program interrupts right away instead of queueing them

2011-07-01 Thread Alexander Graf
On 29.06.2011, at 12:18, Paul Mackerras wrote: Doing so means that we don't have to save the flags anywhere and gets rid of the last reference to to_book3s(vcpu) in arch/powerpc/kvm/book3s.c. Doing so is OK because a program interrupt won't be generated at the same time as any other

Re: [PATCH v2 00/31] Implement user mode network for kvm tools

2011-07-01 Thread Ingo Molnar
* Asias He asias.he...@gmail.com wrote: Usermode TCP/IP can be quite cumbersome for users as things like ping and ip6 won't work properly. Yes, usermode TCP/IP do have limits. But it's more cumbersome for user to setup bridge/nat thing with privileged networking. The network setup is

Re: [PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer

2011-07-01 Thread Hannes Reinecke
On 07/01/2011 10:27 AM, Paolo Bonzini wrote: On 07/01/2011 09:42 AM, Hannes Reinecke wrote: 'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer 'hba_private'. This saves the lookup for driver

Re: [PATCH v2 00/31] Implement user mode network for kvm tools

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 13:53, Ingo Molnar wrote: * Asias He asias.he...@gmail.com wrote: Usermode TCP/IP can be quite cumbersome for users as things like ping and ip6 won't work properly. Yes, usermode TCP/IP do have limits. But it's more cumbersome for user to setup bridge/nat thing

RE: [PATCH v2] staging: zcache: support multiple clients, prep for KVM and RAMster

2011-07-01 Thread Dan Magenheimer
From: Dan Carpenter [mailto:erro...@gmail.com] On Thu, Jun 30, 2011 at 04:28:14PM -0700, Dan Magenheimer wrote: Hi Dan -- Thanks for the careful review. You're right... some of this was leftover from debugging an off-by-one error, though the code as is still works. OTOH, there's

Re: [PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer

2011-07-01 Thread Paolo Bonzini
On 07/01/2011 03:11 PM, Hannes Reinecke wrote: On 07/01/2011 10:27 AM, Paolo Bonzini wrote: On 07/01/2011 09:42 AM, Hannes Reinecke wrote: 'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer

Re: [PATCH resend] compat_ioctl: fix warning caused by qemu

2011-07-01 Thread Arnd Bergmann
On Friday 01 July 2011, Johannes Stezenbach wrote: On Linux x86_64 host with 32bit userspace, running qemu or even just qemu-img create -f qcow2 some.img 1G causes a kernel warning: ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(5326){t:'S';sz:0} arg(7fff) on some.img

Re: [PATCH v2 12/31] kvm tools: Add UDP support for uip

2011-07-01 Thread Asias He
On 07/01/2011 07:46 PM, Ingo Molnar wrote: * Asias He asias.he...@gmail.com wrote: +static void *uip_udp_socket_thread(void *p) +{ +struct epoll_event events[UIP_UDP_MAX_EVENTS]; +struct uip_udp_socket *sk; +struct uip_info *info; +struct uip_eth *eth2; +struct

[PATCH 0/3] [v5] Megasas HBA Emulation

2011-07-01 Thread Hannes Reinecke
Hi all, after getting various feedback from Paolo, Stefan, and Alexander I've respun the patches. Chances since the previous version: - iov: Update parameter usage in iov_(to|from)_buf() Updated description for the first patch and clarified the usage Renamed arguments for io_XXX for

[PATCH 1/3] iov: Update parameter usage in iov_(to|from)_buf()

2011-07-01 Thread Hannes Reinecke
iov_to_buf() has an 'offset' parameter, iov_from_buf() hasn't. This patch adds the missing parameter to iov_from_buf(). It also renames the 'offset' parameter to 'iov_off' to emphasize it's the offset into the iovec and not the buffer. Signed-off-by: Hannes Reinecke h...@suse.de ---

[PATCH 2/3] scsi: Add 'hba_private' to SCSIRequest

2011-07-01 Thread Hannes Reinecke
'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer 'hba_private'. This saves the lookup for driver handling several commands in parallel. 'tag' is still being kept for tracing purposes.

Re: [PATCH 2/3] scsi: Add 'hba_private' to SCSIRequest

2011-07-01 Thread Paolo Bonzini
On 07/01/2011 05:35 PM, Hannes Reinecke wrote: 'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer 'hba_private'. This saves the lookup for driver handling several commands in parallel. 'tag' is

[PATCH] virt: Add more flexible way to specify comm ports host - guest

2011-07-01 Thread Lucas Meneghel Rodrigues
When running the virt guest windows tests using the (now default) autotest private bridge, noticed that some ports needed for host and guest communication weren't specified. So, add a config file knob to allow people to specify additional ports to be added to the default firewall configuration.

Re: [PATCH 1/3] iov: Update parameter usage in iov_(to|from)_buf()

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 17:35, Hannes Reinecke wrote: iov_to_buf() has an 'offset' parameter, iov_from_buf() hasn't. This patch adds the missing parameter to iov_from_buf(). It also renames the 'offset' parameter to 'iov_off' to emphasize it's the offset into the iovec and not the buffer.

Re: [PATCH 3/3] megasas: LSI Megaraid SAS emulation

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 17:35, Hannes Reinecke wrote: This patch adds an emulation for the LSI Megaraid SAS 8708EM2 HBA. Have you tried to execute the current version of megasas and actually do something with it? I just booted up openSUSE 11.4 rescue from DVD with a megasas adapter that contained

Re: [PATCH v2 00/31] Implement user mode network for kvm tools

2011-07-01 Thread Stefan Hajnoczi
On Fri, Jul 1, 2011 at 12:38 AM, Asias He asias.he...@gmail.com wrote: On 06/30/2011 04:56 PM, Stefan Hajnoczi wrote: On Thu, Jun 30, 2011 at 9:40 AM, Asias He asias.he...@gmail.com wrote: uip stands for user mode {TCP,UDP}/IP. Currently, uip supports ARP, ICMP, IPV4, UDP, TCP. So any network

Re: [PATCH v2] staging: zcache: support multiple clients, prep for KVM and RAMster

2011-07-01 Thread Dan Carpenter
On Fri, Jul 01, 2011 at 07:31:54AM -0700, Dan Magenheimer wrote: Off by one errors are kind of insidious. People cut and paste them and they spread. If someone adds a new list of chunks then there are now two examples that are correct and two which have an extra element, so it's 50/50

Re: [PATCH 0/17] Hypervisor-mode KVM on POWER7 and PPC970

2011-07-01 Thread Alexander Graf
On 29.06.2011, at 12:15, Paul Mackerras wrote: The first patch of the following series is a pure bug-fix for 32-bit kernels. The remainder of the following series of patches enable KVM to exploit the hardware hypervisor mode on 64-bit Power ISA Book3S machines. At present, POWER7 and

Re: [PATCH 10/17] KVM: PPC: Add support for Book3S processors in hypervisor mode

2011-07-01 Thread Dave Hansen
On Wed, 2011-06-29 at 20:21 +1000, Paul Mackerras wrote: +struct kvmppc_pginfo { + unsigned long pfn; + atomic_t refcnt; +}; I only see this refcnt inc'd in one spot and never decremented or read. Is the refcnt just the number of hptes we have for this particular page at the moment?

Re: [PATCH 10/17] KVM: PPC: Add support for Book3S processors in hypervisor mode

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 20:37, Dave Hansen wrote: On Wed, 2011-06-29 at 20:21 +1000, Paul Mackerras wrote: +struct kvmppc_pginfo { +unsigned long pfn; +atomic_t refcnt; +}; I only see this refcnt inc'd in one spot and never decremented or read. Is the refcnt just the number of hptes

Re: [PATCH resend] compat_ioctl: fix warning caused by qemu

2011-07-01 Thread Jens Axboe
On 2011-07-01 16:46, Arnd Bergmann wrote: Yes, that should be fine, unless Jens would like to see a different solution for the struct definitions, e.g. moving all of the floppy compat ioctl numbers to fd.h. I'm fine with it either way. Looks OK to me, I've queued it up for 3.1 with your ack.

Re: [PATCH v2 00/31] Implement user mode network for kvm tools

2011-07-01 Thread Pekka Enberg
On Fri, Jul 1, 2011 at 7:50 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Fri, Jul 1, 2011 at 12:38 AM, Asias He asias.he...@gmail.com wrote: On 06/30/2011 04:56 PM, Stefan Hajnoczi wrote: On Thu, Jun 30, 2011 at 9:40 AM, Asias He asias.he...@gmail.com wrote: uip stands for user mode

[PATCH v4 0/9] Steal time series again

2011-07-01 Thread Glauber Costa
Here follows the fourth version of the steal time series. Hope it is acceptable for all involved parties now. The main differences from v3 are: * The Changelogs seem to have been writen by an actual person now, not of a monkey. Yet, I am the aforementioned person, so don't expect much. * Forcing

[PATCH v4 4/9] KVM-HV: KVM Steal time implementation

2011-07-01 Thread Glauber Costa
To implement steal time, we need the hypervisor to pass the guest information about how much time was spent running other processes outside the VM, while the vcpu had meaningful work to do - halt time does not count. This information is acquired through the run_delay field of delayacct/schedstats

[PATCH v4 2/9] KVM-HDR Add constant to represent KVM MSRs enabled bit

2011-07-01 Thread Glauber Costa
This patch is simple, put in a different commit so it can be more easily shared between guest and hypervisor. It just defines a named constant to indicate the enable bit for KVM-specific MSRs. Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge

[PATCH v4 8/9] KVM-GST: adjust scheduler cpu power

2011-07-01 Thread Glauber Costa
This patch makes update_rq_clock() aware of steal time. The mechanism of operation is not different from irq_time, and follows the same principles. This lives in a CONFIG option itself, and can be compiled out independently of the rest of steal time reporting. The effect of disabling it is that

[PATCH v4 1/9] introduce kvm_read_guest_cached

2011-07-01 Thread Glauber Costa
From: Gleb Natapov g...@redhat.com Introduce kvm_read_guest_cached() function in addition to write one we already have. [ by glauber: export function signature in kvm header ] Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Glauber Costa glom...@redhat.com ---

[PATCH v4 5/9] KVM-GST: Add a pv_ops stub for steal time

2011-07-01 Thread Glauber Costa
This patch adds a function pointer in one of the many paravirt_ops structs, to allow guests to register a steal time function. Besides a steal time function, we also declare two jump_labels. They will be used to allow the steal time code to be easily bypassed when not in use. Signed-off-by:

[PATCH v4 6/9] add jump labels for ia64 paravirt

2011-07-01 Thread Glauber Costa
Since in a later patch I intend to call jump labels inside CONFIG_PARAVIRT, IA64 would fail to compile if they are not provided. This patch provides those jump labels for the IA64 architecture. Signed-off-by: Glauber Costa glom...@redhat.com CC: Isaku Yamahata yamah...@valinux.co.jp CC: Eddie

[PATCH v4 7/9] KVM-GST: KVM Steal time accounting

2011-07-01 Thread Glauber Costa
This patch accounts steal time time in account_process_tick. If one or more tick is considered stolen in the current accounting cycle, user/system accounting is skipped. Idle is fine, since the hypervisor does not report steal time if the guest is halted. Accounting steal time from the core

[PATCH v4 9/9] KVM-GST: KVM Steal time registration

2011-07-01 Thread Glauber Costa
This patch implements the kvm bits of the steal time infrastructure. The most important part of it, is the steal time clock. It is an continuous clock that shows the accumulated amount of steal time since vcpu creation. It is supposed to survive cpu offlining/onlining. Signed-off-by: Glauber

[PATCH v4 3/9] KVM-HDR: KVM Steal time implementation

2011-07-01 Thread Glauber Costa
To implement steal time, we need the hypervisor to pass the guest information about how much time was spent running other processes outside the VM. This is per-vcpu, and using the kvmclock structure for that is an abuse we decided not to make. In this patchset, I am introducing a new msr,

[PATCH v2 1/8] kvm tools: Don't dynamically allocate threadpool jobs

2011-07-01 Thread Sasha Levin
To allow efficient use of shorter-term threadpool jobs, don't allocate them dynamically upon creation. Instead, store them within 'job' structures. This will prevent some overhead creating/destroying jobs which live for a short time. Signed-off-by: Sasha Levin levinsasha...@gmail.com ---

[PATCH v2 2/8] kvm tools: Process virtio-blk requests in parallel

2011-07-01 Thread Sasha Levin
Process multiple requests within a virtio-blk device's vring in parallel. Doing so may improve performance in cases when a request which can be completed using data which is present in a cache is queued after a request with un-cached data. bonnie++ benchmarks have shown a 6% improvement with

[PATCH v2 3/8] kvm tools: Allow giving instance names

2011-07-01 Thread Sasha Levin
This will allow tracking instance names and sending commands to specific instances if multiple instances are running. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/kvm.h |5 +++- tools/kvm/kvm-run.c |5 +++- tools/kvm/kvm.c | 56

[PATCH v2 5/8] kvm tools: Provide instance name when running 'kvm pause'

2011-07-01 Thread Sasha Levin
Instead of sending a signal to the first instance found, send it to a specific instance. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm-pause.c | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/kvm/kvm-pause.c

[PATCH v2 4/8] kvm tools: Provide instance name when running 'kvm debug'

2011-07-01 Thread Sasha Levin
Instead of sending a signal to the first instance found, send it to a specific instance. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm-debug.c | 19 +++ 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tools/kvm/kvm-debug.c

[PATCH v2 6/8] kvm tools: Add virtio-balloon device

2011-07-01 Thread Sasha Levin
From the virtio spec: The virtio memory balloon device is a primitive device for managing guest memory: the device asks for a certain amount of memory, and the guest supplies it (or withdraws it, if the device has more than it asks for). This allows the guest to adapt to changes in allowance of

[PATCH v2 8/8] kvm tools: Add 'kvm balloon' command

2011-07-01 Thread Sasha Levin
Add a command to allow easily inflate/deflate the balloon driver in running instances. Usage: kvm balloon [command] [instance name] [size] command is either inflate or deflate, and size is represented in MB. Target instance must be named (started with '--name'). Signed-off-by: Sasha Levin

[PATCH 9/9] kvm tools: Stop VCPUs before freeing struct kvm

2011-07-01 Thread Sasha Levin
Not stopping VCPUs before leads to seg faults and other errors due to synchronization between threads. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/term.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/kvm/term.c b/tools/kvm/term.c index

[PATCH v2 7/8] kvm tools: Advise memory allocated for guest RAM as KSM mergable

2011-07-01 Thread Sasha Levin
Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index 23d31a3..2f5d633 100644 --- a/tools/kvm/kvm.c +++ b/tools/kvm/kvm.c @@ -346,6 +346,8 @@ struct kvm

[PATCH] virtio_balloon: Notify guest only after deflating the balloon

2011-07-01 Thread Sasha Levin
Unless the host requires that requested pages won't be used until he us notified (VIRTIO_BALLOON_F_MUST_TELL_HOST), only notify after deflating the balloon. This will avoid having to take an exit before actually using the pages. Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin

Re: [PATCH v2 00/31] Implement user mode network for kvm tools

2011-07-01 Thread Asias He
On 07/02/2011 04:36 AM, Pekka Enberg wrote: On Fri, Jul 1, 2011 at 7:50 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Fri, Jul 1, 2011 at 12:38 AM, Asias He asias.he...@gmail.com wrote: On 06/30/2011 04:56 PM, Stefan Hajnoczi wrote: On Thu, Jun 30, 2011 at 9:40 AM, Asias He

Re: [RFC PATCH 17/17] KVM: PPC: Add an ioctl for userspace to select which platform to emulate

2011-07-01 Thread Paul Mackerras
On Thu, Jun 30, 2011 at 05:04:23PM +0200, Alexander Graf wrote: On 06/29/2011 12:41 PM, Paul Mackerras wrote: +struct kvm_ppc_set_platform { +__u16 platform; /* defines the OS/hypervisor ABI */ +__u16 guest_arch; /* e.g. decimal 206 for v2.06 */ +__u32 flags;

Re: [PATCH 05/17] KVM: PPC: Deliver program interrupts right away instead of queueing them

2011-07-01 Thread Alexander Graf
On 29.06.2011, at 12:18, Paul Mackerras wrote: Doing so means that we don't have to save the flags anywhere and gets rid of the last reference to to_book3s(vcpu) in arch/powerpc/kvm/book3s.c. Doing so is OK because a program interrupt won't be generated at the same time as any other

Re: [PATCH 0/17] Hypervisor-mode KVM on POWER7 and PPC970

2011-07-01 Thread Alexander Graf
On 29.06.2011, at 12:15, Paul Mackerras wrote: The first patch of the following series is a pure bug-fix for 32-bit kernels. The remainder of the following series of patches enable KVM to exploit the hardware hypervisor mode on 64-bit Power ISA Book3S machines. At present, POWER7 and