Re: [uq/master PATCH] kvmvapic: add ioport read accessor

2013-05-06 Thread Jan Kiszka
On 2013-05-05 22:51, Marcelo Tosatti wrote: Necessary since memory region accessor assumes read and write methods are registered. Otherwise reading I/O port 0x7e segfaults. https://bugzilla.redhat.com/show_bug.cgi?id=954306 Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[PATCH v2 02/13] nEPT: Move gpte_access() and prefetch_invalid_gpte() to paging_tmpl.h

2013-05-06 Thread Jun Nakajima
For preparation, we just move gpte_access() and prefetch_invalid_gpte() from mmu.c to paging_tmpl.h. Signed-off-by: Nadav Har'El n...@il.ibm.com Signed-off-by: Jun Nakajima jun.nakaj...@intel.com Signed-off-by: Xinhao Xu xinhao...@intel.com --- arch/x86/kvm/mmu.c | 30

[PATCH v2 01/13] nEPT: Support LOAD_IA32_EFER entry/exit controls for L1

2013-05-06 Thread Jun Nakajima
Recent KVM, since http://kerneltrap.org/mailarchive/linux-kvm/2010/5/2/6261577 switch the EFER MSR when EPT is used and the host and guest have different NX bits. So if we add support for nested EPT (L1 guest using EPT to run L2) and want to be able to run recent KVM as L1, we need to allow L1 to

[PATCH v2 03/13] nEPT: Add EPT tables support to paging_tmpl.h

2013-05-06 Thread Jun Nakajima
This is the first patch in a series which adds nested EPT support to KVM's nested VMX. Nested EPT means emulating EPT for an L1 guest so that L1 can use EPT when running a nested guest L2. When L1 uses EPT, it allows the L2 guest to set its own cr3 and take its own page faults without either of L0

[PATCH v2 04/13] nEPT: Define EPT-specific link_shadow_page()

2013-05-06 Thread Jun Nakajima
Since link_shadow_page() is used by a routine in mmu.c, add an EPT-specific link_shadow_page() in paging_tmp.h, rather than moving it. Signed-off-by: Nadav Har'El n...@il.ibm.com Signed-off-by: Jun Nakajima jun.nakaj...@intel.com Signed-off-by: Xinhao Xu xinhao...@intel.com ---

[PATCH v2 05/13] nEPT: MMU context for nested EPT

2013-05-06 Thread Jun Nakajima
KVM's existing shadow MMU code already supports nested TDP. To use it, we need to set up a new MMU context for nested EPT, and create a few callbacks for it (nested_ept_*()). This context should also use the EPT versions of the page table access functions (defined in the previous patch). Then, we

[PATCH v2 06/13] nEPT: Fix cr3 handling in nested exit and entry

2013-05-06 Thread Jun Nakajima
The existing code for handling cr3 and related VMCS fields during nested exit and entry wasn't correct in all cases: If L2 is allowed to control cr3 (and this is indeed the case in nested EPT), during nested exit we must copy the modified cr3 from vmcs02 to vmcs12, and we forgot to do so. This

[PATCH v2 07/13] nEPT: Fix wrong test in kvm_set_cr3

2013-05-06 Thread Jun Nakajima
kvm_set_cr3() attempts to check if the new cr3 is a valid guest physical address. The problem is that with nested EPT, cr3 is an *L2* physical address, not an L1 physical address as this test expects. As the comment above this test explains, it isn't necessary, and doesn't correspond to anything

[PATCH v2 08/13] nEPT: Some additional comments

2013-05-06 Thread Jun Nakajima
Some additional comments to preexisting code: Explain who (L0 or L1) handles EPT violation and misconfiguration exits. Don't mention shadow on either EPT or shadow as the only two options. Signed-off-by: Nadav Har'El n...@il.ibm.com Signed-off-by: Jun Nakajima jun.nakaj...@intel.com

[PATCH v2 09/13] nEPT: Advertise EPT to L1

2013-05-06 Thread Jun Nakajima
Advertise the support of EPT to the L1 guest, through the appropriate MSR. This is the last patch of the basic Nested EPT feature, so as to allow bisection through this patch series: The guest will not see EPT support until this last patch, and will not attempt to use the half-applied feature.

[PATCH v2 10/13] nEPT: Nested INVEPT

2013-05-06 Thread Jun Nakajima
If we let L1 use EPT, we should probably also support the INVEPT instruction. In our current nested EPT implementation, when L1 changes its EPT table for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in the course of this modification already calls INVEPT. Therefore, when L1

[PATCH v2 11/13] nEPT: Miscelleneous cleanups

2013-05-06 Thread Jun Nakajima
Some trivial code cleanups not really related to nested EPT. Signed-off-by: Nadav Har'El n...@il.ibm.com Signed-off-by: Jun Nakajima jun.nakaj...@intel.com Signed-off-by: Xinhao Xu xinhao...@intel.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- arch/x86/kvm/vmx.c | 6 ++ 1 file

[PATCH v2 12/13] nEPT: Move is_rsvd_bits_set() to paging_tmpl.h

