Displaying 20 results from an estimated 72 matches for "pv_init".
Did you mean:
hv_init
2019 May 08
2
[PATCH 04/10] s390/mm: force swiotlb for protected virtualization
...(void)
this is also ugly. the correct solution would be probably to refactor
everything, including all the AMD SEV code.... let's not go there
> +{
> + return is_prot_virt_guest();
> +}
> +EXPORT_SYMBOL_GPL(sev_active);
> +
> +/* protected virtualization */
> +static void pv_init(void)
> +{
> + if (!sev_active())
can't you just use is_prot_virt_guest here?
> + return;
> +
> + /* make sure bounce buffers are shared */
> + swiotlb_init(1);
> + swiotlb_update_mem_attributes();
> + swiotlb_force = SWIOTLB_FORCE;
> +}
> +
> void __init me...
2019 May 08
2
[PATCH 04/10] s390/mm: force swiotlb for protected virtualization
...(void)
this is also ugly. the correct solution would be probably to refactor
everything, including all the AMD SEV code.... let's not go there
> +{
> + return is_prot_virt_guest();
> +}
> +EXPORT_SYMBOL_GPL(sev_active);
> +
> +/* protected virtualization */
> +static void pv_init(void)
> +{
> + if (!sev_active())
can't you just use is_prot_virt_guest here?
> + return;
> +
> + /* make sure bounce buffers are shared */
> + swiotlb_init(1);
> + swiotlb_update_mem_attributes();
> + swiotlb_force = SWIOTLB_FORCE;
> +}
> +
> void __init me...
2020 Jul 15
5
[PATCH v7 2/2] s390: virtio: PV needs VIRTIO I/O device protection
..."support for limited memory access required for protected virtualization\n");
> > > + return -ENODEV;
> > > + }
> > > +
> > > + return 0;
> > > +}
> > > +
> > > /* protected virtualization */
> > > static void pv_init(void)
> > > {
> > What bothers me here is that arch code depends on virtio now.
> > It works even with a modular virtio when functions are inline,
> > but it seems fragile: e.g. it breaks virtio as an out of tree module,
> > since layout of struct virtio_device ca...
2020 Jul 15
5
[PATCH v7 2/2] s390: virtio: PV needs VIRTIO I/O device protection
..."support for limited memory access required for protected virtualization\n");
> > > + return -ENODEV;
> > > + }
> > > +
> > > + return 0;
> > > +}
> > > +
> > > /* protected virtualization */
> > > static void pv_init(void)
> > > {
> > What bothers me here is that arch code depends on virtio now.
> > It works even with a modular virtio when functions are inline,
> > but it seems fragile: e.g. it breaks virtio as an out of tree module,
> > since layout of struct virtio_device ca...
2020 Jun 15
4
[PATCH v2 0/1] s390: virtio: let's arch choose to accept devices without IOMMU feature
An architecture protecting the guest memory against unauthorized host
access may want to enforce VIRTIO I/O device protection through the
use of VIRTIO_F_IOMMU_PLATFORM.
Let's give a chance to the architecture to accept or not devices
without VIRTIO_F_IOMMU_PLATFORM.
Pierre Morel (1):
s390: virtio: let arch accept devices without IOMMU feature
arch/s390/mm/init.c | 6 ++++++
2019 Apr 09
0
[RFC PATCH 03/12] s390/mm: force swiotlb for protected virtualization
...ve it so the code gets exercised.
That's the swiotlb stuff, right?
(The patches will obviously need some reordering before it is actually
getting merged.)
> + */
> + return true;
> +}
> +EXPORT_SYMBOL_GPL(sev_active);
> +
> +/* protected virtualization */
> +static void pv_init(void)
> +{
> + if (!sev_active())
> + return;
> +
> + /* make sure bounce buffers are shared */
> + swiotlb_init(1);
> + swiotlb_update_mem_attributes();
> + swiotlb_force = SWIOTLB_FORCE;
> +}
> +
> void __init mem_init(void)
> {
> cpumask_set_cpu(0, &am...
2020 Jul 15
2
[PATCH v7 2/2] s390: virtio: PV needs VIRTIO I/O device protection
...eature(dev, VIRTIO_F_IOMMU_PLATFORM)) {
> + dev_warn(&dev->dev,
> + "support for limited memory access required for protected virtualization\n");
> + return -ENODEV;
> + }
> +
> + return 0;
> +}
> +
> /* protected virtualization */
> static void pv_init(void)
> {
What bothers me here is that arch code depends on virtio now.
It works even with a modular virtio when functions are inline,
but it seems fragile: e.g. it breaks virtio as an out of tree module,
since layout of struct virtio_device can change.
I'm not sure what to do with this y...
2020 Jul 15
2
[PATCH v7 2/2] s390: virtio: PV needs VIRTIO I/O device protection
...eature(dev, VIRTIO_F_IOMMU_PLATFORM)) {
> + dev_warn(&dev->dev,
> + "support for limited memory access required for protected virtualization\n");
> + return -ENODEV;
> + }
> +
> + return 0;
> +}
> +
> /* protected virtualization */
> static void pv_init(void)
> {
What bothers me here is that arch code depends on virtio now.
It works even with a modular virtio when functions are inline,
but it seems fragile: e.g. it breaks virtio as an out of tree module,
since layout of struct virtio_device can change.
I'm not sure what to do with this y...
2020 Jun 17
6
[PATCH v3 0/1] s390: virtio: let arch choose to accept devices without IOMMU feature
An architecture protecting the guest memory against unauthorized host
access may want to enforce VIRTIO I/O device protection through the
use of VIRTIO_F_IOMMU_PLATFORM.
Let's give a chance to the architecture to accept or not devices
without VIRTIO_F_IOMMU_PLATFORM.
Pierre Morel (1):
s390: virtio: let arch accept devices without IOMMU feature
arch/s390/mm/init.c | 6 ++++++
2020 Jul 14
4
[PATCH v6 0/2] s390: virtio: let arch validate VIRTIO features
Hi all,
The goal of the series is to give a chance to the architecture
to validate VIRTIO device features.
in this respin:
1) I kept removed the ack from Jason as I reworked the patch
@Jason, the nature and goal of the patch did not really changed
please can I get back your acked-by with these changes?
2) Rewording for warning messages
Regards,
Pierre
Pierre Morel (2):
2020 Jun 16
3
[PATCH v2 1/1] s390: virtio: let arch accept devices without IOMMU feature
...eturn is_prot_virt_guest();
> }
>
> +int arch_needs_iommu_platform(struct virtio_device *dev)
Maybe prefixing the name with virtio_ would help provide the
proper context.
> +{
> + return is_prot_virt_guest();
> +}
> +
> /* protected virtualization */
> static void pv_init(void)
> {
> diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
> index a977e32a88f2..30091089bee8 100644
> --- a/drivers/virtio/virtio.c
> +++ b/drivers/virtio/virtio.c
> @@ -167,6 +167,11 @@ void virtio_add_status(struct virtio_device *dev, unsigned int status)
>...
2020 Jun 16
3
[PATCH v2 1/1] s390: virtio: let arch accept devices without IOMMU feature
...eturn is_prot_virt_guest();
> }
>
> +int arch_needs_iommu_platform(struct virtio_device *dev)
Maybe prefixing the name with virtio_ would help provide the
proper context.
> +{
> + return is_prot_virt_guest();
> +}
> +
> /* protected virtualization */
> static void pv_init(void)
> {
> diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
> index a977e32a88f2..30091089bee8 100644
> --- a/drivers/virtio/virtio.c
> +++ b/drivers/virtio/virtio.c
> @@ -167,6 +167,11 @@ void virtio_add_status(struct virtio_device *dev, unsigned int status)
>...
2019 Apr 26
0
[PATCH 04/10] s390/mm: force swiotlb for protected virtualization
...) {
+ uv_set_shared(addr);
+ addr += PAGE_SIZE;
+ }
+ return 0;
+}
+EXPORT_SYMBOL_GPL(set_memory_decrypted);
+
+/* are we a protected virtualization guest? */
+bool sev_active(void)
+{
+ return is_prot_virt_guest();
+}
+EXPORT_SYMBOL_GPL(sev_active);
+
+/* protected virtualization */
+static void pv_init(void)
+{
+ if (!sev_active())
+ return;
+
+ /* make sure bounce buffers are shared */
+ swiotlb_init(1);
+ swiotlb_update_mem_attributes();
+ swiotlb_force = SWIOTLB_FORCE;
+}
+
void __init mem_init(void)
{
cpumask_set_cpu(0, &init_mm.context.cpu_attach_mask);
@@ -134,6 +182,8 @@ void __in...
2020 Jun 17
1
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...-161,6 +162,11 @@ bool force_dma_unencrypted(struct device *dev)
> return is_prot_virt_guest();
> }
>
> +int arch_needs_virtio_iommu_platform(struct virtio_device *dev)
> +{
> + return is_prot_virt_guest();
> +}
> +
> /* protected virtualization */
> static void pv_init(void)
Can we please stop dumping random code to arch/s390/mm/init.c?
All the protected virtualization functions should go into a separate
file (e.g. mem_encrypt.c like on x86), some of which could also be in
header files.
Please consider this a comment for the future.. just go ahead with
this pa...
2020 Jun 17
1
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...-161,6 +162,11 @@ bool force_dma_unencrypted(struct device *dev)
> return is_prot_virt_guest();
> }
>
> +int arch_needs_virtio_iommu_platform(struct virtio_device *dev)
> +{
> + return is_prot_virt_guest();
> +}
> +
> /* protected virtualization */
> static void pv_init(void)
Can we please stop dumping random code to arch/s390/mm/init.c?
All the protected virtualization functions should go into a separate
file (e.g. mem_encrypt.c like on x86), some of which could also be in
header files.
Please consider this a comment for the future.. just go ahead with
this pa...
2019 Jun 06
0
[PATCH v4 1/8] s390/mm: force swiotlb for protected virtualization
...d pages shared (swiotlb, dma_alloca) */
+ for (i = 0; i < numpages; ++i) {
+ uv_set_shared(addr);
+ addr += PAGE_SIZE;
+ }
+ return 0;
+}
+
+/* are we a protected virtualization guest? */
+bool sev_active(void)
+{
+ return is_prot_virt_guest();
+}
+
+/* protected virtualization */
+static void pv_init(void)
+{
+ if (!is_prot_virt_guest())
+ return;
+
+ /* make sure bounce buffers are shared */
+ swiotlb_init(1);
+ swiotlb_update_mem_attributes();
+ swiotlb_force = SWIOTLB_FORCE;
+}
+
void __init mem_init(void)
{
cpumask_set_cpu(0, &init_mm.context.cpu_attach_mask);
@@ -136,6 +181,8 @@ v...
2019 Jun 12
0
[PATCH v5 1/8] s390/mm: force swiotlb for protected virtualization
...d pages shared (swiotlb, dma_alloca) */
+ for (i = 0; i < numpages; ++i) {
+ uv_set_shared(addr);
+ addr += PAGE_SIZE;
+ }
+ return 0;
+}
+
+/* are we a protected virtualization guest? */
+bool sev_active(void)
+{
+ return is_prot_virt_guest();
+}
+
+/* protected virtualization */
+static void pv_init(void)
+{
+ if (!is_prot_virt_guest())
+ return;
+
+ /* make sure bounce buffers are shared */
+ swiotlb_init(1);
+ swiotlb_update_mem_attributes();
+ swiotlb_force = SWIOTLB_FORCE;
+}
+
void __init mem_init(void)
{
cpumask_set_cpu(0, &init_mm.context.cpu_attach_mask);
@@ -136,6 +181,8 @@ v...
2019 May 23
0
[PATCH v2 1/8] s390/mm: force swiotlb for protected virtualization
...d pages shared (swiotlb, dma_alloca) */
+ for (i = 0; i < numpages; ++i) {
+ uv_set_shared(addr);
+ addr += PAGE_SIZE;
+ }
+ return 0;
+}
+
+/* are we a protected virtualization guest? */
+bool sev_active(void)
+{
+ return is_prot_virt_guest();
+}
+
+/* protected virtualization */
+static void pv_init(void)
+{
+ if (!is_prot_virt_guest())
+ return;
+
+ /* make sure bounce buffers are shared */
+ swiotlb_init(1);
+ swiotlb_update_mem_attributes();
+ swiotlb_force = SWIOTLB_FORCE;
+}
+
void __init mem_init(void)
{
cpumask_set_cpu(0, &init_mm.context.cpu_attach_mask);
@@ -136,6 +181,8 @@ v...
2019 May 29
0
[PATCH v3 1/8] s390/mm: force swiotlb for protected virtualization
...d pages shared (swiotlb, dma_alloca) */
+ for (i = 0; i < numpages; ++i) {
+ uv_set_shared(addr);
+ addr += PAGE_SIZE;
+ }
+ return 0;
+}
+
+/* are we a protected virtualization guest? */
+bool sev_active(void)
+{
+ return is_prot_virt_guest();
+}
+
+/* protected virtualization */
+static void pv_init(void)
+{
+ if (!is_prot_virt_guest())
+ return;
+
+ /* make sure bounce buffers are shared */
+ swiotlb_init(1);
+ swiotlb_update_mem_attributes();
+ swiotlb_force = SWIOTLB_FORCE;
+}
+
void __init mem_init(void)
{
cpumask_set_cpu(0, &init_mm.context.cpu_attach_mask);
@@ -136,6 +181,8 @@ v...
2020 Jul 09
4
[PATCH v5 2/2] s390: virtio: PV needs VIRTIO I/O device protection
...U_PLATFORM\n");
"support for limited memory access required for protected
virtualization"
?
Mentioning the feature flag is shorter in both cases, though.
> + return -ENODEV;
> + }
> +
> + return 0;
> +}
> +
> /* protected virtualization */
> static void pv_init(void)
> {
Either way,
Reviewed-by: Cornelia Huck <cohuck at redhat.com>