2015-01-30 10:22+0100, Paolo Bonzini:
On 29/01/2015 22:48, Radim Krčmář wrote:
This patch series is made our of three logical parts,
[1-3/8] are just a cleanup and could be omitted
[4-6/8] improve broadcast detection and unoptimized delivery
[7-8/8] handle mixed mode (by falling back
2015-01-30 16:23+0100, Paolo Bonzini:
On 30/01/2015 16:14, Radim Krčmář wrote:
+ case KVM_APIC_MODE_XAPIC_FLAT:
+ *cid = 0;
+ *lid = ldr 0xff;
+ return true;
+ case KVM_APIC_MODE_XAPIC_CLUSTER:
+ *cid =
2015-01-30 16:10+0100, Paolo Bonzini:
On 30/01/2015 15:56, Radim Krčmář wrote:
Do you know of a difference with it?
new-mode (new-mode - 1) | hweight8(new-mode) != 1
lea-0x1(%rax),%edi |popcnt %edi,%eax
test %eax,%edi|cmp$1,%eax
x (x -
On 30/01/2015 16:14, Radim Krčmář wrote:
+ case KVM_APIC_MODE_XAPIC_FLAT:
+ *cid = 0;
+ *lid = ldr 0xff;
+ return true;
+ case KVM_APIC_MODE_XAPIC_CLUSTER:
+ *cid = (ldr 4) 0xf;
+ *lid = ldr 0xf;
+ return true;
+ case
On 30/01/2015 16:20, Radim Krčmář wrote:
+ /* XXX: A superset of x2APIC broadcasts is fine in practice as long as
+ * we don't support APIC ID 0xfeff.
+ */
It's ugly. :)
Yeah, there is: don't deliver x2APIC broadcasts to xAPIC.
(I'm not even sure if it is correct ...)
2015-01-30 10:18+0100, Paolo Bonzini:
On 29/01/2015 22:48, Radim Krčmář wrote:
+static inline bool
+apic_logical_id(struct kvm_apic_map *map, u32 ldr, u16 *cid, u16 *lid)
{
+ switch (map-mode) {
+ case KVM_APIC_MODE_XAPIC_FLAT:
+ *cid = 0;
+ *lid = ldr
On 30/01/2015 17:57, Radim Krčmář wrote:
As optimizations go, we could drop the on cid as cid 16 is
checked later, so mode=4 practically does nothing ... Not the best for
future bugs, but still pretty safe -- only x2APIC can set a value that
would require the and it can't have valid XAPIC
On 12/12/2014 07:14 AM, Feng Wu wrote:
Currently, we use a global vector as the Posted-Interrupts
Notification Event for all the vCPUs in the system. We need
to introduce another global vector for VT-d Posted-Interrtups,
which will be used to wakeup the sleep vCPU when an external
interrupt
On Fri, Jan 30, 2015 at 2:49 AM, Michal Marek mma...@suse.cz wrote:
On 2015-01-29 21:47, Paul Bolle wrote:
[Added Michal. Removed Yann.]
On Thu, 2015-01-29 at 12:38 -0800, Luis R. Rodriguez wrote:
On Tue, Jan 27, 2015 at 12:00 PM, Luis R. Rodriguez mcg...@suse.com wrote:
On Fri, Jan 23, 2015
From: Antonios Motakis a.mota...@virtualopensystems.com
Allow to memory map the MMIO regions of the device so userspace can
directly access them. PIO regions are not being handled at this point.
Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com
---
From: Antonios Motakis a.mota...@virtualopensystems.com
Return information for the interrupts exposed by the device.
This patch extends VFIO_DEVICE_GET_INFO with the number of IRQs
and enables VFIO_DEVICE_GET_IRQ_INFO.
Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com
---
From: Antonios Motakis a.mota...@virtualopensystems.com
This patch enables the IOCTLs VFIO_DEVICE_GET_REGION_INFO ioctl call,
which allows the user to learn about the available MMIO resources of
a device.
Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com
---
From: Antonios Motakis a.mota...@virtualopensystems.com
VFIO returns a file descriptor which we can use to manipulate the memory
regions of the device. Usually, the user will mmap memory regions that are
addressable on page boundaries, however for memory regions where this is
not the case we
From: Antonios Motakis a.mota...@virtualopensystems.com
A VFIO userspace driver will start by opening the VFIO device
that corresponds to an IOMMU group, and will use the ioctl interface
to get the basic device info, such as number of memory regions and
interrupts, and their properties. This
From: Antonios Motakis a.mota...@virtualopensystems.com
Enable building the VFIO PLATFORM driver that allows to use Linux platform
devices with VFIO.
Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com
---
drivers/vfio/Kconfig | 1 +
drivers/vfio/Makefile | 1 +
From: Antonios Motakis a.mota...@virtualopensystems.com
This patch forms the common skeleton code for platform devices support
with VFIO. This will include the core functionality of VFIO_PLATFORM,
however binding to the device and discovering the device resources will
be done with the help of a
From: Antonios Motakis a.mota...@virtualopensystems.com
Driver to bind to Linux platform devices, and callbacks to discover their
resources to be used by the main VFIO PLATFORM code.
Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com
---
drivers/vfio/platform/vfio_platform.c | 103
2015-01-30 10:19+0100, Paolo Bonzini:
On 29/01/2015 22:48, Radim Krčmář wrote:
We want to support mixed modes and the easiest solution is to avoid
optimizing those weird and unlikely scenarios.
Hmm, what happens if use maxcpus to disable some CPUs at startup?
Their APICs are kept
On 30/01/2015 15:21, Radim Krčmář wrote:
Yes, but it would only matter if the OS set LDR on them.
I mark x2APIC with perfectly configured xAPIC on unused processors as
weird ... (Linux 3.18 and 2.6.32 doesn't do it.)
Ok.
Paolo
--
To unsubscribe from this list: send the line unsubscribe kvm
From: Antonios Motakis a.mota...@virtualopensystems.com
Level sensitive interrupts are exposed as maskable and automasked
interrupts and are masked and disabled automatically when they fire.
Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com
[Baptiste Reynal: Move masked interrupt
From: Antonios Motakis a.mota...@virtualopensystems.com
VFIO_PCI passes the VFIO device structure *vdev via eventfd to the handler
that implements masking/unmasking of IRQs via an eventfd. We can replace
it in the virqfd infrastructure with an opaque type so we can make use
of the mechanism from
From: Antonios Motakis a.mota...@virtualopensystems.com
We want to reuse virqfd functionality in multiple VFIO drivers; before
moving these functions to core VFIO, add the vfio_ prefix to the
virqfd_enable and virqfd_disable functions, and export them so they can
be used from other modules.
From: Antonios Motakis a.mota...@virtualopensystems.com
The functions vfio_pci_virqfd_init and vfio_pci_virqfd_exit are not really
PCI specific, since we plan to reuse the virqfd code with more VFIO drivers
in addition to VFIO_PCI.
Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com
From: Antonios Motakis a.mota...@virtualopensystems.com
This patch allows to set an eventfd for a platform device's interrupt,
and also to trigger the interrupt eventfd from userspace for testing.
Level sensitive interrupts are marked as maskable and are handled in
a later patch. Edge triggered
From: Antonios Motakis a.mota...@virtualopensystems.com
This patch is a skeleton for the VFIO_DEVICE_SET_IRQS IOCTL, around which
most IRQ functionality is implemented in VFIO.
Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com
---
drivers/vfio/platform/vfio_platform_common.c |
2015-01-30 10:38+0100, Paolo Bonzini:
On 29/01/2015 22:48, Radim Krčmář wrote:
+ if (hweight8(new-mode) != 1)
Better (more optimized):
if (new-mode (new-mode - 1))
True, hweight needs to have X86_FEATURE_POPCNT to be efficient ...
Do you know of a difference with it?
On 30/01/2015 15:56, Radim Krčmář wrote:
2015-01-30 10:38+0100, Paolo Bonzini:
On 29/01/2015 22:48, Radim Krčmář wrote:
+ if (hweight8(new-mode) != 1)
Better (more optimized):
if (new-mode (new-mode - 1))
True, hweight needs to have X86_FEATURE_POPCNT to be efficient
From: Nicholas Bellinger n...@linux-iscsi.org
Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org
---
hw/scsi/vhost-scsi.c| 1 +
hw/scsi/virtio-scsi.c | 3 +++
hw/virtio/virtio-pci.c | 2 ++
include/hw/i386/pc.h| 13 -
On 29/01/2015 22:48, Radim Krčmář wrote:
We want to support mixed modes and the easiest solution is to avoid
optimizing those weird and unlikely scenarios.
Hmm, what happens if use maxcpus to disable some CPUs at startup? Could
the disabled CPUs remain in xapic mode while the others move to
On 29/01/2015 22:48, Radim Krčmář wrote:
We want to support mixed modes and the easiest solution is to avoid
optimizing those weird and unlikely scenarios.
Signed-off-by: Radim Krčmář rkrc...@redhat.com
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/lapic.c| 16
On 29/01/2015 22:48, Radim Krčmář wrote:
In mixed modes, we musn't deliver xAPIC IPIs like x2APIC and vice versa.
Instead of preserving the information in apic_send_ipi(), we regain it
by converting all destinations into correct APIC MDA in the slow path.
This allows easier reasoning about
On 30/01/2015 09:12, Nicholas A. Bellinger wrote:
From: Nicholas Bellinger n...@linux-iscsi.org
This patch adds a new memcpy_fromiovec_out() library function which modifies
the passed *iov following memcpy_fromiovec(), but also returns the next
current
iovec pointer via **iov_out.
On 29/01/2015 22:48, Radim Krčmář wrote:
This patch series is made our of three logical parts,
[1-3/8] are just a cleanup and could be omitted
[4-6/8] improve broadcast detection and unoptimized delivery
[7-8/8] handle mixed mode (by falling back to improvements from [5-6/9])
I applied
From: Nicholas Bellinger n...@linux-iscsi.org
Hi MST Paolo,
Here are the associated QEMU vhost/scsi changes to enable KVM host
for expose F_HOTPLUG, F_T10_PI, and ANY_LAYOUT feature bits into
virtio 1.0 compatible guests.
Note this does not include VIRTIO_SCSI_F_CHANGE, which is currently
not
From: Nicholas Bellinger n...@linux-iscsi.org
Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org
---
hw/scsi/vhost-scsi.c | 1 +
hw/virtio/virtio-pci.c | 2 ++
include/hw/i386/pc.h | 5 +
3 files changed, 8 insertions(+)
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index
From: Nicholas Bellinger n...@linux-iscsi.org
Cc: Michael S. Tsirkin m...@redhat.com
Cc: Paolo Bonzini pbonz...@redhat.com
Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org
---
hw/virtio/virtio-pci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/virtio/virtio-pci.c
On 29/01/2015 22:48, Radim Krčmář wrote:
recalculate_apic_map() uses two passes over all VCPUs. This is a relic
from time when we selected a global mode in the first pass and set up
the optimized table in the second pass (to have a consistent mode).
Recent changes made mixed mode
From: Nicholas Bellinger n...@linux-iscsi.org
This patch adds initial ANY_LAYOUT support with a new vhost_virtqueue
callback in vhost_scsi_handle_vqal().
It calculates data_direction + exp_data_len for the new tcm_vhost_cmd
descriptor by walking both outgoing + incoming iovecs, assuming the
From: Nicholas Bellinger n...@linux-iscsi.org
This patch fixes vhost_scsi_handle_vq() failure cases that result in BUG_ON()
getting triggered when vhost_scsi_free_cmd() is called, and -tvc_se_cmd has
not been initialized by target_submit_cmd_map_sgls().
It changes tcm_vhost_release_cmd() to use
From: Nicholas Bellinger n...@linux-iscsi.org
Move logic for typical vhost_scsi_handle_vq() - tcm_vhost_workqueue -
tcm_vhost_submission_work() dispatch into vhost_scsi_queue_desc().
Can be shared by vhost_scsi_handle_vqal() code.
Cc: Michael S. Tsirkin m...@redhat.com
Cc: Paolo Bonzini
From: Nicholas Bellinger n...@linux-iscsi.org
This patch adds ANY_LAYOUT prerequisites logic for accepting a set of
protection + data payloads via iovec + offset. Also includes helpers
for calcuating SGLs + invoking vhost_scsi_map_to_sgl() with a known
number of iovecs.
Required by ANY_LAYOUT
From: Nicholas Bellinger n...@linux-iscsi.org
Hi MST Paolo,
The series adds initial vhost/scsi ANY_LAYOUT layout support.
It assumes request/CDB and response/sense_buffer headers may span more
than a single iovec using lib/iovec.c logic, along with a new addition
of memcpy_fromiovec_out() to
From: Nicholas Bellinger n...@linux-iscsi.org
This patch adds a new memcpy_fromiovec_out() library function which modifies
the passed *iov following memcpy_fromiovec(), but also returns the next current
iovec pointer via **iov_out.
This is useful for vhost ANY_LAYOUT support when guests are
From: Nicholas Bellinger n...@linux-iscsi.org
This patch changes vhost_scsi_map_to_sgl() parameters to accept virtio
iovec ptr + len when determing pages_nr.
This is currently done with iov_num_pages() - PAGE_ALIGN, so allow
the same parameters as well.
Cc: Michael S. Tsirkin m...@redhat.com
From: Nicholas Bellinger n...@linux-iscsi.org
Signal support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits
required for virtio-scsi 1.0 spec layout requirements.
Cc: Michael S. Tsirkin m...@redhat.com
Cc: Paolo Bonzini pbonz...@redhat.com
Signed-off-by: Nicholas Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org
Required for ANY_LAYOUT support when the incoming virtio-scsi response
header + fixed size sense buffer payload may span more than a single
iovec entry.
This changes existing code to save cmd-tvc_resp_iod instead of the
first single iovec base
On 29/01/2015 22:48, Radim Krčmář wrote:
The majority of this patch turns
result = 0; if (CODE) result = 1; return result;
into
return CODE;
because we return bool now.
Added a bunch of != 0 to avoid automagic conversion to bool.
Paolo
Signed-off-by: Radim Krčmář rkrc...@redhat.com
On 29/01/2015 23:10, Joe Perches wrote:
On Thu, 2015-01-29 at 22:48 +0100, Radim Krčmář wrote:
And don't export the internal ones while at it.
[]
-int kvm_apic_match_logical_addr(struct kvm_lapic *apic, u32 mda)
+static bool kvm_apic_match_logical_addr(struct kvm_lapic *apic, u32 mda)
{
On 2015-01-29 21:47, Paul Bolle wrote:
[Added Michal. Removed Yann.]
On Thu, 2015-01-29 at 12:38 -0800, Luis R. Rodriguez wrote:
On Tue, Jan 27, 2015 at 12:00 PM, Luis R. Rodriguez mcg...@suse.com wrote:
On Fri, Jan 23, 2015 at 03:19:25PM +, Stefano Stabellini wrote:
On Fri, 23 Jan
On 29/01/2015 23:37, Christoffer Dall wrote:
Hi Paolo,
Please pull this second round of fixes for KVM/ARM for 3.19. Hopefully there
is time to get this upstream before the final release of 3.19.
The series fixes the notorious memory corruption issues on APM platforms and
swapping
2015-01-30 09:52+0100, Paolo Bonzini:
On 29/01/2015 22:48, Radim Krčmář wrote:
The majority of this patch turns
result = 0; if (CODE) result = 1; return result;
into
return CODE;
because we return bool now.
Added a bunch of != 0 to avoid automagic conversion to bool.
Makes
From: Antonios Motakis a.mota...@virtualopensystems.com
The Virqfd code needs to keep accesses to any struct *virqfd safe, but
this comes into play only when creating or destroying eventfds, so sharing
the same spinlock with the VFIO bus driver is not necessary.
Signed-off-by: Antonios Motakis
2015-01-30 10:03+0100, Paolo Bonzini:
On 29/01/2015 22:48, Radim Krčmář wrote:
+/* KVM APIC implementation has two quirks
+ * - dest always begins at 0 while xAPIC MDA has offset 24,
+ * - IOxAPIC messages have to be delivered (directly) to x2APIC.
+ */
+static u32
From: Antonios Motakis a.mota...@virtualopensystems.com
With this patch the VFIO user will be able to set an eventfd that can be
used in order to mask and unmask IRQs of platform devices.
Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com
---
From: Antonios Motakis a.mota...@virtualopensystems.com
The virqfd functionality that is used by VFIO_PCI to implement interrupt
masking and unmasking via an eventfd, is generic enough and can be reused
by another driver. Move it to a separate file in order to allow the code
to be shared.
From: Antonios Motakis a.mota...@virtualopensystems.com
Now we have finally completely decoupled virqfd from VFIO_PCI. We can
initialize it from the VFIO generic code, in order to safely use it from
multiple independent VFIO bus drivers.
Signed-off-by: Antonios Motakis
On Fri, Jan 30, 2015 at 08:12:28AM +, Nicholas A. Bellinger wrote:
From: Nicholas Bellinger n...@linux-iscsi.org
This patch changes vhost_scsi_map_to_sgl() parameters to accept virtio
iovec ptr + len when determing pages_nr.
This is currently done with iov_num_pages() - PAGE_ALIGN, so
Linus,
The following changes since commit 26bc420b59a38e4e6685a73345a0def461136dce:
Linux 3.19-rc6 (2015-01-25 20:04:41 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus
for you to fetch changes up to
On 2015/1/26 21:13, Gonglei (Arei) wrote:
From: Gonglei arei.gong...@huawei.com
In order to support to assign a boot order for
vhost-scsi device, we should get the tpgt for
user level (such as Qemu). and at present, we
only support the minimum tpgt can boot.
Ping...
Signed-off-by:
59 matches
Mail list logo