2013-05-06 Thread Jun Nakajima
Move is_rsvd_bits_set() to paging_tmpl.h so that it can be used to check reserved bits in EPT page table entries as well. Signed-off-by: Jun Nakajima jun.nakaj...@intel.com Signed-off-by: Xinhao Xu xinhao...@intel.com --- arch/x86/kvm/mmu.c | 8 arch/x86/kvm/paging_tmpl.h | 12

[PATCH v2 13/13] nEPT: Inject EPT violation/misconfigration

2013-05-06 Thread Jun Nakajima
Add code to detect EPT misconfiguration and inject it to L1 VMM. Also, it injects more correct exit qualification upon EPT violation to L1 VMM. Now L1 can correctly go to ept_misconfig handler (instead of wrongly going to fast_page_fault), it will try to handle mmio page fault, if failed, it is a

Re: [PATCH v2 01/13] nEPT: Support LOAD_IA32_EFER entry/exit controls for L1

2013-05-06 Thread Jan Kiszka
On 2013-05-06 09:04, Jun Nakajima wrote: Recent KVM, since http://kerneltrap.org/mailarchive/linux-kvm/2010/5/2/6261577 switch the EFER MSR when EPT is used and the host and guest have different NX bits. So if we add support for nested EPT (L1 guest using EPT to run L2) and want to be able to

[PATCH 4/5] powerpc/vfio: Implement IOMMU driver for VFIO

2013-05-06 Thread aik
From: Alexey Kardashevskiy a...@ozlabs.ru VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or direct mapping when possible) and IRQ signaling. The platform dependent part includes IOMMU initialization and handling. This implements

[PATCH 5/5] powerpc/vfio: Enable on pSeries platform

2013-05-06 Thread aik
From: Alexey Kardashevskiy a...@ozlabs.ru The enables VFIO on the pSeries platform, enabling user space programs to access PCI devices directly. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Paul Mackerras pau...@samba.org ---

[PATCH 0/5] VFIO PPC64: add VFIO support on POWERPC64

2013-05-06 Thread aik
From: Alexey Kardashevskiy a...@ozlabs.ru The series adds support for VFIO on POWERPC in user space (such as QEMU). The in-kernel real mode IOMMU support is added by another series posted separately. As the first and main aim of this series is the POWERNV platform support, the Enable on POWERNV

[PATCH 1/5] iommu: Move initialization earlier

2013-05-06 Thread aik
From: Alexey Kardashevskiy a...@ozlabs.ru The iommu_init() call initializes IOMMU internal structures and data required for the API to function such as iommu_group_alloc(). It is registered as a subsys_initcall. One of the IOMMU users is a PCI subsystem on POWER which discovers new IOMMU tables

[PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-05-06 Thread aik
From: Alexey Kardashevskiy a...@ozlabs.ru The IOMMU API implements groups creating/deletion, device binding and IOMMU map/unmap operations. The PowerPC implementation uses most of the API except map/unmap operations, which are implemented on POWER using hypercalls. However, in order to link a

[PATCH 3/5] powerpc/vfio: Enable on POWERNV platform

2013-05-06 Thread aik
From: Alexey Kardashevskiy a...@ozlabs.ru This initializes IOMMU groups based on the IOMMU configuration discovered during the PCI scan on POWERNV (POWER non virtualized) platform. The IOMMU groups are to be used later by the VFIO driver, which is used for PCI pass through. It also implements

[PATCH 0/6] KVM: PPC: IOMMU in-kernel handling

2013-05-06 Thread Alexey Kardashevskiy
This series is supposed to accelerate IOMMU operations in real and virtual mode in the host kernel for the KVM guest. The first user is VFIO however this series does not contain any VFIO related code as the connection between VFIO and the new handlers is to be made in QEMU via ioctl to the KVM

[PATCH 1/6] KVM: PPC: Make lookup_linux_pte public

2013-05-06 Thread Alexey Kardashevskiy
The lookup_linux_pte() function returns a linux PTE which is needed in the process of converting KVM guest physical address into host real address in real mode. This conversion will be used by upcoming support of H_PUT_TCE_INDIRECT, as the TCE list address comes from the guest and is a guest

[PATCH 3/6] powerpc: Prepare to support kernel handling of IOMMU map/unmap

2013-05-06 Thread Alexey Kardashevskiy
The current VFIO-on-POWER implementation supports only user mode driven mapping, i.e. QEMU is sending requests to map/unmap pages. However this approach is really slow, so we want to move that to KVM. Since H_PUT_TCE can be extremely performance sensitive (especially with network adapters where

[PATCH 4/6] iommu: Add a function to find an iommu group by id

2013-05-06 Thread Alexey Kardashevskiy
As IOMMU groups are exposed to the user space by their numbers, the user space can use them in various kernel APIs so the kernel might need an API to find a group by its ID. As an example, QEMU VFIO on PPC64 platform needs it to associate a logical bus number (LIOBN) with a specific IOMMU group

[PATCH 5/6] KVM: PPC: Add support for IOMMU in-kernel handling

2013-05-06 Thread Alexey Kardashevskiy
This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT and H_STUFF_TCE requests without passing them to QEMU, which should save time on switching to QEMU and back. Both real and virtual modes are supported - whenever the kernel fails to handle TCE request, it passes it to the virtual

[PATCH 2/6] KVM: PPC: Add support for multiple-TCE hcalls

2013-05-06 Thread Alexey Kardashevskiy
This adds real mode handlers for the H_PUT_TCE_INDIRECT and H_STUFF_TCE hypercalls for QEMU emulated devices such as virtio devices or emulated PCI. These calls allow adding multiple entries (up to 512) into the TCE table in one call which saves time on transition to/from real mode. This adds a

[PATCH 6/6] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-05-06 Thread Alexey Kardashevskiy
This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off) so we added a list of huge pages. It is populated in virtual mode and get_page is called just once per a huge page. Real mode handlers check if the

Re: [PATCH 0/3] vhost cleanups and separate module

2013-05-06 Thread Rusty Russell
Asias He as...@redhat.com writes: Asias He (3): vhost: Remove vhost_enable_zcopy in vhost.h vhost: Move VHOST_NET_FEATURES to net.c vhost: Make vhost a separate module I like these cleanups, MST pleasee apply. I have some other cleanups which are on hold for the moment pending MST's

Re: [PATCH 0/3] vhost cleanups and separate module

2013-05-06 Thread Asias He
Hello Rusty, On Mon, May 06, 2013 at 03:41:36PM +0930, Rusty Russell wrote: Asias He as...@redhat.com writes: Asias He (3): vhost: Remove vhost_enable_zcopy in vhost.h vhost: Move VHOST_NET_FEATURES to net.c vhost: Make vhost a separate module I like these cleanups, MST pleasee

Re: [PATCH 4/4] vhost-net: Cleanup vhost_ubuf adn vhost_zcopy

2013-05-06 Thread Michael S. Tsirkin
Typo a/adn/and/ On Fri, May 03, 2013 at 02:25:18PM +0800, Asias He wrote: - Rename vhost_ubuf to vhost_net_ubuf - Rename vhost_zcopy_mask to vhost_net_zcopy_mask - Make funcs static Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/net.c | 58

Re: [PATCH 4/4] vhost-net: Cleanup vhost_ubuf adn vhost_zcopy

2013-05-06 Thread Asias He
On Mon, May 6, 2013 at 4:17 PM, Michael S. Tsirkin m...@redhat.com wrote: Typo a/adn/and/ Yes. Catched this up and and fixed already. On Fri, May 03, 2013 at 02:25:18PM +0800, Asias He wrote: - Rename vhost_ubuf to vhost_net_ubuf - Rename vhost_zcopy_mask to vhost_net_zcopy_mask - Make

[PATCH v2 00/11] vhost cleanups

2013-05-06 Thread Asias He
MST, This is on top of [PATCH 0/2] vhost-net fix ubuf. Asias He (11): vhost: Remove vhost_enable_zcopy in vhost.h vhost: Move VHOST_NET_FEATURES to net.c vhost: Make vhost a separate module vhost: Remove comments for hdr in vhost.h vhost: Simplify dev-vqs[i] access vhost-net: Cleanup

[PATCH v2 01/11] vhost: Remove vhost_enable_zcopy in vhost.h

2013-05-06 Thread Asias He
It is net.c specific. Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/vhost.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index cc23bc4..076c9ac 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -192,7 +192,4 @@

[PATCH v2 02/11] vhost: Move VHOST_NET_FEATURES to net.c

2013-05-06 Thread Asias He
vhost.h should not depend on device specific marcos like VHOST_NET_F_VIRTIO_NET_HDR and VIRTIO_NET_F_MRG_RXBUF. Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/net.c | 6 ++ drivers/vhost/vhost.h | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH v2 03/11] vhost: Make vhost a separate module

2013-05-06 Thread Asias He
Currently, vhost-net and vhost-scsi are sharing the vhost core code. However, vhost-scsi shares the code by including the vhost.c file directly. Making vhost a separate module makes it is easier to share code with other vhost devices. Signed-off-by: Asias He as...@redhat.com ---

[PATCH v2 04/11] vhost: Remove comments for hdr in vhost.h

2013-05-06 Thread Asias He
It is supposed to be removed when hdr is moved into vhost_net_virtqueue. Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/vhost.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 94a80eb..51aeb5f 100644 ---

[PATCH v2 05/11] vhost: Simplify dev-vqs[i] access

2013-05-06 Thread Asias He
Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/vhost.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index e406d5f..74bc779 100644 --- a/drivers/vhost/vhost.c +++

[PATCH v2 06/11] vhost-net: Cleanup vhost_ubuf and vhost_zcopy

2013-05-06 Thread Asias He
- Rename vhost_ubuf to vhost_net_ubuf - Rename vhost_zcopy_mask to vhost_net_zcopy_mask - Make funcs static Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/net.c | 58 +++-- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git

[PATCH v2 07/11] vhost-scsi: Remove unnecessary forward struct vhost_scsi declaration

