pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

qemu-nvmm: sync



Module Name:	pkgsrc-wip
Committed By:	Maxime Villard <max%m00nbsd.net@localhost>
Pushed By:	maxv
Date:		Thu Mar 21 21:31:04 2019 +0100
Changeset:	9543428d74a515e0458d3835a1b265ad6c56a8f5

Modified Files:
	qemu-nvmm/distinfo
	qemu-nvmm/patches/patch-nvmm-support

Log Message:
qemu-nvmm: sync

nvmm_gpa_map takes a protection now, remove TODO

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9543428d74a515e0458d3835a1b265ad6c56a8f5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 qemu-nvmm/distinfo                   |  2 +-
 qemu-nvmm/patches/patch-nvmm-support | 34 ++++++++++++++++++----------------
 2 files changed, 19 insertions(+), 17 deletions(-)

diffs:
diff --git a/qemu-nvmm/distinfo b/qemu-nvmm/distinfo
index d8c4a2658d..b88c65e73a 100644
--- a/qemu-nvmm/distinfo
+++ b/qemu-nvmm/distinfo
@@ -16,7 +16,7 @@ SHA1 (patch-hw_display_omap__dss.c) = 6b13242f28e32346bc70548c216c578d98fd3420
 SHA1 (patch-hw_net_etraxfs__eth.c) = e5dd1661d60dbcd27b332403e0843500ba9544bc
 SHA1 (patch-hw_net_xilinx__axienet.c) = ebcd2676d64ce6f31e4a8c976d4fdf530ad5e8b7
 SHA1 (patch-hw_usb_dev-mtp.c) = 66543b5559d92f8e2fa9a6eb85e5dfe7c1ad3339
-SHA1 (patch-nvmm-support) = bb76d347911a92e1d95b08d7bc5b7933dbfbe74f
+SHA1 (patch-nvmm-support) = ea237f5ef60b662cacb1e23c7e186e4b32e55049
 SHA1 (patch-target_arm_cpu.h) = 0f70a35900c7cc3124dc11969643e0eef6ad6af5
 SHA1 (patch-target_arm_helper.c) = 08f9425422080442a2c90bb252423bab38651ae4
 SHA1 (patch-tests_Makefile.include) = 42345d697cb2e324dccf1d68bd8d61e8001c6162
diff --git a/qemu-nvmm/patches/patch-nvmm-support b/qemu-nvmm/patches/patch-nvmm-support
index aae4a0555c..10455c645c 100644
--- a/qemu-nvmm/patches/patch-nvmm-support
+++ b/qemu-nvmm/patches/patch-nvmm-support
@@ -3,7 +3,7 @@ $NetBSD: patch-nvmm_support,v 1.1 2018/10/29 00:00:00 maxv Exp $
 Add NVMM support.
 
 --- accel/stubs/Makefile.objs	2018-12-11 18:44:34.000000000 +0100
-+++ accel/stubs/Makefile.objs	2019-02-04 09:58:31.612072806 +0100
++++ accel/stubs/Makefile.objs	2019-03-21 20:48:31.764998305 +0100
 @@ -1,5 +1,6 @@
  obj-$(call lnot,$(CONFIG_HAX))  += hax-stub.o
  obj-$(call lnot,$(CONFIG_HVF))  += hvf-stub.o
@@ -12,7 +12,7 @@ Add NVMM support.
  obj-$(call lnot,$(CONFIG_KVM))  += kvm-stub.o
  obj-$(call lnot,$(CONFIG_TCG))  += tcg-stub.o
 --- accel/stubs/nvmm-stub.c	1970-01-01 01:00:00.000000000 +0100
-+++ accel/stubs/nvmm-stub.c	2019-02-04 12:03:40.012081666 +0100
++++ accel/stubs/nvmm-stub.c	2019-03-21 20:48:31.773998305 +0100
 @@ -0,0 +1,43 @@
 +/*
 + * Copyright (c) 2018-2019 Maxime Villard, All rights reserved.
@@ -58,7 +58,7 @@ Add NVMM support.
 +{
 +}
 --- configure	2018-12-11 18:44:34.000000000 +0100
-+++ configure	2019-02-04 11:34:28.769555764 +0100
++++ configure	2019-03-21 20:48:31.773998305 +0100
 @@ -237,6 +237,17 @@
      return 1
  }
@@ -152,7 +152,7 @@ Add NVMM support.
    echo "TARGET_WORDS_BIGENDIAN=y" >> $config_target_mak
  fi
 --- cpus.c	2018-12-11 18:44:34.000000000 +0100
-+++ cpus.c	2019-02-04 10:03:02.152520882 +0100
++++ cpus.c	2019-03-21 20:48:31.774998305 +0100
 @@ -40,6 +40,7 @@
  #include "sysemu/hax.h"
  #include "sysemu/hvf.h"
@@ -240,7 +240,7 @@ Add NVMM support.
          qemu_dummy_start_vcpu(cpu);
      }
 --- include/sysemu/hw_accel.h	2018-12-11 18:44:34.000000000 +0100
-+++ include/sysemu/hw_accel.h	2019-02-04 10:04:09.887130860 +0100
++++ include/sysemu/hw_accel.h	2019-03-21 20:48:31.774998305 +0100
 @@ -15,6 +15,7 @@
  #include "sysemu/hax.h"
  #include "sysemu/kvm.h"
@@ -290,7 +290,7 @@ Add NVMM support.
  
  #endif /* QEMU_HW_ACCEL_H */
 --- include/sysemu/nvmm.h	1970-01-01 01:00:00.000000000 +0100