2013-05-06 Thread Asias He
It was needed when struct tcm_vhost_tpg is in tcm_vhost.h Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/scsi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 2dcb94a..02ddedd 100644 --- a/drivers/vhost/scsi.c +++

[PATCH v2 08/11] vhost-scsi: Rename struct vhost_scsi *s to *vs

2013-05-06 Thread Asias He
vs is used everywhere, make the naming more consistent. Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/scsi.c | 56 ++-- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index

[PATCH v2 09/11] vhost-scsi: Make func indention more consistent

2013-05-06 Thread Asias He
Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/scsi.c | 154 +-- 1 file changed, 88 insertions(+), 66 deletions(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index d4798e1..d9781ed 100644 --- a/drivers/vhost/scsi.c +++

[PATCH v2 10/11] vhost-scsi: Rename struct tcm_vhost_tpg *tv_tpg to *tpg

2013-05-06 Thread Asias He
Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/scsi.c | 122 +-- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index d9781ed..353145f 100644 --- a/drivers/vhost/scsi.c +++

[PATCH v2 11/11] vhost-scsi: Rename struct tcm_vhost_cmd *tv_cmd to *cmd

2013-05-06 Thread Asias He
This way, we use cmd for struct tcm_vhost_cmd and evt for struct tcm_vhost_cmd. Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/scsi.c | 142 +-- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/drivers/vhost/scsi.c

Re: [PATCH v2 00/11] vhost cleanups

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 04:38:18PM +0800, Asias He wrote: MST, This is on top of [PATCH 0/2] vhost-net fix ubuf. Acked-by: Michael S. Tsirkin m...@redhat.com Once -rc1 is out I'll fork -next and apply them. Thanks a lot! Nicholas, recently attempts to push patches through both net and target

Re: [PATCH 0/3] vhost cleanups and separate module

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 03:41:36PM +0930, Rusty Russell wrote: Asias He as...@redhat.com writes: Asias He (3): vhost: Remove vhost_enable_zcopy in vhost.h vhost: Move VHOST_NET_FEATURES to net.c vhost: Make vhost a separate module I like these cleanups, MST pleasee apply.

Re: [PATCH v2 03/11] vhost: Make vhost a separate module

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 04:38:21PM +0800, Asias He wrote: Currently, vhost-net and vhost-scsi are sharing the vhost core code. However, vhost-scsi shares the code by including the vhost.c file directly. Making vhost a separate module makes it is easier to share code with other vhost

Re: [PATCH v2 03/11] vhost: Make vhost a separate module

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 04:38:21PM +0800, Asias He wrote: Currently, vhost-net and vhost-scsi are sharing the vhost core code. However, vhost-scsi shares the code by including the vhost.c file directly. Making vhost a separate module makes it is easier to share code with other vhost

Re: [PATCH v2 00/11] vhost cleanups

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 04:38:18PM +0800, Asias He wrote: MST, This is on top of [PATCH 0/2] vhost-net fix ubuf. Okay, how about making EVENT_IDX work for virtio-scsi? I'm guessing it's some messup with feature negotiation, that's what all event-idx bugs came down to so far. Asias He (11):

Re: virtio performance analysis

2013-05-06 Thread Michael S. Tsirkin
On Thu, May 02, 2013 at 09:13:29AM +0530, nitesh narayan lal wrote: Hi, I am currently working on the virtio performance analysis in PowerPC . That's nice. I was looking at the virtio front-end code and had done tracing by adding WARN_ON condition in skb_recv_done(),xmit_skb_done( ) and

Re: [PATCH v2 06/11] vhost-net: Cleanup vhost_ubuf and vhost_zcopy

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 04:38:24PM +0800, Asias He wrote: - Rename vhost_ubuf to vhost_net_ubuf - Rename vhost_zcopy_mask to vhost_net_zcopy_mask - Make funcs static Signed-off-by: Asias He as...@redhat.com OK this actually fixes a warning introduced by patch 1, so I'll pull this in too

[PATCH] vhost: drop virtio_net.h dependency

2013-05-06 Thread Michael S. Tsirkin
There's no net specific code in vhost.c anymore, don't include the virtio_net.h header. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- This is on top of Asias' patches, already queued so just FYI. drivers/vhost/vhost.c | 1 - 1 file changed, 1 deletion(-) diff --git

Re: [PATCH v17 RESEND] pvpanic: pvpanic device driver

2013-05-06 Thread Marcelo Tosatti
On Mon, May 06, 2013 at 11:39:35AM +0800, Hu Tao wrote: On Fri, May 03, 2013 at 06:59:18PM -0300, Marcelo Tosatti wrote: On Fri, May 03, 2013 at 10:47:10AM +0800, Hu Tao wrote: pvpanic device is a qemu simulated device through which guest panic event is sent to host. Signed-off-by:

Re: [uq/master PATCH] kvmvapic: add ioport read accessor

2013-05-06 Thread Gleb Natapov
On Sun, May 05, 2013 at 05:51:49PM -0300, Marcelo Tosatti wrote: Necessary since memory region accessor assumes read and write methods are registered. Otherwise reading I/O port 0x7e segfaults. https://bugzilla.redhat.com/show_bug.cgi?id=954306 Signed-off-by: Marcelo Tosatti

Re: [PATCH v2 00/11] vhost cleanups

2013-05-06 Thread Asias He
On Mon, May 06, 2013 at 01:07:46PM +0300, Michael S. Tsirkin wrote: On Mon, May 06, 2013 at 04:38:18PM +0800, Asias He wrote: MST, This is on top of [PATCH 0/2] vhost-net fix ubuf. Okay, how about making EVENT_IDX work for virtio-scsi? I'm guessing it's some messup with feature negotiation,

Re: [PATCH] vhost: drop virtio_net.h dependency

2013-05-06 Thread Asias He
On Mon, May 06, 2013 at 01:37:34PM +0300, Michael S. Tsirkin wrote: There's no net specific code in vhost.c anymore, don't include the virtio_net.h header. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Asias He as...@redhat.com --- This is on top of Asias' patches,

Re: [PATCH v2 03/11] vhost: Make vhost a separate module

2013-05-06 Thread Asias He
On Mon, May 06, 2013 at 01:03:42PM +0300, Michael S. Tsirkin wrote: On Mon, May 06, 2013 at 04:38:21PM +0800, Asias He wrote: Currently, vhost-net and vhost-scsi are sharing the vhost core code. However, vhost-scsi shares the code by including the vhost.c file directly. Making vhost a

Re: [PATCH v4 4/6] KVM: MMU: fast invalid all shadow pages

2013-05-06 Thread Gleb Natapov
On Mon, May 06, 2013 at 11:39:11AM +0800, Xiao Guangrong wrote: On 05/04/2013 08:52 AM, Marcelo Tosatti wrote: On Sat, May 04, 2013 at 12:51:06AM +0800, Xiao Guangrong wrote: On 05/03/2013 11:53 PM, Marcelo Tosatti wrote: On Fri, May 03, 2013 at 01:52:07PM +0800, Xiao Guangrong wrote: On

[PATCH 0/1] [PULL] qemu-kvm.git uq/master queue

2013-05-06 Thread Gleb Natapov
Anthony please pull if it is not too later for 1.5. The following changes since commit 467b34689d277fa56c09ad07ca0f08d7d7539f6d: Update OpenBIOS images (2013-05-05 09:53:22 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master for you

[PATCH 1/1] kvmvapic: add ioport read accessor

2013-05-06 Thread Gleb Natapov
From: Marcelo Tosatti mtosa...@redhat.com Necessary since memory region accessor assumes read and write methods are registered. Otherwise reading I/O port 0x7e segfaults. https://bugzilla.redhat.com/show_bug.cgi?id=954306 Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Reviewed-by: Jan

Re: [PATCH v4 4/6] KVM: MMU: fast invalid all shadow pages

2013-05-06 Thread Xiao Guangrong
On 05/06/2013 08:36 PM, Gleb Natapov wrote: Step 1) Fix kvm_mmu_zap_all's behaviour: introduce lockbreak via spin_needbreak. Use generation numbers so that in case kvm_mmu_zap_all releases mmu_lock and reacquires it again, only shadow pages from the generation with which kvm_mmu_zap_all

Re: [PATCH v2 00/11] vhost cleanups

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 08:05:26PM +0800, Asias He wrote: On Mon, May 06, 2013 at 01:07:46PM +0300, Michael S. Tsirkin wrote: On Mon, May 06, 2013 at 04:38:18PM +0800, Asias He wrote: MST, This is on top of [PATCH 0/2] vhost-net fix ubuf. Okay, how about making EVENT_IDX work for

Re: [PATCH v17 RESEND] pvpanic: pvpanic device driver

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 13:38, Marcelo Tosatti ha scritto: On Mon, May 06, 2013 at 11:39:35AM +0800, Hu Tao wrote: On Fri, May 03, 2013 at 06:59:18PM -0300, Marcelo Tosatti wrote: On Fri, May 03, 2013 at 10:47:10AM +0800, Hu Tao wrote: pvpanic device is a qemu simulated device through which guest panic

Re: [PATCH v2 00/11] vhost cleanups

2013-05-06 Thread Asias He
On Mon, May 06, 2013 at 04:15:35PM +0300, Michael S. Tsirkin wrote: On Mon, May 06, 2013 at 08:05:26PM +0800, Asias He wrote: On Mon, May 06, 2013 at 01:07:46PM +0300, Michael S. Tsirkin wrote: On Mon, May 06, 2013 at 04:38:18PM +0800, Asias He wrote: MST, This is on top of [PATCH 0/2]

Re: [PATCH] vhost: drop virtio_net.h dependency

2013-05-06 Thread Asias He
On Mon, May 06, 2013 at 01:37:34PM +0300, Michael S. Tsirkin wrote: There's no net specific code in vhost.c anymore, don't include the virtio_net.h header. Did you push the it to your tree. I am not seeing it. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- This is on top of Asias'

Re: [v1][KVM][PATCH 1/1] kvm:ppc: enable doorbell exception with E500MC

2013-05-06 Thread Alexander Graf
On 05/06/2013 04:53 AM, Tiejun Chen wrote: Actually E500MC also support doorbell exception, and CONFIG_PPC_E500MC can cover BOOK3E/BOOK3E_64 as well. Signed-off-by: Tiejun Chentiejun.c...@windriver.com --- arch/powerpc/kvm/booke.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

KVM call agenda for 2013-05-07

2013-05-06 Thread Juan Quintela
Hi Please send in any agenda topics you are interested in. Later, Juan. -- 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 v4 4/6] KVM: MMU: fast invalid all shadow pages

2013-05-06 Thread Gleb Natapov
On Mon, May 06, 2013 at 09:10:11PM +0800, Xiao Guangrong wrote: On 05/06/2013 08:36 PM, Gleb Natapov wrote: Step 1) Fix kvm_mmu_zap_all's behaviour: introduce lockbreak via spin_needbreak. Use generation numbers so that in case kvm_mmu_zap_all releases mmu_lock and reacquires it again,

Re: [PATCH v4 4/6] KVM: MMU: fast invalid all shadow pages

2013-05-06 Thread Xiao Guangrong
On 05/07/2013 01:24 AM, Gleb Natapov wrote: On Mon, May 06, 2013 at 09:10:11PM +0800, Xiao Guangrong wrote: On 05/06/2013 08:36 PM, Gleb Natapov wrote: Step 1) Fix kvm_mmu_zap_all's behaviour: introduce lockbreak via spin_needbreak. Use generation numbers so that in case kvm_mmu_zap_all

Re: [PATCH v4 4/6] KVM: MMU: fast invalid all shadow pages

2013-05-06 Thread Marcelo Tosatti
On Mon, May 06, 2013 at 11:39:11AM +0800, Xiao Guangrong wrote: On 05/04/2013 08:52 AM, Marcelo Tosatti wrote: On Sat, May 04, 2013 at 12:51:06AM +0800, Xiao Guangrong wrote: On 05/03/2013 11:53 PM, Marcelo Tosatti wrote: On Fri, May 03, 2013 at 01:52:07PM +0800, Xiao Guangrong wrote: On