-+++ include/sysemu/nvmm.h	2019-02-04 12:06:14.967932051 +0100
++++ include/sysemu/nvmm.h	2019-03-21 20:48:31.774998305 +0100
 @@ -0,0 +1,35 @@
 +/*
 + * Copyright (c) 2018-2019 Maxime Villard, All rights reserved.
@@ -328,7 +328,7 @@ Add NVMM support.
 +
 +#endif /* CONFIG_NVMM */
 --- qemu-options.hx	2018-12-11 18:44:34.000000000 +0100
-+++ qemu-options.hx	2019-02-04 10:05:16.697759799 +0100
++++ qemu-options.hx	2019-03-21 20:48:31.774998305 +0100
 @@ -66,7 +66,7 @@
  @table @option
  @item accel=@var{accels1}[:@var{accels2}[:...]]
@@ -355,7 +355,7 @@ Add NVMM support.
  fails to initialize.
  @table @option
 --- target/i386/helper.c	2018-12-11 18:44:34.000000000 +0100
-+++ target/i386/helper.c	2019-02-04 10:05:47.993117568 +0100
++++ target/i386/helper.c	2019-03-21 20:48:31.775998305 +0100
 @@ -986,7 +986,7 @@
      X86CPU *cpu = x86_env_get_cpu(env);
      CPUState *cs = CPU(cpu);
@@ -366,7 +366,7 @@ Add NVMM support.
  
          cpu_interrupt(cs, CPU_INTERRUPT_TPR);
 --- target/i386/Makefile.objs	2018-12-11 18:44:34.000000000 +0100
-+++ target/i386/Makefile.objs	2019-02-04 10:06:13.786588242 +0100
++++ target/i386/Makefile.objs	2019-03-21 20:48:31.775998305 +0100
 @@ -17,6 +17,7 @@
  obj-$(CONFIG_HVF) += hvf/
  endif
@@ -376,8 +376,8 @@ Add NVMM support.
  obj-$(CONFIG_SEV) += sev.o
  obj-$(call lnot,$(CONFIG_SEV)) += sev-stub.o
 --- target/i386/nvmm-all.c	1970-01-01 01:00:00.000000000 +0100
-+++ target/i386/nvmm-all.c	2019-02-26 12:41:22.288405702 +0100
-@@ -0,0 +1,1174 @@
++++ target/i386/nvmm-all.c	2019-03-21 20:52:07.633997481 +0100
+@@ -0,0 +1,1176 @@
 +/*
 + * Copyright (c) 2018-2019 Maxime Villard, All rights reserved.
 + *
@@ -1319,12 +1319,14 @@ Add NVMM support.
 +    bool add, bool rom, const char *name)
 +{
 +    struct nvmm_machine *mach = get_nvmm_mach();
-+    int ret;
-+
-+    // TODO rom read-only?
++    int ret, prot;
 +
 +    if (add) {
-+        ret = nvmm_gpa_map(mach, hva, start_pa, size, 0);
++        prot = PROT_READ | PROT_EXEC;
++        if (!rom) {
++            prot |= PROT_WRITE;
++        }
++        ret = nvmm_gpa_map(mach, hva, start_pa, size, prot);
 +    } else {
 +        ret = nvmm_gpa_unmap(mach, hva, start_pa, size);
 +    }
@@ -1553,7 +1555,7 @@ Add NVMM support.
 +
 +type_init(nvmm_type_init);
 --- vl.c	2018-12-11 18:44:35.000000000 +0100
-+++ vl.c	2019-02-04 10:07:16.467301929 +0100
++++ vl.c	2019-03-21 20:48:31.776998305 +0100
 @@ -3653,7 +3653,8 @@
                                                       optarg, true);
                  optarg = qemu_opt_get(accel_opts, "accel");


Home | Main Index | Thread Index | Old Index