Re: [RFC PATCH 04/11] kvm tools: console: unconditionally output to any console

2013-05-06 Thread Sasha Levin
On 05/03/2013 12:09 PM, Will Deacon wrote: On Fri, May 03, 2013 at 05:02:14PM +0100, Sasha Levin wrote: On 05/03/2013 05:19 AM, Pekka Enberg wrote: On Wed, May 1, 2013 at 6:50 PM, Will Deacon will.dea...@arm.com wrote: From: Marc Zyngier marc.zyng...@arm.com Kvmtool suppresses any output to

Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-05-06 Thread Alex Williamson
On Mon, 2013-05-06 at 17:21 +1000, a...@ozlabs.ru wrote: From: Alexey Kardashevskiy a...@ozlabs.ru The IOMMU API implements groups creating/deletion, device binding and IOMMU map/unmap operations. The PowerPC implementation uses most of the API except map/unmap operations, which are

[PATCH] mips/kvm: Fix ABI for compatibility with 64-bit guests.

2013-05-06 Thread David Daney
From: David Daney david.da...@cavium.com There are several parts to this: o All registers are 64-bits wide, 32-bit guests use the least significant portion of the register storage fields. o FPU register formats are defined. o CP0 Registers are manipulated via the KVM_GET_MSRS/KVM_SET_MSRS

Re: [PATCH] mips/kvm: Fix ABI for compatibility with 64-bit guests.

2013-05-06 Thread Sanjay Lal
On May 6, 2013, at 3:39 PM, David Daney wrote: /* for KVM_GET_REGS and KVM_SET_REGS */ +/* + * If Config[AT] is zero (32-bit CPU), the register contents are + * stored in the lower 32-bits of the struct kvm_regs fields and sign + * extended to 64-bits. + */ struct kvm_regs { -

Re: [PATCH] mips/kvm: Fix ABI for compatibility with 64-bit guests.

2013-05-06 Thread David Daney
On 05/06/2013 04:11 PM, Sanjay Lal wrote: On May 6, 2013, at 3:39 PM, David Daney wrote: /* for KVM_GET_REGS and KVM_SET_REGS */ +/* + * If Config[AT] is zero (32-bit CPU), the register contents are + * stored in the lower 32-bits of the struct kvm_regs fields and sign + * extended to

Re: [PATCH] kvm/ppc/booke64: Hard disable interrupts when entering the guest

2013-05-06 Thread Scott Wood
On 05/05/2013 04:03:08 PM, Benjamin Herrenschmidt wrote: On Fri, 2013-05-03 at 18:45 -0500, Scott Wood wrote: kvmppc_lazy_ee_enable() was causing interrupts to be soft-enabled (albeit hard-disabled) in kvmppc_restart_interrupt(). This led to warnings, and possibly breakage if the interrupt

Re: [PATCH] kvm/ppc/booke64: Hard disable interrupts when entering the guest

2013-05-06 Thread Benjamin Herrenschmidt
On Mon, 2013-05-06 at 18:53 -0500, Scott Wood wrote: Ie. The last stage of entry will hard enable, so they should be soft-enabled too... if not, latency trackers will consider the whole guest periods as interrupt disabled... OK... I guess we already have that problem on 32-bit as well?

Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-05-06 Thread Alexey Kardashevskiy
On 05/07/2013 07:07 AM, Alex Williamson wrote: On Mon, 2013-05-06 at 17:21 +1000, a...@ozlabs.ru wrote: From: Alexey Kardashevskiy a...@ozlabs.ru The IOMMU API implements groups creating/deletion, device binding and IOMMU map/unmap operations. The PowerPC implementation uses most of the API

Re: [v1][KVM][PATCH 1/1] kvm:ppc: enable doorbell exception with E500MC

2013-05-06 Thread tiejun.chen
On 05/06/2013 10:58 PM, Alexander Graf wrote: On 05/06/2013 04:53 AM, Tiejun Chen wrote: Actually E500MC also support doorbell exception, and CONFIG_PPC_E500MC can cover BOOK3E/BOOK3E_64 as well. Signed-off-by: Tiejun Chentiejun.c...@windriver.com --- arch/powerpc/kvm/booke.c |2 +- 1

irqfd issue

2013-05-06 Thread Asias He
Hi, I am seeing this with linus/master. Any ideas? [ 34.168356] IPv6: ADDRCONF(NETDEV_UP): virbr0: link is not ready [ 36.743758] BUG: unable to handle kernel paging request at 00030029 [ 36.745177] IP: [81c08584] __mutex_lock_slowpath+0x34/0x240 [ 36.746576] PGD 0 [

Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-05-06 Thread Alex Williamson
On Tue, 2013-05-07 at 10:49 +1000, Alexey Kardashevskiy wrote: On 05/07/2013 07:07 AM, Alex Williamson wrote: On Mon, 2013-05-06 at 17:21 +1000, a...@ozlabs.ru wrote: From: Alexey Kardashevskiy a...@ozlabs.ru The IOMMU API implements groups creating/deletion, device binding and IOMMU

RE: [PATCH v10 7/7] KVM: VMX: Use posted interrupt to deliver virtual interrupt

2013-05-06 Thread Zhang, Yang Z
Yangminqiang wrote on 2013-05-03: Nakajima, Jun wrote on 2013-04-26: Subject: Re: [PATCH v10 7/7] KVM: VMX: Use posted interrupt to deliver virtual interrupt On Fri, Apr 26, 2013 at 2:29 AM, Yangminqiang yangminqi...@huawei.com wrote: Ivytown or newer platform supported it. Ivytown?

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-06 Thread tiejun.chen
On 05/07/2013 07:50 AM, Scott Wood wrote: On 05/05/2013 10:13:17 PM, tiejun.chen wrote: On 05/06/2013 11:10 AM, Tiejun Chen wrote: For the external interrupt, the decrementer exception and the doorbell excpetion, we also need to soft-disable interrupts while doing as host interrupt handlers

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-06 Thread tiejun.chen
On 05/07/2013 10:06 AM, Scott Wood wrote: On 05/06/2013 08:56:25 PM, tiejun.chen wrote: On 05/07/2013 07:50 AM, Scott Wood wrote: On 05/05/2013 10:13:17 PM, tiejun.chen wrote: On 05/06/2013 11:10 AM, Tiejun Chen wrote: For the external interrupt, the decrementer exception and the doorbell

Re: [RFC PATCH 04/11] kvm tools: console: unconditionally output to any console

2013-05-06 Thread Anup Patel
On Tue, May 7, 2013 at 2:34 AM, Sasha Levin sasha.le...@oracle.com wrote: On 05/03/2013 12:09 PM, Will Deacon wrote: On Fri, May 03, 2013 at 05:02:14PM +0100, Sasha Levin wrote: On 05/03/2013 05:19 AM, Pekka Enberg wrote: On Wed, May 1, 2013 at 6:50 PM, Will Deacon will.dea...@arm.com wrote:

KVM: x86: perform kvmclock updates in lockstep

2013-05-06 Thread Marcelo Tosatti
It is necessary for each vcpus system_timestamp memory copy to be updated from one sample of the nanosecond kernel clock. If this is not the case, and NTP changes frequency adjustment, different vcpus will make use of different time bases. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com

Re: [PATCH] kvm/ppc/booke64: Hard disable interrupts when entering the guest

2013-05-06 Thread Scott Wood
On 05/06/2013 07:03:14 PM, Benjamin Herrenschmidt wrote: On Mon, 2013-05-06 at 18:53 -0500, Scott Wood wrote: Ie. The last stage of entry will hard enable, so they should be soft-enabled too... if not, latency trackers will consider the whole guest periods as interrupt disabled...

Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-05-06 Thread Alexey Kardashevskiy
On 05/07/2013 11:42 AM, Alex Williamson wrote: On Tue, 2013-05-07 at 10:49 +1000, Alexey Kardashevskiy wrote: On 05/07/2013 07:07 AM, Alex Williamson wrote: On Mon, 2013-05-06 at 17:21 +1000, a...@ozlabs.ru wrote: From: Alexey Kardashevskiy a...@ozlabs.ru The IOMMU API implements groups

[PATCH] kvm/ppc: interrupt disabling fixes

2013-05-06 Thread Scott Wood
booke64 was not maintaing consistent lazy ee state when exiting the guest, leading to warnings and worse. booke32 was less affected due to the absence of lazy ee, but it was still feeding bad information into trace_hardirqs_off/on -- we don't want guest execution to be seen as an IRQs off

[PATCH v18] pvpanic: pvpanic device driver

2013-05-06 Thread Hu Tao
pvpanic device is a qemu simulated device through which guest panic event is sent to host. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- v17 - v18: 1. call acpi_walk_resources to get the port, and usb outb instead of acpi_evaluate_oject in panic notifier callback

Re: [PATCH v4 4/6] KVM: MMU: fast invalid all shadow pages

2013-05-06 Thread Xiao Guangrong
On 05/07/2013 03:50 AM, Marcelo Tosatti wrote: On Mon, May 06, 2013 at 11:39:11AM +0800, Xiao Guangrong wrote: On 05/04/2013 08:52 AM, Marcelo Tosatti wrote: On Sat, May 04, 2013 at 12:51:06AM +0800, Xiao Guangrong wrote: On 05/03/2013 11:53 PM, Marcelo Tosatti wrote: On Fri, May 03, 2013 at

Re: [PATCH] kvm/ppc/booke64: Hard disable interrupts when entering the guest

2013-05-06 Thread Benjamin Herrenschmidt
On Mon, 2013-05-06 at 22:05 -0500, Scott Wood wrote: On 05/06/2013 07:03:14 PM, Benjamin Herrenschmidt wrote: On Mon, 2013-05-06 at 18:53 -0500, Scott Wood wrote: Ie. The last stage of entry will hard enable, so they should be soft-enabled too... if not, latency trackers will

Re: [PATCH] kvm/ppc: interrupt disabling fixes

2013-05-06 Thread Benjamin Herrenschmidt
On Mon, 2013-05-06 at 22:32 -0500, Scott Wood wrote: + hard_irq_disable(); + trace_hardirqs_off(); I still think hard_irq_disable() should be fixed to do the right thing here :-) I'll do that standalone patch here and give it a spin. Cheers, Ben. -- To unsubscribe from this

Re: Fwd: Booting physically installed Windows while in Arch (AHCI support in OVMF?)

2013-05-06 Thread Michael Tokarev
06.05.2013 00:42, Evert Heylen wrote: Please, any help? I think the easiest way is to convert your existing system from UEFI back to regular bios + MBR. For that, you need to disable UEFI boot in bios and convert GPT to MBR on the HDD. This is because, as you figured, ahci support in OVMF

Re: [PATCH 2/6] KVM: PPC: Add support for multiple-TCE hcalls

2013-05-06 Thread David Gibson
On Mon, May 06, 2013 at 05:25:53PM +1000, Alexey Kardashevskiy wrote: This adds real mode handlers for the H_PUT_TCE_INDIRECT and H_STUFF_TCE hypercalls for QEMU emulated devices such as virtio devices or emulated PCI. These calls allow adding multiple entries (up to 512) into the TCE table

Re: [PATCH 5/6] KVM: PPC: Add support for IOMMU in-kernel handling

2013-05-06 Thread David Gibson
On Mon, May 06, 2013 at 05:25:56PM +1000, Alexey Kardashevskiy wrote: This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT and H_STUFF_TCE requests without passing them to QEMU, which should save time on switching to QEMU and back. Both real and virtual modes are supported -

Re: [PATCH 5/6] KVM: PPC: Add support for IOMMU in-kernel handling

2013-05-06 Thread Alexey Kardashevskiy
On 05/07/2013 03:29 PM, David Gibson wrote: On Mon, May 06, 2013 at 05:25:56PM +1000, Alexey Kardashevskiy wrote: This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT and H_STUFF_TCE requests without passing them to QEMU, which should save time on switching to QEMU and back.

[PATCH 4/5] powerpc/vfio: Implement IOMMU driver for VFIO

2013-05-06 Thread aik
From: Alexey Kardashevskiy a...@ozlabs.ru VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or direct mapping when possible) and IRQ signaling. The platform dependent part includes IOMMU initialization and handling. This implements

[PATCH 5/5] powerpc/vfio: Enable on pSeries platform

2013-05-06 Thread aik
From: Alexey Kardashevskiy a...@ozlabs.ru The enables VFIO on the pSeries platform, enabling user space programs to access PCI devices directly. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Paul Mackerras pau...@samba.org ---

[PATCH 1/5] iommu: Move initialization earlier

2013-05-06 Thread aik
From: Alexey Kardashevskiy a...@ozlabs.ru The iommu_init() call initializes IOMMU internal structures and data required for the API to function such as iommu_group_alloc(). It is registered as a subsys_initcall. One of the IOMMU users is a PCI subsystem on POWER which discovers new IOMMU tables

  1   2   >